diff --git a/.gitignore b/.gitignore
index 261c51cb..c95dfeab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,8 @@
dist/**/*
docs/dist/**/*
docs/assets/css/*
+docs/assets/js/dist/*
+docs/assets/js/docs.*
js/dist/**/*
# Ignore docs files
diff --git a/Gruntfile.js b/Gruntfile.js
index 1841f693..89366158 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -114,6 +114,16 @@ module.exports = function (grunt) {
//'js/dist/popover.js' : 'js/src/popover.js'
}
},
+ docs: {
+ options: {
+ sourceMap: true,
+ modules: 'ignore'
+ },
+ files: {
+ 'docs/assets/js/dist/style.js': 'docs/assets/js/src/style.js',
+ 'docs/assets/js/dist/application.js': 'docs/assets/js/src/application.js'
+ }
+ },
dist: {
options: {
modules: 'ignore'
@@ -147,7 +157,7 @@ module.exports = function (grunt) {
options: {
configFile: 'js/.eslintrc'
},
- target: 'js/src/*.js'
+ target: ['js/src/*.js', 'docs/assets/js/src/*.js']
},
jscs: {
@@ -391,6 +401,11 @@ module.exports = function (grunt) {
tasks: ['babel:dev']
},
+ docsjs: {
+ files: ['docs/assets/js/src/*.js'],
+ tasks: ['docs-js']
+ },
+
// FIXME: restore this after getting fundamentals done, just trying to reduce churn while developing
//sass: {
// files: 'scss/**/*.scss',
@@ -555,7 +570,7 @@ module.exports = function (grunt) {
// Docs task.
grunt.registerTask('docs-css', ['sass:docs', 'postcss:docs', 'postcss:examples', 'csscomb:docs', 'csscomb:examples', 'cssmin:docs']);
- grunt.registerTask('docs-js', ['uglify:docsJs']);
+ grunt.registerTask('docs-js', ['babel:docs', 'uglify:docsJs']);
grunt.registerTask('lint-docs-js', ['jscs:assets']);
grunt.registerTask('docs', ['copy:bs-docs-components', 'copy:bs-docs-content', 'docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs']);
diff --git a/docs/_includes/footer.html b/docs/_includes/footer.html
index 044a70ec..9179f63f 100644
--- a/docs/_includes/footer.html
+++ b/docs/_includes/footer.html
@@ -63,7 +63,3 @@ Holder.addTheme('gray', {
fontweight: 'normal'
})
-
-
diff --git a/docs/assets/js/docs.min.js b/docs/assets/js/docs.min.js
deleted file mode 100644
index f49e3923..00000000
--- a/docs/assets/js/docs.min.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/*!
- * AnchorJS - v1.2.1 - 2015-07-02
- * https://github.com/bryanbraun/anchorjs
- * Copyright (c) 2015 Bryan Braun; Licensed MIT
- */
-function AnchorJS(a){"use strict";this.options=a||{},this._applyRemainingDefaultOptions=function(a){this.options.icon=this.options.hasOwnProperty("icon")?a.icon:"",this.options.visible=this.options.hasOwnProperty("visible")?a.visible:"hover",this.options.placement=this.options.hasOwnProperty("placement")?a.placement:"right",this.options["class"]=this.options.hasOwnProperty("class")?a["class"]:""},this._applyRemainingDefaultOptions(a),this.add=function(a){var b,c,d,e,f,g,h,i,j,k,l,m;if(this._applyRemainingDefaultOptions(this.options),a){if("string"!=typeof a)throw new Error("The selector provided to AnchorJS was invalid.")}else a="h1, h2, h3, h4, h5, h6";if(b=document.querySelectorAll(a),0===b.length)return!1;for(this._addBaselineStyles(),c=document.querySelectorAll("[id]"),d=[].map.call(c,function(a){return a.id}),f=0;f .anchorjs-link, .anchorjs-link:focus { opacity: 1; }",e=' @font-face { font-family: "anchorjs-icons"; font-style: normal; font-weight: normal; src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBTUAAAC8AAAAYGNtYXAWi9QdAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5Zgq29TcAAAF4AAABNGhlYWQEZM3pAAACrAAAADZoaGVhBhUDxgAAAuQAAAAkaG10eASAADEAAAMIAAAAFGxvY2EAKACuAAADHAAAAAxtYXhwAAgAVwAAAygAAAAgbmFtZQ5yJ3cAAANIAAAB2nBvc3QAAwAAAAAFJAAAACAAAwJAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpywPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6cv//f//AAAAAAAg6cv//f//AAH/4xY5AAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAACADEARAJTAsAAKwBUAAABIiYnJjQ/AT4BMzIWFxYUDwEGIicmND8BNjQnLgEjIgYPAQYUFxYUBw4BIwciJicmND8BNjIXFhQPAQYUFx4BMzI2PwE2NCcmNDc2MhcWFA8BDgEjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAEAAAABAACiToc1Xw889QALBAAAAAAA0XnFFgAAAADRecUWAAAAAAJTAsAAAAAIAAIAAAAAAAAAAQAAA8D/wAAABAAAAAAAAlMAAQAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAACAAAAAoAAMQAAAAAACgAUAB4AmgABAAAABQBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEADgAAAAEAAAAAAAIABwCfAAEAAAAAAAMADgBLAAEAAAAAAAQADgC0AAEAAAAAAAUACwAqAAEAAAAAAAYADgB1AAEAAAAAAAoAGgDeAAMAAQQJAAEAHAAOAAMAAQQJAAIADgCmAAMAAQQJAAMAHABZAAMAAQQJAAQAHADCAAMAAQQJAAUAFgA1AAMAAQQJAAYAHACDAAMAAQQJAAoANAD4YW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzVmVyc2lvbiAxLjAAVgBlAHIAcwBpAG8AbgAgADEALgAwYW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzYW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzUmVndWxhcgBSAGUAZwB1AGwAYQByYW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzRm9udCBnZW5lcmF0ZWQgYnkgSWNvTW9vbi4ARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format("truetype"); }',f=" [data-anchorjs-icon]::after { content: attr(data-anchorjs-icon); }";b.className="anchorjs",b.appendChild(document.createTextNode("")),a=document.head.querySelector('[rel="stylesheet"], style'),void 0===a?document.head.appendChild(b):document.head.insertBefore(b,a),b.sheet.insertRule(c,b.sheet.cssRules.length),b.sheet.insertRule(d,b.sheet.cssRules.length),b.sheet.insertRule(f,b.sheet.cssRules.length),b.sheet.insertRule(e,b.sheet.cssRules.length)}}}var anchors=new AnchorJS;/*!
- * clipboard.js v1.4.2
- * https://zenorocha.github.io/clipboard.js
- *
- * Licensed MIT � Zeno Rocha
- */
-!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Clipboard=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gd;d++)c[d].fn.apply(c[d].ctx,b);return this},off:function(a,b){var c=this.e||(this.e={}),d=c[a],e=[];if(d&&b)for(var f=0,g=d.length;g>f;f++)d[f].fn!==b&&e.push(d[f]);return e.length?c[a]=e:delete c[a],this}},b.exports=d},{}],6:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}c.__esModule=!0;var e=function(){function a(a,b){for(var c=0;c>>0;if("function"!=typeof a)throw TypeError();var d,e=arguments[1];for(d=0;c>d;d++)d in b&&a.call(e,b[d],d,b)}),function(a){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";a.atob=a.atob||function(a){a=String(a);var c,d=0,e=[],f=0,g=0;if(a=a.replace(/\s/g,""),a.length%4===0&&(a=a.replace(/=+$/,"")),a.length%4===1)throw Error("InvalidCharacterError");if(/[^+/0-9A-Za-z]/.test(a))throw Error("InvalidCharacterError");for(;d>16&255)),e.push(String.fromCharCode(f>>8&255)),e.push(String.fromCharCode(255&f)),g=0,f=0),d+=1;return 12===g?(f>>=4,e.push(String.fromCharCode(255&f))):18===g&&(f>>=2,e.push(String.fromCharCode(f>>8&255)),e.push(String.fromCharCode(255&f))),e.join("")},a.btoa=a.btoa||function(a){a=String(a);var c,d,e,f,g,h,i,j=0,k=[];if(/[^\x00-\xFF]/.test(a))throw Error("InvalidCharacterError");for(;j>2,g=(3&c)<<4|d>>4,h=(15&d)<<2|e>>6,i=63&e,j===a.length+2?(h=64,i=64):j===a.length+1&&(i=64),k.push(b.charAt(f),b.charAt(g),b.charAt(h),b.charAt(i));return k.join("")}}(a),Object.prototype.hasOwnProperty||(Object.prototype.hasOwnProperty=function(a){var b=this.__proto__||this.constructor.prototype;return a in this&&(!(a in b)||b[a]!==this[a])}),function(){if("performance"in a==0&&(a.performance={}),Date.now=Date.now||function(){return(new Date).getTime()},"now"in a.performance==0){var b=Date.now();performance.timing&&performance.timing.navigationStart&&(b=performance.timing.navigationStart),a.performance.now=function(){return Date.now()-b}}}(),a.requestAnimationFrame||(a.webkitRequestAnimationFrame?!function(a){a.requestAnimationFrame=function(b){return webkitRequestAnimationFrame(function(){b(a.performance.now())})},a.cancelAnimationFrame=webkitCancelAnimationFrame}(a):a.mozRequestAnimationFrame?!function(a){a.requestAnimationFrame=function(b){return mozRequestAnimationFrame(function(){b(a.performance.now())})},a.cancelAnimationFrame=mozCancelAnimationFrame}(a):!function(a){a.requestAnimationFrame=function(b){return a.setTimeout(b,1e3/60)},a.cancelAnimationFrame=a.clearTimeout}(a))}}(this),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):"object"==typeof exports?exports.Holder=b():a.Holder=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){a.exports=c(1)},function(a,b,c){(function(b){function d(a,b,c,d){var g=e(c.substr(c.lastIndexOf(a.domain)),a);g&&f({mode:null,el:d,flags:g,engineSettings:b})}function e(a,b){var c={theme:z(D.settings.themes.gray,null),stylesheets:b.stylesheets,instanceOptions:b},d=a.split("?"),e=d[0].split("/");c.holderURL=a;var f=e[1],g=f.match(/([\d]+p?)x([\d]+p?)/);if(!g)return!1;if(c.fluid=-1!==f.indexOf("p"),c.dimensions={width:g[1].replace("p","%"),height:g[2].replace("p","%")},2===d.length){var h=r.parse(d[1]);if(h.bg&&(c.theme.background=t.parseColor(h.bg)),h.fg&&(c.theme.foreground=t.parseColor(h.fg)),h.bg&&!h.fg&&(c.autoFg=!0),h.theme&&c.instanceOptions.themes.hasOwnProperty(h.theme)&&(c.theme=z(c.instanceOptions.themes[h.theme],null)),h.text&&(c.text=h.text),h.textmode&&(c.textmode=h.textmode),h.size&&(c.size=h.size),h.font&&(c.font=h.font),h.align&&(c.align=h.align),c.nowrap=t.truthy(h.nowrap),c.auto=t.truthy(h.auto),c.outline=t.truthy(h.outline),t.truthy(h.random)){D.vars.cache.themeKeys=D.vars.cache.themeKeys||Object.keys(c.instanceOptions.themes);var i=D.vars.cache.themeKeys[0|Math.random()*D.vars.cache.themeKeys.length];c.theme=z(c.instanceOptions.themes[i],null)}}return c}function f(a){var b=a.mode,c=a.el,d=a.flags,e=a.engineSettings,f=d.dimensions,h=d.theme,i=f.width+"x"+f.height;if(b=null==b?d.fluid?"fluid":"image":b,null!=d.text&&(h.text=d.text,"object"===c.nodeName.toLowerCase())){for(var l=h.text.split("\\n"),m=0;m1){var t,u=0,v=0,x=0;p=new e.Group("line"+x),("left"===a.align||"right"===a.align)&&(r=a.width*(1-2*(1-D.vars.lineWrapRatio)));for(var y=0;y=r||A===!0)&&(b(m,p,u,m.properties.leading),m.add(p),u=0,v+=m.properties.leading,x+=1,p=new e.Group("line"+x),p.y=v),A!==!0&&(o.moveTo(u,0),u+=n.spaceWidth+z.width,p.add(o))}if(b(m,p,u,m.properties.leading),m.add(p),"left"===a.align)m.moveTo(a.width-q,null,null);else if("right"===a.align){for(t in m.children)p=m.children[t],p.moveTo(a.width-p.width,null,null);m.moveTo(0-(a.width-q),null,null)}else{for(t in m.children)p=m.children[t],p.moveTo((m.width-p.width)/2,null,null);m.moveTo((a.width-m.width)/2,null,null)}m.moveTo(null,(a.height-m.height)/2,null),(a.height-m.height)/2<0&&m.moveTo(null,0,null)}else o=new e.Text(a.text),p=new e.Group("line0"),p.add(o),m.add(p),"left"===a.align?m.moveTo(a.width-q,null,null):"right"===a.align?m.moveTo(0-(a.width-q),null,null):m.moveTo((a.width-n.boundingBox.width)/2,null,null),m.moveTo(null,(a.height-n.boundingBox.height)/2,null);return d}function i(a,b,c,d){var e=parseInt(a,10),f=parseInt(b,10),g=Math.max(e,f),h=Math.min(e,f),i=.8*Math.min(h,g*d);return Math.round(Math.max(c,i))}function j(a){var b;b=null==a||null==a.nodeType?D.vars.resizableImages:[a];for(var c=0,d=b.length;d>c;c++){var e=b[c];if(e.holderData){var f=e.holderData.flags,h=A(e);if(h){if(!e.holderData.resizeUpdate)continue;if(f.fluid&&f.auto){var i=e.holderData.fluidConfig;switch(i.mode){case"width":h.height=h.width/i.ratio;break;case"height":h.width=h.height*i.ratio}}var j={mode:"image",holderSettings:{dimensions:h,theme:f.theme,flags:f},el:e,engineSettings:e.holderData.engineSettings};"exact"==f.textmode&&(f.exactDimensions=h,j.holderSettings.dimensions=f.dimensions),g(j)}else n(e)}}}function k(a){if(a.holderData){var b=A(a);if(b){var c=a.holderData.flags,d={fluidHeight:"%"==c.dimensions.height.slice(-1),fluidWidth:"%"==c.dimensions.width.slice(-1),mode:null,initialDimensions:b};d.fluidWidth&&!d.fluidHeight?(d.mode="width",d.ratio=d.initialDimensions.width/parseFloat(c.dimensions.height)):!d.fluidWidth&&d.fluidHeight&&(d.mode="height",d.ratio=parseFloat(c.dimensions.width)/d.initialDimensions.height),a.holderData.fluidConfig=d}else n(a)}}function l(){var a,c=[],d=Object.keys(D.vars.invisibleImages);d.forEach(function(b){a=D.vars.invisibleImages[b],A(a)&&"img"==a.nodeName.toLowerCase()&&(c.push(a),delete D.vars.invisibleImages[b])}),c.length&&C.run({images:c}),setTimeout(function(){b.requestAnimationFrame(l)},10)}function m(){D.vars.visibilityCheckStarted||(b.requestAnimationFrame(l),D.vars.visibilityCheckStarted=!0)}function n(a){a.holderData.invisibleId||(D.vars.invisibleId+=1,D.vars.invisibleImages["i"+D.vars.invisibleId]=a,a.holderData.invisibleId=D.vars.invisibleId)}function o(a){D.vars.debounceTimer||a.call(this),D.vars.debounceTimer&&b.clearTimeout(D.vars.debounceTimer),D.vars.debounceTimer=b.setTimeout(function(){D.vars.debounceTimer=null,a.call(this)},D.setup.debounce)}function p(){o(function(){j(null)})}var q=c(2),r=c(3),s=c(4),t=c(5),u=c(6),v=c(7),w=c(8),x=c(9),y=c(10),z=t.extend,A=t.dimensionCheck,B=x.svg_ns,C={version:x.version,addTheme:function(a,b){return null!=a&&null!=b&&(D.settings.themes[a]=b),delete D.vars.cache.themeKeys,this},addImage:function(a,b){var c=v.getNodeArray(b);return c.forEach(function(b){var c=v.newEl("img"),d={};d[D.setup.dataAttr]=a,v.setAttr(c,d),b.appendChild(c)}),this},setResizeUpdate:function(a,b){a.holderData&&(a.holderData.resizeUpdate=!!b,a.holderData.resizeUpdate&&j(a))},run:function(a){a=a||{};var c={},g=z(D.settings,a);D.vars.preempted=!0,D.vars.dataAttr=g.dataAttr||D.setup.dataAttr,D.vars.lineWrapRatio=g.lineWrapRatio||D.setup.lineWrapRatio,c.renderer=g.renderer?g.renderer:D.setup.renderer,-1===D.setup.renderers.join(",").indexOf(c.renderer)&&(c.renderer=D.setup.supportsSVG?"svg":D.setup.supportsCanvas?"canvas":"html");var h=v.getNodeArray(g.images),i=v.getNodeArray(g.bgnodes),j=v.getNodeArray(g.stylenodes),k=v.getNodeArray(g.objects);return c.stylesheets=[],c.svgXMLStylesheet=!0,c.noFontFallback=g.noFontFallback?g.noFontFallback:!1,j.forEach(function(a){if(a.attributes.rel&&a.attributes.href&&"stylesheet"==a.attributes.rel.value){var b=a.attributes.href.value,d=v.newEl("a");d.href=b;var e=d.protocol+"//"+d.host+d.pathname+d.search;c.stylesheets.push(e)}}),i.forEach(function(a){if(b.getComputedStyle){var d=b.getComputedStyle(a,null).getPropertyValue("background-image"),h=a.getAttribute("data-background-src"),i=h||d,j=null,k=g.domain+"/",l=i.indexOf(k);if(0===l)j=i;else if(1===l&&"?"===i[0])j=i.slice(1);else{var m=i.substr(l).match(/([^\"]*)"?\)/);if(null!==m)j=m[1];else if(0===i.indexOf("url("))throw"Holder: unable to parse background URL: "+i}if(null!=j){var n=e(j,g);n&&f({mode:"background",el:a,flags:n,engineSettings:c})}}}),k.forEach(function(a){var b={};try{b.data=a.getAttribute("data"),b.dataSrc=a.getAttribute(D.vars.dataAttr)}catch(e){}var f=null!=b.data&&0===b.data.indexOf(g.domain),h=null!=b.dataSrc&&0===b.dataSrc.indexOf(g.domain);f?d(g,c,b.data,a):h&&d(g,c,b.dataSrc,a)}),h.forEach(function(a){var b={};try{b.src=a.getAttribute("src"),b.dataSrc=a.getAttribute(D.vars.dataAttr),b.rendered=a.getAttribute("data-holder-rendered")}catch(e){}var f=null!=b.src,h=null!=b.dataSrc&&0===b.dataSrc.indexOf(g.domain),i=null!=b.rendered&&"true"==b.rendered;f?0===b.src.indexOf(g.domain)?d(g,c,b.src,a):h&&(i?d(g,c,b.dataSrc,a):!function(a,b,c,e,f){t.imageExists(a,function(a){a||d(b,c,e,f)})}(b.src,g,c,b.dataSrc,a)):h&&d(g,c,b.dataSrc,a)}),this}},D={settings:{domain:"holder.js",images:"img",objects:"object",bgnodes:"body .holderjs",stylenodes:"head link.holderjs",themes:{gray:{background:"#EEEEEE",foreground:"#AAAAAA"},social:{background:"#3a5a97",foreground:"#FFFFFF"},industrial:{background:"#434A52",foreground:"#C2F200"},sky:{background:"#0D8FDB",foreground:"#FFFFFF"},vine:{background:"#39DBAC",foreground:"#1E292C"},lava:{background:"#F8591A",foreground:"#1C2846"}}},defaults:{size:10,units:"pt",scale:1/16}},E=function(){var a=null,b=null,c=null;return function(d){var e=d.root;if(D.setup.supportsSVG){var f=!1,g=function(a){return document.createTextNode(a)};(null==a||a.parentNode!==document.body)&&(f=!0),a=u.initSVG(a,e.properties.width,e.properties.height),a.style.display="block",f&&(b=v.newEl("text",B),c=g(null),v.setAttr(b,{x:0}),b.appendChild(c),a.appendChild(b),document.body.appendChild(a),a.style.visibility="hidden",a.style.position="absolute",a.style.top="-100%",a.style.left="-100%");var h=e.children.holderTextGroup,i=h.properties;v.setAttr(b,{y:i.font.size,style:t.cssProps({"font-weight":i.font.weight,"font-size":i.font.size+i.font.units,"font-family":i.font.family})}),c.nodeValue=i.text;var j=b.getBBox(),k=Math.ceil(j.width/(e.properties.width*D.vars.lineWrapRatio)),l=i.text.split(" "),m=i.text.match(/\\n/g);k+=null==m?0:m.length,c.nodeValue=i.text.replace(/[ ]+/g,"");var n=b.getComputedTextLength(),o=j.width-n,p=Math.round(o/Math.max(1,l.length-1)),q=[];if(k>1){c.nodeValue="";for(var r=0;r=0?b:1)}function f(a){v?e(a):w.push(a)}null==document.readyState&&document.addEventListener&&(document.addEventListener("DOMContentLoaded",function y(){document.removeEventListener("DOMContentLoaded",y,!1),document.readyState="complete"},!1),document.readyState="loading");var g=a.document,h=g.documentElement,i="load",j=!1,k="on"+i,l="complete",m="readyState",n="attachEvent",o="detachEvent",p="addEventListener",q="DOMContentLoaded",r="onreadystatechange",s="removeEventListener",t=p in g,u=j,v=j,w=[];if(g[m]===l)e(b);else if(t)g[p](q,c,j),a[p](i,c,j);else{g[n](r,c),a[n](k,c);try{u=null==a.frameElement&&h}catch(x){}u&&u.doScroll&&!function z(){if(!v){try{u.doScroll("left")}catch(a){return e(z,50)}d(),b()}}()}return f.version="1.4.0",f.isReady=function(){return v},f}a.exports="undefined"!=typeof window&&d(window)},function(a,b,c){var d=encodeURIComponent,e=decodeURIComponent,f=c(11),g=c(12),h=/(\w+)\[(\d+)\]/,i=/\w+\.\w+/;b.parse=function(a){if("string"!=typeof a)return{};if(a=f(a),""===a)return{};"?"===a.charAt(0)&&(a=a.slice(1));for(var b={},c=a.split("&"),d=0;d=0;d--)c=a.charCodeAt(d),b.unshift(c>128?["",c,";"].join(""):a[d]);return b.join("")},b.imageExists=function(a,b){var c=new Image;c.onerror=function(){b.call(this,!1)},c.onload=function(){b.call(this,!0)},c.src=a},b.decodeHtmlEntity=function(a){return a.replace(/(\d+);/g,function(a,b){return String.fromCharCode(b)})},b.dimensionCheck=function(a){var b={height:a.clientHeight,width:a.clientWidth};return b.height&&b.width?b:!1},b.truthy=function(a){return"string"==typeof a?"true"===a||"yes"===a||"1"===a||"on"===a||"✓"===a:!!a},b.parseColor=function(a){var b,c=/(^(?:#?)[0-9a-f]{6}$)|(^(?:#?)[0-9a-f]{3}$)/i,d=/^rgb\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/,e=/^rgba\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0\.\d{1,}|1)\)$/,f=a.match(c);return null!==f?(b=f[1]||f[2],"#"!==b[0]?"#"+b:b):(f=a.match(d),null!==f?b="rgb("+f.slice(1).join(",")+")":(f=a.match(e),null!==f?b="rgba("+f.slice(1).join(",")+")":null))}},function(a,b,c){(function(a){var d=c(7),e="http://www.w3.org/2000/svg",f=8;b.initSVG=function(a,b,c){var g,h,i=!1;a&&a.querySelector?(h=a.querySelector("style"),null===h&&(i=!0)):(a=d.newEl("svg",e),i=!0),i&&(g=d.newEl("defs",e),h=d.newEl("style",e),d.setAttr(h,{type:"text/css"}),g.appendChild(h),a.appendChild(g)),a.webkitMatchesSelector&&a.setAttribute("xmlns",e);for(var j=0;j=0;i--){var j=h.createProcessingInstruction("xml-stylesheet",'href="'+g[i]+'" rel="stylesheet"');h.insertBefore(j,h.firstChild)}h.removeChild(h.documentElement),f=e.serializeToString(h)}var k=e.serializeToString(b);return k=k.replace(/\&(\#[0-9]{2,}\;)/g,"&$1"),f+k}}}).call(b,function(){return this}())},function(a,b,c){(function(a){b.newEl=function(b,c){return a.document?null==c?a.document.createElement(b):a.document.createElementNS(c,b):void 0},b.setAttr=function(a,b){for(var c in b)a.setAttribute(c,b[c])},b.createXML=function(){return a.DOMParser?(new DOMParser).parseFromString("","application/xml"):void 0},b.getNodeArray=function(b){var c=null;return"string"==typeof b?c=document.querySelectorAll(b):a.NodeList&&b instanceof a.NodeList?c=b:a.Node&&b instanceof a.Node?c=[b]:a.HTMLCollection&&b instanceof a.HTMLCollection?c=b:b instanceof Array?c=b:null===b&&(c=[]),c=Array.prototype.slice.call(c)}}).call(b,function(){return this}())},function(a,b,c){var d=function(a,b){"string"==typeof a&&(this.original=a,"#"===a.charAt(0)&&(a=a.slice(1)),/[^a-f0-9]+/i.test(a)||(3===a.length&&(a=a.replace(/./g,"$&$&")),6===a.length&&(this.alpha=1,b&&b.alpha&&(this.alpha=b.alpha),this.set(parseInt(a,16)))))};d.rgb2hex=function(a,b,c){function d(a){var b=(0|a).toString(16);return 16>a&&(b="0"+b),b}return[a,b,c].map(d).join("")},d.hsl2rgb=function(a,b,c){var d=a/60,e=(1-Math.abs(2*c-1))*b,f=e*(1-Math.abs(parseInt(d)%2-1)),g=c-e/2,h=0,i=0,j=0;return d>=0&&1>d?(h=e,i=f):d>=1&&2>d?(h=f,i=e):d>=2&&3>d?(i=e,j=f):d>=3&&4>d?(i=f,j=e):d>=4&&5>d?(h=f,j=e):d>=5&&6>d&&(h=e,j=f),h+=g,i+=g,j+=g,h=parseInt(255*h),i=parseInt(255*i),j=parseInt(255*j),[h,i,j]},d.prototype.set=function(a){this.raw=a;var b=(16711680&this.raw)>>16,c=(65280&this.raw)>>8,d=255&this.raw,e=.2126*b+.7152*c+.0722*d,f=-.09991*b-.33609*c+.436*d,g=.615*b-.55861*c-.05639*d;return this.rgb={r:b,g:c,b:d},this.yuv={y:e,u:f,v:g},this},d.prototype.lighten=function(a){var b=Math.min(1,Math.max(0,Math.abs(a)))*(0>a?-1:1),c=255*b|0,e=Math.min(255,Math.max(0,this.rgb.r+c)),f=Math.min(255,Math.max(0,this.rgb.g+c)),g=Math.min(255,Math.max(0,this.rgb.b+c)),h=d.rgb2hex(e,f,g);return new d(h)},d.prototype.toHex=function(a){return(a?"#":"")+this.raw.toString(16)},d.prototype.lighterThan=function(a){return a instanceof d||(a=new d(a)),this.yuv.y>a.yuv.y},d.prototype.blendAlpha=function(a){a instanceof d||(a=new d(a));var b=a,c=this,e=b.alpha*b.rgb.r+(1-b.alpha)*c.rgb.r,f=b.alpha*b.rgb.g+(1-b.alpha)*c.rgb.g,g=b.alpha*b.rgb.b+(1-b.alpha)*c.rgb.b;return new d(d.rgb2hex(e,f,g))},a.exports=d},function(a,b,c){a.exports={version:"2.8.2",svg_ns:"http://www.w3.org/2000/svg"}},function(a,b,c){(function(b){var d=c(6),e=c(7),f=c(5),g=c(9),h=g.svg_ns,i="\nCreated with Holder.js "+g.version+".\nLearn more at http://holderjs.com\n(c) 2012-2015 Ivan Malopinsky - http://imsky.co\n";a.exports=function(){if(b.XMLSerializer){var a=e.createXML(),c=d.initSVG(null,0,0),g=e.newEl("rect",h);return c.appendChild(g),function(b,j){var k=b.root;d.initSVG(c,k.properties.width,k.properties.height);for(var l=c.querySelectorAll("g"),m=0;m h1, .bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5")}();
\ No newline at end of file
diff --git a/docs/assets/js/src/application.js b/docs/assets/js/src/application.js
index c0a34976..315ca27c 100644
--- a/docs/assets/js/src/application.js
+++ b/docs/assets/js/src/application.js
@@ -1,83 +1,21 @@
-// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
-// IT'S ALL JUST JUNK FOR OUR DOCS!
-// ++++++++++++++++++++++++++++++++++++++++++
+import Style from './style'
-/*!
- * JavaScript for Bootstrap's docs (http://getbootstrap.com)
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under the Creative Commons Attribution 3.0 Unported License. For
- * details, see https://creativecommons.org/licenses/by/3.0/.
- */
+class Application {
-/* global Clipboard, anchors */
+ constructor() {
+ }
-!function ($) {
- 'use strict';
-
- $(function () {
-
- // Tooltip and popover demos
- $('.tooltip-demo').tooltip({
- selector: '[data-toggle="tooltip"]',
- container: 'body'
+ displayTypographyProperties() {
+ Style.displayFontSizeWeightColor('.bd-example-type td > *:not(.type-info)', ($element) => {
+ return $element.closest('tr').find('td.type-info')
})
+ }
+}
- $('[data-toggle="popover"]').popover()
+$(() => {
+ let app = new Application()
+ app.displayTypographyProperties()
- // Demos within modals
- $('.tooltip-test').tooltip()
- $('.popover-test').popover()
+ // $.bootstrapMaterialDesign()
- // Indeterminate checkbox example
- $('.bd-example-indeterminate [type="checkbox"]').prop('indeterminate', true)
-
- // Disable empty links in docs examples
- $('.bd-example [href=#]').click(function (e) {
- e.preventDefault()
- })
-
- // Insert copy to clipboard button before .highlight
- $('.highlight').each(function () {
- var btnHtml = 'Copy
'
- $(this).before(btnHtml)
- $('.btn-clipboard').tooltip()
- })
-
- var clipboard = new Clipboard('.btn-clipboard', {
- target: function (trigger) {
- return trigger.parentNode.nextElementSibling
- }
- })
-
- clipboard.on('success', function (e) {
- $(e.triggerStart)
- .attr('title', 'Copied!')
- .tooltip('_fixTitle')
- .tooltip('show')
- .attr('title', 'Copy to clipboard')
- .tooltip('_fixTitle')
-
- e.clearSelection()
- })
-
- clipboard.on('error', function (e) {
- var fallbackMsg = /Mac/i.test(navigator.userAgent) ? 'Press \u2318 to copy' : 'Press Ctrl-C to copy'
-
- $(e.triggerStart)
- .attr('title', fallbackMsg)
- .tooltip('_fixTitle')
- .tooltip('show')
- .attr('title', 'Copy to clipboard')
- .tooltip('_fixTitle')
- })
-
- })
-
-}(jQuery)
-
-;(function () {
- 'use strict';
-
- anchors.options.placement = 'left';
- anchors.add('.bd-content > h1, .bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5')
-})();
+})
diff --git a/docs/assets/js/src/old/old_application.js b/docs/assets/js/src/old/old_application.js
new file mode 100644
index 00000000..c0a34976
--- /dev/null
+++ b/docs/assets/js/src/old/old_application.js
@@ -0,0 +1,83 @@
+// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
+// IT'S ALL JUST JUNK FOR OUR DOCS!
+// ++++++++++++++++++++++++++++++++++++++++++
+
+/*!
+ * JavaScript for Bootstrap's docs (http://getbootstrap.com)
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under the Creative Commons Attribution 3.0 Unported License. For
+ * details, see https://creativecommons.org/licenses/by/3.0/.
+ */
+
+/* global Clipboard, anchors */
+
+!function ($) {
+ 'use strict';
+
+ $(function () {
+
+ // Tooltip and popover demos
+ $('.tooltip-demo').tooltip({
+ selector: '[data-toggle="tooltip"]',
+ container: 'body'
+ })
+
+ $('[data-toggle="popover"]').popover()
+
+ // Demos within modals
+ $('.tooltip-test').tooltip()
+ $('.popover-test').popover()
+
+ // Indeterminate checkbox example
+ $('.bd-example-indeterminate [type="checkbox"]').prop('indeterminate', true)
+
+ // Disable empty links in docs examples
+ $('.bd-example [href=#]').click(function (e) {
+ e.preventDefault()
+ })
+
+ // Insert copy to clipboard button before .highlight
+ $('.highlight').each(function () {
+ var btnHtml = 'Copy
'
+ $(this).before(btnHtml)
+ $('.btn-clipboard').tooltip()
+ })
+
+ var clipboard = new Clipboard('.btn-clipboard', {
+ target: function (trigger) {
+ return trigger.parentNode.nextElementSibling
+ }
+ })
+
+ clipboard.on('success', function (e) {
+ $(e.triggerStart)
+ .attr('title', 'Copied!')
+ .tooltip('_fixTitle')
+ .tooltip('show')
+ .attr('title', 'Copy to clipboard')
+ .tooltip('_fixTitle')
+
+ e.clearSelection()
+ })
+
+ clipboard.on('error', function (e) {
+ var fallbackMsg = /Mac/i.test(navigator.userAgent) ? 'Press \u2318 to copy' : 'Press Ctrl-C to copy'
+
+ $(e.triggerStart)
+ .attr('title', fallbackMsg)
+ .tooltip('_fixTitle')
+ .tooltip('show')
+ .attr('title', 'Copy to clipboard')
+ .tooltip('_fixTitle')
+ })
+
+ })
+
+}(jQuery)
+
+;(function () {
+ 'use strict';
+
+ anchors.options.placement = 'left';
+ anchors.add('.bd-content > h1, .bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5')
+})();
diff --git a/docs/assets/js/src/style.js b/docs/assets/js/src/style.js
new file mode 100644
index 00000000..40680a72
--- /dev/null
+++ b/docs/assets/js/src/style.js
@@ -0,0 +1,75 @@
+const Style = (($) => {
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+ // const Default = {
+ // template: ``
+ // }
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class Style {
+
+ constructor() {
+
+ }
+
+ static rgbToHex(rgba) {
+ rgba = rgba.match(/\d+/g)
+ let hex = `#${String(`0${Number(rgba[0]).toString(16)}`).slice(-2)}${String(`0${Number(rgba[1]).toString(16)}`).slice(-2)}${String(`0${Number(rgba[2]).toString(16)}`).slice(-2)}`
+ return hex
+ }
+
+ static displayFontSizeWeightColor(selector, targetFn, after = false, bg = false, wrapWithMark = false) {
+ return $(selector).each((index, element) => {
+ let $element = $(element)
+ let $target = targetFn($element)
+
+ let rgbaBgColor = $element.css('background-color')
+ // let hexBgColor = Style.rgbToHex(rgbaBgColor)
+
+ let rgbaColor = $element.css('color')
+ // let hexColor = Style.rgbToHex(rgbaColor)
+
+ let text = ''
+
+ if (wrapWithMark) {
+ text += ``
+ }
+ // text += `${$element.css('font-size')} ${$element.css('font-weight')} ${hexColor}`
+ text += `${$element.css('font-size')} ${$element.css('font-weight')} ${rgbaColor}`
+ if (bg) {
+ // text += ` bg: ${hexBgColor} `
+ text += ` bg: ${rgbaBgColor} `
+ }
+
+ if (wrapWithMark) {
+ text += ``
+ }
+
+ $target.text('')
+ $target.append($(text))
+ })
+ }
+
+
+ // ------------------------------------------------------------------------
+ // private
+
+
+ // ------------------------------------------------------------------------
+ // static
+ }
+
+
+ return Style
+
+})(jQuery)
+
+export default Style
diff --git a/docs/assets/js/vendor/tether.min.js b/docs/assets/js/vendor/tether.min.js
index 423313db..7dc9ceb3 100644
--- a/docs/assets/js/vendor/tether.min.js
+++ b/docs/assets/js/vendor/tether.min.js
@@ -1,2 +1,2 @@
/*! tether 1.1.0 */
-!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(t,e,o){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t){var e=getComputedStyle(t),o=e.position;if("fixed"===o)return t;for(var i=t;i=i.parentNode;){var n=void 0;try{n=getComputedStyle(i)}catch(r){}if("undefined"==typeof n||null===n)return i;var s=n.overflow,a=n.overflowX,f=n.overflowY;if(/(auto|scroll)/.test(s+f+a)&&("absolute"!==o||["relative","absolute","fixed"].indexOf(n.position)>=0))return i}return document.body}function r(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var o=e.documentElement,i={},n=t.getBoundingClientRect();for(var r in n)i[r]=n[r];var s=x(e);return i.top-=s.top,i.left-=s.left,"undefined"==typeof i.width&&(i.width=document.body.scrollWidth-i.left-i.right),"undefined"==typeof i.height&&(i.height=document.body.scrollHeight-i.top-i.bottom),i.top=i.top-o.clientTop,i.left=i.left-o.clientLeft,i.right=e.body.clientWidth-i.width-i.left,i.bottom=e.body.clientHeight-i.height-i.top,i}function s(t){return t.offsetParent||document.documentElement}function a(){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");f(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var o=t.offsetWidth;e.style.overflow="scroll";var i=t.offsetWidth;o===i&&(i=e.clientWidth),document.body.removeChild(e);var n=o-i;return{width:n,height:n}}function f(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var o in e)({}).hasOwnProperty.call(e,o)&&(t[o]=e[o])}),t}function h(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var o=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),i=u(t).replace(o," ");p(t,i)}}function l(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{h(t,e);var o=u(t)+(" "+e);p(t,o)}}function d(t,e){if("undefined"!=typeof t.classList)return t.classList.contains(e);var o=u(t);return new RegExp("(^| )"+e+"( |$)","gi").test(o)}function u(t){return t.className instanceof SVGAnimatedString?t.className.baseVal:t.className}function p(t,e){t.setAttribute("class",e)}function c(t,e,o){o.forEach(function(o){-1===e.indexOf(o)&&d(t,o)&&h(t,o)}),e.forEach(function(e){d(t,e)||l(t,e)})}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){var o=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+o>=e&&e>=t-o}function m(){return"undefined"!=typeof performance&&"undefined"!=typeof performance.now?performance.now():+new Date}function v(){for(var t={top:0,left:0},e=arguments.length,o=Array(e),i=0;e>i;i++)o[i]=arguments[i];return o.forEach(function(e){var o=e.top,i=e.left;"string"==typeof o&&(o=parseFloat(o,10)),"string"==typeof i&&(i=parseFloat(i,10)),t.top+=o,t.left+=i}),t}function y(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function b(t,e){return"scrollParent"===e?e=t.scrollParent:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),"undefined"!=typeof e.nodeType&&!function(){var t=r(e),o=t,i=getComputedStyle(e);e=[o.left,o.top,t.width+o.left,t.height+o.top],U.forEach(function(t,o){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[o]+=parseFloat(i["border"+t+"Width"]):e[o]-=parseFloat(i["border"+t+"Width"])})}(),e}var w=function(){function t(t,e){for(var o=0;o1?a-1:0),h=1;a>h;h++)f[h-1]=arguments[h];i.apply(s,f),r?this.bindings[t].splice(e,1):++e}}}]),t}();C.Utils={getScrollParent:n,getBounds:r,getOffsetParent:s,extend:f,addClass:l,removeClass:h,hasClass:d,updateClasses:c,defer:T,flush:S,uniqueId:O,Evented:W,getScrollBarSize:a};var M=function(){function t(t,e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),w=function(){function t(t,e){for(var o=0;o16?(e=Math.min(e-16,250),void(o=setTimeout(n,250))):void("undefined"!=typeof t&&m()-t<10||("undefined"!=typeof o&&(clearTimeout(o),o=null),t=m(),_(),e=m()-t))};["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,i)})}();var z={center:"center",left:"right",right:"left"},F={middle:"middle",top:"bottom",bottom:"top"},L={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},Y=function(t,e){var o=t.left,i=t.top;return"auto"===o&&(o=z[e.left]),"auto"===i&&(i=F[e.top]),{left:o,top:i}},H=function(t){var e=t.left,o=t.top;return"undefined"!=typeof L[t.left]&&(e=L[t.left]),"undefined"!=typeof L[t.top]&&(o=L[t.top]),{left:e,top:o}},X=function(t){var e=t.split(" "),o=M(e,2),i=o[0],n=o[1];return{top:i,left:n}},j=X,N=function(){function t(e){var o=this;i(this,t),this.position=this.position.bind(this),B.push(this),this.history=[],this.setOptions(e,!1),C.modules.forEach(function(t){"undefined"!=typeof t.initialize&&t.initialize.call(o)}),this.position()}return w(t,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return"undefined"!=typeof e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,o=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],i={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=f(i,t);var r=this.options,s=r.element,a=r.target,h=r.targetModifier;if(this.element=s,this.target=a,this.targetModifier=h,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if("undefined"==typeof e[t])throw new Error("Tether Error: Both element and target must be defined");"undefined"!=typeof e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),l(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&l(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=j(this.options.targetAttachment),this.attachment=j(this.options.attachment),this.offset=X(this.options.offset),this.targetOffset=X(this.options.targetOffset),"undefined"!=typeof this.scrollParent&&this.disable(),this.scrollParent="scroll-handle"===this.targetModifier?this.target:n(this.target),this.options.enabled!==!1&&this.enable(o)}},{key:"getTargetBounds",value:function(){if("undefined"==typeof this.targetModifier)return r(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=r(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.topo.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body,s=0;n&&(s=15);var a=t.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-s,e={width:15,height:.975*a*(a/o.scrollHeight),left:t.left+t.width-parseFloat(i.borderLeftWidth)-15},f=0;408>a&&this.target===document.body&&(f=-11e-5*Math.pow(a,2)-.00727*a+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var h=this.target.scrollTop/(o.scrollHeight-a);return e.top=h*(a-e.height-f)+t.top+parseFloat(i.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return"undefined"==typeof this._cache&&(this._cache={}),"undefined"==typeof this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];this.options.addTargetClasses!==!1&&l(this.target,this.getClass("enabled")),l(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParent!==document&&this.scrollParent.addEventListener("scroll",this.position),t&&this.position()}},{key:"disable",value:function(){h(this.target,this.getClass("enabled")),h(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeof this.scrollParent&&this.scrollParent.removeEventListener("scroll",this.position)}},{key:"destroy",value:function(){var t=this;this.disable(),B.forEach(function(e,o){return e===t?void B.splice(o,1):void 0})}},{key:"updateAttachClasses",value:function(t,e){var o=this;t=t||this.attachment,e=e||this.targetAttachment;var i=["left","top","bottom","right","middle","center"];"undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var n=this._addAttachClasses;t.top&&n.push(this.getClass("element-attached")+"-"+t.top),t.left&&n.push(this.getClass("element-attached")+"-"+t.left),e.top&&n.push(this.getClass("target-attached")+"-"+e.top),e.left&&n.push(this.getClass("target-attached")+"-"+e.left);var r=[];i.forEach(function(t){r.push(o.getClass("element-attached")+"-"+t),r.push(o.getClass("target-attached")+"-"+t)}),T(function(){"undefined"!=typeof o._addAttachClasses&&(c(o.element,o._addAttachClasses,r),o.options.addTargetClasses!==!1&&c(o.target,o._addAttachClasses,r),delete o._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];if(this.enabled){this.clearCache();var o=Y(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,o);var i=this.cache("element-bounds",function(){return r(t.element)}),n=i.width,f=i.height;if(0===n&&0===f&&"undefined"!=typeof this.lastSize){var h=this.lastSize;n=h.width,f=h.height}else this.lastSize={width:n,height:f};var l=this.cache("target-bounds",function(){return t.getTargetBounds()}),d=l,u=y(H(this.attachment),{width:n,height:f}),p=y(H(o),d),c=y(this.offset,{width:n,height:f}),g=y(this.targetOffset,d);u=v(u,c),p=v(p,g);for(var m=l.left+p.left-u.left,b=l.top+p.top-u.top,w=0;wwindow.innerWidth&&(A=this.cache("scrollbar-size",a),x.viewport.bottom-=A.height),document.body.scrollHeight>window.innerHeight&&(A=this.cache("scrollbar-size",a),x.viewport.right-=A.width),(-1===["","static"].indexOf(document.body.style.position)||-1===["","static"].indexOf(document.body.parentElement.style.position))&&(x.page.bottom=document.body.scrollHeight-b-f,x.page.right=document.body.scrollWidth-m-n),"undefined"!=typeof this.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeof this.targetModifier&&!function(){var e=t.cache("target-offsetparent",function(){return s(t.target)}),o=t.cache("target-offsetparent-bounds",function(){return r(e)}),i=getComputedStyle(e),n=o,a={};if(["Top","Left","Bottom","Right"].forEach(function(t){a[t.toLowerCase()]=parseFloat(i["border"+t+"Width"])}),o.right=document.body.scrollWidth-o.left-n.width+a.right,o.bottom=document.body.scrollHeight-o.top-n.height+a.bottom,x.page.top>=o.top+a.top&&x.page.bottom>=o.bottom&&x.page.left>=o.left+a.left&&x.page.right>=o.right){var f=e.scrollTop,h=e.scrollLeft;x.offset={top:x.page.top-o.top+f-a.top,left:x.page.left-o.left+h-a.left}}}(),this.move(x),this.history.unshift(x),this.history.length>3&&this.history.pop(),e&&S(),!0}}},{key:"move",value:function(t){var e=this;if("undefined"!=typeof this.element.parentNode){var o={};for(var i in t){o[i]={};for(var n in t[i]){for(var r=!1,a=0;a=0&&(b=parseFloat(b),y=parseFloat(y)),b!==y&&(v=!0,m[n]=y)}v&&T(function(){f(e.element.style,m)})}}}]),t}();N.modules=[],C.position=_;var R=f(N,C),M=function(){function t(t,e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),P=C.Utils,r=P.getBounds,f=P.extend,c=P.updateClasses,T=P.defer,U=["left","top","right","bottom"];C.modules.push({position:function(t){var e=this,o=t.top,i=t.left,n=t.targetAttachment;if(!this.options.constraints)return!0;var s=this.cache("element-bounds",function(){return r(e.element)}),a=s.height,h=s.width;if(0===h&&0===a&&"undefined"!=typeof this.lastSize){var l=this.lastSize;h=l.width,a=l.height}var d=this.cache("target-bounds",function(){return e.getTargetBounds()}),u=d.height,p=d.width,g=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,o=t.pinnedClass;e&&g.push(e),o&&g.push(o)}),g.forEach(function(t){["left","top","right","bottom"].forEach(function(e){g.push(t+"-"+e)})});var m=[],v=f({},n),y=f({},this.attachment);return this.options.constraints.forEach(function(t){var r=t.to,s=t.attachment,f=t.pin;"undefined"==typeof s&&(s="");var l=void 0,d=void 0;if(s.indexOf(" ")>=0){var c=s.split(" "),g=M(c,2);d=g[0],l=g[1]}else l=d=s;var w=b(e,r);("target"===d||"both"===d)&&(ow[3]&&"bottom"===v.top&&(o-=u,v.top="top")),"together"===d&&(ow[3]&&"bottom"===v.top&&("top"===y.top?(o-=u,v.top="top",o-=a,y.top="bottom"):"bottom"===y.top&&(o-=u,v.top="top",o+=a,y.top="top")),"middle"===v.top&&(o+a>w[3]&&"top"===y.top?(o-=a,y.top="bottom"):ow[2]&&"right"===v.left&&(i-=p,v.left="left")),"together"===l&&(iw[2]&&"right"===v.left?"left"===y.left?(i-=p,v.left="left",i-=h,y.left="right"):"right"===y.left&&(i-=p,v.left="left",i+=h,y.left="left"):"center"===v.left&&(i+h>w[2]&&"left"===y.left?(i-=h,y.left="right"):iw[3]&&"top"===y.top&&(o-=a,y.top="bottom")),("element"===l||"both"===l)&&(iw[2]&&"left"===y.left&&(i-=h,y.left="right")),"string"==typeof f?f=f.split(",").map(function(t){return t.trim()}):f===!0&&(f=["top","left","right","bottom"]),f=f||[];var C=[],O=[];o=0?(o=w[1],C.push("top")):O.push("top")),o+a>w[3]&&(f.indexOf("bottom")>=0?(o=w[3]-a,C.push("bottom")):O.push("bottom")),i=0?(i=w[0],C.push("left")):O.push("left")),i+h>w[2]&&(f.indexOf("right")>=0?(i=w[2]-h,C.push("right")):O.push("right")),C.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),C.forEach(function(e){m.push(t+"-"+e)})}(),O.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),O.forEach(function(e){m.push(t+"-"+e)})}(),(C.indexOf("left")>=0||C.indexOf("right")>=0)&&(y.left=v.left=!1),(C.indexOf("top")>=0||C.indexOf("bottom")>=0)&&(y.top=v.top=!1),(v.top!==n.top||v.left!==n.left||y.top!==e.attachment.top||y.left!==e.attachment.left)&&e.updateAttachClasses(y,v)}),T(function(){e.options.addTargetClasses!==!1&&c(e.target,m,g),c(e.element,m,g)}),{top:o,left:i}}});var P=C.Utils,r=P.getBounds,c=P.updateClasses,T=P.defer;C.modules.push({position:function(t){var e=this,o=t.top,i=t.left,n=this.cache("element-bounds",function(){return r(e.element)}),s=n.height,a=n.width,f=this.getTargetBounds(),h=o+s,l=i+a,d=[];o<=f.bottom&&h>=f.top&&["left","right"].forEach(function(t){var e=f[t];(e===i||e===l)&&d.push(t)}),i<=f.right&&l>=f.left&&["top","bottom"].forEach(function(t){var e=f[t];(e===o||e===h)&&d.push(t)});var u=[],p=[],g=["left","top","right","bottom"];return u.push(this.getClass("abutted")),g.forEach(function(t){u.push(e.getClass("abutted")+"-"+t)}),d.length&&p.push(this.getClass("abutted")),d.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),T(function(){e.options.addTargetClasses!==!1&&c(e.target,p,u),c(e.element,p,u)}),!0}});var M=function(){function t(t,e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return C.modules.push({position:function(t){var e=t.top,o=t.left;if(this.options.shift){var i=this.options.shift;"function"==typeof this.options.shift&&(i=this.options.shift.call(this,{top:e,left:o}));var n=void 0,r=void 0;if("string"==typeof i){i=i.split(" "),i[1]=i[1]||i[0];var s=M(i,2);n=s[0],r=s[1],n=parseFloat(n,10),r=parseFloat(r,10)}else n=i.top,r=i.left;return e+=n,o+=r,{top:e,left:o}}}}),R});
+!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(t,e,o){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t){var e=getComputedStyle(t),o=e.position;if("fixed"===o)return t;for(var i=t;i=i.parentNode;){var n=void 0;try{n=getComputedStyle(i)}catch(r){}if("undefined"==typeof n||null===n)return i;var s=n.overflow,a=n.overflowX,f=n.overflowY;if(/(auto|scroll)/.test(s+f+a)&&("absolute"!==o||["relative","absolute","fixed"].indexOf(n.position)>=0))return i}return document.body}function r(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var o=e.documentElement,i={},n=t.getBoundingClientRect();for(var r in n)i[r]=n[r];var s=x(e);return i.top-=s.top,i.left-=s.left,"undefined"==typeof i.width&&(i.width=document.body.scrollWidth-i.left-i.right),"undefined"==typeof i.height&&(i.height=document.body.scrollHeight-i.top-i.bottom),i.top=i.top-o.clientTop,i.left=i.left-o.clientLeft,i.right=e.body.clientWidth-i.width-i.left,i.bottom=e.body.clientHeight-i.height-i.top,i}function s(t){return t.offsetParent||document.documentElement}function a(){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");f(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var o=t.offsetWidth;e.style.overflow="scroll";var i=t.offsetWidth;o===i&&(i=e.clientWidth),document.body.removeChild(e);var n=o-i;return{width:n,height:n}}function f(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var o in e)({}).hasOwnProperty.call(e,o)&&(t[o]=e[o])}),t}function h(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var o=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),i=u(t).replace(o," ");p(t,i)}}function l(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{h(t,e);var o=u(t)+(" "+e);p(t,o)}}function d(t,e){if("undefined"!=typeof t.classList)return t.classList.contains(e);var o=u(t);return new RegExp("(^| )"+e+"( |$)","gi").test(o)}function u(t){return t.className instanceof SVGAnimatedString?t.className.baseVal:t.className}function p(t,e){t.setAttribute("class",e)}function c(t,e,o){o.forEach(function(o){-1===e.indexOf(o)&&d(t,o)&&h(t,o)}),e.forEach(function(e){d(t,e)||l(t,e)})}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){var o=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+o>=e&&e>=t-o}function m(){return"undefined"!=typeof performance&&"undefined"!=typeof performance.now?performance.now():+new Date}function v(){for(var t={top:0,left:0},e=arguments.length,o=Array(e),i=0;e>i;i++)o[i]=arguments[i];return o.forEach(function(e){var o=e.top,i=e.left;"string"==typeof o&&(o=parseFloat(o,10)),"string"==typeof i&&(i=parseFloat(i,10)),t.top+=o,t.left+=i}),t}function y(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function b(t,e){return"scrollParent"===e?e=t.scrollParent:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),"undefined"!=typeof e.nodeType&&!function(){var t=r(e),o=t,i=getComputedStyle(e);e=[o.left,o.top,t.width+o.left,t.height+o.top],U.forEach(function(t,o){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[o]+=parseFloat(i["border"+t+"Width"]):e[o]-=parseFloat(i["border"+t+"Width"])})}(),e}var w=function(){function t(t,e){for(var o=0;o1?a-1:0),h=1;a>h;h++)f[h-1]=arguments[h];i.apply(s,f),r?this.bindings[t].splice(e,1):++e}}}]),t}();C.Utils={getScrollParent:n,getBounds:r,getOffsetParent:s,extend:f,addClass:l,removeClass:h,hasClass:d,updateClasses:c,defer:T,flush:S,uniqueId:O,Evented:W,getScrollBarSize:a};var M=function(){function t(t,e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),w=function(){function t(t,e){for(var o=0;o16?(e=Math.min(e-16,250),void(o=setTimeout(n,250))):void("undefined"!=typeof t&&m()-t<10||("undefined"!=typeof o&&(clearTimeout(o),o=null),t=m(),_(),e=m()-t))};["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,i)})}();var z={center:"center",left:"right",right:"left"},F={middle:"middle",top:"bottom",bottom:"top"},L={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},Y=function(t,e){var o=t.left,i=t.top;return"auto"===o&&(o=z[e.left]),"auto"===i&&(i=F[e.top]),{left:o,top:i}},H=function(t){var e=t.left,o=t.top;return"undefined"!=typeof L[t.left]&&(e=L[t.left]),"undefined"!=typeof L[t.top]&&(o=L[t.top]),{left:e,top:o}},X=function(t){var e=t.split(" "),o=M(e,2),i=o[0],n=o[1];return{top:i,left:n}},j=X,N=function(){function t(e){var o=this;i(this,t),this.position=this.position.bind(this),B.push(this),this.history=[],this.setOptions(e,!1),C.modules.forEach(function(t){"undefined"!=typeof t.initialize&&t.initialize.call(o)}),this.position()}return w(t,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return"undefined"!=typeof e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,o=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],i={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=f(i,t);var r=this.options,s=r.$element,a=r.target,h=r.targetModifier;if(this.$element=s,this.target=a,this.targetModifier=h,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if("undefined"==typeof e[t])throw new Error("Tether Error: Both element and target must be defined");"undefined"!=typeof e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),l(this.$element,this.getClass("element")),this.options.addTargetClasses!==!1&&l(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=j(this.options.targetAttachment),this.attachment=j(this.options.attachment),this.offset=X(this.options.offset),this.targetOffset=X(this.options.targetOffset),"undefined"!=typeof this.scrollParent&&this.disable(),this.scrollParent="scroll-handle"===this.targetModifier?this.target:n(this.target),this.options.enabled!==!1&&this.enable(o)}},{key:"getTargetBounds",value:function(){if("undefined"==typeof this.targetModifier)return r(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=r(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.topo.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body,s=0;n&&(s=15);var a=t.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-s,e={width:15,height:.975*a*(a/o.scrollHeight),left:t.left+t.width-parseFloat(i.borderLeftWidth)-15},f=0;408>a&&this.target===document.body&&(f=-11e-5*Math.pow(a,2)-.00727*a+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var h=this.target.scrollTop/(o.scrollHeight-a);return e.top=h*(a-e.height-f)+t.top+parseFloat(i.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t, e){return"undefined"==typeof this._cache&&(this._cache={}),"undefined"==typeof this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];this.options.addTargetClasses!==!1&&l(this.target,this.getClass("enabled")),l(this.$element,this.getClass("enabled")),this.enabled=!0,this.scrollParent!==document&&this.scrollParent.addEventListener("scroll",this.position),t&&this.position()}},{key:"disable",value:function(){h(this.target,this.getClass("enabled")),h(this.$element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeof this.scrollParent&&this.scrollParent.removeEventListener("scroll",this.position)}},{key:"destroy",value:function(){var t=this;this.disable(),B.forEach(function(e, o){return e===t?void B.splice(o,1):void 0})}},{key:"updateAttachClasses",value:function(t, e){var o=this;t=t||this.attachment,e=e||this.targetAttachment;var i=["left","top","bottom","right","middle","center"];"undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var n=this._addAttachClasses;t.top&&n.push(this.getClass("element-attached")+"-"+t.top),t.left&&n.push(this.getClass("element-attached")+"-"+t.left),e.top&&n.push(this.getClass("target-attached")+"-"+e.top),e.left&&n.push(this.getClass("target-attached")+"-"+e.left);var r=[];i.forEach(function(t){r.push(o.getClass("element-attached")+"-"+t),r.push(o.getClass("target-attached")+"-"+t)}),T(function(){"undefined"!=typeof o._addAttachClasses&&(c(o.$element,o._addAttachClasses,r),o.options.addTargetClasses!==!1&&c(o.target,o._addAttachClasses,r),delete o._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];if(this.enabled){this.clearCache();var o=Y(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,o);var i=this.cache("element-bounds",function(){return r(t.$element)}),n=i.width,f=i.height;if(0===n&&0===f&&"undefined"!=typeof this.lastSize){var h=this.lastSize;n=h.width,f=h.height}else this.lastSize={width:n,height:f};var l=this.cache("target-bounds",function(){return t.getTargetBounds()}),d=l,u=y(H(this.attachment),{width:n,height:f}),p=y(H(o),d),c=y(this.offset,{width:n,height:f}),g=y(this.targetOffset,d);u=v(u,c),p=v(p,g);for(var m=l.left+p.left-u.left,b=l.top+p.top-u.top,w=0; wwindow.innerWidth&&(A=this.cache("scrollbar-size",a),x.viewport.bottom-=A.height),document.body.scrollHeight>window.innerHeight&&(A=this.cache("scrollbar-size",a),x.viewport.right-=A.width),(-1===["","static"].indexOf(document.body.style.position)||-1===["","static"].indexOf(document.body.parentElement.style.position))&&(x.page.bottom=document.body.scrollHeight-b-f,x.page.right=document.body.scrollWidth-m-n),"undefined"!=typeof this.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeof this.targetModifier&&!function(){var e=t.cache("target-offsetparent",function(){return s(t.target)}),o=t.cache("target-offsetparent-bounds",function(){return r(e)}),i=getComputedStyle(e),n=o,a={};if(["Top","Left","Bottom","Right"].forEach(function(t){a[t.toLowerCase()]=parseFloat(i["border"+t+"Width"])}),o.right=document.body.scrollWidth-o.left-n.width+a.right,o.bottom=document.body.scrollHeight-o.top-n.height+a.bottom,x.page.top>=o.top+a.top&&x.page.bottom>=o.bottom&&x.page.left>=o.left+a.left&&x.page.right>=o.right){var f=e.scrollTop,h=e.scrollLeft;x.offset={top:x.page.top-o.top+f-a.top,left:x.page.left-o.left+h-a.left}}}(),this.move(x),this.history.unshift(x),this.history.length>3&&this.history.pop(),e&&S(),!0}}},{key:"move",value:function(t){var e=this;if("undefined"!=typeof this.$element.parentNode){var o={};for(var i in t){o[i]={};for(var n in t[i]){for(var r=!1,a=0; a=0&&(b=parseFloat(b),y=parseFloat(y)),b!==y&&(v=!0,m[n]=y)}v&&T(function(){f(e.$element.style,m)})}}}]),t}();N.modules=[],C.position=_;var R=f(N,C),M=function(){function t(t, e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator](); !(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e); i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e, o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),P=C.Utils,r=P.getBounds,f=P.extend,c=P.updateClasses,T=P.defer,U=["left","top","right","bottom"];C.modules.push({position:function(t){var e=this,o=t.top,i=t.left,n=t.targetAttachment;if(!this.options.constraints)return!0;var s=this.cache("element-bounds",function(){return r(e.$element)}),a=s.height,h=s.width;if(0===h&&0===a&&"undefined"!=typeof this.lastSize){var l=this.lastSize;h=l.width,a=l.height}var d=this.cache("target-bounds",function(){return e.getTargetBounds()}),u=d.height,p=d.width,g=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,o=t.pinnedClass;e&&g.push(e),o&&g.push(o)}),g.forEach(function(t){["left","top","right","bottom"].forEach(function(e){g.push(t+"-"+e)})});var m=[],v=f({},n),y=f({},this.attachment);return this.options.constraints.forEach(function(t){var r=t.to,s=t.attachment,f=t.pin;"undefined"==typeof s&&(s="");var l=void 0,d=void 0;if(s.indexOf(" ")>=0){var c=s.split(" "),g=M(c,2);d=g[0],l=g[1]}else l=d=s;var w=b(e,r);("target"===d||"both"===d)&&(ow[3]&&"bottom"===v.top&&(o-=u,v.top="top")),"together"===d&&(ow[3]&&"bottom"===v.top&&("top"===y.top?(o-=u,v.top="top",o-=a,y.top="bottom"):"bottom"===y.top&&(o-=u,v.top="top",o+=a,y.top="top")),"middle"===v.top&&(o+a>w[3]&&"top"===y.top?(o-=a,y.top="bottom"):ow[2]&&"right"===v.left&&(i-=p,v.left="left")),"together"===l&&(iw[2]&&"right"===v.left?"left"===y.left?(i-=p,v.left="left",i-=h,y.left="right"):"right"===y.left&&(i-=p,v.left="left",i+=h,y.left="left"):"center"===v.left&&(i+h>w[2]&&"left"===y.left?(i-=h,y.left="right"):iw[3]&&"top"===y.top&&(o-=a,y.top="bottom")),("element"===l||"both"===l)&&(iw[2]&&"left"===y.left&&(i-=h,y.left="right")),"string"==typeof f?f=f.split(",").map(function(t){return t.trim()}):f===!0&&(f=["top","left","right","bottom"]),f=f||[];var C=[],O=[];o=0?(o=w[1],C.push("top")):O.push("top")),o+a>w[3]&&(f.indexOf("bottom")>=0?(o=w[3]-a,C.push("bottom")):O.push("bottom")),i=0?(i=w[0],C.push("left")):O.push("left")),i+h>w[2]&&(f.indexOf("right")>=0?(i=w[2]-h,C.push("right")):O.push("right")),C.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),C.forEach(function(e){m.push(t+"-"+e)})}(),O.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),O.forEach(function(e){m.push(t+"-"+e)})}(),(C.indexOf("left")>=0||C.indexOf("right")>=0)&&(y.left=v.left=!1),(C.indexOf("top")>=0||C.indexOf("bottom")>=0)&&(y.top=v.top=!1),(v.top!==n.top||v.left!==n.left||y.top!==e.attachment.top||y.left!==e.attachment.left)&&e.updateAttachClasses(y,v)}),T(function(){e.options.addTargetClasses!==!1&&c(e.target,m,g),c(e.$element,m,g)}),{top:o,left:i}}});var P=C.Utils,r=P.getBounds,c=P.updateClasses,T=P.defer;C.modules.push({position:function(t){var e=this,o=t.top,i=t.left,n=this.cache("element-bounds",function(){return r(e.$element)}),s=n.height,a=n.width,f=this.getTargetBounds(),h=o+s,l=i+a,d=[];o<=f.bottom&&h>=f.top&&["left","right"].forEach(function(t){var e=f[t];(e===i||e===l)&&d.push(t)}),i<=f.right&&l>=f.left&&["top","bottom"].forEach(function(t){var e=f[t];(e===o||e===h)&&d.push(t)});var u=[],p=[],g=["left","top","right","bottom"];return u.push(this.getClass("abutted")),g.forEach(function(t){u.push(e.getClass("abutted")+"-"+t)}),d.length&&p.push(this.getClass("abutted")),d.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),T(function(){e.options.addTargetClasses!==!1&&c(e.target,p,u),c(e.$element,p,u)}),!0}});var M=function(){function t(t, e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator](); !(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e); i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e, o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return C.modules.push({position:function(t){var e=t.top,o=t.left;if(this.options.shift){var i=this.options.shift;"function"==typeof this.options.shift&&(i=this.options.shift.call(this,{top:e,left:o}));var n=void 0,r=void 0;if("string"==typeof i){i=i.split(" "),i[1]=i[1]||i[0];var s=M(i,2);n=s[0],r=s[1],n=parseFloat(n,10),r=parseFloat(r,10)}else n=i.top,r=i.left;return e+=n,o+=r,{top:e,left:o}}}}),R});
diff --git a/grunt/configBridge.json b/grunt/configBridge.json
index 2bda8339..27ba1816 100644
--- a/grunt/configBridge.json
+++ b/grunt/configBridge.json
@@ -4,7 +4,8 @@
"../assets/js/vendor/anchor.min.js",
"../assets/js/vendor/clipboard.min.js",
"../assets/js/vendor/holder.min.js",
- "../assets/js/src/application.js"
+ "../assets/js/dist/style.js",
+ "../assets/js/dist/application.js"
]
}
}
diff --git a/js/src/autofill.js b/js/src/autofill.js
index 7bf8465d..75907298 100644
--- a/js/src/autofill.js
+++ b/js/src/autofill.js
@@ -20,8 +20,8 @@ const Autofill = (($) => {
*/
class Autofill {
- constructor(element, config) {
- this.element = element
+ constructor($element, config) {
+ this.$element = $element
this.config = $.extend({}, Default, config)
this._watchLoading()
@@ -29,8 +29,8 @@ const Autofill = (($) => {
}
dispose() {
- $.removeData(this.element, DATA_KEY)
- this.element = null
+ $.removeData(this.$element, DATA_KEY)
+ this.$element = null
this.config = null
}
@@ -48,7 +48,7 @@ const Autofill = (($) => {
_onLoading() {
setInterval(() => {
$('input[type!=checkbox]').each((index, element) => {
- let $element = $(element)
+ let $element = $($element)
if ($element.val() && $element.val() !== $element.attr('value')) {
$element.triggerStart('change')
}
@@ -65,7 +65,7 @@ const Autofill = (($) => {
let $inputs = $(event.currentTarget).closest('form').find('input').not('[type=file]')
focused = setInterval(() => {
$inputs.each((index, element) => {
- let $element = $(element)
+ let $element = $($element)
if ($element.val() !== $element.attr('value')) {
$element.triggerStart('change')
}
diff --git a/js/src/bootstrapMaterialDesign.js b/js/src/bootstrapMaterialDesign.js
index 6ac8741b..199380a6 100644
--- a/js/src/bootstrapMaterialDesign.js
+++ b/js/src/bootstrapMaterialDesign.js
@@ -84,8 +84,8 @@ const BootstrapMaterialDesign = (($) => {
*/
class BootstrapMaterialDesign {
- constructor(element, config) {
- this.element = element
+ constructor($element, config) {
+ this.$element = $element
this.config = $.extend({}, Default, config)
let $document = $(document)
@@ -106,7 +106,7 @@ const BootstrapMaterialDesign = (($) => {
// add to arrive if present and enabled
if (document.arrive && this.config.arrive) {
$document.arrive(selector, (element) => { // eslint-disable-line no-loop-func
- $(element)[component](componentConfig)
+ $($element)[component](componentConfig)
})
}
}
@@ -114,8 +114,8 @@ const BootstrapMaterialDesign = (($) => {
}
dispose() {
- $.removeData(this.element, DATA_KEY)
- this.element = null
+ $.removeData(this.$element, DATA_KEY)
+ this.$element = null
this.config = null
}
diff --git a/js/src/checkbox.js b/js/src/checkbox.js
index f0779948..fdc1a168 100644
--- a/js/src/checkbox.js
+++ b/js/src/checkbox.js
@@ -23,20 +23,20 @@ const Checkbox = (($) => {
*/
class Checkbox {
- constructor(element, config) {
- this.element = element
+ constructor($element, config) {
+ this.$element = $element
this.config = $.extend({}, Default, config)
- this.element.after(this.config.template)
- this.formGroup = Util.findFormGroup(this.element)
+ this.$element.after(this.config.template)
+ this.$formGroup = Util.findFormGroup(this.$element)
this._bindEventListeners()
}
dispose() {
- $.removeData(this.element, DATA_KEY)
- this.element = null
- this.formGroup = null
+ $.removeData(this.$element, DATA_KEY)
+ this.$element = null
+ this.$formGroup = null
this.config = null
}
@@ -44,14 +44,14 @@ const Checkbox = (($) => {
// private
_bindEventListeners() {
// checkboxes didn't appear to bubble to the document, so we'll bind these directly
- this.formGroup.find('.checkbox label').hover(() => {
- Util.addFormGroupFocus(this.formGroup)
+ this.$formGroup.find('.checkbox label').hover(() => {
+ Util.addFormGroupFocus(this.$formGroup)
}, () => {
- Util.removeFormGroupFocus(this.formGroup)
+ Util.removeFormGroupFocus(this.$formGroup)
})
- this.element.change(() => {
- this.element.blur()
+ this.$element.change(() => {
+ this.$element.blur()
})
}
diff --git a/js/src/fileinput.js b/js/src/fileinput.js
index a67e7e24..2cfead0c 100644
--- a/js/src/fileinput.js
+++ b/js/src/fileinput.js
@@ -27,38 +27,38 @@ const FileInput = (($) => {
*/
class FileInput {
- constructor(element, config) {
- this.element = element
+ constructor($element, config) {
+ this.$element = $element
this.config = $.extend({}, Default, config)
- this.formGroup = Util.findFormGroup(this.element)
+ this.$formGroup = Util.findFormGroup(this.$element)
- this.formGroup.addClass(ClassName.IS_FILEINPUT)
+ this.$formGroup.addClass(ClassName.IS_FILEINPUT)
this._bindEventListeners()
}
dispose() {
- $.removeData(this.element, DATA_KEY)
- this.element = null
- this.formGroup = null
+ $.removeData(this.$element, DATA_KEY)
+ this.$element = null
+ this.$formGroup = null
this.config = null
}
// ------------------------------------------------------------------------
// private
_bindEventListeners() {
- this.formGroup
+ this.$formGroup
.on('focus', () => {
- Util.addFormGroupFocus(this.formGroup)
+ Util.addFormGroupFocus(this.$formGroup)
})
.on('blur', () => {
- Util.removeFormGroupFocus(this.formGroup)
+ Util.removeFormGroupFocus(this.$formGroup)
})
// set the fileinput readonly field with the name of the file
- this.element.on('change', () => {
+ this.$element.on('change', () => {
let value = ''
- $.each(this.element.files, (i, file) => {
+ $.each(this.$element.files, (i, file) => {
value += `${file.name} , `
})
value = value.substring(0, value.length - 2)
@@ -67,16 +67,16 @@ const FileInput = (($) => {
} else {
this._addIsEmpty()
}
- this.formGroup.find('input.form-control[readonly]').val(value)
+ this.$formGroup.find('input.form-control[readonly]').val(value)
})
}
_addIsEmpty() {
- this.formGroup.addClass(ClassName.IS_EMPTY)
+ this.$formGroup.addClass(ClassName.IS_EMPTY)
}
_removeIsEmpty() {
- this.formGroup.removeClass(ClassName.IS_EMPTY)
+ this.$formGroup.removeClass(ClassName.IS_EMPTY)
}
// ------------------------------------------------------------------------
diff --git a/js/src/input.js b/js/src/input.js
index 5bc8b881..447854e2 100644
--- a/js/src/input.js
+++ b/js/src/input.js
@@ -41,30 +41,30 @@ const Input = (($) => {
*/
class Input {
- constructor(element, config) {
- this.element = element
+ constructor($element, config) {
+ this.$element = $element
this.config = $.extend({}, Default, config)
// Requires form-group standard markup (will add it if necessary)
- this.formGroup = this._findOrCreateFormGroup()
+ this.$formGroup = this._findOrCreateFormGroup()
this._convertInputSizeVariations()
// Initially mark as empty
if (this._isEmpty()) {
- this.formGroup.addClass(ClassName.IS_EMPTY)
+ this.$formGroup.addClass(ClassName.IS_EMPTY)
}
// Add marker div the end of the form-group
- this.formGroup.append(this.config.template)
+ this.$formGroup.append(this.config.template)
this._bindEventListeners()
}
dispose() {
- $.removeData(this.element, DATA_KEY)
- this.element = null
- this.formGroup = null
+ $.removeData(this.$element, DATA_KEY)
+ this.$element = null
+ this.$formGroup = null
this.config = null
}
@@ -73,16 +73,16 @@ const Input = (($) => {
_bindEventListeners() {
- this.element
+ this.$element
.on('keydown paste', (event) => {
if (Util.isChar(event)) {
this._removeIsEmpty()
}
})
.on('keyup change', (event) => {
- let isValid = (typeof this.element[0].checkValidity === 'undefined' || this.element[0].checkValidity())
+ let isValid = (typeof this.$element[0].checkValidity === 'undefined' || this.$element[0].checkValidity())
- if (this.element.val() === '' && isValid) {
+ if (this.$element.val() === '' && isValid) {
this._addIsEmpty()
} else {
this._removeIsEmpty()
@@ -101,19 +101,19 @@ const Input = (($) => {
}
})
.on('focus', () => {
- Util.addFormGroupFocus(this.formGroup)
+ Util.addFormGroupFocus(this.$formGroup)
})
.on('blur', () => {
- Util.removeFormGroupFocus(this.formGroup)
+ Util.removeFormGroupFocus(this.$formGroup)
})
// make sure empty is added back when there is a programmatic value change.
// NOTE: programmatic changing of value using $.val() must trigger the change event i.e. $.val('x').trigger('change')
.on('change', () => {
- if (this.element.attr('type') === 'file') {
+ if (this.$element.attr('type') === 'file') {
return
}
- let value = this.element.val()
+ let value = this.$element.val()
if (value) {
this._removeIsEmpty()
} else {
@@ -123,23 +123,23 @@ const Input = (($) => {
}
_addHasError() {
- this.formGroup.addClass(ClassName.HAS_ERROR)
+ this.$formGroup.addClass(ClassName.HAS_ERROR)
}
_removeHasError() {
- this.formGroup.removeClass(ClassName.HAS_ERROR)
+ this.$formGroup.removeClass(ClassName.HAS_ERROR)
}
_addIsEmpty() {
- this.formGroup.addClass(ClassName.IS_EMPTY)
+ this.$formGroup.addClass(ClassName.IS_EMPTY)
}
_removeIsEmpty() {
- this.formGroup.removeClass(ClassName.IS_EMPTY)
+ this.$formGroup.removeClass(ClassName.IS_EMPTY)
}
_isEmpty() {
- return (this.element.val() === null || this.element.val() === undefined || this.element.val() === '')
+ return (this.$element.val() === null || this.$element.val() === undefined || this.$element.val() === '')
}
_convertInputSizeVariations() {
@@ -149,18 +149,18 @@ const Input = (($) => {
// Modification - Change input-sm/lg to form-group-sm/lg instead (preferred standard and simpler css/less variants)
for (let inputSize in InputSizeConversions) {
- if (this.element.hasClass(inputSize)) {
- this.element.removeClass(inputSize)
- this.formGroup.addClass(InputSizeConversions[inputSize])
+ if (this.$element.hasClass(inputSize)) {
+ this.$element.removeClass(inputSize)
+ this.$formGroup.addClass(InputSizeConversions[inputSize])
}
}
}
_findOrCreateFormGroup() {
- let fg = this.element.closest(Selector.FORM_GROUP) // note that form-group may be grandparent in the case of an input-group
+ let fg = this.$element.closest(Selector.FORM_GROUP) // note that form-group may be grandparent in the case of an input-group
if (fg.length === 0) {
- this.element.wrap(this.config.formGroup.template)
- fg = this.element.closest(Selector.FORM_GROUP) // find node after attached (otherwise additional attachments don't work)
+ this.$element.wrap(this.config.$formGroup.template)
+ fg = this.$element.closest(Selector.FORM_GROUP) // find node after attached (otherwise additional attachments don't work)
}
return fg
}
diff --git a/js/src/old/es6Template.js b/js/src/old/es6Template.js
index 843423de..ee8e2154 100644
--- a/js/src/old/es6Template.js
+++ b/js/src/old/es6Template.js
@@ -22,14 +22,14 @@ const Foo = (($) => {
*/
class Foo {
- constructor(element, config) {
- this.element = element
+ constructor($element, config) {
+ this.$element = $element
this.config = $.extend({}, Default, config)
}
dispose() {
- $.removeData(this.element, DATA_KEY)
- this.element = null
+ $.removeData(this.$element, DATA_KEY)
+ this.$element = null
this.config = null
}
diff --git a/js/src/old/material.js b/js/src/old/material.js
deleted file mode 100644
index 276f0cf2..00000000
--- a/js/src/old/material.js
+++ /dev/null
@@ -1,301 +0,0 @@
-/* globals jQuery */
-
-(function($) {
- // Selector to select only not already processed elements
- //$.expr[":"].notmdproc = function(obj){
- // if ($(obj).data("mdproc")) {
- // return false;
- // } else {
- // return true;
- // }
- //};
- //
- //function isChar(evt) {
- // if (typeof evt.which == "undefined") {
- // return true;
- // } else if (typeof evt.which == "number" && evt.which > 0) {
- // return !evt.ctrlKey && !evt.metaKey && !evt.altKey && evt.which != 8 && evt.which != 9;
- // }
- // return false;
- //}
- //
- //function addFormGroupFocus(formGroup){
- // formGroup.addClass("is-focused");
- //}
- //
- //function removeFormGroupFocus(formGroup){
- // formGroup.removeClass("is-focused"); // remove class from form-group
- //}
-
- $.material = {
- "options": {
- // These options set what will be started by $.material.init()
- //"input": true,
- //"ripples": true,
- //"checkbox": true,
- //"togglebutton": true,
- //"radio": true,
- //"arrive": true,
- //"autofill": false,
-
- //"withRipples": [
- // ".btn:not(.btn-link)",
- // ".card-image",
- // ".navbar a:not(.ripple-none)",
- // ".dropdown-menu a",
- // ".nav-tabs a:not(.ripple-none)",
- // ".withripple",
- // ".pagination li:not(.active):not(.disabled) a:not(.ripple-none)"
- //].join(","),
- //"inputElements": "input.form-control, textarea.form-control, select.form-control",
- //"checkboxElements": ".checkbox > label > input[type=checkbox]",
- //"togglebuttonElements": ".togglebutton > label > input[type=checkbox]",
- //"radioElements": ".radio > label > input[type=radio]" ,
- //"fileInputElements": 'input[type=file]'
- },
- //"checkbox": function(selector) {
- // // Add fake-checkbox to material checkboxes
- // $((selector) ? selector : this.options.checkboxElements)
- // .filter(":notmdproc")
- // .data("mdproc", true)
- // .after("");
- //},
- //"togglebutton": function(selector) {
- // $((selector) ? selector : this.options.togglebuttonElements)
- // .filter(":notmdproc")
- // .data("mdproc", true)
- // .after("");
- //},
- //"radio": function(selector) {
- // // Add fake-radio to material radios
- // $((selector) ? selector : this.options.radioElements)
- // .filter(":notmdproc")
- // .data("mdproc", true)
- // .after("");
- //},
- //"input": function(selector) {
- // $((selector) ? selector : this.options.inputElements)
- // .filter(":notmdproc")
- // .data("mdproc", true)
- // .each( () => {
- // var $input = $(this);
- //
- // // Requires form-group standard markup (will add it if necessary)
- // var $formGroup = $input.closest(".form-group"); // note that form-group may be grandparent in the case of an input-group
- // if($formGroup.length === 0){
- // $input.wrap("");
- // $formGroup = $input.closest(".form-group"); // find node after attached (otherwise additional attachments don't work)
- // }
- //
- // // Modification - Change input-sm/lg to form-group-sm/lg instead (preferred standard and simpler css/less variants)
- // var legacySizes = {
- // "input-lg": "form-group-lg",
- // "input-sm": "form-group-sm"
- // };
- // $.each( legacySizes, function( legacySize, standardSize ) {
- // if ($input.hasClass(legacySize)) {
- // $input.removeClass(legacySize);
- // $formGroup.addClass(standardSize);
- // }
- // }); // TODO: determine if we want to keep meddling this much.
- //
- // // Set as empty if is empty (damn I must improve this...)
- // if ($input.val() === null || $input.val() == "undefined" || $input.val() === "") {
- // $formGroup.addClass("is-empty");
- // }
- //
- // // Add at the end of the form-group
- // $formGroup.append("");
- //
- // // Support for file input
- // if ($formGroup.find("input[type=file]").length > 0) {
- // $formGroup.addClass("is-fileinput");
- // }
- // });
- //},
- //"attachInputEventHandlers": () => {
- //
- //// checkboxes didn't appear to bubble to the document, so we'll bind these directly
- //$(".form-group .checkbox label").hover(() => {
- // Util.addFormGroupFocus(this);
- //}, () => {
- // Util.removeFormGroupFocus(this);
- //});
- //
- //$(document)
- //.on("change", ".checkbox input[type=checkbox]", () => { $(this).blur(); })
- //.on("keydown paste", ".form-control", function(e) {
- // if(Util.isChar(e)) {
- // $(this).closest(".form-group").removeClass("is-empty");
- // }
- //})
- //.on("keyup change", ".form-control", () => {
- // var $input = $(this);
- // var $formGroup = $input.closest(".form-group");
- // var isValid = (typeof $input[0].checkValidity === "undefined" || $input[0].checkValidity());
- //
- // if ($input.val() === "" && isValid) {
- // $formGroup.addClass("is-empty");
- // }
- // else {
- // $formGroup.removeClass("is-empty");
- // }
- //
- // // Validation events do not bubble, so they must be attached directly to the input: http://jsfiddle.net/PEpRM/1/
- // // Further, even the bind method is being caught, but since we are already calling #checkValidity here, just alter
- // // the form-group on change.
- // //
- // // NOTE: I'm not sure we should be intervening regarding validation, this seems better as a README and snippet of code.
- // // BUT, I've left it here for backwards compatibility.
- // if(isValid){
- // $formGroup.removeClass("has-error");
- // }
- // else{
- // $formGroup.addClass("has-error");
- // }
- //})
- //.on("focus", ".form-control, .form-group.is-fileinput", () => {
- // Util.addFormGroupFocus(this.formGroup);
- //})
- //.on("blur", ".form-control, .form-group.is-fileinput", () => {
- // Util.removeFormGroupFocus(this.formGroup);
- //})
- //// make sure empty is added back when there is a programmatic value change.
- //// NOTE: programmatic changing of value using $.val() must trigger the change event i.e. $.val('x').trigger('change')
- //.on("change", ".form-group input", () => {
- // var $input = $(this);
- // if($input.attr("type") == "file") {
- // return;
- // }
- //
- // var $formGroup = $input.closest(".form-group");
- // var value = $input.val();
- // if (value) {
- // $formGroup.removeClass("is-empty");
- // } else {
- // $formGroup.addClass("is-empty");
- // }
- //})
- //// set the fileinput readonly field with the name of the file
- //.on("change", ".form-group.is-fileinput input[type='file']", () => {
- // var $input = $(this);
- // var $formGroup = $input.closest(".form-group");
- // var value = "";
- // $.each(this.files, function(i, file) {
- // value += file.name + ", ";
- // });
- // value = value.substring(0, value.length - 2);
- // if (value) {
- // $formGroup.removeClass("is-empty");
- // } else {
- // $formGroup.addClass("is-empty");
- // }
- // $formGroup.find("input.form-control[readonly]").val(value);
- //});
- //},
- //"ripples": function(selector) {
- // $((selector) ? selector : this.options.withRipples).ripples();
- //},
- //"autofill": () => {
- // // This part of code will detect autofill when the page is loading (username and password inputs for example)
- // var loading = setInterval(() => {
- // $("input[type!=checkbox]").each(() => {
- // var $this = $(this);
- // if ($this.val() && $this.val() !== $this.attr("value")) {
- // $this.triggerStart("change");
- // }
- // });
- // }, 100);
- //
- // // After 10 seconds we are quite sure all the needed inputs are autofilled then we can stop checking them
- // setTimeout(() => {
- // clearInterval(loading);
- // }, 10000);
- //},
- //"attachAutofillEventHandlers": () => {
- // // Listen on inputs of the focused form (because user can select from the autofill dropdown only when the input has focus)
- // var focused;
- // $(document)
- // .on("focus", "input", () => {
- // var $inputs = $(this).parents("form").find("input").not("[type=file]");
- // focused = setInterval(() => {
- // $inputs.each(() => {
- // var $this = $(this);
- // if ($this.val() !== $this.attr("value")) {
- // $this.triggerStart("change");
- // }
- // });
- // }, 100);
- // })
- // .on("blur", ".form-group input", () => {
- // clearInterval(focused);
- // });
- //},
- "init": () => {
- // var $document = $(document);
- //
- // if ($.fn.ripples && this.options.ripples) {
- // //this.ripples();
- // $(this.options.withRipples).ripples()
- // }
- // if (this.options.input) {
- // this.input();
- // this.attachInputEventHandlers();
- //
- // $(this.options.inputElements).input()
- // }
- // if (this.options.checkbox) {
- // //this.checkbox();
- // $(this.options.checkboxElements).checkbox()
- // }
- // if (this.options.togglebutton) {
- // //this.togglebutton();
- // $(this.options.togglebuttonElements).togglebutton()
- // }
- // if (this.options.radio) {
- // //this.radio();
- // $(this.options.radioElements).radio()
- // }
- // if (this.options.autofill) {
- // //this.autofill();
- // //this.attachAutofillEventHandlers();
- // $('body').autofill();
- // }
- //
- // $(this.options.fileInputElements).fileInput()
- //
- // if (document.arrive && this.options.arrive) {
- // if ($.fn.ripples && this.options.ripples) {
- // $document.arrive(this.options.withRipples, () => {
- // $(this).ripples()
- // });
- // }
- // if (this.options.input) {
- // $document.arrive(this.options.inputElements, () => {
- // $(this).input()
- // });
- // }
- // if (this.options.checkbox) {
- // $document.arrive(this.options.checkboxElements, () => {
- // $(this).checkbox();
- // });
- // }
- // if (this.options.radio) {
- // $document.arrive(this.options.radioElements, () => {
- // $(this).radio();
- // });
- // }
- // if (this.options.togglebutton) {
- // $document.arrive(this.options.togglebuttonElements, () => {
- // $(this).togglebutton();
- // });
- // }
- //
- // $document.arrive(this.options.fileInputElements, () => {
- // $(this).fileInput();
- // });
- // }
- }
- };
-
-})(jQuery);
diff --git a/js/src/old/ripples.js b/js/src/old/ripples.js
deleted file mode 100644
index 9a35233a..00000000
--- a/js/src/old/ripples.js
+++ /dev/null
@@ -1,320 +0,0 @@
-/* Copyright 2014+, Federico Zivolo, LICENSE at https://github.com/FezVrasta/bootstrap-material-design/blob/master/LICENSE.md */
-/* globals jQuery, navigator */
-
-(function($, window, document, undefined) {
-
- //"use strict";
- //
- ///**
- // * Define the name of the plugin
- // */
- //var ripples = "ripples";
- //
- //
- ///**
- // * Get an instance of the plugin
- // */
- //var self = null;
- //
- //
- ///**
- // * Define the DEFAULT_OPTIONS of the plugin
- // */
- //var DEFAULT_OPTIONS = {};
- //
- //
- ///**
- // * Create the main plugin function
- // */
- //function Ripples(element, options) {
- // self = this;
- //
- // this._element = $(element);
- // this._options = $.extend({}, DEFAULT_OPTIONS, options);
- //
- // this.init();
- //}
- //
- //
- /**
- * Initialize the plugin
- */
- //Ripples.prototype.init = function() {
- // var $element = this._element;
- //
- // $element.on("mousedown touchstart", function(event) {
- // /**
- // * Verify if the user is just touching on a device and return if so
- // */
- // if(self.isTouch() && event.type === "mousedown") {
- // return;
- // }
- //
- //
- // /**
- // * Verify if the current element already has a ripple wrapper element and
- // * creates if it doesn't
- // */
- // if(!($element.find(".ripple-container").length)) {
- // $element.append("");
- // }
- //
- //
- // /**
- // * Find the ripple wrapper
- // */
- // var $container = $element.children(".ripple-container");
- //
- //
- // /**
- // * Get relY and relX positions
- // */
- // var relY = self.getRelY($container, event);
- // var relX = self.getRelX($container, event);
- //
- //
- // /**
- // * If relY and/or relX are false, return the event
- // */
- // if(!relY && !relX) {
- // return;
- // }
- //
- //
- // /**
- // * Get the ripple color
- // */
- // var rippleColor = self.getRipplesColor($element);
- //
- //
- // /**
- // * Create the ripple element
- // */
- // var $ripple = $("");
- //
- // $ripple
- // .addClass("ripple")
- // .css({
- // "left": relX,
- // "top": relY,
- // "background-color": rippleColor
- // });
- //
- //
- // /**
- // * Append the ripple to the wrapper
- // */
- // $container.append($ripple);
- //
- //
- // /**
- // * Make sure the ripple has the styles applied (ugly hack but it works)
- // */
- // (function() { return window.getComputedStyle($ripple[0]).opacity; })();
- //
- //
- // /**
- // * Turn on the ripple animation
- // */
- // self.rippleOn($element, $ripple);
- //
- //
- // /**
- // * Call the rippleEnd function when the transition "on" ends
- // */
- // setTimeout(function() {
- // self.rippleEnd($ripple);
- // }, 500);
- //
- //
- // /**
- // * Detect when the user leaves the element
- // */
- // $element.on("mouseup mouseleave touchend", function() {
- // $ripple.data("mousedown", "off");
- //
- // if($ripple.data("animating") === "off") {
- // self.rippleOut($ripple);
- // }
- // });
- //
- // });
- //};
- //
- //
- ///**
- // * Get the new size based on the element height/width and the ripple width
- // */
- //Ripples.prototype.getNewSize = function($element, $ripple) {
- //
- // return (Math.max($element.outerWidth(), $element.outerHeight()) / $ripple.outerWidth()) * 2.5;
- //};
-
-
- ///**
- // * Get the relX
- // */
- //Ripples.prototype.getRelX = function($container, event) {
- // var wrapperOffset = $container.offset();
- //
- // if(!self.isTouch()) {
- // /**
- // * Get the mouse position relative to the ripple wrapper
- // */
- // return event.pageX - wrapperOffset.left;
- // } else {
- // /**
- // * Make sure the user is using only one finger and then get the touch
- // * position relative to the ripple wrapper
- // */
- // event = event.originalEvent;
- //
- // if(event.touches.length === 1) {
- // return event.touches[0].pageX - wrapperOffset.left;
- // }
- //
- // return false;
- // }
- //};
- //
- //
- ///**
- // * Get the relY
- // */
- //Ripples.prototype.getRelY = function($container, event) {
- // var wrapperOffset = $container.offset();
- //
- // if(!self.isTouch()) {
- // /**
- // * Get the mouse position relative to the ripple wrapper
- // */
- // return event.pageY - wrapperOffset.top;
- // } else {
- // /**
- // * Make sure the user is using only one finger and then get the touch
- // * position relative to the ripple wrapper
- // */
- // event = event.originalEvent;
- //
- // if(event.touches.length === 1) {
- // return event.touches[0].pageY - wrapperOffset.top;
- // }
- //
- // return false;
- // }
- //};
- //
- //
- ///**
- // * Get the ripple color
- // */
- //Ripples.prototype.getRipplesColor = function($element) {
- //
- // var color = $element.data("ripple-color") ? $element.data("ripple-color") : window.getComputedStyle($element[0]).color;
- //
- // return color;
- //};
-
- //
- ///**
- // * Verify if the client browser has transistion support
- // */
- //Ripples.prototype.hasTransitionSupport = function() {
- // var thisBody = document.body || document.documentElement;
- // var thisStyle = thisBody.style;
- //
- // var support = (
- // thisStyle.transition !== undefined ||
- // thisStyle.WebkitTransition !== undefined ||
- // thisStyle.MozTransition !== undefined ||
- // thisStyle.MsTransition !== undefined ||
- // thisStyle.OTransition !== undefined
- // );
- //
- // return support;
- //};
- //
- //
- ///**
- // * Verify if the client is using a mobile device
- // */
- //Ripples.prototype.isTouch = function() {
- // return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
- //};
- //
- //
- ///**
- // * End the animation of the ripple
- // */
- //Ripples.prototype.rippleEnd = function($ripple) {
- // $ripple.data("animating", "off");
- //
- // if($ripple.data("mousedown") === "off") {
- // self.rippleOut($ripple);
- // }
- //};
- //
- //
- ///**
- // * Turn off the ripple effect
- // */
- //Ripples.prototype.rippleOut = function($ripple) {
- // $ripple.off();
- //
- // if(self.hasTransitionSupport()) {
- // $ripple.addClass("ripple-out");
- // } else {
- // $ripple.animate({"opacity": 0}, 100, function() {
- // $ripple.trigger("transitionend");
- // });
- // }
- //
- // $ripple.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", function() {
- // $ripple.remove();
- // });
- //};
- //
- //
- ///**
- // * Turn on the ripple effect
- // */
- //Ripples.prototype.rippleOn = function($element, $ripple) {
- // var size = self.getNewSize($element, $ripple);
- //
- // if(self.hasTransitionSupport()) {
- // $ripple
- // .css({
- // "-ms-transform": "scale(" + size + ")",
- // "-moz-transform": "scale(" + size + ")",
- // "-webkit-transform": "scale(" + size + ")",
- // "transform": "scale(" + size + ")"
- // })
- // .addClass("ripple-on")
- // .data("animating", "on")
- // .data("mousedown", "on");
- // } else {
- // $ripple.animate({
- // "width": Math.max($element.outerWidth(), $element.outerHeight()) * 2,
- // "height": Math.max($element.outerWidth(), $element.outerHeight()) * 2,
- // "margin-left": Math.max($element.outerWidth(), $element.outerHeight()) * (-1),
- // "margin-top": Math.max($element.outerWidth(), $element.outerHeight()) * (-1),
- // "opacity": 0.2
- // }, 500, function() {
- // $ripple.trigger("transitionend");
- // });
- // }
- //};
- //
- //
- ///**
- // * Create the jquery plugin function
- // */
- //$.fn.ripples = function(options) {
- // return this.each(function() {
- // if(!$.data(this, "plugin_" + ripples)) {
- // $.data(this, "plugin_" + ripples, new Ripples(this, options));
- // }
- // });
- //};
-
-})(jQuery, window, document);
diff --git a/js/src/radio.js b/js/src/radio.js
index dc81c456..b0d1085d 100644
--- a/js/src/radio.js
+++ b/js/src/radio.js
@@ -23,16 +23,16 @@ const Radio = (($) => {
*/
class Radio {
- constructor(element, config) {
- this.element = element
+ constructor($element, config) {
+ this.$element = $element
this.config = $.extend({}, Default, config)
- this.element.after(this.config.template)
+ this.$element.after(this.config.template)
}
dispose() {
- $.removeData(this.element, DATA_KEY)
- this.element = null
+ $.removeData(this.$element, DATA_KEY)
+ this.$element = null
this.config = null
}
diff --git a/js/src/ripples.js b/js/src/ripples.js
index 5c9e4f80..7c050a31 100644
--- a/js/src/ripples.js
+++ b/js/src/ripples.js
@@ -44,17 +44,17 @@ const Ripples = (($) => {
*/
class Ripples {
- constructor(element, config) {
- this.element = $(element)
+ constructor($element, config) {
+ this.$element = $element
this.config = $.extend({}, Default, config)
// attach initial listener
- this.element.on(this.config.triggerStart, this._onStartRipple)
+ this.$element.on(this.config.triggerStart, this._onStartRipple)
}
dispose() {
- $.removeData(this.element, DATA_KEY)
- this.element = null
+ $.removeData(this.$element, DATA_KEY)
+ this.$element = null
this.containerElement = null
this.decoratorElement = null
this.config = null
@@ -101,7 +101,7 @@ const Ripples = (($) => {
}, this.config.duration)
// Detect when the user leaves the element (attach only when necessary for performance)
- this.element.on(this.config.triggerEnd, () => {
+ this.$element.on(this.config.triggerEnd, () => {
this.decoratorElement.data('mousedown', 'off')
if (this.decoratorElement.data('animating') === 'off') {
@@ -112,12 +112,12 @@ const Ripples = (($) => {
_findOrCreateContainer() {
if (!this.containerElement || !this.containerElement.length > 0) {
- this.element.append(this.config.container.template)
- this.containerElement = this.element.find(Selector.CONTAINER)
+ this.$element.append(this.config.container.template)
+ this.containerElement = this.$element.find(Selector.CONTAINER)
}
// always add the rippleElement, it is always removed
- this.containerElement.append(this.config.element.template)
+ this.containerElement.append(this.config.$element.template)
this.decoratorElement = this.containerElement.find(Selector.DECORATOR)
}
@@ -184,7 +184,7 @@ const Ripples = (($) => {
* Get the ripple color
*/
_getRipplesColor() {
- let color = this.element.data('ripple-color') ? this.element.data('ripple-color') : window.getComputedStyle(this.element[0]).color
+ let color = this.$element.data('ripple-color') ? this.$element.data('ripple-color') : window.getComputedStyle(this.$element[0]).color
return color
}
@@ -245,10 +245,10 @@ const Ripples = (($) => {
.data('mousedown', 'on')
} else {
this.decoratorElement.animate({
- width: Math.max(this.element.outerWidth(), this.element.outerHeight()) * 2,
- height: Math.max(this.element.outerWidth(), this.element.outerHeight()) * 2,
- 'margin-left': Math.max(this.element.outerWidth(), this.element.outerHeight()) * (-1),
- 'margin-top': Math.max(this.element.outerWidth(), this.element.outerHeight()) * (-1),
+ width: Math.max(this.$element.outerWidth(), this.$element.outerHeight()) * 2,
+ height: Math.max(this.$element.outerWidth(), this.$element.outerHeight()) * 2,
+ 'margin-left': Math.max(this.$element.outerWidth(), this.$element.outerHeight()) * (-1),
+ 'margin-top': Math.max(this.$element.outerWidth(), this.$element.outerHeight()) * (-1),
opacity: 0.2
}, this.config.duration, () => {
this.decoratorElement.triggerStart('transitionend')
@@ -260,7 +260,7 @@ const Ripples = (($) => {
* Get the new size based on the element height/width and the ripple width
*/
_getNewSize() {
- return (Math.max(this.element.outerWidth(), this.element.outerHeight()) / this.decoratorElement.outerWidth()) * 2.5
+ return (Math.max(this.$element.outerWidth(), this.$element.outerHeight()) / this.decoratorElement.outerWidth()) * 2.5
}
// ------------------------------------------------------------------------
@@ -268,12 +268,12 @@ const Ripples = (($) => {
static _jQueryInterface(config) {
return this.each(() => {
- let element = $(this)
- let data = element.data(DATA_KEY)
+ let $element = $(this)
+ let data = $element.data(DATA_KEY)
if (!data) {
data = new Ripples(this, config)
- element.data(DATA_KEY, data)
+ $element.data(DATA_KEY, data)
}
})
}
diff --git a/js/src/togglebutton.js b/js/src/togglebutton.js
index 044cc123..748c8bf4 100644
--- a/js/src/togglebutton.js
+++ b/js/src/togglebutton.js
@@ -23,16 +23,16 @@ const Togglebutton = (($) => {
*/
class Togglebutton {
- constructor(element, config) {
- this.element = element
+ constructor($element, config) {
+ this.$element = $element
this.config = $.extend({}, Default, config)
- this.element.after(this.config.template)
+ this.$element.after(this.config.template)
}
dispose() {
- $.removeData(this.element, DATA_KEY)
- this.element = null
+ $.removeData(this.$element, DATA_KEY)
+ this.$element = null
this.config = null
}
diff --git a/js/src/util.js b/js/src/util.js
index 29ea6c78..e52ae4e5 100644
--- a/js/src/util.js
+++ b/js/src/util.js
@@ -86,10 +86,10 @@ const Util = (($) => {
/**
Find expected form-group
*/
- findFormGroup(element) {
- let fg = element.closest(Selector.FORM_GROUP) // note that form-group may be grandparent in the case of an input-group
+ findFormGroup($element) {
+ let fg = $element.closest(Selector.FORM_GROUP) // note that form-group may be grandparent in the case of an input-group
if (fg.length === 0) {
- $.error(`Failed to find form-group for ${element}`)
+ $.error(`Failed to find form-group for ${$element}`)
}
return fg
}
diff --git a/js/tests/vendor/tether.min.js b/js/tests/vendor/tether.min.js
index 423313db..7dc9ceb3 100644
--- a/js/tests/vendor/tether.min.js
+++ b/js/tests/vendor/tether.min.js
@@ -1,2 +1,2 @@
/*! tether 1.1.0 */
-!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(t,e,o){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t){var e=getComputedStyle(t),o=e.position;if("fixed"===o)return t;for(var i=t;i=i.parentNode;){var n=void 0;try{n=getComputedStyle(i)}catch(r){}if("undefined"==typeof n||null===n)return i;var s=n.overflow,a=n.overflowX,f=n.overflowY;if(/(auto|scroll)/.test(s+f+a)&&("absolute"!==o||["relative","absolute","fixed"].indexOf(n.position)>=0))return i}return document.body}function r(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var o=e.documentElement,i={},n=t.getBoundingClientRect();for(var r in n)i[r]=n[r];var s=x(e);return i.top-=s.top,i.left-=s.left,"undefined"==typeof i.width&&(i.width=document.body.scrollWidth-i.left-i.right),"undefined"==typeof i.height&&(i.height=document.body.scrollHeight-i.top-i.bottom),i.top=i.top-o.clientTop,i.left=i.left-o.clientLeft,i.right=e.body.clientWidth-i.width-i.left,i.bottom=e.body.clientHeight-i.height-i.top,i}function s(t){return t.offsetParent||document.documentElement}function a(){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");f(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var o=t.offsetWidth;e.style.overflow="scroll";var i=t.offsetWidth;o===i&&(i=e.clientWidth),document.body.removeChild(e);var n=o-i;return{width:n,height:n}}function f(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var o in e)({}).hasOwnProperty.call(e,o)&&(t[o]=e[o])}),t}function h(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var o=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),i=u(t).replace(o," ");p(t,i)}}function l(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{h(t,e);var o=u(t)+(" "+e);p(t,o)}}function d(t,e){if("undefined"!=typeof t.classList)return t.classList.contains(e);var o=u(t);return new RegExp("(^| )"+e+"( |$)","gi").test(o)}function u(t){return t.className instanceof SVGAnimatedString?t.className.baseVal:t.className}function p(t,e){t.setAttribute("class",e)}function c(t,e,o){o.forEach(function(o){-1===e.indexOf(o)&&d(t,o)&&h(t,o)}),e.forEach(function(e){d(t,e)||l(t,e)})}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){var o=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+o>=e&&e>=t-o}function m(){return"undefined"!=typeof performance&&"undefined"!=typeof performance.now?performance.now():+new Date}function v(){for(var t={top:0,left:0},e=arguments.length,o=Array(e),i=0;e>i;i++)o[i]=arguments[i];return o.forEach(function(e){var o=e.top,i=e.left;"string"==typeof o&&(o=parseFloat(o,10)),"string"==typeof i&&(i=parseFloat(i,10)),t.top+=o,t.left+=i}),t}function y(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function b(t,e){return"scrollParent"===e?e=t.scrollParent:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),"undefined"!=typeof e.nodeType&&!function(){var t=r(e),o=t,i=getComputedStyle(e);e=[o.left,o.top,t.width+o.left,t.height+o.top],U.forEach(function(t,o){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[o]+=parseFloat(i["border"+t+"Width"]):e[o]-=parseFloat(i["border"+t+"Width"])})}(),e}var w=function(){function t(t,e){for(var o=0;o1?a-1:0),h=1;a>h;h++)f[h-1]=arguments[h];i.apply(s,f),r?this.bindings[t].splice(e,1):++e}}}]),t}();C.Utils={getScrollParent:n,getBounds:r,getOffsetParent:s,extend:f,addClass:l,removeClass:h,hasClass:d,updateClasses:c,defer:T,flush:S,uniqueId:O,Evented:W,getScrollBarSize:a};var M=function(){function t(t,e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),w=function(){function t(t,e){for(var o=0;o16?(e=Math.min(e-16,250),void(o=setTimeout(n,250))):void("undefined"!=typeof t&&m()-t<10||("undefined"!=typeof o&&(clearTimeout(o),o=null),t=m(),_(),e=m()-t))};["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,i)})}();var z={center:"center",left:"right",right:"left"},F={middle:"middle",top:"bottom",bottom:"top"},L={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},Y=function(t,e){var o=t.left,i=t.top;return"auto"===o&&(o=z[e.left]),"auto"===i&&(i=F[e.top]),{left:o,top:i}},H=function(t){var e=t.left,o=t.top;return"undefined"!=typeof L[t.left]&&(e=L[t.left]),"undefined"!=typeof L[t.top]&&(o=L[t.top]),{left:e,top:o}},X=function(t){var e=t.split(" "),o=M(e,2),i=o[0],n=o[1];return{top:i,left:n}},j=X,N=function(){function t(e){var o=this;i(this,t),this.position=this.position.bind(this),B.push(this),this.history=[],this.setOptions(e,!1),C.modules.forEach(function(t){"undefined"!=typeof t.initialize&&t.initialize.call(o)}),this.position()}return w(t,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return"undefined"!=typeof e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,o=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],i={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=f(i,t);var r=this.options,s=r.element,a=r.target,h=r.targetModifier;if(this.element=s,this.target=a,this.targetModifier=h,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if("undefined"==typeof e[t])throw new Error("Tether Error: Both element and target must be defined");"undefined"!=typeof e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),l(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&l(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=j(this.options.targetAttachment),this.attachment=j(this.options.attachment),this.offset=X(this.options.offset),this.targetOffset=X(this.options.targetOffset),"undefined"!=typeof this.scrollParent&&this.disable(),this.scrollParent="scroll-handle"===this.targetModifier?this.target:n(this.target),this.options.enabled!==!1&&this.enable(o)}},{key:"getTargetBounds",value:function(){if("undefined"==typeof this.targetModifier)return r(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=r(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.topo.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body,s=0;n&&(s=15);var a=t.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-s,e={width:15,height:.975*a*(a/o.scrollHeight),left:t.left+t.width-parseFloat(i.borderLeftWidth)-15},f=0;408>a&&this.target===document.body&&(f=-11e-5*Math.pow(a,2)-.00727*a+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var h=this.target.scrollTop/(o.scrollHeight-a);return e.top=h*(a-e.height-f)+t.top+parseFloat(i.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return"undefined"==typeof this._cache&&(this._cache={}),"undefined"==typeof this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];this.options.addTargetClasses!==!1&&l(this.target,this.getClass("enabled")),l(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParent!==document&&this.scrollParent.addEventListener("scroll",this.position),t&&this.position()}},{key:"disable",value:function(){h(this.target,this.getClass("enabled")),h(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeof this.scrollParent&&this.scrollParent.removeEventListener("scroll",this.position)}},{key:"destroy",value:function(){var t=this;this.disable(),B.forEach(function(e,o){return e===t?void B.splice(o,1):void 0})}},{key:"updateAttachClasses",value:function(t,e){var o=this;t=t||this.attachment,e=e||this.targetAttachment;var i=["left","top","bottom","right","middle","center"];"undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var n=this._addAttachClasses;t.top&&n.push(this.getClass("element-attached")+"-"+t.top),t.left&&n.push(this.getClass("element-attached")+"-"+t.left),e.top&&n.push(this.getClass("target-attached")+"-"+e.top),e.left&&n.push(this.getClass("target-attached")+"-"+e.left);var r=[];i.forEach(function(t){r.push(o.getClass("element-attached")+"-"+t),r.push(o.getClass("target-attached")+"-"+t)}),T(function(){"undefined"!=typeof o._addAttachClasses&&(c(o.element,o._addAttachClasses,r),o.options.addTargetClasses!==!1&&c(o.target,o._addAttachClasses,r),delete o._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];if(this.enabled){this.clearCache();var o=Y(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,o);var i=this.cache("element-bounds",function(){return r(t.element)}),n=i.width,f=i.height;if(0===n&&0===f&&"undefined"!=typeof this.lastSize){var h=this.lastSize;n=h.width,f=h.height}else this.lastSize={width:n,height:f};var l=this.cache("target-bounds",function(){return t.getTargetBounds()}),d=l,u=y(H(this.attachment),{width:n,height:f}),p=y(H(o),d),c=y(this.offset,{width:n,height:f}),g=y(this.targetOffset,d);u=v(u,c),p=v(p,g);for(var m=l.left+p.left-u.left,b=l.top+p.top-u.top,w=0;wwindow.innerWidth&&(A=this.cache("scrollbar-size",a),x.viewport.bottom-=A.height),document.body.scrollHeight>window.innerHeight&&(A=this.cache("scrollbar-size",a),x.viewport.right-=A.width),(-1===["","static"].indexOf(document.body.style.position)||-1===["","static"].indexOf(document.body.parentElement.style.position))&&(x.page.bottom=document.body.scrollHeight-b-f,x.page.right=document.body.scrollWidth-m-n),"undefined"!=typeof this.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeof this.targetModifier&&!function(){var e=t.cache("target-offsetparent",function(){return s(t.target)}),o=t.cache("target-offsetparent-bounds",function(){return r(e)}),i=getComputedStyle(e),n=o,a={};if(["Top","Left","Bottom","Right"].forEach(function(t){a[t.toLowerCase()]=parseFloat(i["border"+t+"Width"])}),o.right=document.body.scrollWidth-o.left-n.width+a.right,o.bottom=document.body.scrollHeight-o.top-n.height+a.bottom,x.page.top>=o.top+a.top&&x.page.bottom>=o.bottom&&x.page.left>=o.left+a.left&&x.page.right>=o.right){var f=e.scrollTop,h=e.scrollLeft;x.offset={top:x.page.top-o.top+f-a.top,left:x.page.left-o.left+h-a.left}}}(),this.move(x),this.history.unshift(x),this.history.length>3&&this.history.pop(),e&&S(),!0}}},{key:"move",value:function(t){var e=this;if("undefined"!=typeof this.element.parentNode){var o={};for(var i in t){o[i]={};for(var n in t[i]){for(var r=!1,a=0;a=0&&(b=parseFloat(b),y=parseFloat(y)),b!==y&&(v=!0,m[n]=y)}v&&T(function(){f(e.element.style,m)})}}}]),t}();N.modules=[],C.position=_;var R=f(N,C),M=function(){function t(t,e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),P=C.Utils,r=P.getBounds,f=P.extend,c=P.updateClasses,T=P.defer,U=["left","top","right","bottom"];C.modules.push({position:function(t){var e=this,o=t.top,i=t.left,n=t.targetAttachment;if(!this.options.constraints)return!0;var s=this.cache("element-bounds",function(){return r(e.element)}),a=s.height,h=s.width;if(0===h&&0===a&&"undefined"!=typeof this.lastSize){var l=this.lastSize;h=l.width,a=l.height}var d=this.cache("target-bounds",function(){return e.getTargetBounds()}),u=d.height,p=d.width,g=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,o=t.pinnedClass;e&&g.push(e),o&&g.push(o)}),g.forEach(function(t){["left","top","right","bottom"].forEach(function(e){g.push(t+"-"+e)})});var m=[],v=f({},n),y=f({},this.attachment);return this.options.constraints.forEach(function(t){var r=t.to,s=t.attachment,f=t.pin;"undefined"==typeof s&&(s="");var l=void 0,d=void 0;if(s.indexOf(" ")>=0){var c=s.split(" "),g=M(c,2);d=g[0],l=g[1]}else l=d=s;var w=b(e,r);("target"===d||"both"===d)&&(ow[3]&&"bottom"===v.top&&(o-=u,v.top="top")),"together"===d&&(ow[3]&&"bottom"===v.top&&("top"===y.top?(o-=u,v.top="top",o-=a,y.top="bottom"):"bottom"===y.top&&(o-=u,v.top="top",o+=a,y.top="top")),"middle"===v.top&&(o+a>w[3]&&"top"===y.top?(o-=a,y.top="bottom"):ow[2]&&"right"===v.left&&(i-=p,v.left="left")),"together"===l&&(iw[2]&&"right"===v.left?"left"===y.left?(i-=p,v.left="left",i-=h,y.left="right"):"right"===y.left&&(i-=p,v.left="left",i+=h,y.left="left"):"center"===v.left&&(i+h>w[2]&&"left"===y.left?(i-=h,y.left="right"):iw[3]&&"top"===y.top&&(o-=a,y.top="bottom")),("element"===l||"both"===l)&&(iw[2]&&"left"===y.left&&(i-=h,y.left="right")),"string"==typeof f?f=f.split(",").map(function(t){return t.trim()}):f===!0&&(f=["top","left","right","bottom"]),f=f||[];var C=[],O=[];o=0?(o=w[1],C.push("top")):O.push("top")),o+a>w[3]&&(f.indexOf("bottom")>=0?(o=w[3]-a,C.push("bottom")):O.push("bottom")),i=0?(i=w[0],C.push("left")):O.push("left")),i+h>w[2]&&(f.indexOf("right")>=0?(i=w[2]-h,C.push("right")):O.push("right")),C.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),C.forEach(function(e){m.push(t+"-"+e)})}(),O.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),O.forEach(function(e){m.push(t+"-"+e)})}(),(C.indexOf("left")>=0||C.indexOf("right")>=0)&&(y.left=v.left=!1),(C.indexOf("top")>=0||C.indexOf("bottom")>=0)&&(y.top=v.top=!1),(v.top!==n.top||v.left!==n.left||y.top!==e.attachment.top||y.left!==e.attachment.left)&&e.updateAttachClasses(y,v)}),T(function(){e.options.addTargetClasses!==!1&&c(e.target,m,g),c(e.element,m,g)}),{top:o,left:i}}});var P=C.Utils,r=P.getBounds,c=P.updateClasses,T=P.defer;C.modules.push({position:function(t){var e=this,o=t.top,i=t.left,n=this.cache("element-bounds",function(){return r(e.element)}),s=n.height,a=n.width,f=this.getTargetBounds(),h=o+s,l=i+a,d=[];o<=f.bottom&&h>=f.top&&["left","right"].forEach(function(t){var e=f[t];(e===i||e===l)&&d.push(t)}),i<=f.right&&l>=f.left&&["top","bottom"].forEach(function(t){var e=f[t];(e===o||e===h)&&d.push(t)});var u=[],p=[],g=["left","top","right","bottom"];return u.push(this.getClass("abutted")),g.forEach(function(t){u.push(e.getClass("abutted")+"-"+t)}),d.length&&p.push(this.getClass("abutted")),d.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),T(function(){e.options.addTargetClasses!==!1&&c(e.target,p,u),c(e.element,p,u)}),!0}});var M=function(){function t(t,e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return C.modules.push({position:function(t){var e=t.top,o=t.left;if(this.options.shift){var i=this.options.shift;"function"==typeof this.options.shift&&(i=this.options.shift.call(this,{top:e,left:o}));var n=void 0,r=void 0;if("string"==typeof i){i=i.split(" "),i[1]=i[1]||i[0];var s=M(i,2);n=s[0],r=s[1],n=parseFloat(n,10),r=parseFloat(r,10)}else n=i.top,r=i.left;return e+=n,o+=r,{top:e,left:o}}}}),R});
+!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(t,e,o){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t){var e=getComputedStyle(t),o=e.position;if("fixed"===o)return t;for(var i=t;i=i.parentNode;){var n=void 0;try{n=getComputedStyle(i)}catch(r){}if("undefined"==typeof n||null===n)return i;var s=n.overflow,a=n.overflowX,f=n.overflowY;if(/(auto|scroll)/.test(s+f+a)&&("absolute"!==o||["relative","absolute","fixed"].indexOf(n.position)>=0))return i}return document.body}function r(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var o=e.documentElement,i={},n=t.getBoundingClientRect();for(var r in n)i[r]=n[r];var s=x(e);return i.top-=s.top,i.left-=s.left,"undefined"==typeof i.width&&(i.width=document.body.scrollWidth-i.left-i.right),"undefined"==typeof i.height&&(i.height=document.body.scrollHeight-i.top-i.bottom),i.top=i.top-o.clientTop,i.left=i.left-o.clientLeft,i.right=e.body.clientWidth-i.width-i.left,i.bottom=e.body.clientHeight-i.height-i.top,i}function s(t){return t.offsetParent||document.documentElement}function a(){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");f(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var o=t.offsetWidth;e.style.overflow="scroll";var i=t.offsetWidth;o===i&&(i=e.clientWidth),document.body.removeChild(e);var n=o-i;return{width:n,height:n}}function f(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var o in e)({}).hasOwnProperty.call(e,o)&&(t[o]=e[o])}),t}function h(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var o=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),i=u(t).replace(o," ");p(t,i)}}function l(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{h(t,e);var o=u(t)+(" "+e);p(t,o)}}function d(t,e){if("undefined"!=typeof t.classList)return t.classList.contains(e);var o=u(t);return new RegExp("(^| )"+e+"( |$)","gi").test(o)}function u(t){return t.className instanceof SVGAnimatedString?t.className.baseVal:t.className}function p(t,e){t.setAttribute("class",e)}function c(t,e,o){o.forEach(function(o){-1===e.indexOf(o)&&d(t,o)&&h(t,o)}),e.forEach(function(e){d(t,e)||l(t,e)})}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){var o=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+o>=e&&e>=t-o}function m(){return"undefined"!=typeof performance&&"undefined"!=typeof performance.now?performance.now():+new Date}function v(){for(var t={top:0,left:0},e=arguments.length,o=Array(e),i=0;e>i;i++)o[i]=arguments[i];return o.forEach(function(e){var o=e.top,i=e.left;"string"==typeof o&&(o=parseFloat(o,10)),"string"==typeof i&&(i=parseFloat(i,10)),t.top+=o,t.left+=i}),t}function y(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function b(t,e){return"scrollParent"===e?e=t.scrollParent:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),"undefined"!=typeof e.nodeType&&!function(){var t=r(e),o=t,i=getComputedStyle(e);e=[o.left,o.top,t.width+o.left,t.height+o.top],U.forEach(function(t,o){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[o]+=parseFloat(i["border"+t+"Width"]):e[o]-=parseFloat(i["border"+t+"Width"])})}(),e}var w=function(){function t(t,e){for(var o=0;o1?a-1:0),h=1;a>h;h++)f[h-1]=arguments[h];i.apply(s,f),r?this.bindings[t].splice(e,1):++e}}}]),t}();C.Utils={getScrollParent:n,getBounds:r,getOffsetParent:s,extend:f,addClass:l,removeClass:h,hasClass:d,updateClasses:c,defer:T,flush:S,uniqueId:O,Evented:W,getScrollBarSize:a};var M=function(){function t(t,e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),w=function(){function t(t,e){for(var o=0;o16?(e=Math.min(e-16,250),void(o=setTimeout(n,250))):void("undefined"!=typeof t&&m()-t<10||("undefined"!=typeof o&&(clearTimeout(o),o=null),t=m(),_(),e=m()-t))};["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,i)})}();var z={center:"center",left:"right",right:"left"},F={middle:"middle",top:"bottom",bottom:"top"},L={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},Y=function(t,e){var o=t.left,i=t.top;return"auto"===o&&(o=z[e.left]),"auto"===i&&(i=F[e.top]),{left:o,top:i}},H=function(t){var e=t.left,o=t.top;return"undefined"!=typeof L[t.left]&&(e=L[t.left]),"undefined"!=typeof L[t.top]&&(o=L[t.top]),{left:e,top:o}},X=function(t){var e=t.split(" "),o=M(e,2),i=o[0],n=o[1];return{top:i,left:n}},j=X,N=function(){function t(e){var o=this;i(this,t),this.position=this.position.bind(this),B.push(this),this.history=[],this.setOptions(e,!1),C.modules.forEach(function(t){"undefined"!=typeof t.initialize&&t.initialize.call(o)}),this.position()}return w(t,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return"undefined"!=typeof e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,o=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],i={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=f(i,t);var r=this.options,s=r.$element,a=r.target,h=r.targetModifier;if(this.$element=s,this.target=a,this.targetModifier=h,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if("undefined"==typeof e[t])throw new Error("Tether Error: Both element and target must be defined");"undefined"!=typeof e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),l(this.$element,this.getClass("element")),this.options.addTargetClasses!==!1&&l(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=j(this.options.targetAttachment),this.attachment=j(this.options.attachment),this.offset=X(this.options.offset),this.targetOffset=X(this.options.targetOffset),"undefined"!=typeof this.scrollParent&&this.disable(),this.scrollParent="scroll-handle"===this.targetModifier?this.target:n(this.target),this.options.enabled!==!1&&this.enable(o)}},{key:"getTargetBounds",value:function(){if("undefined"==typeof this.targetModifier)return r(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=r(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.topo.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body,s=0;n&&(s=15);var a=t.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-s,e={width:15,height:.975*a*(a/o.scrollHeight),left:t.left+t.width-parseFloat(i.borderLeftWidth)-15},f=0;408>a&&this.target===document.body&&(f=-11e-5*Math.pow(a,2)-.00727*a+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var h=this.target.scrollTop/(o.scrollHeight-a);return e.top=h*(a-e.height-f)+t.top+parseFloat(i.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t, e){return"undefined"==typeof this._cache&&(this._cache={}),"undefined"==typeof this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];this.options.addTargetClasses!==!1&&l(this.target,this.getClass("enabled")),l(this.$element,this.getClass("enabled")),this.enabled=!0,this.scrollParent!==document&&this.scrollParent.addEventListener("scroll",this.position),t&&this.position()}},{key:"disable",value:function(){h(this.target,this.getClass("enabled")),h(this.$element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeof this.scrollParent&&this.scrollParent.removeEventListener("scroll",this.position)}},{key:"destroy",value:function(){var t=this;this.disable(),B.forEach(function(e, o){return e===t?void B.splice(o,1):void 0})}},{key:"updateAttachClasses",value:function(t, e){var o=this;t=t||this.attachment,e=e||this.targetAttachment;var i=["left","top","bottom","right","middle","center"];"undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var n=this._addAttachClasses;t.top&&n.push(this.getClass("element-attached")+"-"+t.top),t.left&&n.push(this.getClass("element-attached")+"-"+t.left),e.top&&n.push(this.getClass("target-attached")+"-"+e.top),e.left&&n.push(this.getClass("target-attached")+"-"+e.left);var r=[];i.forEach(function(t){r.push(o.getClass("element-attached")+"-"+t),r.push(o.getClass("target-attached")+"-"+t)}),T(function(){"undefined"!=typeof o._addAttachClasses&&(c(o.$element,o._addAttachClasses,r),o.options.addTargetClasses!==!1&&c(o.target,o._addAttachClasses,r),delete o._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];if(this.enabled){this.clearCache();var o=Y(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,o);var i=this.cache("element-bounds",function(){return r(t.$element)}),n=i.width,f=i.height;if(0===n&&0===f&&"undefined"!=typeof this.lastSize){var h=this.lastSize;n=h.width,f=h.height}else this.lastSize={width:n,height:f};var l=this.cache("target-bounds",function(){return t.getTargetBounds()}),d=l,u=y(H(this.attachment),{width:n,height:f}),p=y(H(o),d),c=y(this.offset,{width:n,height:f}),g=y(this.targetOffset,d);u=v(u,c),p=v(p,g);for(var m=l.left+p.left-u.left,b=l.top+p.top-u.top,w=0; wwindow.innerWidth&&(A=this.cache("scrollbar-size",a),x.viewport.bottom-=A.height),document.body.scrollHeight>window.innerHeight&&(A=this.cache("scrollbar-size",a),x.viewport.right-=A.width),(-1===["","static"].indexOf(document.body.style.position)||-1===["","static"].indexOf(document.body.parentElement.style.position))&&(x.page.bottom=document.body.scrollHeight-b-f,x.page.right=document.body.scrollWidth-m-n),"undefined"!=typeof this.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeof this.targetModifier&&!function(){var e=t.cache("target-offsetparent",function(){return s(t.target)}),o=t.cache("target-offsetparent-bounds",function(){return r(e)}),i=getComputedStyle(e),n=o,a={};if(["Top","Left","Bottom","Right"].forEach(function(t){a[t.toLowerCase()]=parseFloat(i["border"+t+"Width"])}),o.right=document.body.scrollWidth-o.left-n.width+a.right,o.bottom=document.body.scrollHeight-o.top-n.height+a.bottom,x.page.top>=o.top+a.top&&x.page.bottom>=o.bottom&&x.page.left>=o.left+a.left&&x.page.right>=o.right){var f=e.scrollTop,h=e.scrollLeft;x.offset={top:x.page.top-o.top+f-a.top,left:x.page.left-o.left+h-a.left}}}(),this.move(x),this.history.unshift(x),this.history.length>3&&this.history.pop(),e&&S(),!0}}},{key:"move",value:function(t){var e=this;if("undefined"!=typeof this.$element.parentNode){var o={};for(var i in t){o[i]={};for(var n in t[i]){for(var r=!1,a=0; a=0&&(b=parseFloat(b),y=parseFloat(y)),b!==y&&(v=!0,m[n]=y)}v&&T(function(){f(e.$element.style,m)})}}}]),t}();N.modules=[],C.position=_;var R=f(N,C),M=function(){function t(t, e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator](); !(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e); i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e, o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),P=C.Utils,r=P.getBounds,f=P.extend,c=P.updateClasses,T=P.defer,U=["left","top","right","bottom"];C.modules.push({position:function(t){var e=this,o=t.top,i=t.left,n=t.targetAttachment;if(!this.options.constraints)return!0;var s=this.cache("element-bounds",function(){return r(e.$element)}),a=s.height,h=s.width;if(0===h&&0===a&&"undefined"!=typeof this.lastSize){var l=this.lastSize;h=l.width,a=l.height}var d=this.cache("target-bounds",function(){return e.getTargetBounds()}),u=d.height,p=d.width,g=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,o=t.pinnedClass;e&&g.push(e),o&&g.push(o)}),g.forEach(function(t){["left","top","right","bottom"].forEach(function(e){g.push(t+"-"+e)})});var m=[],v=f({},n),y=f({},this.attachment);return this.options.constraints.forEach(function(t){var r=t.to,s=t.attachment,f=t.pin;"undefined"==typeof s&&(s="");var l=void 0,d=void 0;if(s.indexOf(" ")>=0){var c=s.split(" "),g=M(c,2);d=g[0],l=g[1]}else l=d=s;var w=b(e,r);("target"===d||"both"===d)&&(ow[3]&&"bottom"===v.top&&(o-=u,v.top="top")),"together"===d&&(ow[3]&&"bottom"===v.top&&("top"===y.top?(o-=u,v.top="top",o-=a,y.top="bottom"):"bottom"===y.top&&(o-=u,v.top="top",o+=a,y.top="top")),"middle"===v.top&&(o+a>w[3]&&"top"===y.top?(o-=a,y.top="bottom"):ow[2]&&"right"===v.left&&(i-=p,v.left="left")),"together"===l&&(iw[2]&&"right"===v.left?"left"===y.left?(i-=p,v.left="left",i-=h,y.left="right"):"right"===y.left&&(i-=p,v.left="left",i+=h,y.left="left"):"center"===v.left&&(i+h>w[2]&&"left"===y.left?(i-=h,y.left="right"):iw[3]&&"top"===y.top&&(o-=a,y.top="bottom")),("element"===l||"both"===l)&&(iw[2]&&"left"===y.left&&(i-=h,y.left="right")),"string"==typeof f?f=f.split(",").map(function(t){return t.trim()}):f===!0&&(f=["top","left","right","bottom"]),f=f||[];var C=[],O=[];o=0?(o=w[1],C.push("top")):O.push("top")),o+a>w[3]&&(f.indexOf("bottom")>=0?(o=w[3]-a,C.push("bottom")):O.push("bottom")),i=0?(i=w[0],C.push("left")):O.push("left")),i+h>w[2]&&(f.indexOf("right")>=0?(i=w[2]-h,C.push("right")):O.push("right")),C.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),C.forEach(function(e){m.push(t+"-"+e)})}(),O.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),O.forEach(function(e){m.push(t+"-"+e)})}(),(C.indexOf("left")>=0||C.indexOf("right")>=0)&&(y.left=v.left=!1),(C.indexOf("top")>=0||C.indexOf("bottom")>=0)&&(y.top=v.top=!1),(v.top!==n.top||v.left!==n.left||y.top!==e.attachment.top||y.left!==e.attachment.left)&&e.updateAttachClasses(y,v)}),T(function(){e.options.addTargetClasses!==!1&&c(e.target,m,g),c(e.$element,m,g)}),{top:o,left:i}}});var P=C.Utils,r=P.getBounds,c=P.updateClasses,T=P.defer;C.modules.push({position:function(t){var e=this,o=t.top,i=t.left,n=this.cache("element-bounds",function(){return r(e.$element)}),s=n.height,a=n.width,f=this.getTargetBounds(),h=o+s,l=i+a,d=[];o<=f.bottom&&h>=f.top&&["left","right"].forEach(function(t){var e=f[t];(e===i||e===l)&&d.push(t)}),i<=f.right&&l>=f.left&&["top","bottom"].forEach(function(t){var e=f[t];(e===o||e===h)&&d.push(t)});var u=[],p=[],g=["left","top","right","bottom"];return u.push(this.getClass("abutted")),g.forEach(function(t){u.push(e.getClass("abutted")+"-"+t)}),d.length&&p.push(this.getClass("abutted")),d.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),T(function(){e.options.addTargetClasses!==!1&&c(e.target,p,u),c(e.$element,p,u)}),!0}});var M=function(){function t(t, e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator](); !(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e); i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e, o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return C.modules.push({position:function(t){var e=t.top,o=t.left;if(this.options.shift){var i=this.options.shift;"function"==typeof this.options.shift&&(i=this.options.shift.call(this,{top:e,left:o}));var n=void 0,r=void 0;if("string"==typeof i){i=i.split(" "),i[1]=i[1]||i[0];var s=M(i,2);n=s[0],r=s[1],n=parseFloat(n,10),r=parseFloat(r,10)}else n=i.top,r=i.left;return e+=n,o+=r,{top:e,left:o}}}}),R});
diff --git a/scss/includes/_bootstrap-material-design.scss b/scss/includes/_bootstrap-material-design.scss
index eacaf08e..485648fc 100644
--- a/scss/includes/_bootstrap-material-design.scss
+++ b/scss/includes/_bootstrap-material-design.scss
@@ -5,7 +5,8 @@
@import 'bootstrap';
@import 'mixins';
-@import 'scaffolding'; // include the material content given the mixins above (sass requirement for inclusion order of mixins)
+
+@import 'reboot';
@import 'buttons';
@import 'checkboxes';
@import 'togglebutton';
@@ -23,4 +24,5 @@
@import 'dialogs';
@import 'dividers';
@import 'themes';
+
@import 'plugins';
diff --git a/scss/includes/_reboot.scss b/scss/includes/_reboot.scss
new file mode 100644
index 00000000..421087cc
--- /dev/null
+++ b/scss/includes/_reboot.scss
@@ -0,0 +1,12 @@
+body {
+ font-weight: $mdb-font-weight-base;
+}
+
+//// Prevent highlight on mobile
+//* {
+// -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
+// -webkit-tap-highlight-color: transparent;
+// &:focus {
+// outline: 0;
+// }
+//}
diff --git a/scss/includes/_scaffolding.scss b/scss/includes/_scaffolding.scss
deleted file mode 100644
index 30f9cefc..00000000
--- a/scss/includes/_scaffolding.scss
+++ /dev/null
@@ -1,39 +0,0 @@
-body {
- // Not sure we need this now that we are customizing bootstrap
-
-
- // background-color: $body-bg;
- // &.inverse {
- // background: #333333;
- // &, .form-control {
- // color: $mdb-text-color-light;
- // }
- // .modal,
- // .card {
- // &,
- // .form-control {
- // background-color: initial;
- // color: initial;
- // }
- // }
- //
- // }
- //}
- //
- //
- //a, a:hover, a:focus {
- // color: $brand-primary;
- //
- // & .material-icons {
- // vertical-align: middle;
- // }
-}
-
-//// Prevent highlight on mobile
-//* {
-// -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
-// -webkit-tap-highlight-color: transparent;
-// &:focus {
-// outline: 0;
-// }
-//}
diff --git a/scss/includes/_type.scss b/scss/includes/_type.scss
index 27db0e03..b400a986 100644
--- a/scss/includes/_type.scss
+++ b/scss/includes/_type.scss
@@ -1,25 +1,25 @@
-body, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4 {
- //font-family: $font-family-sans-serif;
- //font-weight: 300;
-}
-
-h5, h6{
- font-weight: 400;
-}
-
-.text-warning {
- color: $brand-warning;
-}
-.text-primary {
- color: $brand-primary;
-}
-.text-danger {
- color: $brand-danger;
-}
-.text-success {
- color: $brand-success;
-}
-.text-info {
- color: $brand-info;
-}
+//body, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4 {
+// //font-family: $font-family-sans-serif;
+// //font-weight: 300;
+//}
+//
+//h5, h6{
+// font-weight: 400;
+//}
+//
+//.text-warning {
+// color: $brand-warning;
+//}
+//.text-primary {
+// color: $brand-primary;
+//}
+//.text-danger {
+// color: $brand-danger;
+//}
+//.text-success {
+// color: $brand-success;
+//}
+//.text-info {
+// color: $brand-info;
+//}
diff --git a/scss/includes/_variables.scss b/scss/includes/_variables.scss
index 1e834699..00f67f13 100644
--- a/scss/includes/_variables.scss
+++ b/scss/includes/_variables.scss
@@ -3,6 +3,7 @@
// Typography elements FIXME: review to see if we actually need these
$mdb-text-color-light: rgba(255, 255, 255, 0.84) !default; //hsla(0, 0%, 100%, 0.84) !default; // white 0.84 //unquote("rgba(#{$rgb-white}, 0.84)") !default;
$mdb-text-color-primary: rgba(0, 0, 0, 0.87) !default;
+$mdb-font-weight-base: 400;
$icon-color: rgba(0, 0, 0, 0.5) !default;
@@ -13,15 +14,15 @@ $gray-dark: $mdb-text-color-primary;
// Customized BS variables
$enable-flex: true;
@import 'variables/brand';
-
-$border-radius-base: 2px !default;
-$border-radius-small: 1px !default;
-
@import 'variables/type';
@import 'variables/body';
@import 'variables/buttons';
+$border-radius-base: 2px !default;
+$border-radius-small: 1px !default;
+
+
//---
// Bootstrap Material Design variables start with mdb-
$mdb-brand-inverse: $indigo !default;
diff --git a/scss/includes/variables/_type.scss b/scss/includes/variables/_type.scss
index 34db851d..c7865413 100644
--- a/scss/includes/variables/_type.scss
+++ b/scss/includes/variables/_type.scss
@@ -1,3 +1,55 @@
// Typography
+//
+// Font, line-height, and color for body text, headings, and more.
+
$font-family-sans-serif: 'Roboto', 'Helvetica', 'Arial', sans-serif !default;
-$headings-font-weight: 300 !default;
+//$font-family-serif: Georgia, "Times New Roman", Times, serif !default;
+//$font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace !default;
+//$font-family-base: $font-family-sans-serif !default;
+
+// Pixel value used to responsively scale all typography. Applied to the `` element.
+//$font-size-root: 16px !default;
+//
+//$font-size-base: 1rem !default;
+//$font-size-lg: 1.25rem !default;
+//$font-size-sm: .875rem !default;
+//$font-size-xs: .75rem !default;
+//
+//$font-size-h1: 2.5rem !default;
+//$font-size-h2: 2rem !default;
+//$font-size-h3: 1.75rem !default;
+//$font-size-h4: 1.5rem !default;
+//$font-size-h5: 1.25rem !default;
+//$font-size-h6: 1rem !default;
+//
+//$display1-size: 6rem !default;
+//$display2-size: 5.5rem !default;
+//$display3-size: 4.5rem !default;
+//$display4-size: 3.5rem !default;
+//
+//$display1-weight: 300 !default;
+//$display2-weight: 300 !default;
+//$display3-weight: 300 !default;
+//$display4-weight: 300 !default;
+//
+//$line-height: 1.5 !default;
+//
+//$headings-margin-bottom: ($spacer / 2) !default;
+//$headings-font-family: inherit !default;
+//$headings-font-weight: 500 !default;
+//$headings-line-height: 1.1 !default;
+//$headings-color: inherit !default;
+//
+//$lead-font-size: 1.25rem !default;
+//$lead-font-weight: 300 !default;
+//
+//$text-muted: $gray-light !default;
+//
+//$abbr-border-color: $gray-light !default;
+//
+//$blockquote-small-color: $gray-light !default;
+//$blockquote-font-size: ($font-size-base * 1.25) !default;
+//$blockquote-border-color: $gray-lighter !default;
+//
+//$hr-border-color: rgba(0,0,0,.1) !default;
+//$hr-border-width: $border-width !default;