%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/eirtvhdf/vmullen.hire-va.com/wp-content/themes/phlox-pro/auxin/js/
Upload File :
Create Path :
Current File : /home/eirtvhdf/vmullen.hire-va.com/wp-content/themes/phlox-pro/auxin/js/plugins.min.js

if(typeof Object.create!=="function"){Object.create=function(obj){function F(){}F.prototype=obj;return new F}}if(typeof Object.create!=="function"){Object.create=function(obj){function F(){}F.prototype=obj;return new F}}window.lazySizesConfig=window.lazySizesConfig||{};window.lazySizesConfig.lazyClass="aux-preload";window.lazySizesConfig.loadingClass="aux-preloading";window.lazySizesConfig.loadedClass="aux-preloaded";document.addEventListener("lazybeforeunveil",function(e){var color=e.target.getAttribute("data-bg-color");if(color){e.target.style.backgroundColor=color}});document.addEventListener("lazyloaded",function(e){if(e.target.getAttribute("data-bg-color")){e.target.style.backgroundColor="initial"}if(e.target.classList.contains("aux-has-preload-height")){e.target.classList.remove("aux-has-preload-height");e.target.style.height="auto"}if(e.target.nodeName==="VIDEO"){var video=e.target;for(var source in video.children){var videoSource=video.children[source];if(videoSource.tagName==="SOURCE"&&videoSource.getAttribute("data-src")){videoSource.src=videoSource.getAttribute("data-src")}}video.load();if(video.classList.contains("aux-autoplay")){video.play()}}});(function($,window,document,undefined){"use strict";var resposiveNotLoadedImages=function(){var width,height,lazysizeImages=document.querySelectorAll(".aux-preload");Array.prototype.forEach.call(lazysizeImages,function(el,i){if((width=el.getAttribute("width"))&&(height=el.getAttribute("height"))){el.style.height=el.clientWidth/(width/height)+"px";el.classList.add("aux-has-preload-height")}})};window.addEventListener("orientationchange",resposiveNotLoadedImages);window.addEventListener("resize",resposiveNotLoadedImages);$(resposiveNotLoadedImages)})(jQuery,window,document);!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Grapick=t():e.Grapick=t()}(this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t,n){"use strict";function i(e,t,n){t=t.split(/\s+/);for(var i=0;i<t.length;++i)e.addEventListener(t[i],n)}function r(e,t,n){t=t.split(/\s+/);for(var i=0;i<t.length;++i)e.removeEventListener(t[i],n)}Object.defineProperty(t,"__esModule",{value:!0}),t.on=i,t.off=r},function(e,t,n){"use strict";var i=n(2),r=function(e){return e&&e.__esModule?e:{default:e}}(i);e.exports=function(e){return new r.default(e)}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),c=n(3),u=i(c),h=n(4),d=i(h),f=n(0),v=function(e,t){return e.position-t.position},g=function(e){return e+"-gradient("},p=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));e=Object.assign({},e);var i={pfx:"grp",el:".grp",colorEl:"",min:0,max:100,direction:"90deg",type:"linear",height:"30px",width:"100%"};for(var r in i)r in e||(e[r]=i[r]);var l=e.el;if(!((l="string"==typeof l?document.querySelector(l):l)instanceof HTMLElement))throw"Element not found, given "+l;return n.el=l,n.handlers=[],n.options=e,n.on("handler:color:change",function(e,t){return n.change(t)}),n.on("handler:position:change",function(e,t){return n.change(t)}),n.on("handler:remove",function(e){return n.change(1)}),n.on("handler:add",function(e){return n.change(1)}),n.render(),n}return l(t,e),s(t,[{key:"setColorPicker",value:function(e){this.colorPicker=e}},{key:"getValue",value:function(e,t){var n=this.getColorValue(),i=e||this.getType(),r=t||this.getDirection();return n?i+"-gradient("+r+", "+n+")":""}},{key:"getSafeValue",value:function(e,t){var n=this.previewEl,i=this.getValue(e,t);if(!this.sandEl&&(this.sandEl=document.createElement("div")),!n||!i)return"";for(var o=this.sandEl.style,a=[i].concat(r(this.getPrefixedValues(e,t))),l=void 0,s=0;s<a.length&&(l=a[s],o.backgroundImage=l,o.backgroundImage!=l);s++);return o.backgroundImage}},{key:"setValue",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.type,r=this.direction,o=t.indexOf("(")+1,a=t.lastIndexOf(")"),l=t.substring(o,a),s=l.split(/,(?![^(]*\)) /);if(this.clear(n),!l)return void this.updatePreview();s.length>2&&(r=s.shift());var c=void 0;["repeating-linear","repeating-radial","linear","radial"].forEach(function(e){t.indexOf(g(e))>-1&&!c&&(c=1,i=e)}),this.setDirection(r,n),this.setType(i,n),s.forEach(function(t){var i=t.split(" "),r=parseFloat(i.pop()),o=i.join("");e.addHandler(r,o,0,n)}),this.updatePreview()}},{key:"getColorValue",value:function(){var e=this.handlers;return e.sort(v),e=1==e.length?[e[0],e[0]]:e,e.map(function(e){return e.getValue()}).join(", ")}},{key:"getPrefixedValues",value:function(e,t){var n=this.getValue(e,t);return["-moz-","-webkit-","-o-","-ms-"].map(function(e){return""+e+n})}},{key:"change",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.updatePreview(),!t.silent&&this.emit("change",e)}},{key:"setDirection",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.options.direction=e,this.change(1,t)}},{key:"getDirection",value:function(){return this.options.direction}},{key:"setType",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.options.type=e,this.change(1,t)}},{key:"getType",value:function(){return this.options.type}},{key:"addHandler",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=new d.default(this,e,t,n);return!i.silent&&this.emit("handler:add",r),r}},{key:"getHandler",value:function(e){return this.handlers[e]}},{key:"getHandlers",value:function(){return this.handlers}},{key:"clear",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.handlers,n=t.length-1;n>=0;n--)t[n].remove(e)}},{key:"getSelected",value:function(){for(var e=this.getHandlers(),t=0;t<e.length;t++){var n=e[t];if(n.isSelected())return n}return null}},{key:"updatePreview",value:function(){var e=this.previewEl;e&&(e.style.backgroundImage=this.getSafeValue("linear","to right"))}},{key:"initEvents",value:function(){var e=this,t=this.options,n=t.min,i=t.max,r=this.previewEl,o=0,a={};r&&(0,f.on)(r,"click",function(t){a.w=r.clientWidth,a.h=r.clientHeight;var l=t.offsetX-r.clientLeft,s=t.offsetY-r.clientTop;if(!((o=l/a.w*100)>i||o<n)){var c=document.createElement("canvas"),u=c.getContext("2d");c.width=a.w,c.height=a.h;var h=u.createLinearGradient(0,0,a.w,a.h);e.getHandlers().forEach(function(e){return h.addColorStop(e.position/100,e.color)}),u.fillStyle=h,u.fillRect(0,0,c.width,c.height),c.style.background="black";var d=c.getContext("2d").getImageData(l,s,1,1).data,f="rgba("+d[0]+", "+d[1]+", "+d[2]+", "+d[3]+")";e.addHandler(o,f)}})}},{key:"render",value:function(){var e=this.options,t=this.el,n=e.pfx,i=e.height,r=e.width;if(t){var o=n+"-wrapper",a=n+"-preview";t.innerHTML='\n      <div class="'+o+'">\n        <div class="'+a+'"></div>\n      </div>\n    ';var l=t.querySelector("."+o),s=t.querySelector("."+a),c=l.style;c.position="relative",this.wrapperEl=l,this.previewEl=s,i&&(c.height=i),r&&(c.width=r),this.initEvents(),this.updatePreview()}}}]),t}(u.default);t.default=p},function(e,t){function n(){}n.prototype={on:function(e,t,n){var i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){function i(){r.off(e,i),t.apply(n,arguments)}var r=this;return i._=t,this.on(e,i,n)},emit:function(e){var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),i=0,r=n.length;for(i;i<r;i++)n[i].fn.apply(n[i].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),i=n[e],r=[];if(i&&t)for(var o=0,a=i.length;o<a;o++)i[o].fn!==t&&i[o].fn._!==t&&r.push(i[o]);return r.length?n[e]=r:delete n[e],this}},e.exports=n},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=n(0),a=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"black",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;i(this,e),t.getHandlers().push(this),this.gp=t,this.position=n,this.color=r,this.selected=0,this.render(),o&&this.select()}return r(e,[{key:"toJSON",value:function(){return{position:this.position,selected:this.selected,color:this.color}}},{key:"setColor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.color=e,this.emit("handler:color:change",this,t)}},{key:"setPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.getEl();this.position=e,n&&(n.style.left=e+"%"),this.emit("handler:position:change",this,t)}},{key:"getColor",value:function(){return this.color}},{key:"getPosition",value:function(){return this.position}},{key:"isSelected",value:function(){return!!this.selected}},{key:"getValue",value:function(){return this.getColor()+" "+this.getPosition()+"%"}},{key:"select",value:function(){var e=this.getEl();this.gp.getHandlers().forEach(function(e){return e.deselect()}),this.selected=1;var t=this.getSelectedCls();e&&(e.className+=" "+t),this.emit("handler:select",this)}},{key:"deselect",value:function(){var e=this.getEl();this.selected=0;var t=this.getSelectedCls();e&&(e.className=e.className.replace(t,"").trim()),this.emit("handler:deselect",this)}},{key:"getSelectedCls",value:function(){return this.gp.options.pfx+"-handler-selected"}},{key:"remove",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.getEl(),n=this.gp.getHandlers(),i=n.splice(n.indexOf(this),1)[0];return t&&t.parentNode.removeChild(t),!e.silent&&this.emit("handler:remove",i),i}},{key:"getEl",value:function(){return this.el}},{key:"initEvents",value:function(){var e=this,t=this.getEl(),n=this.gp.previewEl,i=this.gp.options,r=i.min,a=i.max,l=t.querySelector("[data-toggle=handler-close]"),s=t.querySelector("[data-toggle=handler-color-c]"),c=t.querySelector("[data-toggle=handler-color-wrap]"),u=t.querySelector("[data-toggle=handler-color]"),h=t.querySelector("[data-toggle=handler-drag]");if(s&&(0,o.on)(s,"click",function(e){return e.stopPropagation()}),l&&(0,o.on)(l,"click",function(t){t.stopPropagation(),e.remove()}),u&&(0,o.on)(u,"change",function(t){var n=t.target,i=n.value;e.setColor(i),c&&(c.style.backgroundColor=i)}),h){var d=0,f=0,v=0,g={},p={},y={},m=function(t){v=1,y.x=t.clientX-p.x,y.y=t.clientY-p.y,d=100*y.x,d/=g.w,d=f+d,d=d<r?r:d,d=d>a?a:d,e.setPosition(d,0),e.emit("handler:drag",e,d),0===t.which&&k(t)},k=function t(n){v&&(v=0,e.setPosition(d),(0,o.off)(document,"touchmove mousemove",m),(0,o.off)(document,"touchend mouseup",t),e.emit("handler:drag:end",e,d))},b=function(t){0===t.button&&(e.select(),f=e.position,g.w=n.clientWidth,g.h=n.clientHeight,p.x=t.clientX,p.y=t.clientY,(0,o.on)(document,"touchmove mousemove",m),(0,o.on)(document,"touchend mouseup",k),e.emit("handler:drag:start",e))};(0,o.on)(h,"touchstart mousedown",b),(0,o.on)(h,"click",function(e){return e.stopPropagation()})}}},{key:"emit",value:function(){var e;(e=this.gp).emit.apply(e,arguments)}},{key:"render",value:function(){var e=this.gp,t=e.options,n=e.previewEl,i=e.colorPicker,r=t.pfx,o=t.colorEl,a=this.getColor();if(n){var l=document.createElement("div"),s=l.style,c=r+"-handler";return l.className=c,l.innerHTML='\n      <div class="'+c+'-close-c">\n        <div class="'+c+'-close" data-toggle="handler-close">&Cross;</div>\n      </div>\n      <div class="'+c+'-drag" data-toggle="handler-drag"></div>\n      <div class="'+c+'-cp-c" data-toggle="handler-color-c">\n        '+(o||'\n          <div class="'+c+'-cp-wrap" data-toggle="handler-color-wrap" style="background-color: '+a+'">\n            <input type="color" data-toggle="handler-color" value="'+a+'">\n          </div>')+"\n      </div>\n    ",s.position="absolute",s.top=0,s.left=this.position+"%",n.appendChild(l),this.el=l,this.initEvents(),i&&i(this),l}}}]),e}();t.default=a}])});String.prototype.capFirstLetter=function(){return this.charAt(0).toUpperCase()+this.slice(1)};String.prototype.capFirstLetters=function(){return this.toLowerCase().replace(/\b[a-z]/g,function(letter){return letter.toUpperCase()})};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(elt){var len=this.length>>>0;var from=Number(arguments[1])||0;from=from<0?Math.ceil(from):Math.floor(from);if(from<0)from+=len;for(;from<len;from++){if(from in this&&this[from]===elt)return from}return-1}}jQuery.fn.auxSwitch=function(status){if(this.prop("checked")!=status){this.trigger("click")}return this};function auxinCreateNamespace(n){for(var e=n.split("."),a=window,i="",r=e.length,t=0;r>t;t++)"window"!=e[t]&&(i=e[t],a[i]=a[i]||{},a=a[i]);return a}String.prototype.auxReplaceAll=function(search,replacement){var target=this;return target.split(search).join(replacement)};Storage.prototype.setPostMeta=function(postID,metaKey,metaValue){if(!(postID&&metaKey&&metaValue)){return}var postMetaObj=this.getItem("auxin_post_meta");postMetaObj=JSON.parse(postMetaObj)||{};postMetaObj[metaKey+"_"+postID]={id:postID,meta_key:metaKey,meta_value:metaValue};return this.setItem("auxin_post_meta",JSON.stringify(postMetaObj))};Storage.prototype.getPostMeta=function(postID,metaKey,defaultValue){if(!(postID&&metaKey)){return}defaultValue=defaultValue||"";var postMetaObj=this.getItem("auxin_post_meta");postMetaObj=JSON.parse(postMetaObj)||{};return postMetaObj[metaKey+"_"+postID]&&postMetaObj[metaKey+"_"+postID]["meta_value"]||""};window.location.hash=localStorage.getPostMeta(auxin.post&&auxin.post.id,"edit_fragment");jQuery.fn.serializeObject=function(){"use strict";var a={},b=function(b,c){var d=a[c.name];"undefined"!=typeof d&&d!==null?Array.isArray(d)?d.push(c.value):a[c.name]=[d,c.value]:a[c.name]=c.value};return jQuery.each(this.serializeArray(),b),a};function isFunction(func){return typeof func==="function"}(function($){$.fn.alterClass=function(removals,additions){var self=this;if(removals.indexOf("*")===-1){self.removeClass(removals);return!additions?self:self.addClass(additions)}var patt=new RegExp("\\s"+removals.replace(/\*/g,"[A-Za-z0-9-_]+").split(" ").join("\\s|\\s")+"\\s","g");self.each(function(i,it){var cn=" "+it.className+" ";while(patt.test(cn)){cn=cn.replace(patt," ")}it.className=$.trim(cn)});return!additions?self:self.addClass(additions)}})(jQuery);function inArray(needle,haystack){var length=haystack.length;for(var i=0;i<length;i++){if(haystack[i]==needle)return true}return false}function auxinIsTrue(variable){if(typeof variable==="boolean"){return variable}if(typeof variable==="string"){variable=variable.toLowerCase();if(inArray(variable,["yes","on","true","checked"])){return true}}if(!isNaN(parseFloat(variable))&&isFinite(variable)){return Boolean(variable)}return false}(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else if(typeof module==="object"&&module.exports){module.exports=function(root,jQuery){if(jQuery===undefined){if(typeof window!=="undefined"){jQuery=require("jquery")}else{jQuery=require("jquery")(root)}}factory(jQuery);return jQuery}}else{factory(jQuery)}})(function(jQuery){var S2=function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd){var S2=jQuery.fn.select2.amd}var S2;(function(){if(!S2||!S2.requirejs){if(!S2){S2={}}else{require=S2}var requirejs,require,define;(function(undef){var main,req,makeMap,handlers,defined={},waiting={},config={},defining={},hasOwn=Object.prototype.hasOwnProperty,aps=[].slice,jsSuffixRegExp=/\.js$/;function hasProp(obj,prop){return hasOwn.call(obj,prop)}function normalize(name,baseName){var nameParts,nameSegment,mapValue,foundMap,lastIndex,foundI,foundStarMap,starI,i,j,part,normalizedBaseParts,baseParts=baseName&&baseName.split("/"),map=config.map,starMap=map&&map["*"]||{};if(name){name=name.split("/");lastIndex=name.length-1;if(config.nodeIdCompat&&jsSuffixRegExp.test(name[lastIndex])){name[lastIndex]=name[lastIndex].replace(jsSuffixRegExp,"")}if(name[0].charAt(0)==="."&&baseParts){normalizedBaseParts=baseParts.slice(0,baseParts.length-1);name=normalizedBaseParts.concat(name)}for(i=0;i<name.length;i++){part=name[i];if(part==="."){name.splice(i,1);i-=1}else if(part===".."){if(i===0||i===1&&name[2]===".."||name[i-1]===".."){continue}else if(i>0){name.splice(i-1,2);i-=2}}}name=name.join("/")}if((baseParts||starMap)&&map){nameParts=name.split("/");for(i=nameParts.length;i>0;i-=1){nameSegment=nameParts.slice(0,i).join("/");if(baseParts){for(j=baseParts.length;j>0;j-=1){mapValue=map[baseParts.slice(0,j).join("/")];if(mapValue){mapValue=mapValue[nameSegment];if(mapValue){foundMap=mapValue;foundI=i;break}}}}if(foundMap){break}if(!foundStarMap&&starMap&&starMap[nameSegment]){foundStarMap=starMap[nameSegment];starI=i}}if(!foundMap&&foundStarMap){foundMap=foundStarMap;foundI=starI}if(foundMap){nameParts.splice(0,foundI,foundMap);name=nameParts.join("/")}}return name}function makeRequire(relName,forceSync){return function(){var args=aps.call(arguments,0);if(typeof args[0]!=="string"&&args.length===1){args.push(null)}return req.apply(undef,args.concat([relName,forceSync]))}}function makeNormalize(relName){return function(name){return normalize(name,relName)}}function makeLoad(depName){return function(value){defined[depName]=value}}function callDep(name){if(hasProp(waiting,name)){var args=waiting[name];delete waiting[name];defining[name]=true;main.apply(undef,args)}if(!hasProp(defined,name)&&!hasProp(defining,name)){throw new Error("No "+name)}return defined[name]}function splitPrefix(name){var prefix,index=name?name.indexOf("!"):-1;if(index>-1){prefix=name.substring(0,index);name=name.substring(index+1,name.length)}return[prefix,name]}function makeRelParts(relName){return relName?splitPrefix(relName):[]}makeMap=function(name,relParts){var plugin,parts=splitPrefix(name),prefix=parts[0],relResourceName=relParts[1];name=parts[1];if(prefix){prefix=normalize(prefix,relResourceName);plugin=callDep(prefix)}if(prefix){if(plugin&&plugin.normalize){name=plugin.normalize(name,makeNormalize(relResourceName))}else{name=normalize(name,relResourceName)}}else{name=normalize(name,relResourceName);parts=splitPrefix(name);prefix=parts[0];name=parts[1];if(prefix){plugin=callDep(prefix)}}return{f:prefix?prefix+"!"+name:name,n:name,pr:prefix,p:plugin}};function makeConfig(name){return function(){return config&&config.config&&config.config[name]||{}}}handlers={require:function(name){return makeRequire(name)},exports:function(name){var e=defined[name];if(typeof e!=="undefined"){return e}else{return defined[name]={}}},module:function(name){return{id:name,uri:"",exports:defined[name],config:makeConfig(name)}}};main=function(name,deps,callback,relName){var cjsModule,depName,ret,map,i,relParts,args=[],callbackType=typeof callback,usingExports;relName=relName||name;relParts=makeRelParts(relName);if(callbackType==="undefined"||callbackType==="function"){deps=!deps.length&&callback.length?["require","exports","module"]:deps;for(i=0;i<deps.length;i+=1){map=makeMap(deps[i],relParts);depName=map.f;if(depName==="require"){args[i]=handlers.require(name)}else if(depName==="exports"){args[i]=handlers.exports(name);usingExports=true}else if(depName==="module"){cjsModule=args[i]=handlers.module(name)}else if(hasProp(defined,depName)||hasProp(waiting,depName)||hasProp(defining,depName)){args[i]=callDep(depName)}else if(map.p){map.p.load(map.n,makeRequire(relName,true),makeLoad(depName),{});args[i]=defined[depName]}else{throw new Error(name+" missing "+depName)}}ret=callback?callback.apply(defined[name],args):undefined;if(name){if(cjsModule&&cjsModule.exports!==undef&&cjsModule.exports!==defined[name]){defined[name]=cjsModule.exports}else if(ret!==undef||!usingExports){defined[name]=ret}}}else if(name){defined[name]=callback}};requirejs=require=req=function(deps,callback,relName,forceSync,alt){if(typeof deps==="string"){if(handlers[deps]){return handlers[deps](callback)}return callDep(makeMap(deps,makeRelParts(callback)).f)}else if(!deps.splice){config=deps;if(config.deps){req(config.deps,config.callback)}if(!callback){return}if(callback.splice){deps=callback;callback=relName;relName=null}else{deps=undef}}callback=callback||function(){};if(typeof relName==="function"){relName=forceSync;forceSync=alt}if(forceSync){main(undef,deps,callback,relName)}else{setTimeout(function(){main(undef,deps,callback,relName)},4)}return req};req.config=function(cfg){return req(cfg)};requirejs._defined=defined;define=function(name,deps,callback){if(typeof name!=="string"){throw new Error("See almond README: incorrect module build, no module name")}if(!deps.splice){callback=deps;deps=[]}if(!hasProp(defined,name)&&!hasProp(waiting,name)){waiting[name]=[name,deps,callback]}};define.amd={jQuery:true}})();S2.requirejs=requirejs;S2.require=require;S2.define=define}})();S2.define("almond",function(){});S2.define("jquery",[],function(){var _$=jQuery||$;if(_$==null&&console&&console.error){console.error("Select2: An instance of jQuery or a jQuery-compatible library was not "+"found. Make sure that you are including jQuery before Select2 on your "+"web page.")}return _$});S2.define("select2/utils",["jquery"],function($){var Utils={};Utils.Extend=function(ChildClass,SuperClass){var __hasProp={}.hasOwnProperty;function BaseConstructor(){this.constructor=ChildClass}for(var key in SuperClass){if(__hasProp.call(SuperClass,key)){ChildClass[key]=SuperClass[key]}}BaseConstructor.prototype=SuperClass.prototype;ChildClass.prototype=new BaseConstructor;ChildClass.__super__=SuperClass.prototype;return ChildClass};function getMethods(theClass){var proto=theClass.prototype;var methods=[];for(var methodName in proto){var m=proto[methodName];if(typeof m!=="function"){continue}if(methodName==="constructor"){continue}methods.push(methodName)}return methods}Utils.Decorate=function(SuperClass,DecoratorClass){var decoratedMethods=getMethods(DecoratorClass);var superMethods=getMethods(SuperClass);function DecoratedClass(){var unshift=Array.prototype.unshift;var argCount=DecoratorClass.prototype.constructor.length;var calledConstructor=SuperClass.prototype.constructor;if(argCount>0){unshift.call(arguments,SuperClass.prototype.constructor);calledConstructor=DecoratorClass.prototype.constructor}calledConstructor.apply(this,arguments)}DecoratorClass.displayName=SuperClass.displayName;function ctr(){this.constructor=DecoratedClass}DecoratedClass.prototype=new ctr;for(var m=0;m<superMethods.length;m++){var superMethod=superMethods[m];DecoratedClass.prototype[superMethod]=SuperClass.prototype[superMethod]}var calledMethod=function(methodName){var originalMethod=function(){};if(methodName in DecoratedClass.prototype){originalMethod=DecoratedClass.prototype[methodName]}var decoratedMethod=DecoratorClass.prototype[methodName];return function(){var unshift=Array.prototype.unshift;unshift.call(arguments,originalMethod);return decoratedMethod.apply(this,arguments)}};for(var d=0;d<decoratedMethods.length;d++){var decoratedMethod=decoratedMethods[d];DecoratedClass.prototype[decoratedMethod]=calledMethod(decoratedMethod)}return DecoratedClass};var Observable=function(){this.listeners={}};Observable.prototype.on=function(event,callback){this.listeners=this.listeners||{};if(event in this.listeners){this.listeners[event].push(callback)}else{this.listeners[event]=[callback]}};Observable.prototype.trigger=function(event){var slice=Array.prototype.slice;var params=slice.call(arguments,1);this.listeners=this.listeners||{};if(params==null){params=[]}if(params.length===0){params.push({})}params[0]._type=event;if(event in this.listeners){this.invoke(this.listeners[event],slice.call(arguments,1))}if("*"in this.listeners){this.invoke(this.listeners["*"],arguments)}};Observable.prototype.invoke=function(listeners,params){for(var i=0,len=listeners.length;i<len;i++){listeners[i].apply(this,params)}};Utils.Observable=Observable;Utils.generateChars=function(length){var chars="";for(var i=0;i<length;i++){var randomChar=Math.floor(Math.random()*36);chars+=randomChar.toString(36)}return chars};Utils.bind=function(func,context){return function(){func.apply(context,arguments)}};Utils._convertData=function(data){for(var originalKey in data){var keys=originalKey.split("-");var dataLevel=data;if(keys.length===1){continue}for(var k=0;k<keys.length;k++){var key=keys[k];key=key.substring(0,1).toLowerCase()+key.substring(1);if(!(key in dataLevel)){dataLevel[key]={}}if(k==keys.length-1){dataLevel[key]=data[originalKey]}dataLevel=dataLevel[key]}delete data[originalKey]}return data};Utils.hasScroll=function(index,el){var $el=$(el);var overflowX=el.style.overflowX;var overflowY=el.style.overflowY;if(overflowX===overflowY&&(overflowY==="hidden"||overflowY==="visible")){return false}if(overflowX==="scroll"||overflowY==="scroll"){return true}return $el.innerHeight()<el.scrollHeight||$el.innerWidth()<el.scrollWidth};Utils.escapeMarkup=function(markup){var replaceMap={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};if(typeof markup!=="string"){return markup}return String(markup).replace(/[&<>"'\/\\]/g,function(match){return replaceMap[match]})};Utils.__cache={};var id=0;Utils.GetUniqueElementId=function(element){var select2Id=element.getAttribute("data-select2-id");if(select2Id!=null){return select2Id}if(element.id){select2Id="select2-data-"+element.id}else{select2Id="select2-data-"+(++id).toString()+"-"+Utils.generateChars(4)}element.setAttribute("data-select2-id",select2Id);return select2Id};Utils.StoreData=function(element,name,value){var id=Utils.GetUniqueElementId(element);if(!Utils.__cache[id]){Utils.__cache[id]={}}Utils.__cache[id][name]=value};Utils.GetData=function(element,name){var id=Utils.GetUniqueElementId(element);if(name){if(Utils.__cache[id]){if(Utils.__cache[id][name]!=null){return Utils.__cache[id][name]}return $(element).data(name)}return $(element).data(name)}else{return Utils.__cache[id]}};Utils.RemoveData=function(element){var id=Utils.GetUniqueElementId(element);if(Utils.__cache[id]!=null){delete Utils.__cache[id]}element.removeAttribute("data-select2-id")};Utils.copyNonInternalCssClasses=function(dest,src){var classes;var destinationClasses=dest.getAttribute("class").trim().split(/\s+/);destinationClasses=destinationClasses.filter(function(clazz){return clazz.indexOf("select2-")===0});var sourceClasses=src.getAttribute("class").trim().split(/\s+/);sourceClasses=sourceClasses.filter(function(clazz){return clazz.indexOf("select2-")!==0});var replacements=destinationClasses.concat(sourceClasses);dest.setAttribute("class",replacements.join(" "))};return Utils});S2.define("select2/results",["jquery","./utils"],function($,Utils){function Results($element,options,dataAdapter){this.$element=$element;this.data=dataAdapter;this.options=options;Results.__super__.constructor.call(this)}Utils.Extend(Results,Utils.Observable);Results.prototype.render=function(){var $results=$('<ul class="select2-results__options" role="listbox"></ul>');if(this.options.get("multiple")){$results.attr("aria-multiselectable","true")}this.$results=$results;return $results};Results.prototype.clear=function(){this.$results.empty()};Results.prototype.displayMessage=function(params){var escapeMarkup=this.options.get("escapeMarkup");this.clear();this.hideLoading();var $message=$('<li role="alert" aria-live="assertive"'+' class="select2-results__option"></li>');var message=this.options.get("translations").get(params.message);$message.append(escapeMarkup(message(params.args)));$message[0].className+=" select2-results__message";this.$results.append($message)};Results.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()};Results.prototype.append=function(data){this.hideLoading();var $options=[];if(data.results==null||data.results.length===0){if(this.$results.children().length===0){this.trigger("results:message",{message:"noResults"})}return}data.results=this.sort(data.results);for(var d=0;d<data.results.length;d++){var item=data.results[d];var $option=this.option(item);$options.push($option)}this.$results.append($options)};Results.prototype.position=function($results,$dropdown){var $resultsContainer=$dropdown.find(".select2-results");$resultsContainer.append($results)};Results.prototype.sort=function(data){var sorter=this.options.get("sorter");return sorter(data)};Results.prototype.highlightFirstItem=function(){var $options=this.$results.find(".select2-results__option--selectable");var $selected=$options.filter(".select2-results__option--selected");if($selected.length>0){$selected.first().trigger("mouseenter")}else{$options.first().trigger("mouseenter")}this.ensureHighlightVisible()};Results.prototype.setClasses=function(){var self=this;this.data.current(function(selected){var selectedIds=selected.map(function(s){return s.id.toString()});var $options=self.$results.find(".select2-results__option--selectable");$options.each(function(){var $option=$(this);var item=Utils.GetData(this,"data");var id=""+item.id;if(item.element!=null&&item.element.selected||item.element==null&&selectedIds.indexOf(id)>-1){this.classList.add("select2-results__option--selected");$option.attr("aria-selected","true")}else{this.classList.remove("select2-results__option--selected");$option.attr("aria-selected","false")}})})};Results.prototype.showLoading=function(params){this.hideLoading();var loadingMore=this.options.get("translations").get("searching");var loading={disabled:true,loading:true,text:loadingMore(params)};var $loading=this.option(loading);$loading.className+=" loading-results";this.$results.prepend($loading)};Results.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()};Results.prototype.option=function(data){var option=document.createElement("li");option.classList.add("select2-results__option");option.classList.add("select2-results__option--selectable");var attrs={role:"option"};var matches=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;if(data.element!=null&&matches.call(data.element,":disabled")||data.element==null&&data.disabled){attrs["aria-disabled"]="true";option.classList.remove("select2-results__option--selectable");option.classList.add("select2-results__option--disabled")}if(data.id==null){option.classList.remove("select2-results__option--selectable")}if(data._resultId!=null){option.id=data._resultId}if(data.title){option.title=data.title}if(data.children){attrs.role="group";attrs["aria-label"]=data.text;option.classList.remove("select2-results__option--selectable");option.classList.add("select2-results__option--group")}for(var attr in attrs){var val=attrs[attr];option.setAttribute(attr,val)}if(data.children){var $option=$(option);var label=document.createElement("strong");label.className="select2-results__group";this.template(data,label);var $children=[];for(var c=0;c<data.children.length;c++){var child=data.children[c];var $child=this.option(child);$children.push($child)}var $childrenContainer=$("<ul></ul>",{class:"select2-results__options select2-results__options--nested",role:"none"});$childrenContainer.append($children);$option.append(label);$option.append($childrenContainer)}else{this.template(data,option)}Utils.StoreData(option,"data",data);return option};Results.prototype.bind=function(container,$container){var self=this;var id=container.id+"-results";this.$results.attr("id",id);container.on("results:all",function(params){self.clear();self.append(params.data);if(container.isOpen()){self.setClasses();self.highlightFirstItem()}});container.on("results:append",function(params){self.append(params.data);if(container.isOpen()){self.setClasses()}});container.on("query",function(params){self.hideMessages();self.showLoading(params)});container.on("select",function(){if(!container.isOpen()){return}self.setClasses();if(self.options.get("scrollAfterSelect")){self.highlightFirstItem()}});container.on("unselect",function(){if(!container.isOpen()){return}self.setClasses();if(self.options.get("scrollAfterSelect")){self.highlightFirstItem()}});container.on("open",function(){self.$results.attr("aria-expanded","true");self.$results.attr("aria-hidden","false");self.setClasses();self.ensureHighlightVisible()});container.on("close",function(){self.$results.attr("aria-expanded","false");self.$results.attr("aria-hidden","true");self.$results.removeAttr("aria-activedescendant")});container.on("results:toggle",function(){var $highlighted=self.getHighlightedResults();if($highlighted.length===0){return}$highlighted.trigger("mouseup")});container.on("results:select",function(){var $highlighted=self.getHighlightedResults();if($highlighted.length===0){return}var data=Utils.GetData($highlighted[0],"data");if($highlighted.hasClass("select2-results__option--selected")){self.trigger("close",{})}else{self.trigger("select",{data:data})}});container.on("results:previous",function(){var $highlighted=self.getHighlightedResults();var $options=self.$results.find(".select2-results__option--selectable");var currentIndex=$options.index($highlighted);if(currentIndex<=0){return}var nextIndex=currentIndex-1;if($highlighted.length===0){nextIndex=0}var $next=$options.eq(nextIndex);$next.trigger("mouseenter");var currentOffset=self.$results.offset().top;var nextTop=$next.offset().top;var nextOffset=self.$results.scrollTop()+(nextTop-currentOffset);if(nextIndex===0){self.$results.scrollTop(0)}else if(nextTop-currentOffset<0){self.$results.scrollTop(nextOffset)}});container.on("results:next",function(){var $highlighted=self.getHighlightedResults();var $options=self.$results.find(".select2-results__option--selectable");var currentIndex=$options.index($highlighted);var nextIndex=currentIndex+1;if(nextIndex>=$options.length){return}var $next=$options.eq(nextIndex);$next.trigger("mouseenter");var currentOffset=self.$results.offset().top+self.$results.outerHeight(false);var nextBottom=$next.offset().top+$next.outerHeight(false);var nextOffset=self.$results.scrollTop()+nextBottom-currentOffset;if(nextIndex===0){self.$results.scrollTop(0)}else if(nextBottom>currentOffset){self.$results.scrollTop(nextOffset)}});container.on("results:focus",function(params){params.element[0].classList.add("select2-results__option--highlighted");params.element[0].setAttribute("aria-selected","true")});container.on("results:message",function(params){self.displayMessage(params)});if($.fn.mousewheel){this.$results.on("mousewheel",function(e){var top=self.$results.scrollTop();var bottom=self.$results.get(0).scrollHeight-top+e.deltaY;var isAtTop=e.deltaY>0&&top-e.deltaY<=0;var isAtBottom=e.deltaY<0&&bottom<=self.$results.height();if(isAtTop){self.$results.scrollTop(0);e.preventDefault();e.stopPropagation()}else if(isAtBottom){self.$results.scrollTop(self.$results.get(0).scrollHeight-self.$results.height());e.preventDefault();e.stopPropagation()}})}this.$results.on("mouseup",".select2-results__option--selectable",function(evt){var $this=$(this);var data=Utils.GetData(this,"data");if($this.hasClass("select2-results__option--selected")){if(self.options.get("multiple")){self.trigger("unselect",{originalEvent:evt,data:data})}else{self.trigger("close",{})}return}self.trigger("select",{originalEvent:evt,data:data})});this.$results.on("mouseenter",".select2-results__option--selectable",function(evt){var data=Utils.GetData(this,"data");self.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false");self.trigger("results:focus",{data:data,element:$(this)})})};Results.prototype.getHighlightedResults=function(){var $highlighted=this.$results.find(".select2-results__option--highlighted");return $highlighted};Results.prototype.destroy=function(){this.$results.remove()};Results.prototype.ensureHighlightVisible=function(){var $highlighted=this.getHighlightedResults();if($highlighted.length===0){return}var $options=this.$results.find(".select2-results__option--selectable");var currentIndex=$options.index($highlighted);var currentOffset=this.$results.offset().top;var nextTop=$highlighted.offset().top;var nextOffset=this.$results.scrollTop()+(nextTop-currentOffset);var offsetDelta=nextTop-currentOffset;nextOffset-=$highlighted.outerHeight(false)*2;if(currentIndex<=2){this.$results.scrollTop(0)}else if(offsetDelta>this.$results.outerHeight()||offsetDelta<0){this.$results.scrollTop(nextOffset)}};Results.prototype.template=function(result,container){var template=this.options.get("templateResult");var escapeMarkup=this.options.get("escapeMarkup");var content=template(result,container);if(content==null){container.style.display="none"}else if(typeof content==="string"){container.innerHTML=escapeMarkup(content)}else{$(container).append(content)}};return Results});S2.define("select2/keys",[],function(){var KEYS={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return KEYS});S2.define("select2/selection/base",["jquery","../utils","../keys"],function($,Utils,KEYS){function BaseSelection($element,options){this.$element=$element;this.options=options;BaseSelection.__super__.constructor.call(this)}Utils.Extend(BaseSelection,Utils.Observable);BaseSelection.prototype.render=function(){var $selection=$('<span class="select2-selection" role="combobox" '+' aria-haspopup="true" aria-expanded="false">'+"</span>");this._tabindex=0;if(Utils.GetData(this.$element[0],"old-tabindex")!=null){this._tabindex=Utils.GetData(this.$element[0],"old-tabindex")}else if(this.$element.attr("tabindex")!=null){this._tabindex=this.$element.attr("tabindex")}$selection.attr("title",this.$element.attr("title"));$selection.attr("tabindex",this._tabindex);$selection.attr("aria-disabled","false");this.$selection=$selection;return $selection};BaseSelection.prototype.bind=function(container,$container){var self=this;var resultsId=container.id+"-results";this.container=container;this.$selection.on("focus",function(evt){self.trigger("focus",evt)});this.$selection.on("blur",function(evt){self._handleBlur(evt)});this.$selection.on("keydown",function(evt){self.trigger("keypress",evt);if(evt.which===KEYS.SPACE){evt.preventDefault()}});container.on("results:focus",function(params){self.$selection.attr("aria-activedescendant",params.data._resultId)});container.on("selection:update",function(params){self.update(params.data)});container.on("open",function(){self.$selection.attr("aria-expanded","true");self.$selection.attr("aria-owns",resultsId);self._attachCloseHandler(container)});container.on("close",function(){self.$selection.attr("aria-expanded","false");self.$selection.removeAttr("aria-activedescendant");self.$selection.removeAttr("aria-owns");self.$selection.trigger("focus");self._detachCloseHandler(container)});container.on("enable",function(){self.$selection.attr("tabindex",self._tabindex);self.$selection.attr("aria-disabled","false")});container.on("disable",function(){self.$selection.attr("tabindex","-1");self.$selection.attr("aria-disabled","true")})};BaseSelection.prototype._handleBlur=function(evt){var self=this;window.setTimeout(function(){if(document.activeElement==self.$selection[0]||$.contains(self.$selection[0],document.activeElement)){return}self.trigger("blur",evt)},1)};BaseSelection.prototype._attachCloseHandler=function(container){$(document.body).on("mousedown.select2."+container.id,function(e){var $target=$(e.target);var $select=$target.closest(".select2");var $all=$(".select2.select2-container--open");$all.each(function(){if(this==$select[0]){return}var $element=Utils.GetData(this,"element");$element.select2("close")})})};BaseSelection.prototype._detachCloseHandler=function(container){$(document.body).off("mousedown.select2."+container.id)};BaseSelection.prototype.position=function($selection,$container){var $selectionContainer=$container.find(".selection");$selectionContainer.append($selection)};BaseSelection.prototype.destroy=function(){this._detachCloseHandler(this.container)};BaseSelection.prototype.update=function(data){throw new Error("The `update` method must be defined in child classes.")};BaseSelection.prototype.isEnabled=function(){return!this.isDisabled()};BaseSelection.prototype.isDisabled=function(){return this.options.get("disabled")};return BaseSelection});S2.define("select2/selection/single",["jquery","./base","../utils","../keys"],function($,BaseSelection,Utils,KEYS){function SingleSelection(){SingleSelection.__super__.constructor.apply(this,arguments)}Utils.Extend(SingleSelection,BaseSelection);SingleSelection.prototype.render=function(){var $selection=SingleSelection.__super__.render.call(this);$selection[0].classList.add("select2-selection--single");$selection.html('<span class="select2-selection__rendered"></span>'+'<span class="select2-selection__arrow" role="presentation">'+'<b role="presentation"></b>'+"</span>");return $selection};SingleSelection.prototype.bind=function(container,$container){var self=this;SingleSelection.__super__.bind.apply(this,arguments);var id=container.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",id).attr("role","textbox").attr("aria-readonly","true");this.$selection.attr("aria-labelledby",id);this.$selection.attr("aria-controls",id);this.$selection.on("mousedown",function(evt){if(evt.which!==1){return}self.trigger("toggle",{originalEvent:evt})});this.$selection.on("focus",function(evt){});this.$selection.on("blur",function(evt){});container.on("focus",function(evt){if(!container.isOpen()){self.$selection.trigger("focus")}})};SingleSelection.prototype.clear=function(){var $rendered=this.$selection.find(".select2-selection__rendered");$rendered.empty();$rendered.removeAttr("title")};SingleSelection.prototype.display=function(data,container){var template=this.options.get("templateSelection");var escapeMarkup=this.options.get("escapeMarkup");return escapeMarkup(template(data,container))};SingleSelection.prototype.selectionContainer=function(){return $("<span></span>")};SingleSelection.prototype.update=function(data){if(data.length===0){this.clear();return}var selection=data[0];var $rendered=this.$selection.find(".select2-selection__rendered");var formatted=this.display(selection,$rendered);$rendered.empty().append(formatted);var title=selection.title||selection.text;if(title){$rendered.attr("title",title)}else{$rendered.removeAttr("title")}};return SingleSelection});S2.define("select2/selection/multiple",["jquery","./base","../utils"],function($,BaseSelection,Utils){function MultipleSelection($element,options){MultipleSelection.__super__.constructor.apply(this,arguments)}Utils.Extend(MultipleSelection,BaseSelection);MultipleSelection.prototype.render=function(){var $selection=MultipleSelection.__super__.render.call(this);$selection[0].classList.add("select2-selection--multiple");$selection.html('<ul class="select2-selection__rendered"></ul>');return $selection};MultipleSelection.prototype.bind=function(container,$container){var self=this;MultipleSelection.__super__.bind.apply(this,arguments);var id=container.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",id);this.$selection.on("click",function(evt){self.trigger("toggle",{originalEvent:evt})});this.$selection.on("click",".select2-selection__choice__remove",function(evt){if(self.isDisabled()){return}var $remove=$(this);var $selection=$remove.parent();var data=Utils.GetData($selection[0],"data");self.trigger("unselect",{originalEvent:evt,data:data})});this.$selection.on("keydown",".select2-selection__choice__remove",function(evt){if(self.isDisabled()){return}evt.stopPropagation()})};MultipleSelection.prototype.clear=function(){var $rendered=this.$selection.find(".select2-selection__rendered");$rendered.empty();$rendered.removeAttr("title")};MultipleSelection.prototype.display=function(data,container){var template=this.options.get("templateSelection");var escapeMarkup=this.options.get("escapeMarkup");return escapeMarkup(template(data,container))};MultipleSelection.prototype.selectionContainer=function(){var $container=$('<li class="select2-selection__choice">'+'<button type="button" class="select2-selection__choice__remove" '+'tabindex="-1">'+'<span aria-hidden="true">&times;</span>'+"</button>"+'<span class="select2-selection__choice__display"></span>'+"</li>");return $container};MultipleSelection.prototype.update=function(data){this.clear();if(data.length===0){return}var $selections=[];var selectionIdPrefix=this.$selection.find(".select2-selection__rendered").attr("id")+"-choice-";for(var d=0;d<data.length;d++){var selection=data[d];var $selection=this.selectionContainer();var formatted=this.display(selection,$selection);var selectionId=selectionIdPrefix+Utils.generateChars(4)+"-";if(selection.id){selectionId+=selection.id}else{selectionId+=Utils.generateChars(4)}$selection.find(".select2-selection__choice__display").append(formatted).attr("id",selectionId);var title=selection.title||selection.text;if(title){$selection.attr("title",title)}var removeItem=this.options.get("translations").get("removeItem");var $remove=$selection.find(".select2-selection__choice__remove");$remove.attr("title",removeItem());$remove.attr("aria-label",removeItem());$remove.attr("aria-describedby",selectionId);Utils.StoreData($selection[0],"data",selection);$selections.push($selection)}var $rendered=this.$selection.find(".select2-selection__rendered");$rendered.append($selections)};return MultipleSelection});S2.define("select2/selection/placeholder",[],function(){function Placeholder(decorated,$element,options){this.placeholder=this.normalizePlaceholder(options.get("placeholder"));decorated.call(this,$element,options)}Placeholder.prototype.normalizePlaceholder=function(_,placeholder){if(typeof placeholder==="string"){placeholder={id:"",text:placeholder}}return placeholder};Placeholder.prototype.createPlaceholder=function(decorated,placeholder){var $placeholder=this.selectionContainer();$placeholder.html(this.display(placeholder));$placeholder[0].classList.add("select2-selection__placeholder");$placeholder[0].classList.remove("select2-selection__choice");var placeholderTitle=placeholder.title||placeholder.text||$placeholder.text();this.$selection.find(".select2-selection__rendered").attr("title",placeholderTitle);return $placeholder};Placeholder.prototype.update=function(decorated,data){var singlePlaceholder=data.length==1&&data[0].id!=this.placeholder.id;var multipleSelections=data.length>1;if(multipleSelections||singlePlaceholder){return decorated.call(this,data)}this.clear();var $placeholder=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append($placeholder)};return Placeholder});S2.define("select2/selection/allowClear",["jquery","../keys","../utils"],function($,KEYS,Utils){function AllowClear(){}AllowClear.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container);if(this.placeholder==null){if(this.options.get("debug")&&window.console&&console.error){console.error("Select2: The `allowClear` option should be used in combination "+"with the `placeholder` option.")}}this.$selection.on("mousedown",".select2-selection__clear",function(evt){self._handleClear(evt)});container.on("keypress",function(evt){self._handleKeyboardClear(evt,container)})};AllowClear.prototype._handleClear=function(_,evt){if(this.isDisabled()){return}var $clear=this.$selection.find(".select2-selection__clear");if($clear.length===0){return}evt.stopPropagation();var data=Utils.GetData($clear[0],"data");var previousVal=this.$element.val();this.$element.val(this.placeholder.id);var unselectData={data:data};this.trigger("clear",unselectData);if(unselectData.prevented){this.$element.val(previousVal);return}for(var d=0;d<data.length;d++){unselectData={data:data[d]};this.trigger("unselect",unselectData);if(unselectData.prevented){this.$element.val(previousVal);return}}this.$element.trigger("input").trigger("change");this.trigger("toggle",{})};AllowClear.prototype._handleKeyboardClear=function(_,evt,container){if(container.isOpen()){return}if(evt.which==KEYS.DELETE||evt.which==KEYS.BACKSPACE){this._handleClear(evt)}};AllowClear.prototype.update=function(decorated,data){decorated.call(this,data);this.$selection.find(".select2-selection__clear").remove();this.$selection[0].classList.remove("select2-selection--clearable");if(this.$selection.find(".select2-selection__placeholder").length>0||data.length===0){return}var selectionId=this.$selection.find(".select2-selection__rendered").attr("id");var removeAll=this.options.get("translations").get("removeAllItems");var $remove=$('<button type="button" class="select2-selection__clear" tabindex="-1">'+'<span aria-hidden="true">&times;</span>'+"</button>");$remove.attr("title",removeAll());$remove.attr("aria-label",removeAll());$remove.attr("aria-describedby",selectionId);Utils.StoreData($remove[0],"data",data);this.$selection.prepend($remove);this.$selection[0].classList.add("select2-selection--clearable")};return AllowClear});S2.define("select2/selection/search",["jquery","../utils","../keys"],function($,Utils,KEYS){function Search(decorated,$element,options){decorated.call(this,$element,options)}Search.prototype.render=function(decorated){var searchLabel=this.options.get("translations").get("search");var $search=$('<span class="select2-search select2-search--inline">'+'<textarea class="select2-search__field"'+' type="search" tabindex="-1"'+' autocorrect="off" autocapitalize="none"'+' spellcheck="false" role="searchbox" aria-autocomplete="list" >'+"</textarea>"+"</span>");this.$searchContainer=$search;this.$search=$search.find("textarea");this.$search.prop("autocomplete",this.options.get("autocomplete"));this.$search.attr("aria-label",searchLabel());var $rendered=decorated.call(this);this._transferTabIndex();$rendered.append(this.$searchContainer);return $rendered};Search.prototype.bind=function(decorated,container,$container){var self=this;var resultsId=container.id+"-results";var selectionId=container.id+"-container";decorated.call(this,container,$container);self.$search.attr("aria-describedby",selectionId);container.on("open",function(){self.$search.attr("aria-controls",resultsId);self.$search.trigger("focus")});container.on("close",function(){self.$search.val("");self.resizeSearch();self.$search.removeAttr("aria-controls");self.$search.removeAttr("aria-activedescendant");self.$search.trigger("focus")});container.on("enable",function(){self.$search.prop("disabled",false);self._transferTabIndex()});container.on("disable",function(){self.$search.prop("disabled",true)});container.on("focus",function(evt){self.$search.trigger("focus")});container.on("results:focus",function(params){if(params.data._resultId){self.$search.attr("aria-activedescendant",params.data._resultId)}else{self.$search.removeAttr("aria-activedescendant")}});this.$selection.on("focusin",".select2-search--inline",function(evt){self.trigger("focus",evt)});this.$selection.on("focusout",".select2-search--inline",function(evt){self._handleBlur(evt)});this.$selection.on("keydown",".select2-search--inline",function(evt){evt.stopPropagation();self.trigger("keypress",evt);self._keyUpPrevented=evt.isDefaultPrevented();var key=evt.which;if(key===KEYS.BACKSPACE&&self.$search.val()===""){var $previousChoice=self.$selection.find(".select2-selection__choice").last();if($previousChoice.length>0){var item=Utils.GetData($previousChoice[0],"data");self.searchRemoveChoice(item);evt.preventDefault()}}});this.$selection.on("click",".select2-search--inline",function(evt){if(self.$search.val()){evt.stopPropagation()}});var msie=document.documentMode;var disableInputEvents=msie&&msie<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(evt){if(disableInputEvents){self.$selection.off("input.search input.searchcheck");return}self.$selection.off("keyup.search")});this.$selection.on("keyup.search input.search",".select2-search--inline",function(evt){if(disableInputEvents&&evt.type==="input"){self.$selection.off("input.search input.searchcheck");return}var key=evt.which;if(key==KEYS.SHIFT||key==KEYS.CTRL||key==KEYS.ALT){return}if(key==KEYS.TAB){return}self.handleSearch(evt)})};Search.prototype._transferTabIndex=function(decorated){this.$search.attr("tabindex",this.$selection.attr("tabindex"));this.$selection.attr("tabindex","-1")};Search.prototype.createPlaceholder=function(decorated,placeholder){this.$search.attr("placeholder",placeholder.text)};Search.prototype.update=function(decorated,data){var searchHadFocus=this.$search[0]==document.activeElement;this.$search.attr("placeholder","");decorated.call(this,data);this.resizeSearch();if(searchHadFocus){this.$search.trigger("focus")}};Search.prototype.handleSearch=function(){this.resizeSearch();if(!this._keyUpPrevented){var input=this.$search.val();this.trigger("query",{term:input})}this._keyUpPrevented=false};Search.prototype.searchRemoveChoice=function(decorated,item){this.trigger("unselect",{data:item});this.$search.val(item.text);this.handleSearch()};Search.prototype.resizeSearch=function(){this.$search.css("width","25px");var width="100%";if(this.$search.attr("placeholder")===""){var minimumWidth=this.$search.val().length+1;width=minimumWidth*.75+"em"}this.$search.css("width",width)};return Search});S2.define("select2/selection/selectionCss",["../utils"],function(Utils){function SelectionCSS(){}SelectionCSS.prototype.render=function(decorated){var $selection=decorated.call(this);var selectionCssClass=this.options.get("selectionCssClass")||"";if(selectionCssClass.indexOf(":all:")!==-1){selectionCssClass=selectionCssClass.replace(":all:","");Utils.copyNonInternalCssClasses($selection[0],this.$element[0])}$selection.addClass(selectionCssClass);return $selection};return SelectionCSS});S2.define("select2/selection/eventRelay",["jquery"],function($){function EventRelay(){}EventRelay.prototype.bind=function(decorated,container,$container){var self=this;var relayEvents=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"];var preventableEvents=["opening","closing","selecting","unselecting","clearing"];decorated.call(this,container,$container);container.on("*",function(name,params){if(relayEvents.indexOf(name)===-1){return}params=params||{};var evt=$.Event("select2:"+name,{params:params});self.$element.trigger(evt);if(preventableEvents.indexOf(name)===-1){return}params.prevented=evt.isDefaultPrevented()})};return EventRelay});S2.define("select2/translation",["jquery","require"],function($,require){function Translation(dict){this.dict=dict||{}}Translation.prototype.all=function(){return this.dict};Translation.prototype.get=function(key){return this.dict[key]};Translation.prototype.extend=function(translation){this.dict=$.extend({},translation.all(),this.dict)};Translation._cache={};Translation.loadPath=function(path){if(!(path in Translation._cache)){var translations=require(path);Translation._cache[path]=translations}return new Translation(Translation._cache[path])};return Translation});S2.define("select2/diacritics",[],function(){var diacritics={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"};return diacritics});S2.define("select2/data/base",["../utils"],function(Utils){function BaseAdapter($element,options){BaseAdapter.__super__.constructor.call(this)}Utils.Extend(BaseAdapter,Utils.Observable);BaseAdapter.prototype.current=function(callback){throw new Error("The `current` method must be defined in child classes.")};BaseAdapter.prototype.query=function(params,callback){throw new Error("The `query` method must be defined in child classes.")};BaseAdapter.prototype.bind=function(container,$container){};BaseAdapter.prototype.destroy=function(){};BaseAdapter.prototype.generateResultId=function(container,data){var id=container.id+"-result-";id+=Utils.generateChars(4);if(data.id!=null){id+="-"+data.id.toString()}else{id+="-"+Utils.generateChars(4)}return id};return BaseAdapter});S2.define("select2/data/select",["./base","../utils","jquery"],function(BaseAdapter,Utils,$){function SelectAdapter($element,options){this.$element=$element;this.options=options;SelectAdapter.__super__.constructor.call(this)}Utils.Extend(SelectAdapter,BaseAdapter);SelectAdapter.prototype.current=function(callback){var self=this;var data=Array.prototype.map.call(this.$element[0].querySelectorAll(":checked"),function(selectedElement){return self.item($(selectedElement))});callback(data)};SelectAdapter.prototype.select=function(data){var self=this;data.selected=true;if(data.element!=null&&data.element.tagName.toLowerCase()==="option"){data.element.selected=true;this.$element.trigger("input").trigger("change");return}if(this.$element.prop("multiple")){this.current(function(currentData){var val=[];data=[data];data.push.apply(data,currentData);for(var d=0;d<data.length;d++){var id=data[d].id;if(val.indexOf(id)===-1){val.push(id)}}self.$element.val(val);self.$element.trigger("input").trigger("change")})}else{var val=data.id;this.$element.val(val);this.$element.trigger("input").trigger("change")}};SelectAdapter.prototype.unselect=function(data){var self=this;if(!this.$element.prop("multiple")){return}data.selected=false;if(data.element!=null&&data.element.tagName.toLowerCase()==="option"){data.element.selected=false;this.$element.trigger("input").trigger("change");return}this.current(function(currentData){var val=[];for(var d=0;d<currentData.length;d++){var id=currentData[d].id;if(id!==data.id&&val.indexOf(id)===-1){val.push(id)}}self.$element.val(val);self.$element.trigger("input").trigger("change")})};SelectAdapter.prototype.bind=function(container,$container){var self=this;this.container=container;container.on("select",function(params){self.select(params.data)});container.on("unselect",function(params){self.unselect(params.data)})};SelectAdapter.prototype.destroy=function(){this.$element.find("*").each(function(){Utils.RemoveData(this)})};SelectAdapter.prototype.query=function(params,callback){var data=[];var self=this;var $options=this.$element.children();$options.each(function(){if(this.tagName.toLowerCase()!=="option"&&this.tagName.toLowerCase()!=="optgroup"){return}var $option=$(this);var option=self.item($option);var matches=self.matches(params,option);if(matches!==null){data.push(matches)}});callback({results:data})};SelectAdapter.prototype.addOptions=function($options){this.$element.append($options)};SelectAdapter.prototype.option=function(data){var option;if(data.children){option=document.createElement("optgroup");option.label=data.text}else{option=document.createElement("option");if(option.textContent!==undefined){option.textContent=data.text}else{option.innerText=data.text}}if(data.id!==undefined){option.value=data.id}if(data.disabled){option.disabled=true}if(data.selected){option.selected=true}if(data.title){option.title=data.title}var normalizedData=this._normalizeItem(data);normalizedData.element=option;Utils.StoreData(option,"data",normalizedData);return $(option)};SelectAdapter.prototype.item=function($option){var data={};data=Utils.GetData($option[0],"data");if(data!=null){return data}var option=$option[0];if(option.tagName.toLowerCase()==="option"){data={id:$option.val(),text:$option.text(),disabled:$option.prop("disabled"),selected:$option.prop("selected"),title:$option.prop("title")}}else if(option.tagName.toLowerCase()==="optgroup"){data={text:$option.prop("label"),children:[],title:$option.prop("title")};var $children=$option.children("option");var children=[];for(var c=0;c<$children.length;c++){var $child=$($children[c]);var child=this.item($child);children.push(child)}data.children=children}data=this._normalizeItem(data);data.element=$option[0];Utils.StoreData($option[0],"data",data);return data};SelectAdapter.prototype._normalizeItem=function(item){if(item!==Object(item)){item={id:item,text:item}}item=$.extend({},{text:""},item);var defaults={selected:false,disabled:false};if(item.id!=null){item.id=item.id.toString()}if(item.text!=null){item.text=item.text.toString()}if(item._resultId==null&&item.id&&this.container!=null){item._resultId=this.generateResultId(this.container,item)}return $.extend({},defaults,item)};SelectAdapter.prototype.matches=function(params,data){var matcher=this.options.get("matcher");return matcher(params,data)};return SelectAdapter});S2.define("select2/data/array",["./select","../utils","jquery"],function(SelectAdapter,Utils,$){function ArrayAdapter($element,options){this._dataToConvert=options.get("data")||[];ArrayAdapter.__super__.constructor.call(this,$element,options)}Utils.Extend(ArrayAdapter,SelectAdapter);ArrayAdapter.prototype.bind=function(container,$container){ArrayAdapter.__super__.bind.call(this,container,$container);this.addOptions(this.convertToOptions(this._dataToConvert))};ArrayAdapter.prototype.select=function(data){var $option=this.$element.find("option").filter(function(i,elm){return elm.value==data.id.toString()});if($option.length===0){$option=this.option(data);this.addOptions($option)}ArrayAdapter.__super__.select.call(this,data)};ArrayAdapter.prototype.convertToOptions=function(data){var self=this;var $existing=this.$element.find("option");var existingIds=$existing.map(function(){return self.item($(this)).id}).get();var $options=[];function onlyItem(item){return function(){return $(this).val()==item.id}}for(var d=0;d<data.length;d++){var item=this._normalizeItem(data[d]);if(existingIds.indexOf(item.id)>=0){var $existingOption=$existing.filter(onlyItem(item));var existingData=this.item($existingOption);var newData=$.extend(true,{},item,existingData);var $newOption=this.option(newData);$existingOption.replaceWith($newOption);continue}var $option=this.option(item);if(item.children){var $children=this.convertToOptions(item.children);$option.append($children)}$options.push($option)}return $options};return ArrayAdapter});S2.define("select2/data/ajax",["./array","../utils","jquery"],function(ArrayAdapter,Utils,$){function AjaxAdapter($element,options){this.ajaxOptions=this._applyDefaults(options.get("ajax"));if(this.ajaxOptions.processResults!=null){this.processResults=this.ajaxOptions.processResults}AjaxAdapter.__super__.constructor.call(this,$element,options)}Utils.Extend(AjaxAdapter,ArrayAdapter);AjaxAdapter.prototype._applyDefaults=function(options){var defaults={data:function(params){return $.extend({},params,{q:params.term})},transport:function(params,success,failure){var $request=$.ajax(params);$request.then(success);$request.fail(failure);return $request}};return $.extend({},defaults,options,true)};AjaxAdapter.prototype.processResults=function(results){return results};AjaxAdapter.prototype.query=function(params,callback){var matches=[];var self=this;if(this._request!=null){if(typeof this._request.abort==="function"){this._request.abort()}this._request=null}var options=$.extend({type:"GET"},this.ajaxOptions);if(typeof options.url==="function"){options.url=options.url.call(this.$element,params)}if(typeof options.data==="function"){options.data=options.data.call(this.$element,params)}function request(){var $request=options.transport(options,function(data){var results=self.processResults(data,params);if(self.options.get("debug")&&window.console&&console.error){if(!results||!results.results||!Array.isArray(results.results)){console.error("Select2: The AJAX results did not return an array in the "+"`results` key of the response.")}}callback(results)},function(){if("status"in $request&&($request.status===0||$request.status==="0")){return}self.trigger("results:message",{message:"errorLoading"})});self._request=$request}if(this.ajaxOptions.delay&&params.term!=null){if(this._queryTimeout){window.clearTimeout(this._queryTimeout)}this._queryTimeout=window.setTimeout(request,this.ajaxOptions.delay)}else{request()}};return AjaxAdapter});S2.define("select2/data/tags",["jquery"],function($){function Tags(decorated,$element,options){var tags=options.get("tags");var createTag=options.get("createTag");if(createTag!==undefined){this.createTag=createTag}var insertTag=options.get("insertTag");if(insertTag!==undefined){this.insertTag=insertTag}decorated.call(this,$element,options);if(Array.isArray(tags)){for(var t=0;t<tags.length;t++){var tag=tags[t];var item=this._normalizeItem(tag);var $option=this.option(item);this.$element.append($option)}}}Tags.prototype.query=function(decorated,params,callback){var self=this;this._removeOldTags();if(params.term==null||params.page!=null){decorated.call(this,params,callback);return}function wrapper(obj,child){var data=obj.results;for(var i=0;i<data.length;i++){var option=data[i];var checkChildren=option.children!=null&&!wrapper({results:option.children},true);var optionText=(option.text||"").toUpperCase();var paramsTerm=(params.term||"").toUpperCase();var checkText=optionText===paramsTerm;if(checkText||checkChildren){if(child){return false}obj.data=data;callback(obj);return}}if(child){return true}var tag=self.createTag(params);if(tag!=null){var $option=self.option(tag);$option.attr("data-select2-tag","true");self.addOptions([$option]);self.insertTag(data,tag)}obj.results=data;callback(obj)}decorated.call(this,params,wrapper)};Tags.prototype.createTag=function(decorated,params){if(params.term==null){return null}var term=params.term.trim();if(term===""){return null}return{id:term,text:term}};Tags.prototype.insertTag=function(_,data,tag){data.unshift(tag)};Tags.prototype._removeOldTags=function(_){var $options=this.$element.find("option[data-select2-tag]");$options.each(function(){if(this.selected){return}$(this).remove()})};return Tags});S2.define("select2/data/tokenizer",["jquery"],function($){function Tokenizer(decorated,$element,options){var tokenizer=options.get("tokenizer");if(tokenizer!==undefined){this.tokenizer=tokenizer}decorated.call(this,$element,options)}Tokenizer.prototype.bind=function(decorated,container,$container){decorated.call(this,container,$container);this.$search=container.dropdown.$search||container.selection.$search||$container.find(".select2-search__field")};Tokenizer.prototype.query=function(decorated,params,callback){var self=this;function createAndSelect(data){var item=self._normalizeItem(data);var $existingOptions=self.$element.find("option").filter(function(){return $(this).val()===item.id});if(!$existingOptions.length){var $option=self.option(item);$option.attr("data-select2-tag",true);self._removeOldTags();self.addOptions([$option])}select(item)}function select(data){self.trigger("select",{data:data})}params.term=params.term||"";var tokenData=this.tokenizer(params,this.options,createAndSelect);if(tokenData.term!==params.term){if(this.$search.length){this.$search.val(tokenData.term);this.$search.trigger("focus")}params.term=tokenData.term}decorated.call(this,params,callback)};Tokenizer.prototype.tokenizer=function(_,params,options,callback){var separators=options.get("tokenSeparators")||[];var term=params.term;var i=0;var createTag=this.createTag||function(params){return{id:params.term,text:params.term}};while(i<term.length){var termChar=term[i];if(separators.indexOf(termChar)===-1){i++;continue}var part=term.substr(0,i);var partParams=$.extend({},params,{term:part});var data=createTag(partParams);if(data==null){i++;continue}callback(data);term=term.substr(i+1)||"";i=0}return{term:term}};return Tokenizer});S2.define("select2/data/minimumInputLength",[],function(){function MinimumInputLength(decorated,$e,options){this.minimumInputLength=options.get("minimumInputLength");decorated.call(this,$e,options)}MinimumInputLength.prototype.query=function(decorated,params,callback){params.term=params.term||"";if(params.term.length<this.minimumInputLength){this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:params.term,params:params}});return}decorated.call(this,params,callback)};return MinimumInputLength});S2.define("select2/data/maximumInputLength",[],function(){function MaximumInputLength(decorated,$e,options){this.maximumInputLength=options.get("maximumInputLength");decorated.call(this,$e,options)}MaximumInputLength.prototype.query=function(decorated,params,callback){params.term=params.term||"";if(this.maximumInputLength>0&&params.term.length>this.maximumInputLength){this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:params.term,params:params}});return}decorated.call(this,params,callback)};return MaximumInputLength});S2.define("select2/data/maximumSelectionLength",[],function(){function MaximumSelectionLength(decorated,$e,options){this.maximumSelectionLength=options.get("maximumSelectionLength");decorated.call(this,$e,options)}MaximumSelectionLength.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container);container.on("select",function(){self._checkIfMaximumSelected()})};MaximumSelectionLength.prototype.query=function(decorated,params,callback){var self=this;this._checkIfMaximumSelected(function(){decorated.call(self,params,callback)})};MaximumSelectionLength.prototype._checkIfMaximumSelected=function(_,successCallback){var self=this;this.current(function(currentData){var count=currentData!=null?currentData.length:0;if(self.maximumSelectionLength>0&&count>=self.maximumSelectionLength){self.trigger("results:message",{message:"maximumSelected",args:{maximum:self.maximumSelectionLength}});return}if(successCallback){successCallback()}})};return MaximumSelectionLength});S2.define("select2/dropdown",["jquery","./utils"],function($,Utils){function Dropdown($element,options){this.$element=$element;this.options=options;Dropdown.__super__.constructor.call(this)}Utils.Extend(Dropdown,Utils.Observable);Dropdown.prototype.render=function(){var $dropdown=$('<span class="select2-dropdown">'+'<span class="select2-results"></span>'+"</span>");$dropdown.attr("dir",this.options.get("dir"));this.$dropdown=$dropdown;return $dropdown};Dropdown.prototype.bind=function(){};Dropdown.prototype.position=function($dropdown,$container){};Dropdown.prototype.destroy=function(){this.$dropdown.remove()};return Dropdown});S2.define("select2/dropdown/search",["jquery"],function($){function Search(){}Search.prototype.render=function(decorated){var $rendered=decorated.call(this);var searchLabel=this.options.get("translations").get("search");var $search=$('<span class="select2-search select2-search--dropdown">'+'<input class="select2-search__field" type="search" tabindex="-1"'+' autocorrect="off" autocapitalize="none"'+' spellcheck="false" role="searchbox" aria-autocomplete="list" />'+"</span>");this.$searchContainer=$search;this.$search=$search.find("input");this.$search.prop("autocomplete",this.options.get("autocomplete"));this.$search.attr("aria-label",searchLabel());$rendered.prepend($search);return $rendered};Search.prototype.bind=function(decorated,container,$container){var self=this;var resultsId=container.id+"-results";decorated.call(this,container,$container);this.$search.on("keydown",function(evt){self.trigger("keypress",evt);self._keyUpPrevented=evt.isDefaultPrevented()});this.$search.on("input",function(evt){$(this).off("keyup")});this.$search.on("keyup input",function(evt){self.handleSearch(evt)});container.on("open",function(){self.$search.attr("tabindex",0);self.$search.attr("aria-controls",resultsId);self.$search.trigger("focus");window.setTimeout(function(){self.$search.trigger("focus")},0)});container.on("close",function(){self.$search.attr("tabindex",-1);self.$search.removeAttr("aria-controls");self.$search.removeAttr("aria-activedescendant");self.$search.val("");self.$search.trigger("blur")});container.on("focus",function(){if(!container.isOpen()){self.$search.trigger("focus")}});container.on("results:all",function(params){if(params.query.term==null||params.query.term===""){var showSearch=self.showSearch(params);if(showSearch){self.$searchContainer[0].classList.remove("select2-search--hide")}else{self.$searchContainer[0].classList.add("select2-search--hide")}}});container.on("results:focus",function(params){if(params.data._resultId){self.$search.attr("aria-activedescendant",params.data._resultId)}else{self.$search.removeAttr("aria-activedescendant")}})};Search.prototype.handleSearch=function(evt){if(!this._keyUpPrevented){var input=this.$search.val();this.trigger("query",{term:input})}this._keyUpPrevented=false};Search.prototype.showSearch=function(_,params){return true};return Search});S2.define("select2/dropdown/hidePlaceholder",[],function(){function HidePlaceholder(decorated,$element,options,dataAdapter){this.placeholder=this.normalizePlaceholder(options.get("placeholder"));decorated.call(this,$element,options,dataAdapter)}HidePlaceholder.prototype.append=function(decorated,data){data.results=this.removePlaceholder(data.results);decorated.call(this,data)};HidePlaceholder.prototype.normalizePlaceholder=function(_,placeholder){if(typeof placeholder==="string"){placeholder={id:"",text:placeholder}}return placeholder};HidePlaceholder.prototype.removePlaceholder=function(_,data){var modifiedData=data.slice(0);for(var d=data.length-1;d>=0;d--){var item=data[d];if(this.placeholder.id===item.id){modifiedData.splice(d,1)}}return modifiedData};return HidePlaceholder});S2.define("select2/dropdown/infiniteScroll",["jquery"],function($){function InfiniteScroll(decorated,$element,options,dataAdapter){this.lastParams={};decorated.call(this,$element,options,dataAdapter);this.$loadingMore=this.createLoadingMore();this.loading=false}InfiniteScroll.prototype.append=function(decorated,data){this.$loadingMore.remove();this.loading=false;decorated.call(this,data);if(this.showLoadingMore(data)){this.$results.append(this.$loadingMore);this.loadMoreIfNeeded()}};InfiniteScroll.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container);container.on("query",function(params){self.lastParams=params;self.loading=true});container.on("query:append",function(params){self.lastParams=params;self.loading=true});this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))};InfiniteScroll.prototype.loadMoreIfNeeded=function(){var isLoadMoreVisible=$.contains(document.documentElement,this.$loadingMore[0]);if(this.loading||!isLoadMoreVisible){return}var currentOffset=this.$results.offset().top+this.$results.outerHeight(false);var loadingMoreOffset=this.$loadingMore.offset().top+this.$loadingMore.outerHeight(false);if(currentOffset+50>=loadingMoreOffset){this.loadMore()}};InfiniteScroll.prototype.loadMore=function(){this.loading=true;var params=$.extend({},{page:1},this.lastParams);params.page++;this.trigger("query:append",params)};InfiniteScroll.prototype.showLoadingMore=function(_,data){return data.pagination&&data.pagination.more};InfiniteScroll.prototype.createLoadingMore=function(){var $option=$("<li "+'class="select2-results__option select2-results__option--load-more"'+'role="option" aria-disabled="true"></li>');var message=this.options.get("translations").get("loadingMore");$option.html(message(this.lastParams));return $option};return InfiniteScroll});S2.define("select2/dropdown/attachBody",["jquery","../utils"],function($,Utils){function AttachBody(decorated,$element,options){this.$dropdownParent=$(options.get("dropdownParent")||document.body);decorated.call(this,$element,options)}AttachBody.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container);container.on("open",function(){self._showDropdown();self._attachPositioningHandler(container);self._bindContainerResultHandlers(container)});container.on("close",function(){self._hideDropdown();self._detachPositioningHandler(container)});this.$dropdownContainer.on("mousedown",function(evt){evt.stopPropagation()})};AttachBody.prototype.destroy=function(decorated){decorated.call(this);this.$dropdownContainer.remove()};AttachBody.prototype.position=function(decorated,$dropdown,$container){$dropdown.attr("class",$container.attr("class"));$dropdown[0].classList.remove("select2");$dropdown[0].classList.add("select2-container--open");$dropdown.css({position:"absolute",top:-999999});this.$container=$container};AttachBody.prototype.render=function(decorated){var $container=$("<span></span>");var $dropdown=decorated.call(this);$container.append($dropdown);this.$dropdownContainer=$container;return $container};AttachBody.prototype._hideDropdown=function(decorated){this.$dropdownContainer.detach()};AttachBody.prototype._bindContainerResultHandlers=function(decorated,container){if(this._containerResultsHandlersBound){return}var self=this;container.on("results:all",function(){self._positionDropdown();self._resizeDropdown()});container.on("results:append",function(){self._positionDropdown();self._resizeDropdown()});container.on("results:message",function(){self._positionDropdown();self._resizeDropdown()});container.on("select",function(){self._positionDropdown();self._resizeDropdown()});container.on("unselect",function(){self._positionDropdown();self._resizeDropdown()});this._containerResultsHandlersBound=true};AttachBody.prototype._attachPositioningHandler=function(decorated,container){var self=this;var scrollEvent="scroll.select2."+container.id;var resizeEvent="resize.select2."+container.id;var orientationEvent="orientationchange.select2."+container.id;var $watchers=this.$container.parents().filter(Utils.hasScroll);$watchers.each(function(){Utils.StoreData(this,"select2-scroll-position",{x:$(this).scrollLeft(),y:$(this).scrollTop()})});$watchers.on(scrollEvent,function(ev){var position=Utils.GetData(this,"select2-scroll-position");$(this).scrollTop(position.y)});$(window).on(scrollEvent+" "+resizeEvent+" "+orientationEvent,function(e){self._positionDropdown();self._resizeDropdown()})};AttachBody.prototype._detachPositioningHandler=function(decorated,container){var scrollEvent="scroll.select2."+container.id;var resizeEvent="resize.select2."+container.id;var orientationEvent="orientationchange.select2."+container.id;var $watchers=this.$container.parents().filter(Utils.hasScroll);$watchers.off(scrollEvent);$(window).off(scrollEvent+" "+resizeEvent+" "+orientationEvent)};AttachBody.prototype._positionDropdown=function(){var $window=$(window);var isCurrentlyAbove=this.$dropdown[0].classList.contains("select2-dropdown--above");var isCurrentlyBelow=this.$dropdown[0].classList.contains("select2-dropdown--below");var newDirection=null;var offset=this.$container.offset();offset.bottom=offset.top+this.$container.outerHeight(false);var container={height:this.$container.outerHeight(false)};container.top=offset.top;container.bottom=offset.top+container.height;var dropdown={height:this.$dropdown.outerHeight(false)};var viewport={top:$window.scrollTop(),bottom:$window.scrollTop()+$window.height()};var enoughRoomAbove=viewport.top<offset.top-dropdown.height;var enoughRoomBelow=viewport.bottom>offset.bottom+dropdown.height;var css={left:offset.left,top:container.bottom};var $offsetParent=this.$dropdownParent;if($offsetParent.css("position")==="static"){$offsetParent=$offsetParent.offsetParent()}var parentOffset={top:0,left:0};if($.contains(document.body,$offsetParent[0])||$offsetParent[0].isConnected){parentOffset=$offsetParent.offset()}css.top-=parentOffset.top;css.left-=parentOffset.left;if(!isCurrentlyAbove&&!isCurrentlyBelow){newDirection="below"}if(!enoughRoomBelow&&enoughRoomAbove&&!isCurrentlyAbove){newDirection="above"}else if(!enoughRoomAbove&&enoughRoomBelow&&isCurrentlyAbove){newDirection="below"}if(newDirection=="above"||isCurrentlyAbove&&newDirection!=="below"){css.top=container.top-parentOffset.top-dropdown.height}if(newDirection!=null){this.$dropdown[0].classList.remove("select2-dropdown--below");this.$dropdown[0].classList.remove("select2-dropdown--above");this.$dropdown[0].classList.add("select2-dropdown--"+newDirection);this.$container[0].classList.remove("select2-container--below");this.$container[0].classList.remove("select2-container--above");this.$container[0].classList.add("select2-container--"+newDirection)}this.$dropdownContainer.css(css)};AttachBody.prototype._resizeDropdown=function(){var css={width:this.$container.outerWidth(false)+"px"};if(this.options.get("dropdownAutoWidth")){css.minWidth=css.width;css.position="relative";css.width="auto"}this.$dropdown.css(css)};AttachBody.prototype._showDropdown=function(decorated){this.$dropdownContainer.appendTo(this.$dropdownParent);this._positionDropdown();this._resizeDropdown()};return AttachBody});S2.define("select2/dropdown/minimumResultsForSearch",[],function(){function countResults(data){var count=0;for(var d=0;d<data.length;d++){var item=data[d];if(item.children){count+=countResults(item.children)}else{count++}}return count}function MinimumResultsForSearch(decorated,$element,options,dataAdapter){this.minimumResultsForSearch=options.get("minimumResultsForSearch");if(this.minimumResultsForSearch<0){this.minimumResultsForSearch=Infinity}decorated.call(this,$element,options,dataAdapter)}MinimumResultsForSearch.prototype.showSearch=function(decorated,params){if(countResults(params.data.results)<this.minimumResultsForSearch){return false}return decorated.call(this,params)};return MinimumResultsForSearch});S2.define("select2/dropdown/selectOnClose",["../utils"],function(Utils){function SelectOnClose(){}SelectOnClose.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container);container.on("close",function(params){self._handleSelectOnClose(params)})};SelectOnClose.prototype._handleSelectOnClose=function(_,params){if(params&&params.originalSelect2Event!=null){var event=params.originalSelect2Event;if(event._type==="select"||event._type==="unselect"){return}}var $highlightedResults=this.getHighlightedResults();if($highlightedResults.length<1){return}var data=Utils.GetData($highlightedResults[0],"data");if(data.element!=null&&data.element.selected||data.element==null&&data.selected){return}this.trigger("select",{data:data})};return SelectOnClose});S2.define("select2/dropdown/closeOnSelect",[],function(){function CloseOnSelect(){}CloseOnSelect.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container);container.on("select",function(evt){self._selectTriggered(evt)});container.on("unselect",function(evt){self._selectTriggered(evt)})};CloseOnSelect.prototype._selectTriggered=function(_,evt){var originalEvent=evt.originalEvent;if(originalEvent&&(originalEvent.ctrlKey||originalEvent.metaKey)){return}this.trigger("close",{originalEvent:originalEvent,originalSelect2Event:evt})};return CloseOnSelect});S2.define("select2/dropdown/dropdownCss",["../utils"],function(Utils){function DropdownCSS(){}DropdownCSS.prototype.render=function(decorated){var $dropdown=decorated.call(this);var dropdownCssClass=this.options.get("dropdownCssClass")||"";if(dropdownCssClass.indexOf(":all:")!==-1){dropdownCssClass=dropdownCssClass.replace(":all:","");Utils.copyNonInternalCssClasses($dropdown[0],this.$element[0])}$dropdown.addClass(dropdownCssClass);return $dropdown};return DropdownCSS});S2.define("select2/dropdown/tagsSearchHighlight",["../utils"],function(Utils){function TagsSearchHighlight(){}TagsSearchHighlight.prototype.highlightFirstItem=function(decorated){var $options=this.$results.find(".select2-results__option--selectable"+":not(.select2-results__option--selected)");if($options.length>0){var $firstOption=$options.first();var data=Utils.GetData($firstOption[0],"data");var firstElement=data.element;if(firstElement&&firstElement.getAttribute){if(firstElement.getAttribute("data-select2-tag")==="true"){$firstOption.trigger("mouseenter");return}}}decorated.call(this)};return TagsSearchHighlight});S2.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(args){var overChars=args.input.length-args.maximum;var message="Please delete "+overChars+" character";if(overChars!=1){message+="s"}return message},inputTooShort:function(args){var remainingChars=args.minimum-args.input.length;var message="Please enter "+remainingChars+" or more characters";return message},loadingMore:function(){return"Loading more results…"},maximumSelected:function(args){var message="You can only select "+args.maximum+" item";if(args.maximum!=1){message+="s"}return message},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"},removeItem:function(){return"Remove item"},search:function(){return"Search"}}});S2.define("select2/defaults",["jquery","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/selectionCss","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./dropdown/dropdownCss","./dropdown/tagsSearchHighlight","./i18n/en"],function($,ResultsList,SingleSelection,MultipleSelection,Placeholder,AllowClear,SelectionSearch,SelectionCSS,EventRelay,Utils,Translation,DIACRITICS,SelectData,ArrayData,AjaxData,Tags,Tokenizer,MinimumInputLength,MaximumInputLength,MaximumSelectionLength,Dropdown,DropdownSearch,HidePlaceholder,InfiniteScroll,AttachBody,MinimumResultsForSearch,SelectOnClose,CloseOnSelect,DropdownCSS,TagsSearchHighlight,EnglishTranslation){function Defaults(){this.reset()}Defaults.prototype.apply=function(options){options=$.extend(true,{},this.defaults,options);if(options.dataAdapter==null){if(options.ajax!=null){options.dataAdapter=AjaxData}else if(options.data!=null){options.dataAdapter=ArrayData}else{options.dataAdapter=SelectData}if(options.minimumInputLength>0){options.dataAdapter=Utils.Decorate(options.dataAdapter,MinimumInputLength)}if(options.maximumInputLength>0){options.dataAdapter=Utils.Decorate(options.dataAdapter,MaximumInputLength)}if(options.maximumSelectionLength>0){options.dataAdapter=Utils.Decorate(options.dataAdapter,MaximumSelectionLength)}if(options.tags){options.dataAdapter=Utils.Decorate(options.dataAdapter,Tags)}if(options.tokenSeparators!=null||options.tokenizer!=null){options.dataAdapter=Utils.Decorate(options.dataAdapter,Tokenizer)}}if(options.resultsAdapter==null){options.resultsAdapter=ResultsList;if(options.ajax!=null){options.resultsAdapter=Utils.Decorate(options.resultsAdapter,InfiniteScroll)}if(options.placeholder!=null){options.resultsAdapter=Utils.Decorate(options.resultsAdapter,HidePlaceholder)}if(options.selectOnClose){options.resultsAdapter=Utils.Decorate(options.resultsAdapter,SelectOnClose)}if(options.tags){options.resultsAdapter=Utils.Decorate(options.resultsAdapter,TagsSearchHighlight)}}if(options.dropdownAdapter==null){if(options.multiple){options.dropdownAdapter=Dropdown}else{var SearchableDropdown=Utils.Decorate(Dropdown,DropdownSearch);options.dropdownAdapter=SearchableDropdown}if(options.minimumResultsForSearch!==0){options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,MinimumResultsForSearch)}if(options.closeOnSelect){options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,CloseOnSelect)}if(options.dropdownCssClass!=null){options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,DropdownCSS)}options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,AttachBody)}if(options.selectionAdapter==null){if(options.multiple){options.selectionAdapter=MultipleSelection}else{options.selectionAdapter=SingleSelection}if(options.placeholder!=null){options.selectionAdapter=Utils.Decorate(options.selectionAdapter,Placeholder)}if(options.allowClear){options.selectionAdapter=Utils.Decorate(options.selectionAdapter,AllowClear)}if(options.multiple){options.selectionAdapter=Utils.Decorate(options.selectionAdapter,SelectionSearch)}if(options.selectionCssClass!=null){options.selectionAdapter=Utils.Decorate(options.selectionAdapter,SelectionCSS)}options.selectionAdapter=Utils.Decorate(options.selectionAdapter,EventRelay)}options.language=this._resolveLanguage(options.language);options.language.push("en");var uniqueLanguages=[];for(var l=0;l<options.language.length;l++){var language=options.language[l];if(uniqueLanguages.indexOf(language)===-1){uniqueLanguages.push(language)}}options.language=uniqueLanguages;options.translations=this._processTranslations(options.language,options.debug);return options};Defaults.prototype.reset=function(){function stripDiacritics(text){function match(a){return DIACRITICS[a]||a}return text.replace(/[^\u0000-\u007E]/g,match)}function matcher(params,data){if(params.term==null||params.term.trim()===""){return data}if(data.children&&data.children.length>0){var match=$.extend(true,{},data);for(var c=data.children.length-1;c>=0;c--){var child=data.children[c];var matches=matcher(params,child);if(matches==null){match.children.splice(c,1)}}if(match.children.length>0){return match}return matcher(params,match)}var original=stripDiacritics(data.text).toUpperCase();var term=stripDiacritics(params.term).toUpperCase();if(original.indexOf(term)>-1){return data}return null}this.defaults={amdLanguageBase:"./i18n/",autocomplete:"off",closeOnSelect:true,debug:false,dropdownAutoWidth:false,escapeMarkup:Utils.escapeMarkup,language:{},matcher:matcher,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:false,scrollAfterSelect:false,sorter:function(data){return data},templateResult:function(result){return result.text},templateSelection:function(selection){return selection.text},theme:"default",width:"resolve"}};Defaults.prototype.applyFromElement=function(options,$element){var optionLanguage=options.language;var defaultLanguage=this.defaults.language;var elementLanguage=$element.prop("lang");var parentLanguage=$element.closest("[lang]").prop("lang");var languages=Array.prototype.concat.call(this._resolveLanguage(elementLanguage),this._resolveLanguage(optionLanguage),this._resolveLanguage(defaultLanguage),this._resolveLanguage(parentLanguage));options.language=languages;return options};Defaults.prototype._resolveLanguage=function(language){if(!language){return[]}if($.isEmptyObject(language)){return[]}if($.isPlainObject(language)){return[language]}var languages;if(!Array.isArray(language)){languages=[language]}else{languages=language}var resolvedLanguages=[];for(var l=0;l<languages.length;l++){resolvedLanguages.push(languages[l]);if(typeof languages[l]==="string"&&languages[l].indexOf("-")>0){var languageParts=languages[l].split("-");var baseLanguage=languageParts[0];resolvedLanguages.push(baseLanguage)}}return resolvedLanguages};Defaults.prototype._processTranslations=function(languages,debug){var translations=new Translation;for(var l=0;l<languages.length;l++){var languageData=new Translation;var language=languages[l];if(typeof language==="string"){try{languageData=Translation.loadPath(language)}catch(e){try{language=this.defaults.amdLanguageBase+language;languageData=Translation.loadPath(language)}catch(ex){if(debug&&window.console&&console.warn){console.warn('Select2: The language file for "'+language+'" could '+"not be automatically loaded. A fallback will be used instead.")}}}}else if($.isPlainObject(language)){languageData=new Translation(language)}else{languageData=language}translations.extend(languageData)}return translations};Defaults.prototype.set=function(key,value){var camelKey=$.camelCase(key);var data={};data[camelKey]=value;var convertedData=Utils._convertData(data);$.extend(true,this.defaults,convertedData)};var defaults=new Defaults;return defaults});S2.define("select2/options",["jquery","./defaults","./utils"],function($,Defaults,Utils){function Options(options,$element){this.options=options;if($element!=null){this.fromElement($element)}if($element!=null){this.options=Defaults.applyFromElement(this.options,$element)}this.options=Defaults.apply(this.options)}Options.prototype.fromElement=function($e){var excludedData=["select2"];if(this.options.multiple==null){this.options.multiple=$e.prop("multiple")}if(this.options.disabled==null){this.options.disabled=$e.prop("disabled")}if(this.options.autocomplete==null&&$e.prop("autocomplete")){this.options.autocomplete=$e.prop("autocomplete")}if(this.options.dir==null){if($e.prop("dir")){this.options.dir=$e.prop("dir")}else if($e.closest("[dir]").prop("dir")){this.options.dir=$e.closest("[dir]").prop("dir")}else{this.options.dir="ltr"}}$e.prop("disabled",this.options.disabled);$e.prop("multiple",this.options.multiple);if(Utils.GetData($e[0],"select2Tags")){if(this.options.debug&&window.console&&console.warn){console.warn("Select2: The `data-select2-tags` attribute has been changed to "+'use the `data-data` and `data-tags="true"` attributes and will be '+"removed in future versions of Select2.")}Utils.StoreData($e[0],"data",Utils.GetData($e[0],"select2Tags"));Utils.StoreData($e[0],"tags",true)}if(Utils.GetData($e[0],"ajaxUrl")){if(this.options.debug&&window.console&&console.warn){console.warn("Select2: The `data-ajax-url` attribute has been changed to "+"`data-ajax--url` and support for the old attribute will be removed"+" in future versions of Select2.")}$e.attr("ajax--url",Utils.GetData($e[0],"ajaxUrl"));Utils.StoreData($e[0],"ajax-Url",Utils.GetData($e[0],"ajaxUrl"))}var dataset={};function upperCaseLetter(_,letter){return letter.toUpperCase()}for(var attr=0;attr<$e[0].attributes.length;attr++){var attributeName=$e[0].attributes[attr].name;var prefix="data-";if(attributeName.substr(0,prefix.length)==prefix){var dataName=attributeName.substring(prefix.length);var dataValue=Utils.GetData($e[0],dataName);var camelDataName=dataName.replace(/-([a-z])/g,upperCaseLetter);dataset[camelDataName]=dataValue}}if($.fn.jquery&&$.fn.jquery.substr(0,2)=="1."&&$e[0].dataset){dataset=$.extend(true,{},$e[0].dataset,dataset)}var data=$.extend(true,{},Utils.GetData($e[0]),dataset);data=Utils._convertData(data);for(var key in data){if(excludedData.indexOf(key)>-1){continue}if($.isPlainObject(this.options[key])){$.extend(this.options[key],data[key])}else{this.options[key]=data[key]}}return this};Options.prototype.get=function(key){return this.options[key]};Options.prototype.set=function(key,val){this.options[key]=val};return Options});S2.define("select2/core",["jquery","./options","./utils","./keys"],function($,Options,Utils,KEYS){var Select2=function($element,options){if(Utils.GetData($element[0],"select2")!=null){Utils.GetData($element[0],"select2").destroy()}this.$element=$element;this.id=this._generateId($element);options=options||{};this.options=new Options(options,$element);Select2.__super__.constructor.call(this);var tabindex=$element.attr("tabindex")||0;Utils.StoreData($element[0],"old-tabindex",tabindex);$element.attr("tabindex","-1");var DataAdapter=this.options.get("dataAdapter");this.dataAdapter=new DataAdapter($element,this.options);var $container=this.render();this._placeContainer($container);var SelectionAdapter=this.options.get("selectionAdapter");this.selection=new SelectionAdapter($element,this.options);this.$selection=this.selection.render();this.selection.position(this.$selection,$container);var DropdownAdapter=this.options.get("dropdownAdapter");this.dropdown=new DropdownAdapter($element,this.options);this.$dropdown=this.dropdown.render();this.dropdown.position(this.$dropdown,$container);var ResultsAdapter=this.options.get("resultsAdapter");this.results=new ResultsAdapter($element,this.options,this.dataAdapter);this.$results=this.results.render();this.results.position(this.$results,this.$dropdown);var self=this;this._bindAdapters();this._registerDomEvents();this._registerDataEvents();this._registerSelectionEvents();this._registerDropdownEvents();this._registerResultsEvents();this._registerEvents();this.dataAdapter.current(function(initialData){self.trigger("selection:update",{data:initialData})});$element[0].classList.add("select2-hidden-accessible");$element.attr("aria-hidden","true");this._syncAttributes();Utils.StoreData($element[0],"select2",this);$element.data("select2",this)};Utils.Extend(Select2,Utils.Observable);Select2.prototype._generateId=function($element){var id="";if($element.attr("id")!=null){id=$element.attr("id")}else if($element.attr("name")!=null){id=$element.attr("name")+"-"+Utils.generateChars(2)}else{id=Utils.generateChars(4)}id=id.replace(/(:|\.|\[|\]|,)/g,"");id="select2-"+id;return id};Select2.prototype._placeContainer=function($container){$container.insertAfter(this.$element);var width=this._resolveWidth(this.$element,this.options.get("width"));if(width!=null){$container.css("width",width)}};Select2.prototype._resolveWidth=function($element,method){var WIDTH=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if(method=="resolve"){var styleWidth=this._resolveWidth($element,"style");if(styleWidth!=null){return styleWidth}return this._resolveWidth($element,"element")}if(method=="element"){var elementWidth=$element.outerWidth(false);if(elementWidth<=0){return"auto"}return elementWidth+"px"}if(method=="style"){var style=$element.attr("style");if(typeof style!=="string"){return null}var attrs=style.split(";");for(var i=0,l=attrs.length;i<l;i=i+1){var attr=attrs[i].replace(/\s/g,"");var matches=attr.match(WIDTH);if(matches!==null&&matches.length>=1){return matches[1]}}return null}if(method=="computedstyle"){var computedStyle=window.getComputedStyle($element[0]);return computedStyle.width}return method};Select2.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container);this.selection.bind(this,this.$container);this.dropdown.bind(this,this.$container);this.results.bind(this,this.$container)};Select2.prototype._registerDomEvents=function(){var self=this;this.$element.on("change.select2",function(){self.dataAdapter.current(function(data){self.trigger("selection:update",{data:data})})});this.$element.on("focus.select2",function(evt){self.trigger("focus",evt)});this._syncA=Utils.bind(this._syncAttributes,this);this._syncS=Utils.bind(this._syncSubtree,this);this._observer=new window.MutationObserver(function(mutations){self._syncA();self._syncS(mutations)});this._observer.observe(this.$element[0],{attributes:true,childList:true,subtree:false})};Select2.prototype._registerDataEvents=function(){var self=this;this.dataAdapter.on("*",function(name,params){self.trigger(name,params)})};Select2.prototype._registerSelectionEvents=function(){var self=this;var nonRelayEvents=["toggle","focus"];this.selection.on("toggle",function(){self.toggleDropdown()});this.selection.on("focus",function(params){self.focus(params)});this.selection.on("*",function(name,params){if(nonRelayEvents.indexOf(name)!==-1){return}self.trigger(name,params)})};Select2.prototype._registerDropdownEvents=function(){var self=this;this.dropdown.on("*",function(name,params){self.trigger(name,params)})};Select2.prototype._registerResultsEvents=function(){var self=this;this.results.on("*",function(name,params){self.trigger(name,params)})};Select2.prototype._registerEvents=function(){var self=this;this.on("open",function(){self.$container[0].classList.add("select2-container--open")});this.on("close",function(){self.$container[0].classList.remove("select2-container--open")});this.on("enable",function(){self.$container[0].classList.remove("select2-container--disabled")});this.on("disable",function(){self.$container[0].classList.add("select2-container--disabled")});this.on("blur",function(){self.$container[0].classList.remove("select2-container--focus")});this.on("query",function(params){if(!self.isOpen()){self.trigger("open",{})}this.dataAdapter.query(params,function(data){self.trigger("results:all",{data:data,query:params})})});this.on("query:append",function(params){this.dataAdapter.query(params,function(data){self.trigger("results:append",{data:data,query:params})})});this.on("keypress",function(evt){var key=evt.which;if(self.isOpen()){if(key===KEYS.ESC||key===KEYS.UP&&evt.altKey){self.close(evt);evt.preventDefault()}else if(key===KEYS.ENTER||key===KEYS.TAB){self.trigger("results:select",{});evt.preventDefault()}else if(key===KEYS.SPACE&&evt.ctrlKey){self.trigger("results:toggle",{});evt.preventDefault()}else if(key===KEYS.UP){self.trigger("results:previous",{});evt.preventDefault()}else if(key===KEYS.DOWN){self.trigger("results:next",{});evt.preventDefault()}}else{if(key===KEYS.ENTER||key===KEYS.SPACE||key===KEYS.DOWN&&evt.altKey){self.open();evt.preventDefault()}}})};Select2.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled"));if(this.isDisabled()){if(this.isOpen()){this.close()}this.trigger("disable",{})}else{this.trigger("enable",{})}};Select2.prototype._isChangeMutation=function(mutations){var self=this;if(mutations.addedNodes&&mutations.addedNodes.length>0){for(var n=0;n<mutations.addedNodes.length;n++){var node=mutations.addedNodes[n];if(node.selected){return true}}}else if(mutations.removedNodes&&mutations.removedNodes.length>0){return true}else if(Array.isArray(mutations)){return mutations.some(function(mutation){return self._isChangeMutation(mutation)})}return false};Select2.prototype._syncSubtree=function(mutations){var changed=this._isChangeMutation(mutations);var self=this;if(changed){this.dataAdapter.current(function(currentData){self.trigger("selection:update",{data:currentData})})}};Select2.prototype.trigger=function(name,args){var actualTrigger=Select2.__super__.trigger;var preTriggerMap={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(args===undefined){args={}}if(name in preTriggerMap){var preTriggerName=preTriggerMap[name];var preTriggerArgs={prevented:false,name:name,args:args};actualTrigger.call(this,preTriggerName,preTriggerArgs);if(preTriggerArgs.prevented){args.prevented=true;return}}actualTrigger.call(this,name,args)};Select2.prototype.toggleDropdown=function(){if(this.isDisabled()){return}if(this.isOpen()){this.close()}else{this.open()}};Select2.prototype.open=function(){if(this.isOpen()){return}if(this.isDisabled()){return}this.trigger("query",{})};Select2.prototype.close=function(evt){if(!this.isOpen()){return}this.trigger("close",{originalEvent:evt})};Select2.prototype.isEnabled=function(){return!this.isDisabled()};Select2.prototype.isDisabled=function(){return this.options.get("disabled")};Select2.prototype.isOpen=function(){return this.$container[0].classList.contains("select2-container--open")};Select2.prototype.hasFocus=function(){return this.$container[0].classList.contains("select2-container--focus")};Select2.prototype.focus=function(data){if(this.hasFocus()){return}this.$container[0].classList.add("select2-container--focus");this.trigger("focus",{})};Select2.prototype.enable=function(args){if(this.options.get("debug")&&window.console&&console.warn){console.warn('Select2: The `select2("enable")` method has been deprecated and will'+' be removed in later Select2 versions. Use $element.prop("disabled")'+" instead.")}if(args==null||args.length===0){args=[true]}var disabled=!args[0];this.$element.prop("disabled",disabled)};Select2.prototype.data=function(){if(this.options.get("debug")&&arguments.length>0&&window.console&&console.warn){console.warn('Select2: Data can no longer be set using `select2("data")`. You '+"should consider setting the value instead using `$element.val()`.")}var data=[];this.dataAdapter.current(function(currentData){data=currentData});return data};Select2.prototype.val=function(args){if(this.options.get("debug")&&window.console&&console.warn){console.warn('Select2: The `select2("val")` method has been deprecated and will be'+" removed in later Select2 versions. Use $element.val() instead.")}if(args==null||args.length===0){return this.$element.val()}var newVal=args[0];if(Array.isArray(newVal)){newVal=newVal.map(function(obj){return obj.toString()})}this.$element.val(newVal).trigger("input").trigger("change")};Select2.prototype.destroy=function(){Utils.RemoveData(this.$container[0]);this.$container.remove();this._observer.disconnect();this._observer=null;this._syncA=null;this._syncS=null;this.$element.off(".select2");this.$element.attr("tabindex",Utils.GetData(this.$element[0],"old-tabindex"));this.$element[0].classList.remove("select2-hidden-accessible");this.$element.attr("aria-hidden","false");Utils.RemoveData(this.$element[0]);this.$element.removeData("select2");this.dataAdapter.destroy();this.selection.destroy();this.dropdown.destroy();this.results.destroy();this.dataAdapter=null;this.selection=null;this.dropdown=null;this.results=null};Select2.prototype.render=function(){var $container=$('<span class="select2 select2-container">'+'<span class="selection"></span>'+'<span class="dropdown-wrapper" aria-hidden="true"></span>'+"</span>");$container.attr("dir",this.options.get("dir"));this.$container=$container;this.$container[0].classList.add("select2-container--"+this.options.get("theme"));Utils.StoreData($container[0],"element",this.$element);return $container};return Select2});S2.define("select2/dropdown/attachContainer",[],function(){function AttachContainer(decorated,$element,options){decorated.call(this,$element,options)}AttachContainer.prototype.position=function(decorated,$dropdown,$container){var $dropdownContainer=$container.find(".dropdown-wrapper");$dropdownContainer.append($dropdown);$dropdown[0].classList.add("select2-dropdown--below");$container[0].classList.add("select2-container--below")};return AttachContainer});S2.define("select2/dropdown/stopPropagation",[],function(){function StopPropagation(){}StopPropagation.prototype.bind=function(decorated,container,$container){decorated.call(this,container,$container);var stoppedEvents=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$dropdown.on(stoppedEvents.join(" "),function(evt){evt.stopPropagation()})};return StopPropagation});S2.define("select2/selection/stopPropagation",[],function(){function StopPropagation(){}StopPropagation.prototype.bind=function(decorated,container,$container){decorated.call(this,container,$container);var stoppedEvents=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$selection.on(stoppedEvents.join(" "),function(evt){evt.stopPropagation()})};return StopPropagation});(function(factory){if(typeof S2.define==="function"&&S2.define.amd){S2.define("jquery-mousewheel",["jquery"],factory)}else if(typeof exports==="object"){module.exports=factory}else{factory(jQuery)}})(function($){var toFix=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],toBind="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],slice=Array.prototype.slice,nullLowestDeltaTimeout,lowestDelta;if($.event.fixHooks){for(var i=toFix.length;i;){$.event.fixHooks[toFix[--i]]=$.event.mouseHooks}}var special=$.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener){for(var i=toBind.length;i;){this.addEventListener(toBind[--i],handler,false)}}else{this.onmousewheel=handler}$.data(this,"mousewheel-line-height",special.getLineHeight(this));$.data(this,"mousewheel-page-height",special.getPageHeight(this))},teardown:function(){if(this.removeEventListener){for(var i=toBind.length;i;){this.removeEventListener(toBind[--i],handler,false)}}else{this.onmousewheel=null}$.removeData(this,"mousewheel-line-height");$.removeData(this,"mousewheel-page-height")},getLineHeight:function(elem){var $elem=$(elem),$parent=$elem["offsetParent"in $.fn?"offsetParent":"parent"]();if(!$parent.length){$parent=$("body")}return parseInt($parent.css("fontSize"),10)||parseInt($elem.css("fontSize"),10)||16},getPageHeight:function(elem){return $(elem).height()},settings:{adjustOldDeltas:true,normalizeOffset:true}};$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel")},unmousewheel:function(fn){return this.unbind("mousewheel",fn)}});function handler(event){var orgEvent=event||window.event,args=slice.call(arguments,1),delta=0,deltaX=0,deltaY=0,absDelta=0,offsetX=0,offsetY=0;event=$.event.fix(orgEvent);event.type="mousewheel";if("detail"in orgEvent){deltaY=orgEvent.detail*-1}if("wheelDelta"in orgEvent){deltaY=orgEvent.wheelDelta}if("wheelDeltaY"in orgEvent){deltaY=orgEvent.wheelDeltaY}if("wheelDeltaX"in orgEvent){deltaX=orgEvent.wheelDeltaX*-1}if("axis"in orgEvent&&orgEvent.axis===orgEvent.HORIZONTAL_AXIS){deltaX=deltaY*-1;deltaY=0}delta=deltaY===0?deltaX:deltaY;if("deltaY"in orgEvent){deltaY=orgEvent.deltaY*-1;delta=deltaY}if("deltaX"in orgEvent){deltaX=orgEvent.deltaX;if(deltaY===0){delta=deltaX*-1}}if(deltaY===0&&deltaX===0){return}if(orgEvent.deltaMode===1){var lineHeight=$.data(this,"mousewheel-line-height");delta*=lineHeight;deltaY*=lineHeight;deltaX*=lineHeight}else if(orgEvent.deltaMode===2){var pageHeight=$.data(this,"mousewheel-page-height");delta*=pageHeight;deltaY*=pageHeight;deltaX*=pageHeight}absDelta=Math.max(Math.abs(deltaY),Math.abs(deltaX));if(!lowestDelta||absDelta<lowestDelta){lowestDelta=absDelta;if(shouldAdjustOldDeltas(orgEvent,absDelta)){lowestDelta/=40}}if(shouldAdjustOldDeltas(orgEvent,absDelta)){delta/=40;deltaX/=40;deltaY/=40}delta=Math[delta>=1?"floor":"ceil"](delta/lowestDelta);deltaX=Math[deltaX>=1?"floor":"ceil"](deltaX/lowestDelta);deltaY=Math[deltaY>=1?"floor":"ceil"](deltaY/lowestDelta);if(special.settings.normalizeOffset&&this.getBoundingClientRect){var boundingRect=this.getBoundingClientRect();offsetX=event.clientX-boundingRect.left;offsetY=event.clientY-boundingRect.top}event.deltaX=deltaX;event.deltaY=deltaY;event.deltaFactor=lowestDelta;event.offsetX=offsetX;event.offsetY=offsetY;event.deltaMode=0;args.unshift(event,delta,deltaX,deltaY);if(nullLowestDeltaTimeout){clearTimeout(nullLowestDeltaTimeout)}nullLowestDeltaTimeout=setTimeout(nullLowestDelta,200);return($.event.dispatch||$.event.handle).apply(this,args)}function nullLowestDelta(){lowestDelta=null}function shouldAdjustOldDeltas(orgEvent,absDelta){return special.settings.adjustOldDeltas&&orgEvent.type==="mousewheel"&&absDelta%120===0}});S2.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function($,_,Select2,Defaults,Utils){if($.fn.select2==null){var thisMethods=["open","close","destroy"];$.fn.select2=function(options){options=options||{};if(typeof options==="object"){this.each(function(){var instanceOptions=$.extend(true,{},options);var instance=new Select2($(this),instanceOptions)});return this}else if(typeof options==="string"){var ret;var args=Array.prototype.slice.call(arguments,1);this.each(function(){var instance=Utils.GetData(this,"select2");if(instance==null&&window.console&&console.error){console.error("The select2('"+options+"') method was called on an "+"element that is not using Select2.")}ret=instance[options].apply(instance,args)});if(thisMethods.indexOf(options)>-1){return this}return ret}else{throw new Error("Invalid arguments for Select2: "+options)}}}if($.fn.select2.defaults==null){$.fn.select2.defaults=Defaults}return Select2});return{define:S2.define,require:S2.require}}();var select2=S2.require("jquery.select2");jQuery.fn.select2.amd=S2;return select2});(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory():typeof define==="function"&&define.amd?define(factory):(global=global||self,global.PerfectScrollbar=factory())})(this,function(){"use strict";function get(element){return getComputedStyle(element)}function set(element,obj){for(var key in obj){var val=obj[key];if(typeof val==="number"){val=val+"px"}element.style[key]=val}return element}function div(className){var div=document.createElement("div");div.className=className;return div}var elMatches=typeof Element!=="undefined"&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function matches(element,query){if(!elMatches){throw new Error("No element matching method supported")}return elMatches.call(element,query)}function remove(element){if(element.remove){element.remove()}else{if(element.parentNode){element.parentNode.removeChild(element)}}}function queryChildren(element,selector){return Array.prototype.filter.call(element.children,function(child){return matches(child,selector)})}var cls={main:"ps",rtl:"ps__rtl",element:{thumb:function(x){return"ps__thumb-"+x},rail:function(x){return"ps__rail-"+x},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(x){return"ps--active-"+x},scrolling:function(x){return"ps--scrolling-"+x}}};var scrollingClassTimeout={x:null,y:null};function addScrollingClass(i,x){var classList=i.element.classList;var className=cls.state.scrolling(x);if(classList.contains(className)){clearTimeout(scrollingClassTimeout[x])}else{classList.add(className)}}function removeScrollingClass(i,x){scrollingClassTimeout[x]=setTimeout(function(){return i.isAlive&&i.element.classList.remove(cls.state.scrolling(x))},i.settings.scrollingThreshold)}function setScrollingClassInstantly(i,x){addScrollingClass(i,x);removeScrollingClass(i,x)}var EventElement=function EventElement(element){this.element=element;this.handlers={}};var prototypeAccessors={isEmpty:{configurable:true}};EventElement.prototype.bind=function bind(eventName,handler){if(typeof this.handlers[eventName]==="undefined"){this.handlers[eventName]=[]}this.handlers[eventName].push(handler);this.element.addEventListener(eventName,handler,false)};EventElement.prototype.unbind=function unbind(eventName,target){var this$1=this;this.handlers[eventName]=this.handlers[eventName].filter(function(handler){if(target&&handler!==target){return true}this$1.element.removeEventListener(eventName,handler,false);return false})};EventElement.prototype.unbindAll=function unbindAll(){for(var name in this.handlers){this.unbind(name)}};prototypeAccessors.isEmpty.get=function(){var this$1=this;return Object.keys(this.handlers).every(function(key){return this$1.handlers[key].length===0})};Object.defineProperties(EventElement.prototype,prototypeAccessors);var EventManager=function EventManager(){this.eventElements=[]};EventManager.prototype.eventElement=function eventElement(element){var ee=this.eventElements.filter(function(ee){return ee.element===element})[0];if(!ee){ee=new EventElement(element);this.eventElements.push(ee)}return ee};EventManager.prototype.bind=function bind(element,eventName,handler){this.eventElement(element).bind(eventName,handler)};EventManager.prototype.unbind=function unbind(element,eventName,handler){var ee=this.eventElement(element);ee.unbind(eventName,handler);if(ee.isEmpty){this.eventElements.splice(this.eventElements.indexOf(ee),1)}};EventManager.prototype.unbindAll=function unbindAll(){this.eventElements.forEach(function(e){return e.unbindAll()});this.eventElements=[]};EventManager.prototype.once=function once(element,eventName,handler){var ee=this.eventElement(element);var onceHandler=function(evt){ee.unbind(eventName,onceHandler);handler(evt)};ee.bind(eventName,onceHandler)};function createEvent(name){if(typeof window.CustomEvent==="function"){return new CustomEvent(name)}else{var evt=document.createEvent("CustomEvent");evt.initCustomEvent(name,false,false,undefined);return evt}}function processScrollDiff(i,axis,diff,useScrollingClass,forceFireReachEvent){if(useScrollingClass===void 0)useScrollingClass=true;if(forceFireReachEvent===void 0)forceFireReachEvent=false;var fields;if(axis==="top"){fields=["contentHeight","containerHeight","scrollTop","y","up","down"]}else if(axis==="left"){fields=["contentWidth","containerWidth","scrollLeft","x","left","right"]}else{throw new Error("A proper axis should be provided")}processScrollDiff$1(i,diff,fields,useScrollingClass,forceFireReachEvent)}function processScrollDiff$1(i,diff,ref,useScrollingClass,forceFireReachEvent){var contentHeight=ref[0];var containerHeight=ref[1];var scrollTop=ref[2];var y=ref[3];var up=ref[4];var down=ref[5];if(useScrollingClass===void 0)useScrollingClass=true;if(forceFireReachEvent===void 0)forceFireReachEvent=false;var element=i.element;i.reach[y]=null;if(element[scrollTop]<1){i.reach[y]="start"}if(element[scrollTop]>i[contentHeight]-i[containerHeight]-1){i.reach[y]="end"}if(diff){element.dispatchEvent(createEvent("ps-scroll-"+y));if(diff<0){element.dispatchEvent(createEvent("ps-scroll-"+up))}else if(diff>0){element.dispatchEvent(createEvent("ps-scroll-"+down))}if(useScrollingClass){setScrollingClassInstantly(i,y)}}if(i.reach[y]&&(diff||forceFireReachEvent)){element.dispatchEvent(createEvent("ps-"+y+"-reach-"+i.reach[y]))}}function toInt(x){return parseInt(x,10)||0}function isEditable(el){return matches(el,"input,[contenteditable]")||matches(el,"select,[contenteditable]")||matches(el,"textarea,[contenteditable]")||matches(el,"button,[contenteditable]")}function outerWidth(element){var styles=get(element);return toInt(styles.width)+toInt(styles.paddingLeft)+toInt(styles.paddingRight)+toInt(styles.borderLeftWidth)+toInt(styles.borderRightWidth)}var env={isWebKit:typeof document!=="undefined"&&"WebkitAppearance"in document.documentElement.style,supportsTouch:typeof window!=="undefined"&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:typeof navigator!=="undefined"&&navigator.msMaxTouchPoints,isChrome:typeof navigator!=="undefined"&&/Chrome/i.test(navigator&&navigator.userAgent)};function updateGeometry(i){var element=i.element;var roundedScrollTop=Math.floor(element.scrollTop);var rect=element.getBoundingClientRect();i.containerWidth=Math.round(rect.width);i.containerHeight=Math.round(rect.height);i.contentWidth=element.scrollWidth;i.contentHeight=element.scrollHeight;if(!element.contains(i.scrollbarXRail)){queryChildren(element,cls.element.rail("x")).forEach(function(el){return remove(el)});element.appendChild(i.scrollbarXRail)}if(!element.contains(i.scrollbarYRail)){queryChildren(element,cls.element.rail("y")).forEach(function(el){return remove(el)});element.appendChild(i.scrollbarYRail)}if(!i.settings.suppressScrollX&&i.containerWidth+i.settings.scrollXMarginOffset<i.contentWidth){i.scrollbarXActive=true;i.railXWidth=i.containerWidth-i.railXMarginWidth;i.railXRatio=i.containerWidth/i.railXWidth;i.scrollbarXWidth=getThumbSize(i,toInt(i.railXWidth*i.containerWidth/i.contentWidth));i.scrollbarXLeft=toInt((i.negativeScrollAdjustment+element.scrollLeft)*(i.railXWidth-i.scrollbarXWidth)/(i.contentWidth-i.containerWidth))}else{i.scrollbarXActive=false}if(!i.settings.suppressScrollY&&i.containerHeight+i.settings.scrollYMarginOffset<i.contentHeight){i.scrollbarYActive=true;i.railYHeight=i.containerHeight-i.railYMarginHeight;i.railYRatio=i.containerHeight/i.railYHeight;i.scrollbarYHeight=getThumbSize(i,toInt(i.railYHeight*i.containerHeight/i.contentHeight));i.scrollbarYTop=toInt(roundedScrollTop*(i.railYHeight-i.scrollbarYHeight)/(i.contentHeight-i.containerHeight))}else{i.scrollbarYActive=false}if(i.scrollbarXLeft>=i.railXWidth-i.scrollbarXWidth){i.scrollbarXLeft=i.railXWidth-i.scrollbarXWidth}if(i.scrollbarYTop>=i.railYHeight-i.scrollbarYHeight){i.scrollbarYTop=i.railYHeight-i.scrollbarYHeight}updateCss(element,i);if(i.scrollbarXActive){element.classList.add(cls.state.active("x"))}else{element.classList.remove(cls.state.active("x"));i.scrollbarXWidth=0;i.scrollbarXLeft=0;element.scrollLeft=i.isRtl===true?i.contentWidth:0}if(i.scrollbarYActive){element.classList.add(cls.state.active("y"))}else{element.classList.remove(cls.state.active("y"));i.scrollbarYHeight=0;i.scrollbarYTop=0;element.scrollTop=0}}function getThumbSize(i,thumbSize){if(i.settings.minScrollbarLength){thumbSize=Math.max(thumbSize,i.settings.minScrollbarLength)}if(i.settings.maxScrollbarLength){thumbSize=Math.min(thumbSize,i.settings.maxScrollbarLength)}return thumbSize}function updateCss(element,i){var xRailOffset={width:i.railXWidth};var roundedScrollTop=Math.floor(element.scrollTop);if(i.isRtl){xRailOffset.left=i.negativeScrollAdjustment+element.scrollLeft+i.containerWidth-i.contentWidth}else{xRailOffset.left=element.scrollLeft}if(i.isScrollbarXUsingBottom){xRailOffset.bottom=i.scrollbarXBottom-roundedScrollTop}else{xRailOffset.top=i.scrollbarXTop+roundedScrollTop}set(i.scrollbarXRail,xRailOffset);var yRailOffset={top:roundedScrollTop,height:i.railYHeight};if(i.isScrollbarYUsingRight){if(i.isRtl){yRailOffset.right=i.contentWidth-(i.negativeScrollAdjustment+element.scrollLeft)-i.scrollbarYRight-i.scrollbarYOuterWidth-9}else{yRailOffset.right=i.scrollbarYRight-element.scrollLeft}}else{if(i.isRtl){yRailOffset.left=i.negativeScrollAdjustment+element.scrollLeft+i.containerWidth*2-i.contentWidth-i.scrollbarYLeft-i.scrollbarYOuterWidth}else{yRailOffset.left=i.scrollbarYLeft+element.scrollLeft}}set(i.scrollbarYRail,yRailOffset);set(i.scrollbarX,{left:i.scrollbarXLeft,width:i.scrollbarXWidth-i.railBorderXWidth});set(i.scrollbarY,{top:i.scrollbarYTop,height:i.scrollbarYHeight-i.railBorderYWidth})}function clickRail(i){var element=i.element;i.event.bind(i.scrollbarY,"mousedown",function(e){return e.stopPropagation()});i.event.bind(i.scrollbarYRail,"mousedown",function(e){var positionTop=e.pageY-window.pageYOffset-i.scrollbarYRail.getBoundingClientRect().top;var direction=positionTop>i.scrollbarYTop?1:-1;i.element.scrollTop+=direction*i.containerHeight;updateGeometry(i);e.stopPropagation()});i.event.bind(i.scrollbarX,"mousedown",function(e){return e.stopPropagation()});i.event.bind(i.scrollbarXRail,"mousedown",function(e){var positionLeft=e.pageX-window.pageXOffset-i.scrollbarXRail.getBoundingClientRect().left;var direction=positionLeft>i.scrollbarXLeft?1:-1;i.element.scrollLeft+=direction*i.containerWidth;updateGeometry(i);e.stopPropagation()})}function dragThumb(i){bindMouseScrollHandler(i,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]);bindMouseScrollHandler(i,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])}function bindMouseScrollHandler(i,ref){var containerHeight=ref[0];var contentHeight=ref[1];var pageY=ref[2];var railYHeight=ref[3];var scrollbarY=ref[4];var scrollbarYHeight=ref[5];var scrollTop=ref[6];var y=ref[7];var scrollbarYRail=ref[8];var element=i.element;var startingScrollTop=null;var startingMousePageY=null;var scrollBy=null;function mouseMoveHandler(e){if(e.touches&&e.touches[0]){e[pageY]=e.touches[0].pageY}element[scrollTop]=startingScrollTop+scrollBy*(e[pageY]-startingMousePageY);addScrollingClass(i,y);updateGeometry(i);e.stopPropagation();e.preventDefault()}function mouseUpHandler(){removeScrollingClass(i,y);i[scrollbarYRail].classList.remove(cls.state.clicking);i.event.unbind(i.ownerDocument,"mousemove",mouseMoveHandler)}function bindMoves(e,touchMode){startingScrollTop=element[scrollTop];if(touchMode&&e.touches){e[pageY]=e.touches[0].pageY}startingMousePageY=e[pageY];scrollBy=(i[contentHeight]-i[containerHeight])/(i[railYHeight]-i[scrollbarYHeight]);if(!touchMode){i.event.bind(i.ownerDocument,"mousemove",mouseMoveHandler);i.event.once(i.ownerDocument,"mouseup",mouseUpHandler);e.preventDefault()}else{i.event.bind(i.ownerDocument,"touchmove",mouseMoveHandler)}i[scrollbarYRail].classList.add(cls.state.clicking);e.stopPropagation()}i.event.bind(i[scrollbarY],"mousedown",function(e){bindMoves(e)});i.event.bind(i[scrollbarY],"touchstart",function(e){bindMoves(e,true)})}function keyboard(i){var element=i.element;var elementHovered=function(){return matches(element,":hover")};var scrollbarFocused=function(){return matches(i.scrollbarX,":focus")||matches(i.scrollbarY,":focus")};function shouldPreventDefault(deltaX,deltaY){var scrollTop=Math.floor(element.scrollTop);if(deltaX===0){if(!i.scrollbarYActive){return false}if(scrollTop===0&&deltaY>0||scrollTop>=i.contentHeight-i.containerHeight&&deltaY<0){return!i.settings.wheelPropagation}}var scrollLeft=element.scrollLeft;if(deltaY===0){if(!i.scrollbarXActive){return false}if(scrollLeft===0&&deltaX<0||scrollLeft>=i.contentWidth-i.containerWidth&&deltaX>0){return!i.settings.wheelPropagation}}return true}i.event.bind(i.ownerDocument,"keydown",function(e){if(e.isDefaultPrevented&&e.isDefaultPrevented()||e.defaultPrevented){return}if(!elementHovered()&&!scrollbarFocused()){return}var activeElement=document.activeElement?document.activeElement:i.ownerDocument.activeElement;if(activeElement){if(activeElement.tagName==="IFRAME"){activeElement=activeElement.contentDocument.activeElement}else{while(activeElement.shadowRoot){activeElement=activeElement.shadowRoot.activeElement}}if(isEditable(activeElement)){return}}var deltaX=0;var deltaY=0;switch(e.which){case 37:if(e.metaKey){deltaX=-i.contentWidth}else if(e.altKey){deltaX=-i.containerWidth}else{deltaX=-30}break;case 38:if(e.metaKey){deltaY=i.contentHeight}else if(e.altKey){deltaY=i.containerHeight}else{deltaY=30}break;case 39:if(e.metaKey){deltaX=i.contentWidth}else if(e.altKey){deltaX=i.containerWidth}else{deltaX=30}break;case 40:if(e.metaKey){deltaY=-i.contentHeight}else if(e.altKey){deltaY=-i.containerHeight}else{deltaY=-30}break;case 32:if(e.shiftKey){deltaY=i.containerHeight}else{deltaY=-i.containerHeight}break;case 33:deltaY=i.containerHeight;break;case 34:deltaY=-i.containerHeight;break;case 36:deltaY=i.contentHeight;break;case 35:deltaY=-i.contentHeight;break;default:return}if(i.settings.suppressScrollX&&deltaX!==0){return}if(i.settings.suppressScrollY&&deltaY!==0){return}element.scrollTop-=deltaY;element.scrollLeft+=deltaX;updateGeometry(i);if(shouldPreventDefault(deltaX,deltaY)){e.preventDefault()}})}function wheel(i){var element=i.element;function shouldPreventDefault(deltaX,deltaY){var roundedScrollTop=Math.floor(element.scrollTop);var isTop=element.scrollTop===0;var isBottom=roundedScrollTop+element.offsetHeight===element.scrollHeight;var isLeft=element.scrollLeft===0;var isRight=element.scrollLeft+element.offsetWidth===element.scrollWidth;var hitsBound;if(Math.abs(deltaY)>Math.abs(deltaX)){hitsBound=isTop||isBottom}else{hitsBound=isLeft||isRight}return hitsBound?!i.settings.wheelPropagation:true}function getDeltaFromEvent(e){var deltaX=e.deltaX;var deltaY=-1*e.deltaY;if(typeof deltaX==="undefined"||typeof deltaY==="undefined"){deltaX=-1*e.wheelDeltaX/6;deltaY=e.wheelDeltaY/6}if(e.deltaMode&&e.deltaMode===1){deltaX*=10;deltaY*=10}if(deltaX!==deltaX&&deltaY!==deltaY){deltaX=0;deltaY=e.wheelDelta}if(e.shiftKey){return[-deltaY,-deltaX]}return[deltaX,deltaY]}function shouldBeConsumedByChild(target,deltaX,deltaY){if(!env.isWebKit&&element.querySelector("select:focus")){return true}if(!element.contains(target)){return false}var cursor=target;while(cursor&&cursor!==element){if(cursor.classList.contains(cls.element.consuming)){return true}var style=get(cursor);if(deltaY&&style.overflowY.match(/(scroll|auto)/)){var maxScrollTop=cursor.scrollHeight-cursor.clientHeight;if(maxScrollTop>0){if(cursor.scrollTop>0&&deltaY<0||cursor.scrollTop<maxScrollTop&&deltaY>0){return true}}}if(deltaX&&style.overflowX.match(/(scroll|auto)/)){var maxScrollLeft=cursor.scrollWidth-cursor.clientWidth;if(maxScrollLeft>0){if(cursor.scrollLeft>0&&deltaX<0||cursor.scrollLeft<maxScrollLeft&&deltaX>0){return true}}}cursor=cursor.parentNode}return false}function mousewheelHandler(e){var ref=getDeltaFromEvent(e);var deltaX=ref[0];var deltaY=ref[1];if(shouldBeConsumedByChild(e.target,deltaX,deltaY)){return}var shouldPrevent=false;if(!i.settings.useBothWheelAxes){element.scrollTop-=deltaY*i.settings.wheelSpeed;element.scrollLeft+=deltaX*i.settings.wheelSpeed}else if(i.scrollbarYActive&&!i.scrollbarXActive){if(deltaY){element.scrollTop-=deltaY*i.settings.wheelSpeed}else{element.scrollTop+=deltaX*i.settings.wheelSpeed}shouldPrevent=true}else if(i.scrollbarXActive&&!i.scrollbarYActive){if(deltaX){element.scrollLeft+=deltaX*i.settings.wheelSpeed}else{element.scrollLeft-=deltaY*i.settings.wheelSpeed}shouldPrevent=true}updateGeometry(i);shouldPrevent=shouldPrevent||shouldPreventDefault(deltaX,deltaY);if(shouldPrevent&&!e.ctrlKey){e.stopPropagation();e.preventDefault()}}if(typeof window.onwheel!=="undefined"){i.event.bind(element,"wheel",mousewheelHandler)}else if(typeof window.onmousewheel!=="undefined"){i.event.bind(element,"mousewheel",mousewheelHandler)}}function touch(i){if(!env.supportsTouch&&!env.supportsIePointer){return}var element=i.element;function shouldPrevent(deltaX,deltaY){var scrollTop=Math.floor(element.scrollTop);var scrollLeft=element.scrollLeft;var magnitudeX=Math.abs(deltaX);var magnitudeY=Math.abs(deltaY);if(magnitudeY>magnitudeX){if(deltaY<0&&scrollTop===i.contentHeight-i.containerHeight||deltaY>0&&scrollTop===0){return window.scrollY===0&&deltaY>0&&env.isChrome}}else if(magnitudeX>magnitudeY){if(deltaX<0&&scrollLeft===i.contentWidth-i.containerWidth||deltaX>0&&scrollLeft===0){return true}}return true}function applyTouchMove(differenceX,differenceY){element.scrollTop-=differenceY;element.scrollLeft-=differenceX;updateGeometry(i)}var startOffset={};var startTime=0;var speed={};var easingLoop=null;function getTouch(e){if(e.targetTouches){return e.targetTouches[0]}else{return e}}function shouldHandle(e){if(e.pointerType&&e.pointerType==="pen"&&e.buttons===0){return false}if(e.targetTouches&&e.targetTouches.length===1){return true}if(e.pointerType&&e.pointerType!=="mouse"&&e.pointerType!==e.MSPOINTER_TYPE_MOUSE){return true}return false}function touchStart(e){if(!shouldHandle(e)){return}var touch=getTouch(e);startOffset.pageX=touch.pageX;startOffset.pageY=touch.pageY;startTime=(new Date).getTime();if(easingLoop!==null){clearInterval(easingLoop)}}function shouldBeConsumedByChild(target,deltaX,deltaY){if(!element.contains(target)){return false}var cursor=target;while(cursor&&cursor!==element){if(cursor.classList.contains(cls.element.consuming)){return true}var style=get(cursor);if(deltaY&&style.overflowY.match(/(scroll|auto)/)){var maxScrollTop=cursor.scrollHeight-cursor.clientHeight;if(maxScrollTop>0){if(cursor.scrollTop>0&&deltaY<0||cursor.scrollTop<maxScrollTop&&deltaY>0){return true}}}if(deltaX&&style.overflowX.match(/(scroll|auto)/)){var maxScrollLeft=cursor.scrollWidth-cursor.clientWidth;if(maxScrollLeft>0){if(cursor.scrollLeft>0&&deltaX<0||cursor.scrollLeft<maxScrollLeft&&deltaX>0){return true}}}cursor=cursor.parentNode}return false}function touchMove(e){if(shouldHandle(e)){var touch=getTouch(e);var currentOffset={pageX:touch.pageX,pageY:touch.pageY};var differenceX=currentOffset.pageX-startOffset.pageX;var differenceY=currentOffset.pageY-startOffset.pageY;if(shouldBeConsumedByChild(e.target,differenceX,differenceY)){return}applyTouchMove(differenceX,differenceY);startOffset=currentOffset;var currentTime=(new Date).getTime();var timeGap=currentTime-startTime;if(timeGap>0){speed.x=differenceX/timeGap;speed.y=differenceY/timeGap;startTime=currentTime}if(shouldPrevent(differenceX,differenceY)){e.preventDefault()}}}function touchEnd(){if(i.settings.swipeEasing){clearInterval(easingLoop);easingLoop=setInterval(function(){if(i.isInitialized){clearInterval(easingLoop);return}if(!speed.x&&!speed.y){clearInterval(easingLoop);return}if(Math.abs(speed.x)<.01&&Math.abs(speed.y)<.01){clearInterval(easingLoop);return}if(!i.element){clearInterval(easingLoop);return}applyTouchMove(speed.x*30,speed.y*30);speed.x*=.8;speed.y*=.8},10)}}if(env.supportsTouch){i.event.bind(element,"touchstart",touchStart);i.event.bind(element,"touchmove",touchMove);i.event.bind(element,"touchend",touchEnd)}else if(env.supportsIePointer){if(window.PointerEvent){i.event.bind(element,"pointerdown",touchStart);i.event.bind(element,"pointermove",touchMove);i.event.bind(element,"pointerup",touchEnd)}else if(window.MSPointerEvent){i.event.bind(element,"MSPointerDown",touchStart);i.event.bind(element,"MSPointerMove",touchMove);i.event.bind(element,"MSPointerUp",touchEnd)}}}var defaultSettings=function(){return{handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:false,suppressScrollY:false,swipeEasing:true,useBothWheelAxes:false,wheelPropagation:true,wheelSpeed:1}};var handlers={"click-rail":clickRail,"drag-thumb":dragThumb,keyboard:keyboard,wheel:wheel,touch:touch};var PerfectScrollbar=function PerfectScrollbar(element,userSettings){var this$1=this;if(userSettings===void 0)userSettings={};if(typeof element==="string"){element=document.querySelector(element)}if(!element||!element.nodeName){throw new Error("no element is specified to initialize PerfectScrollbar")}this.element=element;element.classList.add(cls.main);this.settings=defaultSettings();for(var key in userSettings){this.settings[key]=userSettings[key]}this.containerWidth=null;this.containerHeight=null;this.contentWidth=null;this.contentHeight=null;var focus=function(){return element.classList.add(cls.state.focus)};var blur=function(){return element.classList.remove(cls.state.focus)};this.isRtl=get(element).direction==="rtl";if(this.isRtl===true){element.classList.add(cls.rtl)}this.isNegativeScroll=function(){var originalScrollLeft=element.scrollLeft;var result=null;element.scrollLeft=-1;result=element.scrollLeft<0;element.scrollLeft=originalScrollLeft;return result}();this.negativeScrollAdjustment=this.isNegativeScroll?element.scrollWidth-element.clientWidth:0;this.event=new EventManager;this.ownerDocument=element.ownerDocument||document;this.scrollbarXRail=div(cls.element.rail("x"));element.appendChild(this.scrollbarXRail);this.scrollbarX=div(cls.element.thumb("x"));this.scrollbarXRail.appendChild(this.scrollbarX);this.scrollbarX.setAttribute("tabindex",0);this.event.bind(this.scrollbarX,"focus",focus);this.event.bind(this.scrollbarX,"blur",blur);this.scrollbarXActive=null;this.scrollbarXWidth=null;this.scrollbarXLeft=null;var railXStyle=get(this.scrollbarXRail);this.scrollbarXBottom=parseInt(railXStyle.bottom,10);if(isNaN(this.scrollbarXBottom)){this.isScrollbarXUsingBottom=false;this.scrollbarXTop=toInt(railXStyle.top)}else{this.isScrollbarXUsingBottom=true}this.railBorderXWidth=toInt(railXStyle.borderLeftWidth)+toInt(railXStyle.borderRightWidth);set(this.scrollbarXRail,{display:"block"});this.railXMarginWidth=toInt(railXStyle.marginLeft)+toInt(railXStyle.marginRight);set(this.scrollbarXRail,{display:""});this.railXWidth=null;this.railXRatio=null;this.scrollbarYRail=div(cls.element.rail("y"));element.appendChild(this.scrollbarYRail);this.scrollbarY=div(cls.element.thumb("y"));this.scrollbarYRail.appendChild(this.scrollbarY);this.scrollbarY.setAttribute("tabindex",0);this.event.bind(this.scrollbarY,"focus",focus);this.event.bind(this.scrollbarY,"blur",blur);this.scrollbarYActive=null;this.scrollbarYHeight=null;this.scrollbarYTop=null;var railYStyle=get(this.scrollbarYRail);this.scrollbarYRight=parseInt(railYStyle.right,10);if(isNaN(this.scrollbarYRight)){this.isScrollbarYUsingRight=false;this.scrollbarYLeft=toInt(railYStyle.left)}else{this.isScrollbarYUsingRight=true}this.scrollbarYOuterWidth=this.isRtl?outerWidth(this.scrollbarY):null;this.railBorderYWidth=toInt(railYStyle.borderTopWidth)+toInt(railYStyle.borderBottomWidth);set(this.scrollbarYRail,{display:"block"});this.railYMarginHeight=toInt(railYStyle.marginTop)+toInt(railYStyle.marginBottom);set(this.scrollbarYRail,{display:""});this.railYHeight=null;this.railYRatio=null;this.reach={x:element.scrollLeft<=0?"start":element.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:element.scrollTop<=0?"start":element.scrollTop>=this.contentHeight-this.containerHeight?"end":null};this.isAlive=true;this.settings.handlers.forEach(function(handlerName){return handlers[handlerName](this$1)});this.lastScrollTop=Math.floor(element.scrollTop);this.lastScrollLeft=element.scrollLeft;this.event.bind(this.element,"scroll",function(e){return this$1.onScroll(e)});updateGeometry(this)};PerfectScrollbar.prototype.update=function update(){if(!this.isAlive){return}this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0;set(this.scrollbarXRail,{display:"block"});set(this.scrollbarYRail,{display:"block"});this.railXMarginWidth=toInt(get(this.scrollbarXRail).marginLeft)+toInt(get(this.scrollbarXRail).marginRight);this.railYMarginHeight=toInt(get(this.scrollbarYRail).marginTop)+toInt(get(this.scrollbarYRail).marginBottom);set(this.scrollbarXRail,{display:"none"});set(this.scrollbarYRail,{display:"none"});updateGeometry(this);processScrollDiff(this,"top",0,false,true);processScrollDiff(this,"left",0,false,true);set(this.scrollbarXRail,{display:""});set(this.scrollbarYRail,{display:""})};PerfectScrollbar.prototype.onScroll=function onScroll(e){if(!this.isAlive){return}updateGeometry(this);processScrollDiff(this,"top",this.element.scrollTop-this.lastScrollTop);processScrollDiff(this,"left",this.element.scrollLeft-this.lastScrollLeft);this.lastScrollTop=Math.floor(this.element.scrollTop);this.lastScrollLeft=this.element.scrollLeft};PerfectScrollbar.prototype.destroy=function destroy(){if(!this.isAlive){return}this.event.unbindAll();remove(this.scrollbarX);remove(this.scrollbarY);remove(this.scrollbarXRail);remove(this.scrollbarYRail);this.removePsClasses();this.element=null;this.scrollbarX=null;this.scrollbarY=null;this.scrollbarXRail=null;this.scrollbarYRail=null;this.isAlive=false};PerfectScrollbar.prototype.removePsClasses=function removePsClasses(){this.element.className=this.element.className.split(" ").filter(function(name){return!name.match(/^ps([-_].+|)$/)}).join(" ")};return PerfectScrollbar});(function(window,factory){var lazySizes=factory(window,window.document,Date);window.lazySizes=lazySizes;if(typeof module=="object"&&module.exports){module.exports=lazySizes}})(typeof window!="undefined"?window:{},function l(window,document,Date){"use strict";var lazysizes,lazySizesCfg;(function(){var prop;var lazySizesDefaults={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:true,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:true,ricTimeout:0,throttleDelay:125};lazySizesCfg=window.lazySizesConfig||window.lazysizesConfig||{};for(prop in lazySizesDefaults){if(!(prop in lazySizesCfg)){lazySizesCfg[prop]=lazySizesDefaults[prop]}}})();if(!document||!document.getElementsByClassName){return{init:function(){},cfg:lazySizesCfg,noSupport:true}}var docElem=document.documentElement;var supportPicture=window.HTMLPictureElement;var _addEventListener="addEventListener";var _getAttribute="getAttribute";var addEventListener=window[_addEventListener].bind(window);var setTimeout=window.setTimeout;var requestAnimationFrame=window.requestAnimationFrame||setTimeout;var requestIdleCallback=window.requestIdleCallback;var regPicture=/^picture$/i;var loadEvents=["load","error","lazyincluded","_lazyloaded"];var regClassCache={};var forEach=Array.prototype.forEach;var hasClass=function(ele,cls){if(!regClassCache[cls]){regClassCache[cls]=new RegExp("(\\s|^)"+cls+"(\\s|$)")}return regClassCache[cls].test(ele[_getAttribute]("class")||"")&&regClassCache[cls]};var addClass=function(ele,cls){if(!hasClass(ele,cls)){ele.setAttribute("class",(ele[_getAttribute]("class")||"").trim()+" "+cls)}};var removeClass=function(ele,cls){var reg;if(reg=hasClass(ele,cls)){ele.setAttribute("class",(ele[_getAttribute]("class")||"").replace(reg," "))}};var addRemoveLoadEvents=function(dom,fn,add){var action=add?_addEventListener:"removeEventListener";if(add){addRemoveLoadEvents(dom,fn)}loadEvents.forEach(function(evt){dom[action](evt,fn)})};var triggerEvent=function(elem,name,detail,noBubbles,noCancelable){var event=document.createEvent("Event");if(!detail){detail={}}detail.instance=lazysizes;event.initEvent(name,!noBubbles,!noCancelable);event.detail=detail;elem.dispatchEvent(event);return event};var updatePolyfill=function(el,full){var polyfill;if(!supportPicture&&(polyfill=window.picturefill||lazySizesCfg.pf)){if(full&&full.src&&!el[_getAttribute]("srcset")){el.setAttribute("srcset",full.src)}polyfill({reevaluate:true,elements:[el]})}else if(full&&full.src){el.src=full.src}};var getCSS=function(elem,style){return(getComputedStyle(elem,null)||{})[style]};var getWidth=function(elem,parent,width){width=width||elem.offsetWidth;while(width<lazySizesCfg.minSize&&parent&&!elem._lazysizesWidth){width=parent.offsetWidth;parent=parent.parentNode}return width};var rAF=function(){var running,waiting;var firstFns=[];var secondFns=[];var fns=firstFns;var run=function(){var runFns=fns;fns=firstFns.length?secondFns:firstFns;running=true;waiting=false;while(runFns.length){runFns.shift()()}running=false};var rafBatch=function(fn,queue){if(running&&!queue){fn.apply(this,arguments)}else{fns.push(fn);if(!waiting){waiting=true;(document.hidden?setTimeout:requestAnimationFrame)(run)}}};rafBatch._lsFlush=run;return rafBatch}();var rAFIt=function(fn,simple){return simple?function(){rAF(fn)}:function(){var that=this;var args=arguments;rAF(function(){fn.apply(that,args)})}};var throttle=function(fn){var running;var lastTime=0;var gDelay=lazySizesCfg.throttleDelay;var rICTimeout=lazySizesCfg.ricTimeout;var run=function(){running=false;lastTime=Date.now();fn()};var idleCallback=requestIdleCallback&&rICTimeout>49?function(){requestIdleCallback(run,{timeout:rICTimeout});if(rICTimeout!==lazySizesCfg.ricTimeout){rICTimeout=lazySizesCfg.ricTimeout}}:rAFIt(function(){setTimeout(run)},true);return function(isPriority){var delay;if(isPriority=isPriority===true){rICTimeout=33}if(running){return}running=true;delay=gDelay-(Date.now()-lastTime);if(delay<0){delay=0}if(isPriority||delay<9){idleCallback()}else{setTimeout(idleCallback,delay)}}};var debounce=function(func){var timeout,timestamp;var wait=99;var run=function(){timeout=null;func()};var later=function(){var last=Date.now()-timestamp;if(last<wait){setTimeout(later,wait-last)}else{(requestIdleCallback||run)(run)}};return function(){timestamp=Date.now();if(!timeout){timeout=setTimeout(later,wait)}}};var loader=function(){var preloadElems,isCompleted,resetPreloadingTimer,loadMode,started;var eLvW,elvH,eLtop,eLleft,eLright,eLbottom,isBodyHidden;var regImg=/^img$/i;var regIframe=/^iframe$/i;var supportScroll="onscroll"in window&&!/(gle|ing)bot/.test(navigator.userAgent);var shrinkExpand=0;var currentExpand=0;var isLoading=0;var lowRuns=-1;var resetPreloading=function(e){isLoading--;if(!e||isLoading<0||!e.target){isLoading=0}};var isVisible=function(elem){if(isBodyHidden==null){isBodyHidden=getCSS(document.body,"visibility")=="hidden"}return isBodyHidden||!(getCSS(elem.parentNode,"visibility")=="hidden"&&getCSS(elem,"visibility")=="hidden")};var isNestedVisible=function(elem,elemExpand){var outerRect;var parent=elem;var visible=isVisible(elem);eLtop-=elemExpand;eLbottom+=elemExpand;eLleft-=elemExpand;eLright+=elemExpand;while(visible&&(parent=parent.offsetParent)&&parent!=document.body&&parent!=docElem){visible=(getCSS(parent,"opacity")||1)>0;if(visible&&getCSS(parent,"overflow")!="visible"){outerRect=parent.getBoundingClientRect();visible=eLright>outerRect.left&&eLleft<outerRect.right&&eLbottom>outerRect.top-1&&eLtop<outerRect.bottom+1}}return visible};var checkElements=function(){var eLlen,i,rect,autoLoadElem,loadedSomething,elemExpand,elemNegativeExpand,elemExpandVal,beforeExpandVal,defaultExpand,preloadExpand,hFac;var lazyloadElems=lazysizes.elements;if((loadMode=lazySizesCfg.loadMode)&&isLoading<8&&(eLlen=lazyloadElems.length)){i=0;lowRuns++;for(;i<eLlen;i++){if(!lazyloadElems[i]||lazyloadElems[i]._lazyRace){continue}if(!supportScroll||lazysizes.prematureUnveil&&lazysizes.prematureUnveil(lazyloadElems[i])){unveilElement(lazyloadElems[i]);continue}if(!(elemExpandVal=lazyloadElems[i][_getAttribute]("data-expand"))||!(elemExpand=elemExpandVal*1)){elemExpand=currentExpand}if(!defaultExpand){defaultExpand=!lazySizesCfg.expand||lazySizesCfg.expand<1?docElem.clientHeight>500&&docElem.clientWidth>500?500:370:lazySizesCfg.expand;lazysizes._defEx=defaultExpand;preloadExpand=defaultExpand*lazySizesCfg.expFactor;hFac=lazySizesCfg.hFac;isBodyHidden=null;if(currentExpand<preloadExpand&&isLoading<1&&lowRuns>2&&loadMode>2&&!document.hidden){currentExpand=preloadExpand;lowRuns=0}else if(loadMode>1&&lowRuns>1&&isLoading<6){currentExpand=defaultExpand}else{currentExpand=shrinkExpand}}if(beforeExpandVal!==elemExpand){eLvW=innerWidth+elemExpand*hFac;elvH=innerHeight+elemExpand;elemNegativeExpand=elemExpand*-1;beforeExpandVal=elemExpand}rect=lazyloadElems[i].getBoundingClientRect();if((eLbottom=rect.bottom)>=elemNegativeExpand&&(eLtop=rect.top)<=elvH&&(eLright=rect.right)>=elemNegativeExpand*hFac&&(eLleft=rect.left)<=eLvW&&(eLbottom||eLright||eLleft||eLtop)&&(lazySizesCfg.loadHidden||isVisible(lazyloadElems[i]))&&(isCompleted&&isLoading<3&&!elemExpandVal&&(loadMode<3||lowRuns<4)||isNestedVisible(lazyloadElems[i],elemExpand))){unveilElement(lazyloadElems[i]);loadedSomething=true;if(isLoading>9){break}}else if(!loadedSomething&&isCompleted&&!autoLoadElem&&isLoading<4&&lowRuns<4&&loadMode>2&&(preloadElems[0]||lazySizesCfg.preloadAfterLoad)&&(preloadElems[0]||!elemExpandVal&&(eLbottom||eLright||eLleft||eLtop||lazyloadElems[i][_getAttribute](lazySizesCfg.sizesAttr)!="auto"))){autoLoadElem=preloadElems[0]||lazyloadElems[i]}}if(autoLoadElem&&!loadedSomething){unveilElement(autoLoadElem)}}};var throttledCheckElements=throttle(checkElements);var switchLoadingClass=function(e){var elem=e.target;if(elem._lazyCache){delete elem._lazyCache;return}resetPreloading(e);addClass(elem,lazySizesCfg.loadedClass);removeClass(elem,lazySizesCfg.loadingClass);addRemoveLoadEvents(elem,rafSwitchLoadingClass);triggerEvent(elem,"lazyloaded")};var rafedSwitchLoadingClass=rAFIt(switchLoadingClass);var rafSwitchLoadingClass=function(e){rafedSwitchLoadingClass({target:e.target})};var changeIframeSrc=function(elem,src){var loadMode=elem.getAttribute("data-load-mode")||lazySizesCfg.iframeLoadMode;if(loadMode==0){elem.contentWindow.location.replace(src)}else if(loadMode==1){elem.src=src}};var handleSources=function(source){var customMedia;var sourceSrcset=source[_getAttribute](lazySizesCfg.srcsetAttr);if(customMedia=lazySizesCfg.customMedia[source[_getAttribute]("data-media")||source[_getAttribute]("media")]){source.setAttribute("media",customMedia)}if(sourceSrcset){source.setAttribute("srcset",sourceSrcset)}};var lazyUnveil=rAFIt(function(elem,detail,isAuto,sizes,isImg){var src,srcset,parent,isPicture,event,firesLoad;if(!(event=triggerEvent(elem,"lazybeforeunveil",detail)).defaultPrevented){if(sizes){if(isAuto){addClass(elem,lazySizesCfg.autosizesClass)}else{elem.setAttribute("sizes",sizes)}}srcset=elem[_getAttribute](lazySizesCfg.srcsetAttr);src=elem[_getAttribute](lazySizesCfg.srcAttr);if(isImg){parent=elem.parentNode;isPicture=parent&&regPicture.test(parent.nodeName||"")}firesLoad=detail.firesLoad||"src"in elem&&(srcset||src||isPicture);event={target:elem};addClass(elem,lazySizesCfg.loadingClass);if(firesLoad){clearTimeout(resetPreloadingTimer);resetPreloadingTimer=setTimeout(resetPreloading,2500);addRemoveLoadEvents(elem,rafSwitchLoadingClass,true)}if(isPicture){forEach.call(parent.getElementsByTagName("source"),handleSources)}if(srcset){elem.setAttribute("srcset",srcset)}else if(src&&!isPicture){if(regIframe.test(elem.nodeName)){changeIframeSrc(elem,src)}else{elem.src=src}}if(isImg&&(srcset||isPicture)){updatePolyfill(elem,{src:src})}}if(elem._lazyRace){delete elem._lazyRace}removeClass(elem,lazySizesCfg.lazyClass);rAF(function(){var isLoaded=elem.complete&&elem.naturalWidth>1;if(!firesLoad||isLoaded){if(isLoaded){addClass(elem,lazySizesCfg.fastLoadedClass)}switchLoadingClass(event);elem._lazyCache=true;setTimeout(function(){if("_lazyCache"in elem){delete elem._lazyCache}},9)}if(elem.loading=="lazy"){isLoading--}},true)});var unveilElement=function(elem){if(elem._lazyRace){return}var detail;var isImg=regImg.test(elem.nodeName);var sizes=isImg&&(elem[_getAttribute](lazySizesCfg.sizesAttr)||elem[_getAttribute]("sizes"));var isAuto=sizes=="auto";if((isAuto||!isCompleted)&&isImg&&(elem[_getAttribute]("src")||elem.srcset)&&!elem.complete&&!hasClass(elem,lazySizesCfg.errorClass)&&hasClass(elem,lazySizesCfg.lazyClass)){return}detail=triggerEvent(elem,"lazyunveilread").detail;if(isAuto){autoSizer.updateElem(elem,true,elem.offsetWidth)}elem._lazyRace=true;isLoading++;lazyUnveil(elem,detail,isAuto,sizes,isImg)};var afterScroll=debounce(function(){lazySizesCfg.loadMode=3;throttledCheckElements()});var altLoadmodeScrollListner=function(){if(lazySizesCfg.loadMode==3){lazySizesCfg.loadMode=2}afterScroll()};var onload=function(){if(isCompleted){return}if(Date.now()-started<999){setTimeout(onload,999);return}isCompleted=true;lazySizesCfg.loadMode=3;throttledCheckElements();addEventListener("scroll",altLoadmodeScrollListner,true)};return{_:function(){started=Date.now();lazysizes.elements=document.getElementsByClassName(lazySizesCfg.lazyClass);preloadElems=document.getElementsByClassName(lazySizesCfg.lazyClass+" "+lazySizesCfg.preloadClass);addEventListener("scroll",throttledCheckElements,true);addEventListener("resize",throttledCheckElements,true);addEventListener("pageshow",function(e){if(e.persisted){var loadingElements=document.querySelectorAll("."+lazySizesCfg.loadingClass);if(loadingElements.length&&loadingElements.forEach){requestAnimationFrame(function(){loadingElements.forEach(function(img){if(img.complete){unveilElement(img)}})})}}});if(window.MutationObserver){new MutationObserver(throttledCheckElements).observe(docElem,{childList:true,subtree:true,attributes:true})}else{docElem[_addEventListener]("DOMNodeInserted",throttledCheckElements,true);docElem[_addEventListener]("DOMAttrModified",throttledCheckElements,true);setInterval(throttledCheckElements,999)}addEventListener("hashchange",throttledCheckElements,true);["focus","mouseover","click","load","transitionend","animationend"].forEach(function(name){document[_addEventListener](name,throttledCheckElements,true)});if(/d$|^c/.test(document.readyState)){onload()}else{addEventListener("load",onload);document[_addEventListener]("DOMContentLoaded",throttledCheckElements);setTimeout(onload,2e4)}if(lazysizes.elements.length){checkElements();rAF._lsFlush()}else{throttledCheckElements()}},checkElems:throttledCheckElements,unveil:unveilElement,_aLSL:altLoadmodeScrollListner}}();var autoSizer=function(){var autosizesElems;var sizeElement=rAFIt(function(elem,parent,event,width){var sources,i,len;elem._lazysizesWidth=width;width+="px";elem.setAttribute("sizes",width);if(regPicture.test(parent.nodeName||"")){sources=parent.getElementsByTagName("source");for(i=0,len=sources.length;i<len;i++){sources[i].setAttribute("sizes",width)}}if(!event.detail.dataAttr){updatePolyfill(elem,event.detail)}});var getSizeElement=function(elem,dataAttr,width){var event;var parent=elem.parentNode;if(parent){width=getWidth(elem,parent,width);event=triggerEvent(elem,"lazybeforesizes",{width:width,dataAttr:!!dataAttr});if(!event.defaultPrevented){width=event.detail.width;if(width&&width!==elem._lazysizesWidth){sizeElement(elem,parent,event,width)}}}};var updateElementsSizes=function(){var i;var len=autosizesElems.length;if(len){i=0;for(;i<len;i++){getSizeElement(autosizesElems[i])}}};var debouncedUpdateElementsSizes=debounce(updateElementsSizes);return{_:function(){autosizesElems=document.getElementsByClassName(lazySizesCfg.autosizesClass);addEventListener("resize",debouncedUpdateElementsSizes)},checkElems:debouncedUpdateElementsSizes,updateElem:getSizeElement}}();var init=function(){if(!init.i&&document.getElementsByClassName){init.i=true;autoSizer._();loader._()}};setTimeout(function(){if(lazySizesCfg.init){init()}});lazysizes={cfg:lazySizesCfg,autoSizer:autoSizer,loader:loader,init:init,uP:updatePolyfill,aC:addClass,rC:removeClass,hC:hasClass,fire:triggerEvent,gW:getWidth,rAF:rAF};return lazysizes});(function($,window,document,undefined){"use strict";var pluginName="avertaVisualSelect",defaults={item:"axi-select-item",selected:"axi-selected",caption:"axi-select-caption",container:"axi-visual-select",insertCaption:false,insertSymbol:true,insertTitleAttr:true,autoHideElement:true,imgTest:/\.jpg|\.png|\.gif|.jpeg|\.svg/},attributesMap={type:"symbolType","title-attr":"insertTitleAttr","auto-hide":"autoHideElement",caption:"insertCaption"};function Plugin(element,options){this.element=element;this.$element=$(element);this.options=$.extend({},defaults,options);for(var key in attributesMap){var value=attributesMap[key],dataAttr=this.$element.data(key);if(dataAttr===undefined){continue}this.options[value]=dataAttr}this._defaults=defaults;this._name=pluginName;this.init()}$.extend(Plugin.prototype,{init:function(){var self=this,st=self.options;self.multiple=self.$element.attr("multiple")==="multiple";if(st.autoHideElement){self.$element.css("display","none")}self.$selectCont=$('<div class="'+st.container+'"></div>').insertAfter(self.$element);self.generate();self.$element.on("change",this.update.bind(this))},_onItemClick:function(event){var $visualItem=$(event.currentTarget),$selectOption=$visualItem.data("selectOption"),st=this.options;if(this.multiple){if($visualItem.hasClass(st.selected)){$visualItem.removeClass(st.selected);$selectOption.removeAttr("selected")}else{$visualItem.addClass(st.selected);$selectOption.attr("selected","selected");var val=this.$element.val();if(val===null){val=[]}val.push($selectOption.attr("value"));this.$element.val(val)}}else if(!$visualItem.hasClass(st.selected)){$visualItem.addClass(st.selected);$selectOption.attr("selected","selected");this.$element.val($selectOption.attr("value"));if(this.$selectedItem){this.$selectedItem.removeClass(st.selected);this.$selectedItem.data("selectOption").removeAttr("selected")}this.$selectedItem=$visualItem}this._internalTrigger=true;this.$element.trigger("change")},_generateVideoSource:function(videoSrc){var source="";videoSrc.split(",").forEach(function(src){src=src.split(" ");source+='<source src="'+src[0]+'" type="video/'+src[1]+'">'});return source},_videoInit:function(event){$(event.currentTarget).on("mouseenter",function(){this.play()}).on("mouseleave",function(){this.pause();this.currentTime=0})},update:function(){if(this._internalTrigger){this._internalTrigger=false;return}var self=this,st=this.options,$items=self.$selectCont.find("."+st.item),val=self.$element.val();self.$element.find("option").each(function(index,option){var $option=$(option),$visualItem=$items.eq(index);if(val.indexOf($option.val())!==-1){self.$selectedItem=$visualItem.addClass(st.selected)}else{$visualItem.removeClass(st.selected)}})},addItem:function(value,text){var self=this,$lastOption=self.$element.find("option").last(),$newOption=$lastOption.clone();if(!$newOption.length){$newOption=$("<option></option>");self.$element.val(value)}$newOption.attr("value",value);$newOption.text(text);$newOption.appendTo(self.$element);self.$element.val(value);this.generate(true);this.update()},generate:function(reset){var self=this,st=self.options;if(reset){this.$selectCont.find("."+st.item).remove()}self.$element.find("option").each(function(){var $selectOption=$(this),$visualItem=$('<div class="'+st.item+'"></div>'),symbol=$selectOption.data("symbol"),videoSrc=$selectOption.data("video-src"),caption=$selectOption.html(),cssClass=$selectOption.data("class");if(cssClass){$visualItem.addClass(cssClass)}if(st.insertSymbol){if(videoSrc){$visualItem.attr("item-type","video");var $videoElement=$("<video></video>").attr("muted","").attr("loop","").append(self._generateVideoSource(videoSrc)).appendTo($visualItem);$videoElement[0].addEventListener("loadedmetadata",self._videoInit)}else if(st.imgTest.test(symbol)||$selectOption.data("type")==="image"){$("<img/>").attr("src",symbol).attr("alt",caption).appendTo($visualItem)}else{$("<span></span>").addClass(symbol).appendTo($visualItem)}}if(st.insertCaption){$('<span class="'+st.caption+'">'+caption+"</span>").appendTo($visualItem)}$visualItem.on("click",self._onItemClick.bind(self)).data("selectOption",$selectOption).appendTo(self.$selectCont);if(st.insertTitleAttr){$visualItem.attr("title",caption)}if($selectOption.attr("selected")==="selected"){self.$selectedItem=$visualItem.addClass(st.selected)}})}});$.fn[pluginName]=function(options){var args=arguments;if(options===undefined||typeof options==="object"){return this.each(function(){if(!$.data(this,"plugin_"+pluginName)){$.data(this,"plugin_"+pluginName,new Plugin(this,options))}})}else if(typeof options==="string"&&options[0]!=="_"&&options!=="init"){var returns;this.each(function(){var instance=$.data(this,"plugin_"+pluginName);if(instance instanceof Plugin&&typeof instance[options]==="function"){returns=instance[options].apply(instance,Array.prototype.slice.call(args,1))}if(options==="destroy"){$.data(this,"plugin_"+pluginName,null)}});return returns!==undefined?returns:this}}})(jQuery,window,document);if(typeof Object.create!=="function"){Object.create=function(obj){function F(){}F.prototype=obj;return new F}}(function($){var Container={init:function(el,options){var self=this;self.options=$.extend({},$.fn.avertaMultiTabs.defaultOptions,options||{});self.$el=$(el);self.el=el;self.$tabs=self.$el.find(self.options.tabs);self.$subList=self.$tabs.find(self.options.subTabsList);self.$subTabs=self.$subList.find(self.options.subTabs);self.$contents=self.$el.find(self.options.contents);self.setup()},setup:function(){var self=this,$activeTab;self.$tabs.on("click",{self:self},self.onTabClicked);self.$subTabs.on("click",{self:self},self.onSubTabClicked);if(self.options.enableHash&&window.location.hash!==""){var id=self.trimID(window.location.hash);$activeTab=self.getTabById("#"+id)}else{$activeTab=self.$tabs.filter("."+self.options.tabsActiveClass)}$activeTab=$activeTab.length?$activeTab:self.$tabs.first();$activeTab.trigger("click",true)},onTabClicked:function(event,fromSetup){event.preventDefault();var self=event.data.self,$this=$(this),$currentSubList;if(!fromSetup&&$this.hasClass("active")){return}self.$tabs.removeClass(self.options.tabsActiveClass);$this.addClass(self.options.tabsActiveClass);self.$subList.removeClass(self.options.tabsActiveClass);$currentSubList=$this.find(self.options.subTabsList);$currentSubList.addClass(self.options.tabsActiveClass);var $firstCurrentSubTab=$currentSubList.find(self.options.subTabs).first();if($firstCurrentSubTab.length){$firstCurrentSubTab.trigger("click")}else{self.showRelatedContent($this)}if(self.options.updateHash){self.updateHash($this)}},onSubTabClicked:function(event,fromSetup){event.preventDefault();var self=event.data.self,$this=$(this);$this.siblings().removeClass(self.options.tabsActiveClass);$this.addClass(self.options.tabsActiveClass);self.showRelatedContent($this)},getTabById:function(id){id=id.split(this.options.hashSuffix)[0];var $activeTab=this.$tabs.find('[href="#'+id+'"]').eq(0);if(!$activeTab.length)$activeTab=this.$tabs.find('[href="'+id+'"]').eq(0);return $activeTab.length?$activeTab.parent():$activeTab},getContentById:function(id){return this.$contents.filter("#"+this.trimID(id))},getIdByTab:function($tab){var $anchor=$tab.find("[href]").eq(0);return $anchor.length?$anchor.attr("href"):false},trimID:function(id){return id.replace(/^\s+|\s+$|#/g,"")},showRelatedContent:function($tab){var self=this,$tabContent;self.$contents.hide();if(self.options.connectType==="id"){var activeId=self.getIdByTab($tab);$tabContent=self.getContentById(activeId)}else{$tabContent=self.$contents.eq($tab.index())}$tabContent.fadeIn(self.options.duration);self.$el.trigger("avtMultiTabChange",$tabContent.attr("id"))},updateHash:function($tab){var self=this,activeId;activeId=self.getIdByTab($tab);activeId=self.trimID(activeId);activeId=activeId?activeId+self.options.hashSuffix:"";if(window.history&&window.history.pushState){window.history.pushState(null,null,window.location.href.split("#")[0]+"#"+activeId)}else{window.location.hash=activeId}}};$.fn.avertaMultiTabs=function(options){return this.each(function(){var container=Object.create(Container);container.init(this,options)})};$.fn.avertaMultiTabs.defaultOptions={tabs:"ul.tabs > li",subTabsList:"ul",subTabs:"> li:not(.not-tab)",tabsActiveClass:"active",contents:"ul.tabs-content > li",contentsActiveClass:"active",transition:"fade",duration:"500",connectType:"id",enableHash:false,updateHash:false,hashSuffix:"-tab"}})(jQuery);if(typeof Object.create!=="function"){Object.create=function(obj){function F(){}F.prototype=obj;return new F}}(function($){var Container={init:function(el,options){var self=this;self.options=$.extend({},$.fn.avertaLiveTabs.defaultOptions,options||{});self.$el=$(el);self.el=el;self.$tabs=self.$el.find(self.options.tabs);self.$contents=self.$el.find(self.options.contents);self.setup()},setup:function(){var self=this,$activeTab;self.$tabs.on("click",{self:self},self.onTabClicked);if(self.options.enableHash&&window.location.hash!==""){var id=self.trimID(window.location.hash);$activeTab=self.getTabById(id)}else{$activeTab=self.$tabs.filter("."+self.options.tabsActiveClass)}$activeTab=$activeTab.length?$activeTab:self.$tabs.first();$activeTab.trigger("click",true)},onTabClicked:function(event,fromSetup){event.preventDefault();var self=event.data.self,$this=$(this),$tabContent,activeId;if(!fromSetup&&$this.hasClass("active")){return}self.$tabs.removeClass(self.options.tabsActiveClass);$this.addClass(self.options.tabsActiveClass);self.$contents.hide();if(self.options.connectType==="id"){activeId=self.getIdByTab($this);$tabContent=self.getContentById(activeId)}else{$tabContent=self.$contents.eq($this.index())}$tabContent.fadeIn(self.options.duration);if(self.options.updateHash){activeId=self.getIdByTab($this);activeId=self.trimID(activeId);activeId=activeId?activeId+self.options.hashSuffix:"";if(window.history&&window.history.pushState)window.history.pushState(null,null,window.location.href.split("#")[0]+"#"+activeId);else window.location.hash=activeId}self.$el.trigger("avtTabChange",$tabContent.attr("id"))},getTabById:function(id){id=id.split(this.options.hashSuffix)[0];var $activeTab=this.$tabs.find('[href="#'+id+'"]').eq(0);if(!$activeTab.length)$activeTab=this.$tabs.find('[href="'+id+'"]').eq(0);return $activeTab.length?$activeTab.parent():$activeTab},getContentById:function(id){return this.$contents.filter("#"+this.trimID(id))},trimID:function(id){return id.replace(/^\s+|\s+$|#/g,"")},getIdByTab:function($tab){var $anchor=$tab.find("[href]").eq(0);return $anchor.length?$anchor.attr("href"):false}};$.fn.avertaLiveTabs=function(options){return this.each(function(){var container=Object.create(Container);container.init(this,options)})};$.fn.avertaLiveTabs.defaultOptions={tabs:"ul.tabs > li",tabsActiveClass:"active",contents:"ul.tabs-content > li",contentsActiveClass:"active",transition:"fade",duration:"500",connectType:"index",enableHash:false,updateHash:false,hashSuffix:"-tab"}})(jQuery);(function($,window,document,undefined){var pluginName="avertaAttachMedia",defaults={item:"am-item",thumbnail:"am-img-holder",caption:"am-img-caption",removeItem:"am-remove",sortable:"axi-attach-items",addItem:"axi-add-new",addItemDisable:"axi-add-new-disabled",srcMap:null,nameMap:null,sortableOptions:{},autoHideElement:true,confirmOnRemove:true,multiple:true,limit:9999,type:null,insertCaption:false,altSrc:"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",l10n:{addToList:"Add image(s)",uploaderTitle:"Select Image",uploderSubmit:"Add image",removeConfirm:"Are you sure that you want to remove this attachment?"}},attributesMap={"media-type":"type",multiple:"multiple",limit:"limit",confirm:"confirmOnRemove",caption:"insertCaption","uploader-submite":{l10n:"uploderSubmit"},"uploader-title":{l10n:"uploaderTitle"},"add-to-list":{l10n:"addToList"},"confirm-text":{l10n:"removeConfirm"}};function Plugin(element,options){this.element=element;this.$element=$(element);this.options=$.extend({},defaults,options);for(var key in attributesMap){var value=attributesMap[key],dataAttr=this.$element.data(key);if(dataAttr===undefined){continue}if(typeof value==="object"){this.options.l10n[value.l10n]=dataAttr}else{this.options[value]=dataAttr}}this._defaults=defaults;this._name=pluginName;this._full=false;this.count=0;this.init()}$.extend(Plugin.prototype,{init:function(){var item,st=this.options;if(st.autoHideElement){this.$element.css("display","none")}var val=this.$element.val();if(val.replace(/\s*/,"")===""){this.ids=[]}else{this.ids=val.split(",")}this.$itemList=$('<div class="'+st.sortable+'"></div>');this.count=Math.min(this.ids.length,st.limit);this.$addItem=$('<a href="#" class="'+st.addItem+'">'+st.l10n.addToList+"</a>").on("click",this.addItem.bind(this));for(var i=0,l=this.count;i!==l;i++){if(item=this._generateItem(this.ids[i])){item.appendTo(this.$itemList)}}this.$itemList.sortable($.extend({update:this.update.bind(this)},st.sortableOptions));this.$element.after(this.$itemList);this.$itemList.after(this.$addItem);this.uploaderFrame=wp.media.frames.frame=wp.media({title:st.l10n.uploaderTitle,multiple:st.multiple,frame:"select",library:{type:st.type},button:{text:st.l10n.uploderSubmit}});this.uploaderFrame.on("select",this._onImageSelect.bind(this));this._checkLimit()},_checkLimit:function(){var st=this.options;if(!this._full&&this.count>=st.limit){this.count=st.limit;this._full=true;this.$addItem.addClass(st.addItemDisable)}else if(this._full){this._full=false;this.$addItem.removeClass(st.addItemDisable)}},_generateItem:function(attachmentId,src,name){var st=this.options;if(src==null){if(!st.srcMap){src=st.altSrc}src=st.srcMap[attachmentId]||st.altSrc}if(src===null){return false}if(name==null&&st.nameMap){name=st.nameMap[attachmentId]}var item=$('<div class="'+st.item+" axi-media-"+attachmentId+'" data-attachment-id="'+attachmentId+'">'+'     <img class="'+st.thumbnail+'" src="'+src+'" alt="Attachment image ('+attachmentId+')" />'+"</div>");if(st.insertCaption){item.append('<span class="'+st.caption+'" >'+name+"</span>")}$('<div class="'+st.removeItem+'"></div>').appendTo(item).on("click",this.removeItem.bind(this));return item},_onImageSelect:function(){var selection=this.uploaderFrame.state().get("selection"),self=this;selection.map(function(attachment){attachment=attachment.toJSON();if(self.options.limit>self.count){self.count++;var image;if(attachment.type==="image"){if(attachment.sizes){image=(attachment.sizes.thumbnail||attachment.sizes.full).url}else{image=attachment.url}}else if(attachment.image){image=attachment.image.src}else{image=attachment.icon}self._generateItem(attachment.id,image,attachment.name).appendTo(self.$itemList);self._checkLimit()}});this.update()},update:function(){this.ids=this.$itemList.sortable("toArray",{attribute:"data-attachment-id"});this.$element.val(this.ids).trigger("change")},removeItem:function(item){if(this.options.confirmOnRemove&&!confirm(this.options.l10n.removeConfirm)){return}if(typeof item==="string"){this.$itemList.find(".axi-media-"+item).remove()}else{$(item.target).parent().remove()}this.count--;this.update();this._checkLimit()},addItem:function(e){if(this._full){return}this.uploaderFrame.open();if(e){e.preventDefault()}}});$.fn[pluginName]=function(options){var args=arguments;if(options===undefined||typeof options==="object"){return this.each(function(){if(!$.data(this,"plugin_"+pluginName)){$.data(this,"plugin_"+pluginName,new Plugin(this,options))}})}else if(typeof options==="string"&&options[0]!=="_"&&options!=="init"){var returns;this.each(function(){var instance=$.data(this,"plugin_"+pluginName);if(instance instanceof Plugin&&typeof instance[options]==="function"){returns=instance[options].apply(instance,Array.prototype.slice.call(args,1))}if(options==="destroy"){$.data(this,"plugin_"+pluginName,null)}});return returns!==undefined?returns:this}}})(jQuery,window,document);(function($){var api="AIzaSyBYkMl1dDDRSmAyHjKInEk9nCgb9-tDQqo",url="https://www.googleapis.com/webfonts/v1/webfonts",list=null,options=null;var GFonts=function(){},waitingList=[];GFonts.isLoading=-1;GFonts.loadedFonts=[];GFonts.getList=function(onLoad){if(list&&onLoad){onLoad.call(null,list);return}if(GFonts.isLoading===1){if(onLoad){waitingList.push(onLoad)}return}GFonts.isLoading=1;$.getJSON(url+"?key="+api,function(data,success,context){GFonts.isLoading=0;GFonts.listLoaded=true;GFonts.list=data;if(onLoad){onLoad.call(null,data,context.responseText)}for(var i=0,l=waitingList.length;i!==l;i++){waitingList[i].call(null,data,context.responseText)}})};GFonts.generateSelectList=function(){if(!list)return;if(options)return options;var _options="";$.each(list.items,function(index,value){_options+='<option value="'+value.family+'" data-variants="'+value.variants.join(",")+'">'+value.family+"</option>"});options=_options;return options};GFonts.load=function(font,variants){if(GFonts.loadedFonts.indexOf(font)===-1){$("head").append('<link rel="stylesheet" href="//fonts.googleapis.com/css?family='+escape(font)+":"+variants+'" >');GFonts.loadedFonts.push(font)}};window.GFonts=GFonts})(jQuery);(function($,window,document,undefined){"use strict";var pluginName="avertaFontSelector",localStorageCached=false,cachedGFontsList=null,loadedFonts=[],defaults={preview:"axi-fs-preview",fontSelect:"axi-fs-font",thicknessSelect:"axi-fs-thickness",previwTextInput:"axi-fs-preview-input",container:"axi-fs-container",lodaing:"axi-fs-loading",autoHideElement:true,insertThickness:true,insertPreview:true,insertPreviewText:true,previewText:"Lorem ipsum sit amet.",googleFontsPrefix:"-gf-",systemFontsPrefix:"-sys-",geaFontsPrefix:"-gea-",customFontsPrefix:"-cus-",useGoogleFonts:true,systemFonts:[],geaFonts:[],customFonts:[],saveToLocalStorage:true,lsExpireTime:5,l10n:{previewTextLabel:"Preview text:",fontLabel:"Font:",fontSizeLabel:"Size:",fontStyleLabel:"Style:",googleFonts:"Google Fonts",systemFonts:"System Fonts",geaFonts:"Early Access Fonts",customFonts:"Custom Fonts"}};function Plugin(element,options){this.element=element;this.$element=$(element);this.options=$.extend({},defaults,options);this._defaults=defaults;this._name=pluginName;this.init()}$.extend(Plugin.prototype,{init:function(){var self=this,st=self.options;if(st.autoHideElement){this.$element.css("display","none")}self.previewStr=st.previewText;self.$container=$('<div class="'+st.container+'"></div>').insertAfter(this.$element).css("display","none");self.$loading=$('<div class="'+st.loading+'"></div>').insertAfter(this.$element);self.$fontSelectList=$('<select class="'+st.fontSelect+'"></select>').appendTo(self.$container);$('<div class="'+st.fontSelect+'-cont"><label>'+st.l10n.fontLabel+"</label></div>").appendTo(self.$container).append(self.$fontSelectList);if(st.insertThickness){self.$thicknessSelectList=$('<select class=" '+st.thicknessSelect+'"></select>').on("change",self._onThicknessChange.bind(self));$('<div class="'+st.thicknessSelect+'-cont"><label>'+st.l10n.fontStyleLabel+"</label></div>").appendTo(self.$container).append(self.$thicknessSelectList)}if(st.insertPreview){self.$preview=$('<div class=" '+st.preview+'"></div>');if(st.insertPreviewText){self.$previewTextInput=$('<input type="text" class="'+st.previwTextInput+'" value="'+st.previewText+'" />').on("change keydown",function(){self.previewStr=$(this).val();self._updatePreview()});$('<div class="'+st.previwTextInput+'-cont"><label>'+st.l10n.previewTextLabel+"</label></div>").appendTo(self.$container).append(self.$previewTextInput)}self.$preview.appendTo(self.$container)}var val=self.$element.val(),prefixLen=0;if(val.length>1){if(val.indexOf(st.googleFontsPrefix)!==-1){self.currentFontType="gfont";prefixLen=st.googleFontsPrefix.length}else if(val.indexOf(st.systemFontsPrefix)!==-1){self.currentFontType="sysfont";prefixLen=st.systemFontsPrefix.length}else if(val.indexOf(st.customFontsPrefix)!==-1){self.currentFontType="cusfont";prefixLen=st.customFontsPrefix.length}else if(val.indexOf(st.geaFontsPrefix)!==-1){self.currentFontType="geafont";prefixLen=st.geaFontsPrefix.length}if(val.indexOf(":")!==-1){self.currentThikness=val.slice(val.lastIndexOf(":")+1);self.currentFont=val.slice(prefixLen,val.lastIndexOf(":"))}else{self.currentFont=val.slice(prefixLen)}}self._getFonts()},_daysBetween:function(date1,date2){var ONE_DAY=1e3*60*60*24;var difference_ms=Math.abs(date1-date2);return Math.round(difference_ms/ONE_DAY)},_getFonts:function(){var self=this,st=self.options,isls=typeof Storage!=="undefined";if(cachedGFontsList||!st.useGoogleFonts){self.gFontsList=cachedGFontsList;self._generateFontList();return}if(st.saveToLocalStorage&&isls){var gfs=localStorage.AxiGoogleFonts,expireDate=Date.parse(localStorage.AxiGoogleFontsDate);if(gfs&&expireDate&&self._daysBetween((new Date).getTime(),expireDate)<st.lsExpireTime){self.gFontsList=JSON.parse(gfs);cachedGFontsList=self.gFontsList;self._generateFontList();return}}GFonts.getList(function(list,data){if(st.saveToLocalStorage&&isls&&!localStorageCached){localStorageCached=true;localStorage.AxiGoogleFonts=data;localStorage.AxiGoogleFontsDate=new Date}self.gFontsList=list;cachedGFontsList=list;self._generateFontList()})},_generateFontList:function(){var self=this,st=self.options,selectOptions="",i,l;self.$loading.remove();self.$container.css("display","");if(st.systemFonts.length!==0){selectOptions+='<optgroup label="'+st.l10n.systemFonts+'">';for(i=0,l=st.systemFonts.length;i!==l;i++){selectOptions+='<option value="'+st.systemFonts[i].name+'" data-type="sysfont" data-thickness="'+st.systemFonts[i].thickness+'">'+st.systemFonts[i].name+"</option>"}selectOptions+="</optgroup>"}if(st.useGoogleFonts){cachedGFontsList=self.gFontsList;selectOptions+='<optgroup label="'+st.l10n.googleFonts+'">';$.each(self.gFontsList.items,function(index,value){selectOptions+='<option value="'+value.family+'" data-type="gfont" data-thickness="'+value.variants.join(",")+'">'+value.family+"</option>"});selectOptions+="</optgroup>"}if(st.geaFonts.length!==0){selectOptions+='<optgroup label="'+st.l10n.geaFonts+'">';for(i=0,l=st.geaFonts.length;i!==l;i++){selectOptions+='<option value="'+st.geaFonts[i].name+'" data-type="geafont" data-thickness="'+st.geaFonts[i].thickness+'">'+st.geaFonts[i].name+"</option>"}selectOptions+="</optgroup>"}if(st.customFonts.length!==0){selectOptions+='<optgroup label="'+st.l10n.customFonts+'">';for(i=0,l=st.customFonts.length;i!==l;i++){selectOptions+='<option value="'+st.customFonts[i].name+'" data-type="cusfont" data-thickness="'+st.customFonts[i].thickness+'">'+st.customFonts[i].name+"</option>"}selectOptions+="</optgroup>"}self.$fontSelectList.html(selectOptions).on("change",self._onFontChange.bind(self));if(!self.currentFont){self.currentFont=self.$fontSelectList.find("option:first").val()}self.$fontSelectList.val(self.currentFont).trigger("change")},_onFontChange:function(event){var $this=$(event.currentTarget),self=this,st=self.options,foundThinkess=false,$selected=$this.find("option:selected");self.currentFont=$this.val();self.currentFontType=$selected.data("type");if(st.insertThickness){var options="";self.currentFontThickness=$selected.data("thickness")||"";$.each(self.currentFontThickness.split(","),function(index,thickness){var label=thickness.indexOf("italic")!==-1?thickness.replace(/italic/," italic"):thickness;if(thickness===self.currentThikness){options+='<option value="'+thickness+'" selected>'+label+"</option>";foundThinkess=true}else{options+='<option value="'+thickness+'">'+label+"</option>"}});self.$thicknessSelectList.html(options);if(!foundThinkess){self.$thicknessSelectList.find("option:first").prop("selected",true).trigger("change")}}self._updatePreview();self._updateInputValue()},_onThicknessChange:function(event){var $this=$(event.currentTarget),self=this;self.currentThikness=$this.val();self._updatePreview();self._updateInputValue()},_loadFont:function(fontName,type){if(loadedFonts.indexOf(fontName)!==-1){return}var st=this.options,list,url;if(type==="cusfont"){list=st.customFonts}else if(type==="geafont"){list=st.geaFonts}else{return}$.each(list,function(index,font){if(font.name===fontName){url=font.url;return false}});if(!url){return}$("head").append('<link rel="stylesheet" href="'+url+'" >');loadedFonts.push(fontName)},_updatePreview:function(){if(!this.options.insertPreview){return}var self=this,st=self.options,prv=self.$preview;prv.html(self.previewStr);prv.css("font-family",self.currentFont);if(self.currentThikness){prv.css("font-weight",self.currentThikness.replace(/italic/,""));if(self.currentThikness.indexOf("italic")!==-1){prv.css("font-style","italic")}else{prv.css("font-style","")}}if(st.useGoogleFonts&&self.currentFontType==="gfont"){GFonts.load(self.currentFont,self.currentFontThickness||"")}else if(self.currentFontType==="geafont"||self.currentFontType==="cusfont"){self._loadFont(self.currentFont,self.currentFontType)}},_updateInputValue:function(){var self=this,st=self.options,val="";switch(self.currentFontType){case"sysfont":val=st.systemFontsPrefix;break;case"gfont":val=st.googleFontsPrefix;break;case"geafont":val=st.geaFontsPrefix;break;case"cusfont":val=st.customFontsPrefix}val+=self.currentFont;if(st.insertThickness){val+=":"+self.currentThikness}self.$element.val(val).trigger("change")}});$.fn[pluginName]=function(options){var args=arguments;if(options===undefined||typeof options==="object"){return this.each(function(){if(!$.data(this,"plugin_"+pluginName)){$.data(this,"plugin_"+pluginName,new Plugin(this,options))}})}}})(jQuery,window,document);(function($,window,document,undefined){"use strict";var pluginName="sortableInput",defaults={sortable:true,fields:"",fieldsDataAttr:"fields",wrapperClass:"sortin-wrapper",selectWrapperClass:"sortin-select-wrapper",fieldsWrapperClass:"sortin-fields",fieldsInnerClass:"sortin-fields-inner",selectboxClass:"sortin-selectbox",addButtonClass:"sortin-add-btn",addButtonText:"Add",removeButtonClass:"sortin-remove-btn",removeButtonText:"x",inputClass:"sortin-input",noOptionText:"No More Option",handlerClass:"sortin-handler"},sortableDefaults={axis:"y",cursor:"move",handle:".sortin-handler"};function Plugin(element,options,sortableOptions){this.element=element;this.$element=$(element);this.settings=$.extend({},defaults,options);this.sortableSettings=$.extend({},sortableDefaults,sortableOptions);this._defaults=defaults;this._name=pluginName;this.init()}$.extend(Plugin.prototype,{init:function(){var customFields=this.$element.data(this.settings.fieldsDataAttr);this.$element.hide();this.$wrapper=$("<div/>",{class:this.settings.wrapperClass});this.$inner=$("<div/>",{class:this.settings.selectWrapperClass});this.$fieldsWrapper=$("<div/>",{class:this.settings.fieldsWrapperClass});this.$selectbox=$("<select/>",{class:this.settings.selectboxClass});this.$addButton=$("<button/>",{class:this.settings.addbuttonClass,type:"button",text:this.settings.addButtonText});this._data=this.$element.val().trim()?JSON.parse(this.$element.val()):[];this.settings.fields=undefined===customFields||[]==customFields?this.settings.fields:customFields;this.$element.after(this.$wrapper.append(this.$inner.append(this.$selectbox).append(this.$addButton)).append(this.$fieldsWrapper));this._createSelectbox();this._createFields();this.$addButton.on("click",this._addField.bind(this));$(this.$wrapper).on("keyup click blur",this._update.bind(this));if(this._data.length==this.settings.fields.length){this._toggleControllers(false)}if(true===this.settings.sortable&&$.fn.sortable){this.sortableSettings.handle=this.sortableSettings.handle?this.sortableSettings.handle:this.settings.handlerClass;this.sortableSettings.update=this._update.bind(this);this.$fieldsWrapper.sortable(this.sortableSettings);this.$fieldsWrapper.disableSelection()}},_createSelectbox:function(){var _fields=this.settings.fields,self=this;$.each(_fields,function(index,obj){self.$selectbox.append('<option id="'+obj.id+'">'+obj.label+"</option>")})},_createFields:function(){var self=this,$wrapper=this.$fieldsWrapper;$.each(self._data,function(index,obj){$("#"+obj.id).remove();self._generateField($wrapper,obj)})},_addField:function(){var self=this,$option=this.$selectbox.children("option"),$wrapper=this.$fieldsWrapper,$selected=$option.filter(":selected");self._generateField($wrapper,$selected);if(1==$option.length){this._toggleControllers(false)}$selected.remove()},_removeField:function(element){var $input=element.children("input"),label=element.children("label").text(),$selectbox=this.$selectbox;$selectbox.append('<option id="'+$input.attr("name")+'">'+label+"</option>");this._toggleControllers(true);element.remove()},_generateField:function(element,obj){var self=this,id=obj.id?obj.id:obj.attr("id"),label=obj.label?obj.label:obj.text(),$wrapper=$("<div/>",{class:this.settings.fieldsInnerClass}),$label=$('<label for="'+id+'">'+label+"</label>"),$inputField=$('<input type="text" name="'+id+'"></input>'),$handler=$("<div/>",{class:this.settings.handlerClass}),$removeButton=$("<button/>",{class:this.settings.removeButtonClass,text:this.settings.removeButtonText});if(-1!==obj.value){$inputField.val(obj.value)}self.$element.trigger("beforeAddField");if(true===this.settings.sortable&&$.fn.sortable){$wrapper.append($handler)}element.append($wrapper.append($label).append($inputField).append($removeButton));self.$element.trigger("afterAddField");$removeButton.on("click",function(){self.$element.trigger("beforeRemoveField");self._removeField($wrapper);self.$element.trigger("afterRemoveField")})},_toggleControllers:function(enable){if(enable){this.$inner.removeClass("sortin-disabled").next("p").remove()}else if(this.settings.noOptionText){this.$inner.addClass("sortin-disabled").after($("<p/>",{text:this.settings.noOptionText}))}this.$addButton.add(this.$selectbox).prop("disabled",!enable)},_update:function(){var $inputs=this.$wrapper.find("input"),arr=[];$.each($inputs,function(index,obj){var $obj=$(obj),$main=$();$main.value=$obj.val();$main.label=$obj.prev("label").text();$main.id=$obj.attr("name");arr.push($main)});this.$element.val(JSON.stringify(arr)).trigger("change")},destroy:function(keep){if(true!==keep){this.$element.remove()}this.$wrapper.remove()}});$.fn[pluginName]=function(options){var args=arguments;if(options===undefined||typeof options==="object"){return this.each(function(){if(!$.data(this,"plugin_"+pluginName)){$.data(this,"plugin_"+pluginName,new Plugin(this,options))}})}else if(typeof options==="string"&&!options[0].match("^_")&&options!=="init"){var returns;this.each(function(){var instance=$.data(this,"plugin_"+pluginName);if(instance instanceof Plugin&&typeof instance[options]==="function"){returns=instance[options].apply(instance,Array.prototype.slice.call(args,1))}});return returns!==undefined?returns:this}}})(jQuery,window,document);(function(){function require(name){var module=require.modules[name];if(!module)throw new Error('failed to require "'+name+'"');if(!("exports"in module)&&typeof module.definition==="function"){module.client=module.component=true;module.definition.call(this,module.exports={},module);delete module.definition}return module.exports}require.loader="component";require.helper={};require.helper.semVerSort=function(a,b){var aArray=a.version.split(".");var bArray=b.version.split(".");for(var i=0;i<aArray.length;++i){var aInt=parseInt(aArray[i],10);var bInt=parseInt(bArray[i],10);if(aInt===bInt){var aLex=aArray[i].substr((""+aInt).length);var bLex=bArray[i].substr((""+bInt).length);if(aLex===""&&bLex!=="")return 1;if(aLex!==""&&bLex==="")return-1;if(aLex!==""&&bLex!=="")return aLex>bLex?1:-1;continue}else if(aInt>bInt){return 1}else{return-1}}return 0};require.latest=function(name,returnPath){function showError(name){throw new Error('failed to find latest module of "'+name+'"')}var versionRegexp=/(.*)~(.*)@v?(\d+\.\d+\.\d+[^\/]*)$/;var remoteRegexp=/(.*)~(.*)/;if(!remoteRegexp.test(name))showError(name);var moduleNames=Object.keys(require.modules);var semVerCandidates=[];var otherCandidates=[];for(var i=0;i<moduleNames.length;i++){var moduleName=moduleNames[i];if(new RegExp(name+"@").test(moduleName)){var version=moduleName.substr(name.length+1);var semVerMatch=versionRegexp.exec(moduleName);if(semVerMatch!=null){semVerCandidates.push({version:version,name:moduleName})}else{otherCandidates.push({version:version,name:moduleName})}}}if(semVerCandidates.concat(otherCandidates).length===0){showError(name)}if(semVerCandidates.length>0){var module=semVerCandidates.sort(require.helper.semVerSort).pop().name;if(returnPath===true){return module}return require(module)}var module=otherCandidates.sort(function(a,b){return a.name>b.name})[0].name;if(returnPath===true){return module}return require(module)};require.modules={};require.register=function(name,definition){require.modules[name]={definition:definition}};require.define=function(name,exports){require.modules[name]={exports:exports}};require.register("abpetkov~transitionize@0.0.3",function(exports,module){module.exports=Transitionize;function Transitionize(element,props){if(!(this instanceof Transitionize))return new Transitionize(element,props);this.element=element;this.props=props||{};this.init()}Transitionize.prototype.isSafari=function(){return/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)};Transitionize.prototype.init=function(){var transitions=[];for(var key in this.props){transitions.push(key+" "+this.props[key])}this.element.style.transition=transitions.join(", ");if(this.isSafari())this.element.style.webkitTransition=transitions.join(", ")}});require.register("ftlabs~fastclick@v0.6.11",function(exports,module){function FastClick(layer){"use strict";var oldOnClick,self=this;this.trackingClick=false;this.trackingClickStart=0;this.targetElement=null;this.touchStartX=0;this.touchStartY=0;this.lastTouchIdentifier=0;this.touchBoundary=10;this.layer=layer;if(!layer||!layer.nodeType){throw new TypeError("Layer must be a document node")}this.onClick=function(){return FastClick.prototype.onClick.apply(self,arguments)};this.onMouse=function(){return FastClick.prototype.onMouse.apply(self,arguments)};this.onTouchStart=function(){return FastClick.prototype.onTouchStart.apply(self,arguments)};this.onTouchMove=function(){return FastClick.prototype.onTouchMove.apply(self,arguments)};this.onTouchEnd=function(){return FastClick.prototype.onTouchEnd.apply(self,arguments)};this.onTouchCancel=function(){return FastClick.prototype.onTouchCancel.apply(self,arguments)};if(FastClick.notNeeded(layer)){return}if(this.deviceIsAndroid){layer.addEventListener("mouseover",this.onMouse,true);layer.addEventListener("mousedown",this.onMouse,true);layer.addEventListener("mouseup",this.onMouse,true)}layer.addEventListener("click",this.onClick,true);layer.addEventListener("touchstart",this.onTouchStart,false);layer.addEventListener("touchmove",this.onTouchMove,false);layer.addEventListener("touchend",this.onTouchEnd,false);layer.addEventListener("touchcancel",this.onTouchCancel,false);if(!Event.prototype.stopImmediatePropagation){layer.removeEventListener=function(type,callback,capture){var rmv=Node.prototype.removeEventListener;if(type==="click"){rmv.call(layer,type,callback.hijacked||callback,capture)}else{rmv.call(layer,type,callback,capture)}};layer.addEventListener=function(type,callback,capture){var adv=Node.prototype.addEventListener;if(type==="click"){adv.call(layer,type,callback.hijacked||(callback.hijacked=function(event){if(!event.propagationStopped){callback(event)}}),capture)}else{adv.call(layer,type,callback,capture)}}}if(typeof layer.onclick==="function"){oldOnClick=layer.onclick;layer.addEventListener("click",function(event){oldOnClick(event)},false);layer.onclick=null}}FastClick.prototype.deviceIsAndroid=navigator.userAgent.indexOf("Android")>0;FastClick.prototype.deviceIsIOS=/iP(ad|hone|od)/.test(navigator.userAgent);FastClick.prototype.deviceIsIOS4=FastClick.prototype.deviceIsIOS&&/OS 4_\d(_\d)?/.test(navigator.userAgent);FastClick.prototype.deviceIsIOSWithBadTarget=FastClick.prototype.deviceIsIOS&&/OS ([6-9]|\d{2})_\d/.test(navigator.userAgent);FastClick.prototype.needsClick=function(target){"use strict";switch(target.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(target.disabled){return true}break;case"input":if(this.deviceIsIOS&&target.type==="file"||target.disabled){return true}break;case"label":case"video":return true}return/\bneedsclick\b/.test(target.className)};FastClick.prototype.needsFocus=function(target){"use strict";switch(target.nodeName.toLowerCase()){case"textarea":return true;case"select":return!this.deviceIsAndroid;case"input":switch(target.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return false}return!target.disabled&&!target.readOnly;default:return/\bneedsfocus\b/.test(target.className)}};FastClick.prototype.sendClick=function(targetElement,event){"use strict";var clickEvent,touch;if(document.activeElement&&document.activeElement!==targetElement){document.activeElement.blur()}touch=event.changedTouches[0];clickEvent=document.createEvent("MouseEvents");clickEvent.initMouseEvent(this.determineEventType(targetElement),true,true,window,1,touch.screenX,touch.screenY,touch.clientX,touch.clientY,false,false,false,false,0,null);clickEvent.forwardedTouchEvent=true;targetElement.dispatchEvent(clickEvent)};FastClick.prototype.determineEventType=function(targetElement){"use strict";if(this.deviceIsAndroid&&targetElement.tagName.toLowerCase()==="select"){return"mousedown"}return"click"};FastClick.prototype.focus=function(targetElement){"use strict";var length;if(this.deviceIsIOS&&targetElement.setSelectionRange&&targetElement.type.indexOf("date")!==0&&targetElement.type!=="time"){length=targetElement.value.length;targetElement.setSelectionRange(length,length)}else{targetElement.focus()}};FastClick.prototype.updateScrollParent=function(targetElement){"use strict";var scrollParent,parentElement;scrollParent=targetElement.fastClickScrollParent;if(!scrollParent||!scrollParent.contains(targetElement)){parentElement=targetElement;do{if(parentElement.scrollHeight>parentElement.offsetHeight){scrollParent=parentElement;targetElement.fastClickScrollParent=parentElement;break}parentElement=parentElement.parentElement}while(parentElement)}if(scrollParent){scrollParent.fastClickLastScrollTop=scrollParent.scrollTop}};FastClick.prototype.getTargetElementFromEventTarget=function(eventTarget){"use strict";if(eventTarget.nodeType===Node.TEXT_NODE){return eventTarget.parentNode}return eventTarget};FastClick.prototype.onTouchStart=function(event){"use strict";var targetElement,touch,selection;if(event.targetTouches.length>1){return true}targetElement=this.getTargetElementFromEventTarget(event.target);touch=event.targetTouches[0];if(this.deviceIsIOS){selection=window.getSelection();if(selection.rangeCount&&!selection.isCollapsed){return true}if(!this.deviceIsIOS4){if(touch.identifier===this.lastTouchIdentifier){event.preventDefault();return false}this.lastTouchIdentifier=touch.identifier;this.updateScrollParent(targetElement)}}this.trackingClick=true;this.trackingClickStart=event.timeStamp;this.targetElement=targetElement;this.touchStartX=touch.pageX;this.touchStartY=touch.pageY;if(event.timeStamp-this.lastClickTime<200){event.preventDefault()}return true};FastClick.prototype.touchHasMoved=function(event){"use strict";var touch=event.changedTouches[0],boundary=this.touchBoundary;if(Math.abs(touch.pageX-this.touchStartX)>boundary||Math.abs(touch.pageY-this.touchStartY)>boundary){return true}return false};FastClick.prototype.onTouchMove=function(event){"use strict";if(!this.trackingClick){return true}if(this.targetElement!==this.getTargetElementFromEventTarget(event.target)||this.touchHasMoved(event)){this.trackingClick=false;this.targetElement=null}return true};FastClick.prototype.findControl=function(labelElement){"use strict";if(labelElement.control!==undefined){return labelElement.control}if(labelElement.htmlFor){return document.getElementById(labelElement.htmlFor)}return labelElement.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")};FastClick.prototype.onTouchEnd=function(event){"use strict";var forElement,trackingClickStart,targetTagName,scrollParent,touch,targetElement=this.targetElement;if(!this.trackingClick){return true}if(event.timeStamp-this.lastClickTime<200){this.cancelNextClick=true;return true}this.cancelNextClick=false;this.lastClickTime=event.timeStamp;trackingClickStart=this.trackingClickStart;this.trackingClick=false;this.trackingClickStart=0;if(this.deviceIsIOSWithBadTarget){touch=event.changedTouches[0];targetElement=document.elementFromPoint(touch.pageX-window.pageXOffset,touch.pageY-window.pageYOffset)||targetElement;targetElement.fastClickScrollParent=this.targetElement.fastClickScrollParent}targetTagName=targetElement.tagName.toLowerCase();if(targetTagName==="label"){forElement=this.findControl(targetElement);if(forElement){this.focus(targetElement);if(this.deviceIsAndroid){return false}targetElement=forElement}}else if(this.needsFocus(targetElement)){if(event.timeStamp-trackingClickStart>100||this.deviceIsIOS&&window.top!==window&&targetTagName==="input"){this.targetElement=null;return false}this.focus(targetElement);if(!this.deviceIsIOS4||targetTagName!=="select"){this.targetElement=null;event.preventDefault()}return false}if(this.deviceIsIOS&&!this.deviceIsIOS4){scrollParent=targetElement.fastClickScrollParent;if(scrollParent&&scrollParent.fastClickLastScrollTop!==scrollParent.scrollTop){return true}}if(!this.needsClick(targetElement)){event.preventDefault();this.sendClick(targetElement,event)}return false};FastClick.prototype.onTouchCancel=function(){"use strict";this.trackingClick=false;this.targetElement=null};FastClick.prototype.onMouse=function(event){"use strict";if(!this.targetElement){return true}if(event.forwardedTouchEvent){return true}if(!event.cancelable){return true}if(!this.needsClick(this.targetElement)||this.cancelNextClick){if(event.stopImmediatePropagation){event.stopImmediatePropagation()}else{event.propagationStopped=true}event.stopPropagation();event.preventDefault();return false}return true};FastClick.prototype.onClick=function(event){"use strict";var permitted;if(this.trackingClick){this.targetElement=null;this.trackingClick=false;return true}if(event.target.type==="submit"&&event.detail===0){return true}permitted=this.onMouse(event);if(!permitted){this.targetElement=null}return permitted};FastClick.prototype.destroy=function(){"use strict";var layer=this.layer;if(this.deviceIsAndroid){layer.removeEventListener("mouseover",this.onMouse,true);layer.removeEventListener("mousedown",this.onMouse,true);layer.removeEventListener("mouseup",this.onMouse,true)}layer.removeEventListener("click",this.onClick,true);layer.removeEventListener("touchstart",this.onTouchStart,false);layer.removeEventListener("touchmove",this.onTouchMove,false);layer.removeEventListener("touchend",this.onTouchEnd,false);layer.removeEventListener("touchcancel",this.onTouchCancel,false)};FastClick.notNeeded=function(layer){"use strict";var metaViewport;var chromeVersion;if(typeof window.ontouchstart==="undefined"){return true}chromeVersion=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1];if(chromeVersion){if(FastClick.prototype.deviceIsAndroid){metaViewport=document.querySelector("meta[name=viewport]");if(metaViewport){if(metaViewport.content.indexOf("user-scalable=no")!==-1){return true}if(chromeVersion>31&&window.innerWidth<=window.screen.width){return true}}}else{return true}}if(layer.style.msTouchAction==="none"){return true}return false};FastClick.attach=function(layer){"use strict";return new FastClick(layer)};if(typeof define!=="undefined"&&define.amd){define(function(){"use strict";return FastClick})}else if(typeof module!=="undefined"&&module.exports){module.exports=FastClick.attach;module.exports.FastClick=FastClick}else{window.FastClick=FastClick}});require.register("component~indexof@0.0.3",function(exports,module){module.exports=function(arr,obj){if(arr.indexOf)return arr.indexOf(obj);for(var i=0;i<arr.length;++i){if(arr[i]===obj)return i}return-1}});require.register("component~classes@1.2.1",function(exports,module){var index=require("component~indexof@0.0.3");var re=/\s+/;var toString=Object.prototype.toString;module.exports=function(el){return new ClassList(el)};function ClassList(el){if(!el)throw new Error("A DOM element reference is required");this.el=el;this.list=el.classList}ClassList.prototype.add=function(name){if(this.list){this.list.add(name);return this}var arr=this.array();var i=index(arr,name);if(!~i)arr.push(name);this.el.className=arr.join(" ");return this};ClassList.prototype.remove=function(name){if("[object RegExp]"==toString.call(name)){return this.removeMatching(name)}if(this.list){this.list.remove(name);return this}var arr=this.array();var i=index(arr,name);if(~i)arr.splice(i,1);this.el.className=arr.join(" ");return this};ClassList.prototype.removeMatching=function(re){var arr=this.array();for(var i=0;i<arr.length;i++){if(re.test(arr[i])){this.remove(arr[i])}}return this};ClassList.prototype.toggle=function(name,force){if(this.list){if("undefined"!==typeof force){if(force!==this.list.toggle(name,force)){this.list.toggle(name)}}else{this.list.toggle(name)}return this}if("undefined"!==typeof force){if(!force){this.remove(name)}else{this.add(name)}}else{if(this.has(name)){this.remove(name)}else{this.add(name)}}return this};ClassList.prototype.array=function(){var str=this.el.className.replace(/^\s+|\s+$/g,"");var arr=str.split(re);if(""===arr[0])arr.shift();return arr};ClassList.prototype.has=ClassList.prototype.contains=function(name){return this.list?this.list.contains(name):!!~index(this.array(),name)}});require.register("component~event@0.1.4",function(exports,module){var bind=window.addEventListener?"addEventListener":"attachEvent",unbind=window.removeEventListener?"removeEventListener":"detachEvent",prefix=bind!=="addEventListener"?"on":"";exports.bind=function(el,type,fn,capture){el[bind](prefix+type,fn,capture||false);return fn};exports.unbind=function(el,type,fn,capture){el[unbind](prefix+type,fn,capture||false);return fn}});require.register("component~query@0.0.3",function(exports,module){function one(selector,el){return el.querySelector(selector)}exports=module.exports=function(selector,el){el=el||document;return one(selector,el)};exports.all=function(selector,el){el=el||document;return el.querySelectorAll(selector)};exports.engine=function(obj){if(!obj.one)throw new Error(".one callback required");if(!obj.all)throw new Error(".all callback required");one=obj.one;exports.all=obj.all;return exports}});require.register("component~matches-selector@0.1.5",function(exports,module){var query=require("component~query@0.0.3");var proto=Element.prototype;var vendor=proto.matches||proto.webkitMatchesSelector||proto.mozMatchesSelector||proto.msMatchesSelector||proto.oMatchesSelector;module.exports=match;function match(el,selector){if(!el||el.nodeType!==1)return false;if(vendor)return vendor.call(el,selector);var nodes=query.all(selector,el.parentNode);for(var i=0;i<nodes.length;++i){if(nodes[i]==el)return true}return false}});require.register("component~closest@0.1.4",function(exports,module){var matches=require("component~matches-selector@0.1.5");module.exports=function(element,selector,checkYoSelf,root){element=checkYoSelf?{parentNode:element}:element;root=root||document;while((element=element.parentNode)&&element!==document){if(matches(element,selector))return element;if(element===root)return}}});require.register("component~delegate@0.2.3",function(exports,module){var closest=require("component~closest@0.1.4"),event=require("component~event@0.1.4");exports.bind=function(el,selector,type,fn,capture){return event.bind(el,type,function(e){var target=e.target||e.srcElement;e.delegateTarget=closest(target,selector,true,el);if(e.delegateTarget)fn.call(el,e)},capture)};exports.unbind=function(el,type,fn,capture){event.unbind(el,type,fn,capture)}});require.register("component~events@1.0.9",function(exports,module){var events=require("component~event@0.1.4");var delegate=require("component~delegate@0.2.3");module.exports=Events;function Events(el,obj){if(!(this instanceof Events))return new Events(el,obj);if(!el)throw new Error("element required");if(!obj)throw new Error("object required");this.el=el;this.obj=obj;this._events={}}Events.prototype.sub=function(event,method,cb){this._events[event]=this._events[event]||{};this._events[event][method]=cb};Events.prototype.bind=function(event,method){var e=parse(event);var el=this.el;var obj=this.obj;var name=e.name;var method=method||"on"+name;var args=[].slice.call(arguments,2);function cb(){var a=[].slice.call(arguments).concat(args);obj[method].apply(obj,a)}if(e.selector){cb=delegate.bind(el,e.selector,name,cb)}else{events.bind(el,name,cb)}this.sub(name,method,cb);return cb};Events.prototype.unbind=function(event,method){if(0==arguments.length)return this.unbindAll();if(1==arguments.length)return this.unbindAllOf(event);var bindings=this._events[event];if(!bindings)return;var cb=bindings[method];if(!cb)return;events.unbind(this.el,event,cb)};Events.prototype.unbindAll=function(){for(var event in this._events){this.unbindAllOf(event)}};Events.prototype.unbindAllOf=function(event){var bindings=this._events[event];if(!bindings)return;for(var method in bindings){this.unbind(event,method)}};function parse(event){var parts=event.split(/ +/);return{name:parts.shift(),selector:parts.join(" ")}}});require.register("switchery",function(exports,module){var transitionize=require("abpetkov~transitionize@0.0.3"),fastclick=require("ftlabs~fastclick@v0.6.11"),classes=require("component~classes@1.2.1"),events=require("component~events@1.0.9");module.exports=Switchery;var defaults={color:"#64bd63",secondaryColor:"#dfdfdf",jackColor:"#fff",jackSecondaryColor:null,className:"switchery",disabled:false,disabledOpacity:.5,speed:"0.4s",size:"default"};function Switchery(element,options){if(!(this instanceof Switchery))return new Switchery(element,options);this.element=element;this.options=options||{};for(var i in defaults){if(this.options[i]==null){this.options[i]=defaults[i]}}if(this.element!=null&&this.element.type=="checkbox")this.init();if(this.isDisabled()===true)this.disable()}Switchery.prototype.hide=function(){this.element.style.display="none"};Switchery.prototype.show=function(){var switcher=this.create();this.insertAfter(this.element,switcher)};Switchery.prototype.create=function(){this.switcher=document.createElement("span");this.jack=document.createElement("small");this.switcher.appendChild(this.jack);this.switcher.className=this.options.className;this.events=events(this.switcher,this);return this.switcher};Switchery.prototype.insertAfter=function(reference,target){reference.parentNode.insertBefore(target,reference.nextSibling)};Switchery.prototype.setPosition=function(clicked){var checked=this.isChecked(),switcher=this.switcher,jack=this.jack;if(clicked&&checked)checked=false;else if(clicked&&!checked)checked=true;if(checked===true){this.element.checked=true;if(window.getComputedStyle)jack.style.left=parseInt(window.getComputedStyle(switcher).width)-parseInt(window.getComputedStyle(jack).width)+"px";else jack.style.left=parseInt(switcher.currentStyle["width"])-parseInt(jack.currentStyle["width"])+"px";if(this.options.color)this.colorize();this.setSpeed()}else{jack.style.left=0;this.element.checked=false;this.switcher.style.boxShadow="inset 0 0 0 0 "+this.options.secondaryColor;this.switcher.style.borderColor=this.options.secondaryColor;this.switcher.style.backgroundColor=this.options.secondaryColor!==defaults.secondaryColor?this.options.secondaryColor:"#fff";this.jack.style.backgroundColor=this.options.jackSecondaryColor!==this.options.jackColor?this.options.jackSecondaryColor:this.options.jackColor;this.setSpeed()}};Switchery.prototype.setSpeed=function(){var switcherProp={},jackProp={"background-color":this.options.speed,left:this.options.speed.replace(/[a-z]/,"")/2+"s"};if(this.isChecked()){switcherProp={border:this.options.speed,"box-shadow":this.options.speed,"background-color":this.options.speed.replace(/[a-z]/,"")*3+"s"}}else{switcherProp={border:this.options.speed,"box-shadow":this.options.speed}}transitionize(this.switcher,switcherProp);transitionize(this.jack,jackProp)};Switchery.prototype.setSize=function(){var small="switchery-small",normal="switchery-default",large="switchery-large";switch(this.options.size){case"small":classes(this.switcher).add(small);break;case"large":classes(this.switcher).add(large);break;default:classes(this.switcher).add(normal);break}};Switchery.prototype.colorize=function(){var switcherHeight=this.switcher.offsetHeight/2;this.switcher.style.backgroundColor=this.options.color;this.switcher.style.borderColor=this.options.color;this.switcher.style.boxShadow="inset 0 0 0 "+switcherHeight+"px "+this.options.color;this.jack.style.backgroundColor=this.options.jackColor};Switchery.prototype.handleOnchange=function(state){if(document.dispatchEvent){var event=document.createEvent("HTMLEvents");event.initEvent("change",true,true);this.element.dispatchEvent(event)}else{this.element.fireEvent("onchange")}};Switchery.prototype.handleChange=function(){var self=this,el=this.element;if(el.addEventListener){el.addEventListener("change",function(){self.setPosition()})}else{el.attachEvent("onchange",function(){self.setPosition()})}};Switchery.prototype.handleClick=function(){var switcher=this.switcher;fastclick(switcher);this.events.bind("click","bindClick")};Switchery.prototype.bindClick=function(){var parent=this.element.parentNode.tagName.toLowerCase(),labelParent=parent==="label"?false:true;this.setPosition(labelParent);this.handleOnchange(this.element.checked)};Switchery.prototype.markAsSwitched=function(){this.element.setAttribute("data-switchery",true)};Switchery.prototype.markedAsSwitched=function(){return this.element.getAttribute("data-switchery")};Switchery.prototype.init=function(){this.hide();this.show();this.setSize();this.setPosition();this.markAsSwitched();this.handleChange();this.handleClick()};Switchery.prototype.isChecked=function(){return this.element.checked};Switchery.prototype.isDisabled=function(){return this.options.disabled||this.element.disabled||this.element.readOnly};Switchery.prototype.destroy=function(){this.events.unbind()};Switchery.prototype.enable=function(){if(!this.options.disabled)return;if(this.options.disabled)this.options.disabled=false;if(this.element.disabled)this.element.disabled=false;if(this.element.readOnly)this.element.readOnly=false;this.switcher.style.opacity=1;this.events.bind("click","bindClick")};Switchery.prototype.disable=function(){if(this.options.disabled)return;if(!this.options.disabled)this.options.disabled=true;if(!this.element.disabled)this.element.disabled=true;if(!this.element.readOnly)this.element.readOnly=true;this.switcher.style.opacity=this.options.disabledOpacity;this.destroy()}});if(typeof exports=="object"){module.exports=require("switchery")}else if(typeof define=="function"&&define.amd){define("Switchery",[],function(){return require("switchery")})}else{(this||window)["Switchery"]=require("switchery")}})();(function($){$.fn.tipsy=function(options){options=$.extend({},$.fn.tipsy.defaults,options);return this.each(function(){var opts=$.fn.tipsy.elementOptions(this,options);$(this).hover(function(){$.data(this,"cancel.tipsy",true);var tip=$.data(this,"active.tipsy");if(!tip){tip=$('<div class="tipsy"><div class="tipsy-inner"/></div>');tip.css({position:"absolute",zIndex:1e5});$.data(this,"active.tipsy",tip)}if($(this).attr("title")||typeof $(this).attr("original-title")!="string"){$(this).attr("original-title",$(this).attr("title")||"").removeAttr("title")}var title;if(typeof opts.title=="string"){title=$(this).attr(opts.title=="title"?"original-title":opts.title)}else if(typeof opts.title=="function"){title=opts.title.call(this)}tip.find(".tipsy-inner")[opts.html?"html":"text"](title||opts.fallback);var pos=$.extend({},$(this).offset(),{width:this.offsetWidth,height:this.offsetHeight});tip.get(0).className="tipsy";tip.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).appendTo(document.body);var actualWidth=tip[0].offsetWidth,actualHeight=tip[0].offsetHeight;var gravity=typeof opts.gravity=="function"?opts.gravity.call(this):opts.gravity;switch(gravity.charAt(0)){case"n":tip.css({top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2}).addClass("tipsy-north");break;case"s":tip.css({top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2}).addClass("tipsy-south");break;case"e":tip.css({top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth}).addClass("tipsy-east");break;case"w":tip.css({top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width}).addClass("tipsy-west");break}if(opts.fade){tip.css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:.8})}else{tip.css({visibility:"visible"})}},function(){$.data(this,"cancel.tipsy",false);var self=this;setTimeout(function(){if($.data(this,"cancel.tipsy"))return;var tip=$.data(self,"active.tipsy");if(opts.fade){tip.stop().fadeOut(function(){$(this).remove()})}else{tip.remove()}},100)})})};$.fn.tipsy.elementOptions=function(ele,options){return $.metadata?$.extend({},options,$(ele).metadata()):options};$.fn.tipsy.defaults={fade:false,fallback:"",gravity:"n",html:false,title:"title"};$.fn.tipsy.autoNS=function(){return $(this).offset().top>$(document).scrollTop()+$(window).height()/2?"s":"n"};$.fn.tipsy.autoWE=function(){return $(this).offset().left>$(document).scrollLeft()+$(window).width()/2?"e":"w"}})(jQuery);(function(factory){"use strict";if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else if(typeof exports=="object"&&typeof module=="object"){module.exports=factory(require("jquery"))}else{factory(jQuery)}})(function($,undefined){"use strict";var defaultOpts={beforeShow:noop,move:noop,change:noop,show:noop,hide:noop,color:false,flat:false,showInput:false,allowEmpty:false,showButtons:true,clickoutFiresChange:true,showInitial:false,showPalette:false,showPaletteOnly:false,hideAfterPaletteSelect:false,togglePaletteOnly:false,showSelectionPalette:true,localStorageKey:false,appendTo:"body",maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",togglePaletteMoreText:"more",togglePaletteLessText:"less",clearText:"Clear Color Selection",noColorSelectedText:"No Color Selected",preferredFormat:false,className:"",containerClassName:"",replacerClassName:"",showAlpha:false,theme:"sp-light",palette:[["#ffffff","#000000","#ff0000","#ff8000","#ffff00","#008000","#0000ff","#4b0082","#9400d3"]],selectionPalette:[],disabled:false,offset:null},spectrums=[],IE=!!/msie/i.exec(window.navigator.userAgent),rgbaSupport=function(){function contains(str,substr){return!!~(""+str).indexOf(substr)}var elem=document.createElement("div");var style=elem.style;style.cssText="background-color:rgba(0,0,0,.5)";return contains(style.backgroundColor,"rgba")||contains(style.backgroundColor,"hsla")}(),replaceInput=["<div class='sp-replacer'>","<div class='sp-preview'><div class='sp-preview-inner'></div></div>","<div class='sp-dd'>&#9660;</div>","</div>"].join(""),markup=function(){var gradientFix="";if(IE){for(var i=1;i<=6;i++){gradientFix+="<div class='sp-"+i+"'></div>"}}return["<div class='sp-container sp-hidden'>","<div class='sp-palette-container'>","<div class='sp-palette sp-thumb sp-cf'></div>","<div class='sp-palette-button-container sp-cf'>","<button type='button' class='sp-palette-toggle'></button>","</div>","</div>","<div class='sp-picker-container'>","<div class='sp-top sp-cf'>","<div class='sp-fill'></div>","<div class='sp-top-inner'>","<div class='sp-color'>","<div class='sp-sat'>","<div class='sp-val'>","<div class='sp-dragger'></div>","</div>","</div>","</div>","<div class='sp-clear sp-clear-display'>","</div>","<div class='sp-hue'>","<div class='sp-slider'></div>",gradientFix,"</div>","</div>","<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle'></div></div></div>","</div>","<div class='sp-input-container sp-cf'>","<input class='sp-input' type='text' spellcheck='false'  />","</div>","<div class='sp-initial sp-thumb sp-cf'></div>","<div class='sp-button-container sp-cf'>","<a class='sp-cancel' href='#'></a>","<button type='button' class='sp-choose'></button>","</div>","</div>","</div>"].join("")}();function paletteTemplate(p,color,className,opts){var html=[];for(var i=0;i<p.length;i++){var current=p[i];if(current){var tiny=tinycolor(current);var c=tiny.toHsl().l<.5?"sp-thumb-el sp-thumb-dark":"sp-thumb-el sp-thumb-light";c+=tinycolor.equals(color,current)?" sp-thumb-active":"";var formattedString=tiny.toString(opts.preferredFormat||"rgb");var swatchStyle=rgbaSupport?"background-color:"+tiny.toRgbString():"filter:"+tiny.toFilter();html.push('<span title="'+formattedString+'" data-color="'+tiny.toRgbString()+'" class="'+c+'"><span class="sp-thumb-inner" style="'+swatchStyle+';"></span></span>')}else{var cls="sp-clear-display";html.push($("<div />").append($('<span data-color="" style="background-color:transparent;" class="'+cls+'"></span>').attr("title",opts.noColorSelectedText)).html())}}return"<div class='sp-cf "+className+"'>"+html.join("")+"</div>"}function hideAll(){for(var i=0;i<spectrums.length;i++){if(spectrums[i]){spectrums[i].hide()}}}function instanceOptions(o,callbackContext){var opts=$.extend({},defaultOpts,o);opts.callbacks={move:bind(opts.move,callbackContext),change:bind(opts.change,callbackContext),show:bind(opts.show,callbackContext),hide:bind(opts.hide,callbackContext),beforeShow:bind(opts.beforeShow,callbackContext)};return opts}function spectrum(element,o){var opts=instanceOptions(o,element),flat=opts.flat,showSelectionPalette=opts.showSelectionPalette,localStorageKey=opts.localStorageKey,theme=opts.theme,callbacks=opts.callbacks,resize=throttle(reflow,10),visible=false,isDragging=false,dragWidth=0,dragHeight=0,dragHelperHeight=0,slideHeight=0,slideWidth=0,alphaWidth=0,alphaSlideHelperWidth=0,slideHelperHeight=0,currentHue=0,currentSaturation=0,currentValue=0,currentAlpha=1,palette=[],paletteArray=[],paletteLookup={},selectionPalette=opts.selectionPalette.slice(0),maxSelectionSize=opts.maxSelectionSize,draggingClass="sp-dragging",shiftMovementDirection=null;var doc=element.ownerDocument,body=doc.body,boundElement=$(element),disabled=false,container=$(markup,doc).addClass(theme),pickerContainer=container.find(".sp-picker-container"),dragger=container.find(".sp-color"),dragHelper=container.find(".sp-dragger"),slider=container.find(".sp-hue"),slideHelper=container.find(".sp-slider"),alphaSliderInner=container.find(".sp-alpha-inner"),alphaSlider=container.find(".sp-alpha"),alphaSlideHelper=container.find(".sp-alpha-handle"),textInput=container.find(".sp-input"),paletteContainer=container.find(".sp-palette"),initialColorContainer=container.find(".sp-initial"),cancelButton=container.find(".sp-cancel"),clearButton=container.find(".sp-clear"),chooseButton=container.find(".sp-choose"),toggleButton=container.find(".sp-palette-toggle"),isInput=boundElement.is("input"),isInputTypeColor=isInput&&boundElement.attr("type")==="color"&&inputTypeColorSupport(),shouldReplace=isInput&&!flat,replacer=shouldReplace?$(replaceInput).addClass(theme).addClass(opts.className).addClass(opts.replacerClassName):$([]),offsetElement=shouldReplace?replacer:boundElement,previewElement=replacer.find(".sp-preview-inner"),initialColor=opts.color||isInput&&boundElement.val(),colorOnShow=false,currentPreferredFormat=opts.preferredFormat,clickoutFiresChange=!opts.showButtons||opts.clickoutFiresChange,isEmpty=!initialColor,allowEmpty=opts.allowEmpty&&!isInputTypeColor;function applyOptions(){if(opts.showPaletteOnly){opts.showPalette=true}toggleButton.text(opts.showPaletteOnly?opts.togglePaletteMoreText:opts.togglePaletteLessText);if(opts.palette){palette=opts.palette.slice(0);paletteArray=Array.isArray(palette[0])?palette:[palette];paletteLookup={};for(var i=0;i<paletteArray.length;i++){for(var j=0;j<paletteArray[i].length;j++){var rgb=tinycolor(paletteArray[i][j]).toRgbString();paletteLookup[rgb]=true}}}container.toggleClass("sp-flat",flat);container.toggleClass("sp-input-disabled",!opts.showInput);container.toggleClass("sp-alpha-enabled",opts.showAlpha);container.toggleClass("sp-clear-enabled",allowEmpty);container.toggleClass("sp-buttons-disabled",!opts.showButtons);container.toggleClass("sp-palette-buttons-disabled",!opts.togglePaletteOnly);container.toggleClass("sp-palette-disabled",!opts.showPalette);container.toggleClass("sp-palette-only",opts.showPaletteOnly);container.toggleClass("sp-initial-disabled",!opts.showInitial);container.addClass(opts.className).addClass(opts.containerClassName);reflow()}function initialize(){if(IE){container.find("*:not(input)").attr("unselectable","on")}applyOptions();if(shouldReplace){boundElement.after(replacer).hide()}if(!allowEmpty){clearButton.hide()}if(flat){boundElement.after(container).hide()}else{var appendTo=opts.appendTo==="parent"?boundElement.parent():$(opts.appendTo);if(appendTo.length!==1){appendTo=$("body")}appendTo.append(container)}updateSelectionPaletteFromStorage();offsetElement.on("click.spectrum touchstart.spectrum",function(e){if(!disabled){toggle()}e.stopPropagation();if(!$(e.target).is("input")){e.preventDefault()}});if(boundElement.is(":disabled")||opts.disabled===true){disable()}container.on("click",stopPropagation);textInput.on("change",setFromTextInput);textInput.on("paste",function(){setTimeout(setFromTextInput,1)});textInput.on("keydown",function(e){if(e.keyCode==13){setFromTextInput()}});cancelButton.text(opts.cancelText);cancelButton.on("click.spectrum",function(e){e.stopPropagation();e.preventDefault();revert();hide()});clearButton.attr("title",opts.clearText);clearButton.on("click.spectrum",function(e){e.stopPropagation();e.preventDefault();isEmpty=true;move();if(flat){updateOriginalInput(true)}});chooseButton.text(opts.chooseText);chooseButton.on("click.spectrum",function(e){e.stopPropagation();e.preventDefault();if(IE&&textInput.is(":focus")){textInput.trigger("change")}if(isValid()){updateOriginalInput(true);hide()}});toggleButton.text(opts.showPaletteOnly?opts.togglePaletteMoreText:opts.togglePaletteLessText);toggleButton.on("click.spectrum",function(e){e.stopPropagation();e.preventDefault();opts.showPaletteOnly=!opts.showPaletteOnly;if(!opts.showPaletteOnly&&!flat){container.css("left","-="+(pickerContainer.outerWidth(true)+5))}applyOptions()});draggable(alphaSlider,function(dragX,dragY,e){currentAlpha=dragX/alphaWidth;isEmpty=false;if(e.shiftKey){currentAlpha=Math.round(currentAlpha*10)/10}move()},dragStart,dragStop);draggable(slider,function(dragX,dragY){currentHue=parseFloat(dragY/slideHeight);isEmpty=false;if(!opts.showAlpha){currentAlpha=1}move()},dragStart,dragStop);draggable(dragger,function(dragX,dragY,e){if(!e.shiftKey){shiftMovementDirection=null}else if(!shiftMovementDirection){var oldDragX=currentSaturation*dragWidth;var oldDragY=dragHeight-currentValue*dragHeight;var furtherFromX=Math.abs(dragX-oldDragX)>Math.abs(dragY-oldDragY);shiftMovementDirection=furtherFromX?"x":"y"}var setSaturation=!shiftMovementDirection||shiftMovementDirection==="x";var setValue=!shiftMovementDirection||shiftMovementDirection==="y";if(setSaturation){currentSaturation=parseFloat(dragX/dragWidth)}if(setValue){currentValue=parseFloat((dragHeight-dragY)/dragHeight)}isEmpty=false;if(!opts.showAlpha){currentAlpha=1}move()},dragStart,dragStop);if(!!initialColor){set(initialColor);updateUI();currentPreferredFormat=opts.preferredFormat||tinycolor(initialColor).format;addColorToSelectionPalette(initialColor)}else{updateUI()}if(flat){show()}function paletteElementClick(e){if(e.data&&e.data.ignore){set($(e.target).closest(".sp-thumb-el").data("color"));move()}else{set($(e.target).closest(".sp-thumb-el").data("color"));move();if(opts.hideAfterPaletteSelect){updateOriginalInput(true);hide()}else{updateOriginalInput()}}return false}var paletteEvent=IE?"mousedown.spectrum":"click.spectrum touchstart.spectrum";paletteContainer.on(paletteEvent,".sp-thumb-el",paletteElementClick);initialColorContainer.on(paletteEvent,".sp-thumb-el:nth-child(1)",{ignore:true},paletteElementClick)}function updateSelectionPaletteFromStorage(){if(localStorageKey&&window.localStorage){try{var oldPalette=window.localStorage[localStorageKey].split(",#");if(oldPalette.length>1){delete window.localStorage[localStorageKey];$.each(oldPalette,function(i,c){addColorToSelectionPalette(c)})}}catch(e){}try{selectionPalette=window.localStorage[localStorageKey].split(";")}catch(e){}}}function addColorToSelectionPalette(color){if(showSelectionPalette){var rgb=tinycolor(color).toRgbString();if(!paletteLookup[rgb]&&$.inArray(rgb,selectionPalette)===-1){selectionPalette.push(rgb);while(selectionPalette.length>maxSelectionSize){selectionPalette.shift()}}if(localStorageKey&&window.localStorage){try{window.localStorage[localStorageKey]=selectionPalette.join(";")}catch(e){}}}}function getUniqueSelectionPalette(){var unique=[];if(opts.showPalette){for(var i=0;i<selectionPalette.length;i++){var rgb=tinycolor(selectionPalette[i]).toRgbString();if(!paletteLookup[rgb]){unique.push(selectionPalette[i])}}}return unique.reverse().slice(0,opts.maxSelectionSize)}function drawPalette(){var currentColor=get();var html=$.map(paletteArray,function(palette,i){return paletteTemplate(palette,currentColor,"sp-palette-row sp-palette-row-"+i,opts)});updateSelectionPaletteFromStorage();if(selectionPalette){html.push(paletteTemplate(getUniqueSelectionPalette(),currentColor,"sp-palette-row sp-palette-row-selection",opts))}paletteContainer.html(html.join(""))}function drawInitial(){if(opts.showInitial){var initial=colorOnShow;var current=get();initialColorContainer.html(paletteTemplate([initial,current],current,"sp-palette-row-initial",opts))}}function dragStart(){if(dragHeight<=0||dragWidth<=0||slideHeight<=0){reflow()}isDragging=true;container.addClass(draggingClass);shiftMovementDirection=null;boundElement.trigger("dragstart.spectrum",[get()])}function dragStop(){isDragging=false;container.removeClass(draggingClass);boundElement.trigger("dragstop.spectrum",[get()])}function setFromTextInput(){var value=textInput.val();if((value===null||value==="")&&allowEmpty){set(null);move();updateOriginalInput()}else{var tiny=tinycolor(value);if(tiny.isValid()){set(tiny);move();updateOriginalInput()}else{textInput.addClass("sp-validation-error")}}}function toggle(){if(visible){hide()}else{show()}}function show(){var event=$.Event("beforeShow.spectrum");if(visible){reflow();return}boundElement.trigger(event,[get()]);if(callbacks.beforeShow(get())===false||event.isDefaultPrevented()){return}hideAll();visible=true;$(doc).on("keydown.spectrum",onkeydown);$(doc).on("click.spectrum",clickout);$(window).on("resize.spectrum",resize);replacer.addClass("sp-active");container.removeClass("sp-hidden");reflow();updateUI();colorOnShow=get();drawInitial();callbacks.show(colorOnShow);boundElement.trigger("show.spectrum",[colorOnShow])}function onkeydown(e){if(e.keyCode===27){hide()}}function clickout(e){if(e.button==2){return}if(isDragging){return}if(clickoutFiresChange){updateOriginalInput(true)}else{revert()}hide()}function hide(){if(!visible||flat){return}visible=false;$(doc).off("keydown.spectrum",onkeydown);$(doc).off("click.spectrum",clickout);$(window).off("resize.spectrum",resize);replacer.removeClass("sp-active");container.addClass("sp-hidden");callbacks.hide(get());boundElement.trigger("hide.spectrum",[get()])}function revert(){set(colorOnShow,true);updateOriginalInput(true)}function set(color,ignoreFormatChange){if(tinycolor.equals(color,get())){updateUI();return}var newColor,newHsv;if(!color&&allowEmpty){isEmpty=true}else{isEmpty=false;newColor=tinycolor(color);newHsv=newColor.toHsv();currentHue=newHsv.h%360/360;currentSaturation=newHsv.s;currentValue=newHsv.v;currentAlpha=newHsv.a}updateUI();if(newColor&&newColor.isValid()&&!ignoreFormatChange){currentPreferredFormat=opts.preferredFormat||newColor.getFormat()}}function get(opts){opts=opts||{};if(allowEmpty&&isEmpty){return null}return tinycolor.fromRatio({h:currentHue,s:currentSaturation,v:currentValue,a:Math.round(currentAlpha*1e3)/1e3},{format:opts.format||currentPreferredFormat})}function isValid(){return!textInput.hasClass("sp-validation-error")}function move(){updateUI();callbacks.move(get());boundElement.trigger("move.spectrum",[get()])}function updateUI(){textInput.removeClass("sp-validation-error");updateHelperLocations();var flatColor=tinycolor.fromRatio({h:currentHue,s:1,v:1});dragger.css("background-color",flatColor.toHexString());var format=currentPreferredFormat;if(currentAlpha<1&&!(currentAlpha===0&&format==="name")){if(format==="hex"||format==="hex3"||format==="hex6"||format==="name"){format="rgb"}}var realColor=get({format:format}),displayColor="";previewElement.removeClass("sp-clear-display");previewElement.css("background-color","transparent");if(!realColor&&allowEmpty){previewElement.addClass("sp-clear-display")}else{var realHex=realColor.toHexString(),realRgb=realColor.toRgbString();if(rgbaSupport||realColor.alpha===1){previewElement.css("background-color",realRgb)}else{previewElement.css("background-color","transparent");previewElement.css("filter",realColor.toFilter())}if(opts.showAlpha){var rgb=realColor.toRgb();rgb.a=0;var realAlpha=tinycolor(rgb).toRgbString();var gradient="linear-gradient(left, "+realAlpha+", "+realHex+")";if(IE){alphaSliderInner.css("filter",tinycolor(realAlpha).toFilter({gradientType:1},realHex))}else{alphaSliderInner.css("background","-webkit-"+gradient);alphaSliderInner.css("background","-moz-"+gradient);alphaSliderInner.css("background","-ms-"+gradient);alphaSliderInner.css("background","linear-gradient(to right, "+realAlpha+", "+realHex+")")}}displayColor=realColor.toString(format)}if(opts.showInput){textInput.val(displayColor)}if(opts.showPalette){drawPalette()}drawInitial()}function updateHelperLocations(){var s=currentSaturation;var v=currentValue;if(allowEmpty&&isEmpty){alphaSlideHelper.hide();slideHelper.hide();dragHelper.hide()}else{alphaSlideHelper.show();slideHelper.show();dragHelper.show();var dragX=s*dragWidth;var dragY=dragHeight-v*dragHeight;dragX=Math.max(-dragHelperHeight,Math.min(dragWidth-dragHelperHeight,dragX-dragHelperHeight));dragY=Math.max(-dragHelperHeight,Math.min(dragHeight-dragHelperHeight,dragY-dragHelperHeight));dragHelper.css({top:dragY+"px",left:dragX+"px"});var alphaX=currentAlpha*alphaWidth;alphaSlideHelper.css({left:alphaX-alphaSlideHelperWidth/2+"px"});var slideY=currentHue*slideHeight;slideHelper.css({top:slideY-slideHelperHeight+"px"})}}function updateOriginalInput(fireCallback){var color=get(),displayColor="",hasChanged=!tinycolor.equals(color,colorOnShow);if(color){displayColor=color.toString(currentPreferredFormat);addColorToSelectionPalette(color)}if(isInput){boundElement.val(displayColor)}if(fireCallback&&hasChanged){callbacks.change(color);boundElement.trigger("change",[color])}}function reflow(){if(!visible){return}dragWidth=dragger.width();dragHeight=dragger.height();dragHelperHeight=dragHelper.height();slideWidth=slider.width();slideHeight=slider.height();slideHelperHeight=slideHelper.height();alphaWidth=alphaSlider.width();alphaSlideHelperWidth=alphaSlideHelper.width();if(!flat){container.css("position","absolute");if(opts.offset){container.offset(opts.offset)}else{container.offset(getOffset(container,offsetElement))}}updateHelperLocations();if(opts.showPalette){drawPalette()}boundElement.trigger("reflow.spectrum")}function destroy(){boundElement.show();offsetElement.off("click.spectrum touchstart.spectrum");container.remove();replacer.remove();spectrums[spect.id]=null}function option(optionName,optionValue){if(optionName===undefined){return $.extend({},opts)}if(optionValue===undefined){return opts[optionName]}opts[optionName]=optionValue;if(optionName==="preferredFormat"){currentPreferredFormat=opts.preferredFormat}applyOptions()}function enable(){disabled=false;boundElement.attr("disabled",false);offsetElement.removeClass("sp-disabled")}function disable(){hide();disabled=true;boundElement.attr("disabled",true);offsetElement.addClass("sp-disabled")}function setOffset(coord){opts.offset=coord;reflow()}initialize();var spect={show:show,hide:hide,toggle:toggle,reflow:reflow,option:option,enable:enable,disable:disable,offset:setOffset,set:function(c){set(c);updateOriginalInput()},get:get,destroy:destroy,container:container};spect.id=spectrums.push(spect)-1;return spect}function getOffset(picker,input){var extraY=0;var dpWidth=picker.outerWidth();var dpHeight=picker.outerHeight();var inputHeight=input.outerHeight();var doc=picker[0].ownerDocument;var docElem=doc.documentElement;var viewWidth=docElem.clientWidth+$(doc).scrollLeft();var viewHeight=docElem.clientHeight+$(doc).scrollTop();var offset=input.offset();var offsetLeft=offset.left;var offsetTop=offset.top;offsetTop+=inputHeight;offsetLeft-=Math.min(offsetLeft,offsetLeft+dpWidth>viewWidth&&viewWidth>dpWidth?Math.abs(offsetLeft+dpWidth-viewWidth):0);offsetTop-=Math.min(offsetTop,offsetTop+dpHeight>viewHeight&&viewHeight>dpHeight?Math.abs(dpHeight+inputHeight-extraY):extraY);return{top:offsetTop,bottom:offset.bottom,left:offsetLeft,right:offset.right,width:offset.width,height:offset.height}}function noop(){}function stopPropagation(e){e.stopPropagation()}function bind(func,obj){var slice=Array.prototype.slice;var args=slice.call(arguments,2);return function(){return func.apply(obj,args.concat(slice.call(arguments)))}}function draggable(element,onmove,onstart,onstop){onmove=onmove||function(){};onstart=onstart||function(){};onstop=onstop||function(){};var doc=document;var dragging=false;var offset={};var maxHeight=0;var maxWidth=0;var hasTouch="ontouchstart"in window;var duringDragEvents={};duringDragEvents["selectstart"]=prevent;duringDragEvents["dragstart"]=prevent;duringDragEvents["touchmove mousemove"]=move;duringDragEvents["touchend mouseup"]=stop;function prevent(e){if(e.stopPropagation){e.stopPropagation()}if(e.preventDefault){e.preventDefault()}e.returnValue=false}function move(e){if(dragging){if(IE&&doc.documentMode<9&&!e.button){return stop()}var t0=e.originalEvent&&e.originalEvent.touches&&e.originalEvent.touches[0];var pageX=t0&&t0.pageX||e.pageX;var pageY=t0&&t0.pageY||e.pageY;var dragX=Math.max(0,Math.min(pageX-offset.left,maxWidth));var dragY=Math.max(0,Math.min(pageY-offset.top,maxHeight));if(hasTouch){prevent(e)}onmove.apply(element,[dragX,dragY,e])}}function start(e){var rightclick=e.which?e.which==3:e.button==2;if(!rightclick&&!dragging){if(onstart.apply(element,arguments)!==false){dragging=true;maxHeight=$(element).height();maxWidth=$(element).width();offset=$(element).offset();$(doc).on(duringDragEvents);$(doc.body).addClass("sp-dragging");move(e);prevent(e)}}}function stop(){if(dragging){$(doc).off(duringDragEvents);$(doc.body).removeClass("sp-dragging");setTimeout(function(){onstop.apply(element,arguments)},0)}dragging=false}$(element).on("touchstart mousedown",start)}function throttle(func,wait,debounce){var timeout;return function(){var context=this,args=arguments;var throttler=function(){timeout=null;func.apply(context,args)};if(debounce)clearTimeout(timeout);if(debounce||!timeout)timeout=setTimeout(throttler,wait)}}function inputTypeColorSupport(){return $.fn.spectrum.inputTypeColorSupport()}var dataID="spectrum.id";$.fn.spectrum=function(opts,extra){if(typeof opts=="string"){var returnValue=this;var args=Array.prototype.slice.call(arguments,1);this.each(function(){var spect=spectrums[$(this).data(dataID)];if(spect){var method=spect[opts];if(!method){throw new Error("Spectrum: no such method: '"+opts+"'")}if(opts=="get"){returnValue=spect.get()}else if(opts=="container"){returnValue=spect.container}else if(opts=="option"){returnValue=spect.option.apply(spect,args)}else if(opts=="destroy"){spect.destroy();$(this).removeData(dataID)}else{method.apply(spect,args)}}});return returnValue}return this.spectrum("destroy").each(function(){var options=$.extend({},$(this).data(),opts);var spect=spectrum(this,options);$(this).data(dataID,spect.id)})};$.fn.spectrum.load=true;$.fn.spectrum.loadOpts={};$.fn.spectrum.draggable=draggable;$.fn.spectrum.defaults=defaultOpts;$.fn.spectrum.inputTypeColorSupport=function inputTypeColorSupport(){if(typeof inputTypeColorSupport._cachedResult==="undefined"){var colorInput=$("<input type='color'/>")[0];inputTypeColorSupport._cachedResult=colorInput.type==="color"&&colorInput.value!==""}return inputTypeColorSupport._cachedResult};$.spectrum={};$.spectrum.localization={};$.spectrum.palettes={};$.fn.spectrum.processNativeColorInputs=function(){var colorInputs=$("input[type=color]");if(colorInputs.length&&!inputTypeColorSupport()){colorInputs.spectrum({preferredFormat:"hex6"})}};(function(){var trimLeft=/^[\s,#]+/,trimRight=/\s+$/,tinyCounter=0,math=Math,mathRound=math.round,mathMin=math.min,mathMax=math.max,mathRandom=math.random;var tinycolor=function(color,opts){color=color?color:"";opts=opts||{};if(color instanceof tinycolor){return color}if(!(this instanceof tinycolor)){return new tinycolor(color,opts)}var rgb=inputToRGB(color);this._originalInput=color;this._r=rgb.r;this._g=rgb.g;this._b=rgb.b;this._a=rgb.a;this._roundA=mathRound(1e3*this._a)/1e3;this._format=opts.format||rgb.format;this._gradientType=opts.gradientType;if(this._r<1){this._r=mathRound(this._r)}if(this._g<1){this._g=mathRound(this._g)}if(this._b<1){this._b=mathRound(this._b)}this._ok=rgb.ok;this._tc_id=tinyCounter++};tinycolor.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var rgb=this.toRgb();return(rgb.r*299+rgb.g*587+rgb.b*114)/1e3},setAlpha:function(value){this._a=boundAlpha(value);this._roundA=mathRound(1e3*this._a)/1e3;return this},toHsv:function(){var hsv=rgbToHsv(this._r,this._g,this._b);return{h:hsv.h*360,s:hsv.s,v:hsv.v,a:this._a}},toHsvString:function(){var hsv=rgbToHsv(this._r,this._g,this._b);var h=mathRound(hsv.h*360),s=mathRound(hsv.s*100),v=mathRound(hsv.v*100);return this._a==1?"hsv("+h+", "+s+"%, "+v+"%)":"hsva("+h+", "+s+"%, "+v+"%, "+this._roundA+")"},toHsl:function(){var hsl=rgbToHsl(this._r,this._g,this._b);return{h:hsl.h*360,s:hsl.s,l:hsl.l,a:this._a}},toHslString:function(){var hsl=rgbToHsl(this._r,this._g,this._b);var h=mathRound(hsl.h*360),s=mathRound(hsl.s*100),l=mathRound(hsl.l*100);return this._a==1?"hsl("+h+", "+s+"%, "+l+"%)":"hsla("+h+", "+s+"%, "+l+"%, "+this._roundA+")"},toHex:function(allow3Char){return rgbToHex(this._r,this._g,this._b,allow3Char)},toHexString:function(allow3Char){return"#"+this.toHex(allow3Char)},toHex8:function(){return rgbaToHex(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:mathRound(this._r),g:mathRound(this._g),b:mathRound(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+mathRound(this._r)+", "+mathRound(this._g)+", "+mathRound(this._b)+")":"rgba("+mathRound(this._r)+", "+mathRound(this._g)+", "+mathRound(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:mathRound(bound01(this._r,255)*100)+"%",g:mathRound(bound01(this._g,255)*100)+"%",b:mathRound(bound01(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+mathRound(bound01(this._r,255)*100)+"%, "+mathRound(bound01(this._g,255)*100)+"%, "+mathRound(bound01(this._b,255)*100)+"%)":"rgba("+mathRound(bound01(this._r,255)*100)+"%, "+mathRound(bound01(this._g,255)*100)+"%, "+mathRound(bound01(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){if(this._a===0){return"transparent"}if(this._a<1){return false}return hexNames[rgbToHex(this._r,this._g,this._b,true)]||false},toFilter:function(secondColor){var hex8String="#"+rgbaToHex(this._r,this._g,this._b,this._a);var secondHex8String=hex8String;var gradientType=this._gradientType?"GradientType = 1, ":"";if(secondColor){var s=tinycolor(secondColor);secondHex8String=s.toHex8String()}return"progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")"},toString:function(format){var formatSet=!!format;format=format||this._format;var formattedString=false;var hasAlpha=this._a<1&&this._a>=0;var needsAlphaFormat=!formatSet&&hasAlpha&&(format==="hex"||format==="hex6"||format==="hex3"||format==="name");if(needsAlphaFormat){if(format==="name"&&this._a===0){return this.toName()}return this.toRgbString()}if(format==="rgb"){formattedString=this.toRgbString()}if(format==="prgb"){formattedString=this.toPercentageRgbString()}if(format==="hex"||format==="hex6"){formattedString=this.toHexString()}if(format==="hex3"){formattedString=this.toHexString(true)}if(format==="hex8"){formattedString=this.toHex8String()}if(format==="name"){formattedString=this.toName()}if(format==="hsl"){formattedString=this.toHslString()}if(format==="hsv"){formattedString=this.toHsvString()}return formattedString||this.toHexString()},_applyModification:function(fn,args){var color=fn.apply(null,[this].concat([].slice.call(args)));this._r=color._r;this._g=color._g;this._b=color._b;this.setAlpha(color._a);return this},lighten:function(){return this._applyModification(lighten,arguments)},brighten:function(){return this._applyModification(brighten,arguments)},darken:function(){return this._applyModification(darken,arguments)},desaturate:function(){return this._applyModification(desaturate,arguments)},saturate:function(){return this._applyModification(saturate,arguments)},greyscale:function(){return this._applyModification(greyscale,arguments)},spin:function(){return this._applyModification(spin,arguments)},_applyCombination:function(fn,args){return fn.apply(null,[this].concat([].slice.call(args)))},analogous:function(){return this._applyCombination(analogous,arguments)},complement:function(){return this._applyCombination(complement,arguments)},monochromatic:function(){return this._applyCombination(monochromatic,arguments)},splitcomplement:function(){return this._applyCombination(splitcomplement,arguments)},triad:function(){return this._applyCombination(triad,arguments)},tetrad:function(){return this._applyCombination(tetrad,arguments)}};tinycolor.fromRatio=function(color,opts){if(typeof color=="object"){var newColor={};for(var i in color){if(color.hasOwnProperty(i)){if(i==="a"){newColor[i]=color[i]}else{newColor[i]=convertToPercentage(color[i])}}}color=newColor}return tinycolor(color,opts)};function inputToRGB(color){var rgb={r:0,g:0,b:0};var a=1;var ok=false;var format=false;if(typeof color=="string"){color=stringInputToObject(color)}if(typeof color=="object"){if(color.hasOwnProperty("r")&&color.hasOwnProperty("g")&&color.hasOwnProperty("b")){rgb=rgbToRgb(color.r,color.g,color.b);ok=true;format=String(color.r).substr(-1)==="%"?"prgb":"rgb"}else if(color.hasOwnProperty("h")&&color.hasOwnProperty("s")&&color.hasOwnProperty("v")){color.s=convertToPercentage(color.s);color.v=convertToPercentage(color.v);rgb=hsvToRgb(color.h,color.s,color.v);ok=true;format="hsv"}else if(color.hasOwnProperty("h")&&color.hasOwnProperty("s")&&color.hasOwnProperty("l")){color.s=convertToPercentage(color.s);color.l=convertToPercentage(color.l);rgb=hslToRgb(color.h,color.s,color.l);ok=true;format="hsl"}if(color.hasOwnProperty("a")){a=color.a}}a=boundAlpha(a);return{ok:ok,format:color.format||format,r:mathMin(255,mathMax(rgb.r,0)),g:mathMin(255,mathMax(rgb.g,0)),b:mathMin(255,mathMax(rgb.b,0)),a:a}}function rgbToRgb(r,g,b){return{r:bound01(r,255)*255,g:bound01(g,255)*255,b:bound01(b,255)*255}}function rgbToHsl(r,g,b){r=bound01(r,255);g=bound01(g,255);b=bound01(b,255);var max=mathMax(r,g,b),min=mathMin(r,g,b);var h,s,l=(max+min)/2;if(max==min){h=s=0}else{var d=max-min;s=l>.5?d/(2-max-min):d/(max+min);switch(max){case r:h=(g-b)/d+(g<b?6:0);break;case g:h=(b-r)/d+2;break;case b:h=(r-g)/d+4;break}h/=6}return{h:h,s:s,l:l}}function hslToRgb(h,s,l){var r,g,b;h=bound01(h,360);s=bound01(s,100);l=bound01(l,100);function hue2rgb(p,q,t){if(t<0)t+=1;if(t>1)t-=1;if(t<1/6)return p+(q-p)*6*t;if(t<1/2)return q;if(t<2/3)return p+(q-p)*(2/3-t)*6;return p}if(s===0){r=g=b=l}else{var q=l<.5?l*(1+s):l+s-l*s;var p=2*l-q;r=hue2rgb(p,q,h+1/3);g=hue2rgb(p,q,h);b=hue2rgb(p,q,h-1/3)}return{r:r*255,g:g*255,b:b*255}}function rgbToHsv(r,g,b){r=bound01(r,255);g=bound01(g,255);b=bound01(b,255);var max=mathMax(r,g,b),min=mathMin(r,g,b);var h,s,v=max;var d=max-min;s=max===0?0:d/max;if(max==min){h=0}else{switch(max){case r:h=(g-b)/d+(g<b?6:0);break;case g:h=(b-r)/d+2;break;case b:h=(r-g)/d+4;break}h/=6}return{h:h,s:s,v:v}}function hsvToRgb(h,s,v){h=bound01(h,360)*6;s=bound01(s,100);v=bound01(v,100);var i=math.floor(h),f=h-i,p=v*(1-s),q=v*(1-f*s),t=v*(1-(1-f)*s),mod=i%6,r=[v,q,p,p,t,v][mod],g=[t,v,v,q,p,p][mod],b=[p,p,t,v,v,q][mod];return{r:r*255,g:g*255,b:b*255}}function rgbToHex(r,g,b,allow3Char){var hex=[pad2(mathRound(r).toString(16)),pad2(mathRound(g).toString(16)),pad2(mathRound(b).toString(16))];if(allow3Char&&hex[0].charAt(0)==hex[0].charAt(1)&&hex[1].charAt(0)==hex[1].charAt(1)&&hex[2].charAt(0)==hex[2].charAt(1)){return hex[0].charAt(0)+hex[1].charAt(0)+hex[2].charAt(0)}return hex.join("")}function rgbaToHex(r,g,b,a){var hex=[pad2(convertDecimalToHex(a)),pad2(mathRound(r).toString(16)),pad2(mathRound(g).toString(16)),pad2(mathRound(b).toString(16))];return hex.join("")}tinycolor.equals=function(color1,color2){if(!color1||!color2){return false}return tinycolor(color1).toRgbString()==tinycolor(color2).toRgbString()};tinycolor.random=function(){return tinycolor.fromRatio({r:mathRandom(),g:mathRandom(),b:mathRandom()})};function desaturate(color,amount){amount=amount===0?0:amount||10;var hsl=tinycolor(color).toHsl();hsl.s-=amount/100;hsl.s=clamp01(hsl.s);return tinycolor(hsl)}function saturate(color,amount){amount=amount===0?0:amount||10;var hsl=tinycolor(color).toHsl();hsl.s+=amount/100;hsl.s=clamp01(hsl.s);return tinycolor(hsl)}function greyscale(color){return tinycolor(color).desaturate(100)}function lighten(color,amount){amount=amount===0?0:amount||10;var hsl=tinycolor(color).toHsl();hsl.l+=amount/100;hsl.l=clamp01(hsl.l);return tinycolor(hsl)}function brighten(color,amount){amount=amount===0?0:amount||10;var rgb=tinycolor(color).toRgb();rgb.r=mathMax(0,mathMin(255,rgb.r-mathRound(255*-(amount/100))));rgb.g=mathMax(0,mathMin(255,rgb.g-mathRound(255*-(amount/100))));rgb.b=mathMax(0,mathMin(255,rgb.b-mathRound(255*-(amount/100))));return tinycolor(rgb)}function darken(color,amount){amount=amount===0?0:amount||10;var hsl=tinycolor(color).toHsl();hsl.l-=amount/100;hsl.l=clamp01(hsl.l);return tinycolor(hsl)}function spin(color,amount){var hsl=tinycolor(color).toHsl();var hue=(mathRound(hsl.h)+amount)%360;hsl.h=hue<0?360+hue:hue;return tinycolor(hsl)}function complement(color){var hsl=tinycolor(color).toHsl();hsl.h=(hsl.h+180)%360;return tinycolor(hsl)}function triad(color){var hsl=tinycolor(color).toHsl();var h=hsl.h;return[tinycolor(color),tinycolor({h:(h+120)%360,s:hsl.s,l:hsl.l}),tinycolor({h:(h+240)%360,s:hsl.s,l:hsl.l})]}function tetrad(color){var hsl=tinycolor(color).toHsl();var h=hsl.h;return[tinycolor(color),tinycolor({h:(h+90)%360,s:hsl.s,l:hsl.l}),tinycolor({h:(h+180)%360,s:hsl.s,l:hsl.l}),tinycolor({h:(h+270)%360,s:hsl.s,l:hsl.l})]}function splitcomplement(color){var hsl=tinycolor(color).toHsl();var h=hsl.h;return[tinycolor(color),tinycolor({h:(h+72)%360,s:hsl.s,l:hsl.l}),tinycolor({h:(h+216)%360,s:hsl.s,l:hsl.l})]}function analogous(color,results,slices){results=results||6;slices=slices||30;var hsl=tinycolor(color).toHsl();var part=360/slices;var ret=[tinycolor(color)];for(hsl.h=(hsl.h-(part*results>>1)+720)%360;--results;){hsl.h=(hsl.h+part)%360;ret.push(tinycolor(hsl))}return ret}function monochromatic(color,results){results=results||6;var hsv=tinycolor(color).toHsv();var h=hsv.h,s=hsv.s,v=hsv.v;var ret=[];var modification=1/results;while(results--){ret.push(tinycolor({h:h,s:s,v:v}));v=(v+modification)%1}return ret}tinycolor.mix=function(color1,color2,amount){amount=amount===0?0:amount||50;var rgb1=tinycolor(color1).toRgb();var rgb2=tinycolor(color2).toRgb();var p=amount/100;var w=p*2-1;var a=rgb2.a-rgb1.a;var w1;if(w*a==-1){w1=w}else{w1=(w+a)/(1+w*a)}w1=(w1+1)/2;var w2=1-w1;var rgba={r:rgb2.r*w1+rgb1.r*w2,g:rgb2.g*w1+rgb1.g*w2,b:rgb2.b*w1+rgb1.b*w2,a:rgb2.a*p+rgb1.a*(1-p)};return tinycolor(rgba)};tinycolor.readability=function(color1,color2){var c1=tinycolor(color1);var c2=tinycolor(color2);var rgb1=c1.toRgb();var rgb2=c2.toRgb();var brightnessA=c1.getBrightness();var brightnessB=c2.getBrightness();var colorDiff=Math.max(rgb1.r,rgb2.r)-Math.min(rgb1.r,rgb2.r)+Math.max(rgb1.g,rgb2.g)-Math.min(rgb1.g,rgb2.g)+Math.max(rgb1.b,rgb2.b)-Math.min(rgb1.b,rgb2.b);return{brightness:Math.abs(brightnessA-brightnessB),color:colorDiff}};tinycolor.isReadable=function(color1,color2){var readability=tinycolor.readability(color1,color2);return readability.brightness>125&&readability.color>500};tinycolor.mostReadable=function(baseColor,colorList){var bestColor=null;var bestScore=0;var bestIsReadable=false;for(var i=0;i<colorList.length;i++){var readability=tinycolor.readability(baseColor,colorList[i]);var readable=readability.brightness>125&&readability.color>500;var score=3*(readability.brightness/125)+readability.color/500;if(readable&&!bestIsReadable||readable&&bestIsReadable&&score>bestScore||!readable&&!bestIsReadable&&score>bestScore){bestIsReadable=readable;bestScore=score;bestColor=tinycolor(colorList[i])}}return bestColor};var names=tinycolor.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var hexNames=tinycolor.hexNames=flip(names);function flip(o){var flipped={};for(var i in o){if(o.hasOwnProperty(i)){flipped[o[i]]=i}}return flipped}function boundAlpha(a){a=parseFloat(a);if(isNaN(a)||a<0||a>1){a=1}return a}function bound01(n,max){if(isOnePointZero(n)){n="100%"}var processPercent=isPercentage(n);n=mathMin(max,mathMax(0,parseFloat(n)));if(processPercent){n=parseInt(n*max,10)/100}if(math.abs(n-max)<1e-6){return 1}return n%max/parseFloat(max)}function clamp01(val){return mathMin(1,mathMax(0,val))}function parseIntFromHex(val){return parseInt(val,16)}function isOnePointZero(n){return typeof n=="string"&&n.indexOf(".")!=-1&&parseFloat(n)===1}function isPercentage(n){return typeof n==="string"&&n.indexOf("%")!=-1}function pad2(c){return c.length==1?"0"+c:""+c}function convertToPercentage(n){if(n<=1){n=n*100+"%"}return n}function convertDecimalToHex(d){return Math.round(parseFloat(d)*255).toString(16)}function convertHexToDecimal(h){return parseIntFromHex(h)/255}var matchers=function(){var CSS_INTEGER="[-\\+]?\\d+%?";var CSS_NUMBER="[-\\+]?\\d*\\.\\d+%?";var CSS_UNIT="(?:"+CSS_NUMBER+")|(?:"+CSS_INTEGER+")";var PERMISSIVE_MATCH3="[\\s|\\(]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")\\s*\\)?";var PERMISSIVE_MATCH4="[\\s|\\(]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")\\s*\\)?";return{rgb:new RegExp("rgb"+PERMISSIVE_MATCH3),rgba:new RegExp("rgba"+PERMISSIVE_MATCH4),hsl:new RegExp("hsl"+PERMISSIVE_MATCH3),hsla:new RegExp("hsla"+PERMISSIVE_MATCH4),hsv:new RegExp("hsv"+PERMISSIVE_MATCH3),hsva:new RegExp("hsva"+PERMISSIVE_MATCH4),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function stringInputToObject(color){color=color.replace(trimLeft,"").replace(trimRight,"").toLowerCase();var named=false;if(names[color]){color=names[color];named=true}else if(color=="transparent"){return{r:0,g:0,b:0,a:0,format:"name"}}var match;if(match=matchers.rgb.exec(color)){return{r:match[1],g:match[2],b:match[3]}}if(match=matchers.rgba.exec(color)){return{r:match[1],g:match[2],b:match[3],a:match[4]}}if(match=matchers.hsl.exec(color)){return{h:match[1],s:match[2],l:match[3]}}if(match=matchers.hsla.exec(color)){return{h:match[1],s:match[2],l:match[3],a:match[4]}}if(match=matchers.hsv.exec(color)){return{h:match[1],s:match[2],v:match[3]}}if(match=matchers.hsva.exec(color)){return{h:match[1],s:match[2],v:match[3],a:match[4]}}if(match=matchers.hex8.exec(color)){return{a:convertHexToDecimal(match[1]),r:parseIntFromHex(match[2]),g:parseIntFromHex(match[3]),b:parseIntFromHex(match[4]),format:named?"name":"hex8"}}if(match=matchers.hex6.exec(color)){return{r:parseIntFromHex(match[1]),g:parseIntFromHex(match[2]),b:parseIntFromHex(match[3]),format:named?"name":"hex"}}if(match=matchers.hex3.exec(color)){return{r:parseIntFromHex(match[1]+""+match[1]),g:parseIntFromHex(match[2]+""+match[2]),b:parseIntFromHex(match[3]+""+match[3]),format:named?"name":"hex"}}return false}window.tinycolor=tinycolor})();$(function(){if($.fn.spectrum.load){$.fn.spectrum.processNativeColorInputs()}})});(function($){"use strict";var proxy=function(callback,context){return callback.bind(context)};var defaults={theme:"fip-grey",source:false,emptyIcon:true,emptyIconValue:"",iconsPerPage:20,hasSearch:true,searchSource:false,useAttribute:false,attributeName:"data-icon",convertToHex:true,allCategoryText:"From all categories",unCategorizedText:"Uncategorized"};function Plugin(element,options){this.element=$(element);this.settings=$.extend({},defaults,options);if(this.settings.emptyIcon){this.settings.iconsPerPage--}this.iconPicker=$("<div/>",{class:"icons-selector",style:"position: relative",html:'<div class="selector">'+'<span class="selected-icon">'+'<i class="fip-icon-block"></i>'+"</span>"+'<span class="selector-button">'+'<i class="fip-icon-down-dir"></i>'+"</span>"+"</div>"+'<div class="selector-popup" style="display: none;">'+(this.settings.hasSearch?'<div class="selector-search">'+'<input type="text" name="" value="" placeholder="Search icon" class="icons-search-input"/>'+'<i class="fip-icon-search"></i>'+"</div>":"")+'<div class="selector-category">'+'<select name="" class="icon-category-select" style="display: none">'+"</select>"+"</div>"+'<div class="fip-icons-container"></div>'+'<div class="selector-footer" style="display:none;">'+'<span class="selector-pages">1/2</span>'+'<span class="selector-arrows">'+'<span class="selector-arrow-left" style="display:none;">'+'<i class="fip-icon-left-dir"></i>'+"</span>"+'<span class="selector-arrow-right">'+'<i class="fip-icon-right-dir"></i>'+"</span>"+"</span>"+"</div>"+"</div>"});this.iconContainer=this.iconPicker.find(".fip-icons-container");this.searchIcon=this.iconPicker.find(".selector-search i");this.iconsSearched=[];this.isSearch=false;this.totalPage=1;this.currentPage=1;this.currentIcon=false;this.iconsCount=0;this.open=false;this.searchValues=[];this.availableCategoriesSearch=[];this.triggerEvent=null;this.backupSource=[];this.backupSearch=[];this.isCategorized=false;this.selectCategory=this.iconPicker.find(".icon-category-select");this.selectedCategory=false;this.availableCategories=[];this.unCategorizedKey=null;this.init()}Plugin.prototype={init:function(){this.iconPicker.addClass(this.settings.theme);this.iconPicker.css({left:-9999}).appendTo("body");var iconPickerHeight=this.iconPicker.outerHeight(),iconPickerWidth=this.iconPicker.outerWidth();this.iconPicker.css({left:""});this.element.before(this.iconPicker);this.element.css({visibility:"hidden",top:0,position:"relative",zIndex:"-1",left:"-"+iconPickerWidth+"px",display:"inline-block",height:iconPickerHeight+"px",width:iconPickerWidth+"px",padding:"0",margin:"0 -"+iconPickerWidth+"px 0 0",border:"0 none",verticalAlign:"top"});if(!this.element.is("select")){var ieVersion=function(){var v=3,div=document.createElement("div"),a=div.all||[];while(div.innerHTML="\x3c!--[if gt IE "+ ++v+"]><br><![endif]--\x3e",a[0]);return v>4?v:!v}();var el=document.createElement("div");this.triggerEvent=ieVersion===9||!("oninput"in el)?["keyup"]:["input","keyup"]}if(!this.settings.source&&this.element.is("select")){this.settings.source=[];this.settings.searchSource=[];if(this.element.find("optgroup").length){this.isCategorized=true;this.element.find("optgroup").each(proxy(function(i,el){var thisCategoryKey=this.availableCategories.length,categoryOption=$("<option />");categoryOption.attr("value",thisCategoryKey);categoryOption.html($(el).attr("label"));this.selectCategory.append(categoryOption);this.availableCategories[thisCategoryKey]=[];this.availableCategoriesSearch[thisCategoryKey]=[];$(el).find("option").each(proxy(function(i,cel){var newIconValue=$(cel).val(),newIconLabel=$(cel).html();if(newIconValue&&newIconValue!==this.settings.emptyIconValue){this.settings.source.push(newIconValue);this.availableCategories[thisCategoryKey].push(newIconValue);this.searchValues.push(newIconLabel);this.availableCategoriesSearch[thisCategoryKey].push(newIconLabel)}},this))},this));if(this.element.find("> option").length){this.element.find("> option").each(proxy(function(i,el){var newIconValue=$(el).val(),newIconLabel=$(el).html();if(!newIconValue||newIconValue===""||newIconValue==this.settings.emptyIconValue){return true}if(this.unCategorizedKey===null){this.unCategorizedKey=this.availableCategories.length;this.availableCategories[this.unCategorizedKey]=[];this.availableCategoriesSearch[this.unCategorizedKey]=[];$("<option />").attr("value",this.unCategorizedKey).html(this.settings.unCategorizedText).appendTo(this.selectCategory)}this.settings.source.push(newIconValue);this.availableCategories[this.unCategorizedKey].push(newIconValue);this.searchValues.push(newIconLabel);this.availableCategoriesSearch[this.unCategorizedKey].push(newIconLabel)},this))}}else{this.element.find("option").each(proxy(function(i,el){var newIconValue=$(el).val(),newIconLabel=$(el).html();if(newIconValue){this.settings.source.push(newIconValue);this.searchValues.push(newIconLabel)}},this))}this.backupSource=this.settings.source.slice(0);this.backupSearch=this.searchValues.slice(0);this.loadCategories()}else{this.initSourceIndex()}this.loadIcons();this.selectCategory.on("change keyup",proxy(function(e){if(this.isCategorized===false){return false}var targetSelect=$(e.currentTarget),currentCategory=targetSelect.val();if(targetSelect.val()==="all"){this.settings.source=this.backupSource;this.searchValues=this.backupSearch}else{var key=parseInt(currentCategory,10);if(this.availableCategories[key]){this.settings.source=this.availableCategories[key];this.searchValues=this.availableCategoriesSearch[key]}}this.resetSearch();this.loadIcons()},this));this.iconPicker.find(".selector-button").click(proxy(function(){this.toggleIconSelector()},this));this.iconPicker.find(".selector-arrow-right").click(proxy(function(e){if(this.currentPage<this.totalPage){this.iconPicker.find(".selector-arrow-left").show();this.currentPage=this.currentPage+1;this.renderIconContainer()}if(this.currentPage===this.totalPage){$(e.currentTarget).hide()}},this));this.iconPicker.find(".selector-arrow-left").click(proxy(function(e){if(this.currentPage>1){this.iconPicker.find(".selector-arrow-right").show();this.currentPage=this.currentPage-1;this.renderIconContainer()}if(this.currentPage===1){$(e.currentTarget).hide()}},this));this.iconPicker.find(".icons-search-input").on("keyup",proxy(function(e){var searchString=$(e.currentTarget).val();if(searchString===""){this.resetSearch();return}this.searchIcon.removeClass("fip-icon-search");this.searchIcon.addClass("fip-icon-cancel");this.isSearch=true;this.currentPage=1;this.iconsSearched=[];$.grep(this.searchValues,proxy(function(n,i){if(n.toLowerCase().search(searchString.toLowerCase())>=0){this.iconsSearched[this.iconsSearched.length]=this.settings.source[i];return true}},this));this.renderIconContainer()},this));this.iconPicker.find(".selector-search").on("click",".fip-icon-cancel",proxy(function(){this.iconPicker.find(".icons-search-input").focus();this.resetSearch()},this));this.iconContainer.on("click",".fip-box",proxy(function(e){this.setSelectedIcon($(e.currentTarget).find("i").attr("data-fip-value"));this.toggleIconSelector()},this));this.iconPicker.click(function(event){event.stopPropagation();return false});$("html").click(proxy(function(){if(this.open){this.toggleIconSelector()}},this))},initSourceIndex:function(){if(typeof this.settings.source!=="object"){return}if(Array.isArray(this.settings.source)){this.isCategorized=false;this.selectCategory.html("").hide();this.settings.source=$.map(this.settings.source,function(e,i){if(typeof e.toString=="function"){return e.toString()}else{return e}});if(Array.isArray(this.settings.searchSource)){this.searchValues=$.map(this.settings.searchSource,function(e,i){if(typeof e.toString=="function"){return e.toString()}else{return e}})}else{this.searchValues=this.settings.source.slice(0)}}else{var originalSource=$.extend(true,{},this.settings.source);this.settings.source=[];this.searchValues=[];this.availableCategoriesSearch=[];this.selectedCategory=false;this.availableCategories=[];this.unCategorizedKey=null;this.isCategorized=true;this.selectCategory.html("");for(var categoryLabel in originalSource){var thisCategoryKey=this.availableCategories.length,categoryOption=$("<option />");categoryOption.attr("value",thisCategoryKey);categoryOption.html(categoryLabel);this.selectCategory.append(categoryOption);this.availableCategories[thisCategoryKey]=[];this.availableCategoriesSearch[thisCategoryKey]=[];for(var newIconKey in originalSource[categoryLabel]){var newIconValue=originalSource[categoryLabel][newIconKey];var newIconLabel=this.settings.searchSource&&this.settings.searchSource[categoryLabel]&&this.settings.searchSource[categoryLabel][newIconKey]?this.settings.searchSource[categoryLabel][newIconKey]:newIconValue;if(typeof newIconValue.toString=="function"){newIconValue=newIconValue.toString()}if(newIconValue&&newIconValue!==this.settings.emptyIconValue){this.settings.source.push(newIconValue);this.availableCategories[thisCategoryKey].push(newIconValue);this.searchValues.push(newIconLabel);this.availableCategoriesSearch[thisCategoryKey].push(newIconLabel)}}}}this.backupSource=this.settings.source.slice(0);this.backupSearch=this.searchValues.slice(0);this.loadCategories()},loadCategories:function(){if(this.isCategorized===false){return}$('<option value="all">'+this.settings.allCategoryText+"</option>").prependTo(this.selectCategory);this.selectCategory.show().val("all").trigger("change")},loadIcons:function(){this.iconContainer.html('<i class="fip-icon-spin3 animate-spin loading"></i>');if(this.settings.source instanceof Array){this.renderIconContainer()}},renderIconContainer:function(){var offset,iconsPaged=[];if(this.isSearch){iconsPaged=this.iconsSearched}else{iconsPaged=this.settings.source}this.iconsCount=iconsPaged.length;this.totalPage=Math.ceil(this.iconsCount/this.settings.iconsPerPage);if(this.totalPage>1){this.iconPicker.find(".selector-footer").show()}else{this.iconPicker.find(".selector-footer").hide()}this.iconPicker.find(".selector-pages").html(this.currentPage+"/"+this.totalPage+" <em>("+this.iconsCount+")</em>");offset=(this.currentPage-1)*this.settings.iconsPerPage;if(this.settings.emptyIcon){this.iconContainer.html('<span class="fip-box"><i class="fip-icon-block" data-fip-value="fip-icon-block"></i></span>')}else if(iconsPaged.length<1){this.iconContainer.html('<span class="icons-picker-error"><i class="fip-icon-block" data-fip-value="fip-icon-block"></i></span>');return}else{this.iconContainer.html("")}iconsPaged=iconsPaged.slice(offset,offset+this.settings.iconsPerPage);for(var i=0,item;item=iconsPaged[i++];){var flipBoxTitle=item;$.grep(this.settings.source,proxy(function(e,i){if(e===item){flipBoxTitle=this.searchValues[i];return true}return false},this));$("<span/>",{html:'<i data-fip-value="'+item+'" '+(this.settings.useAttribute?this.settings.attributeName+'="'+(this.settings.convertToHex?"&#x"+parseInt(item,10).toString(16)+";":item)+'"':'class="'+item+'"')+"></i>",class:"fip-box",title:flipBoxTitle}).appendTo(this.iconContainer)}if(!this.settings.emptyIcon&&(!this.element.val()||$.inArray(this.element.val(),this.settings.source)===-1)){this.setSelectedIcon(iconsPaged[0])}else if($.inArray(this.element.val(),this.settings.source)===-1){this.setSelectedIcon()}else{this.setSelectedIcon(this.element.val())}},setHighlightedIcon:function(){this.iconContainer.find(".current-icon").removeClass("current-icon");if(this.currentIcon){this.iconContainer.find('[data-fip-value="'+this.currentIcon+'"]').parent("span").addClass("current-icon")}},setSelectedIcon:function(theIcon){if(theIcon==="fip-icon-block"){theIcon=""}if(this.settings.useAttribute){if(theIcon){this.iconPicker.find(".selected-icon").html("<i "+this.settings.attributeName+'="'+(this.settings.convertToHex?"&#x"+parseInt(theIcon,10).toString(16)+";":theIcon)+'"></i>')}else{this.iconPicker.find(".selected-icon").html('<i class="fip-icon-block"></i>')}}else{this.iconPicker.find(".selected-icon").html('<i class="'+(theIcon||"fip-icon-block")+'"></i>')}this.element.val(theIcon===""?this.settings.emptyIconValue:theIcon).trigger("change");if(this.triggerEvent!==null){for(var eventKey in this.triggerEvent){this.element.trigger(this.triggerEvent[eventKey])}}this.currentIcon=theIcon;this.setHighlightedIcon()},toggleIconSelector:function(){this.open=!this.open?1:0;this.iconPicker.find(".selector-popup").slideToggle(300);this.iconPicker.find(".selector-button i").toggleClass("fip-icon-down-dir");this.iconPicker.find(".selector-button i").toggleClass("fip-icon-up-dir");if(this.open){this.iconPicker.find(".icons-search-input").focus().select()}},resetSearch:function(){this.iconPicker.find(".icons-search-input").val("");this.searchIcon.removeClass("fip-icon-cancel");this.searchIcon.addClass("fip-icon-search");this.iconPicker.find(".selector-arrow-left").hide();this.currentPage=1;this.isSearch=false;this.renderIconContainer();if(this.totalPage>1){this.iconPicker.find(".selector-arrow-right").show()}}};$.fn.fontIconPicker=function(options){this.each(function(){if(!$.data(this,"fontIconPicker")){$.data(this,"fontIconPicker",new Plugin(this,options))}});this.setIcons=proxy(function(newIcons,iconSearch){if(undefined===newIcons){newIcons=false}if(undefined===iconSearch){iconSearch=false}this.each(function(){$.data(this,"fontIconPicker").settings.source=newIcons;$.data(this,"fontIconPicker").settings.searchSource=iconSearch;$.data(this,"fontIconPicker").initSourceIndex();$.data(this,"fontIconPicker").resetSearch();$.data(this,"fontIconPicker").loadIcons()})},this);this.destroyPicker=proxy(function(){this.each(function(){if(!$.data(this,"fontIconPicker")){return}$.data(this,"fontIconPicker").iconPicker.remove();$.data(this,"fontIconPicker").element.css({visibility:"",top:"",position:"",zIndex:"",left:"",display:"",height:"",width:"",padding:"",margin:"",border:"",verticalAlign:""});$.removeData(this,"fontIconPicker")})},this);this.refreshPicker=proxy(function(newOptions){if(!newOptions){newOptions=options}this.destroyPicker();this.each(function(){if(!$.data(this,"fontIconPicker")){$.data(this,"fontIconPicker",new Plugin(this,newOptions))}})},this);return this}})(jQuery);(function(window,factory){if(typeof define=="function"&&define.amd){define("jquery-bridget/jquery-bridget",["jquery"],function(jQuery){return factory(window,jQuery)})}else if(typeof module=="object"&&module.exports){module.exports=factory(window,require("jquery"))}else{window.jQueryBridget=factory(window,window.jQuery)}})(window,function factory(window,jQuery){"use strict";var arraySlice=Array.prototype.slice;var console=window.console;var logError=typeof console=="undefined"?function(){}:function(message){console.error(message)};function jQueryBridget(namespace,PluginClass,$){$=$||jQuery||window.jQuery;if(!$){return}if(!PluginClass.prototype.option){PluginClass.prototype.option=function(opts){if(!$.isPlainObject(opts)){return}this.options=$.extend(true,this.options,opts)}}$.fn[namespace]=function(arg0){if(typeof arg0=="string"){var args=arraySlice.call(arguments,1);return methodCall(this,arg0,args)}plainCall(this,arg0);return this};function methodCall($elems,methodName,args){var returnValue;var pluginMethodStr="$()."+namespace+'("'+methodName+'")';$elems.each(function(i,elem){var instance=$.data(elem,namespace);if(!instance){logError(namespace+" not initialized. Cannot call methods, i.e. "+pluginMethodStr);return}var method=instance[methodName];if(!method||methodName.charAt(0)=="_"){logError(pluginMethodStr+" is not a valid method");return}var value=method.apply(instance,args);returnValue=returnValue===undefined?value:returnValue});return returnValue!==undefined?returnValue:$elems}function plainCall($elems,options){$elems.each(function(i,elem){var instance=$.data(elem,namespace);if(instance){instance.option(options);instance._init()}else{instance=new PluginClass(elem,options);$.data(elem,namespace,instance)}})}updateJQuery($)}function updateJQuery($){if(!$||$&&$.bridget){return}$.bridget=jQueryBridget}updateJQuery(jQuery||window.jQuery);return jQueryBridget});(function(global,factory){if(typeof define=="function"&&define.amd){define("ev-emitter/ev-emitter",factory)}else if(typeof module=="object"&&module.exports){module.exports=factory()}else{global.EvEmitter=factory()}})(typeof window!="undefined"?window:this,function(){function EvEmitter(){}var proto=EvEmitter.prototype;proto.on=function(eventName,listener){if(!eventName||!listener){return}var events=this._events=this._events||{};var listeners=events[eventName]=events[eventName]||[];if(listeners.indexOf(listener)==-1){listeners.push(listener)}return this};proto.once=function(eventName,listener){if(!eventName||!listener){return}this.on(eventName,listener);var onceEvents=this._onceEvents=this._onceEvents||{};var onceListeners=onceEvents[eventName]=onceEvents[eventName]||{};onceListeners[listener]=true;return this};proto.off=function(eventName,listener){var listeners=this._events&&this._events[eventName];if(!listeners||!listeners.length){return}var index=listeners.indexOf(listener);if(index!=-1){listeners.splice(index,1)}return this};proto.emitEvent=function(eventName,args){var listeners=this._events&&this._events[eventName];if(!listeners||!listeners.length){return}listeners=listeners.slice(0);args=args||[];var onceListeners=this._onceEvents&&this._onceEvents[eventName];for(var i=0;i<listeners.length;i++){var listener=listeners[i];var isOnce=onceListeners&&onceListeners[listener];if(isOnce){this.off(eventName,listener);delete onceListeners[listener]}listener.apply(this,args)}return this};proto.allOff=function(){delete this._events;delete this._onceEvents};return EvEmitter});(function(window,factory){if(typeof define=="function"&&define.amd){define("get-size/get-size",factory)}else if(typeof module=="object"&&module.exports){module.exports=factory()}else{window.getSize=factory()}})(window,function factory(){"use strict";function getStyleSize(value){var num=parseFloat(value);var isValid=value.indexOf("%")==-1&&!isNaN(num);return isValid&&num}function noop(){}var logError=typeof console=="undefined"?noop:function(message){console.error(message)};var measurements=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];var measurementsLength=measurements.length;function getZeroSize(){var size={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};for(var i=0;i<measurementsLength;i++){var measurement=measurements[i];size[measurement]=0}return size}function getStyle(elem){var style=getComputedStyle(elem);if(!style){logError("Style returned "+style+". Are you running this code in a hidden iframe on Firefox? "+"See https://bit.ly/getsizebug1")}return style}var isSetup=false;var isBoxSizeOuter;function setup(){if(isSetup){return}isSetup=true;var div=document.createElement("div");div.style.width="200px";div.style.padding="1px 2px 3px 4px";div.style.borderStyle="solid";div.style.borderWidth="1px 2px 3px 4px";div.style.boxSizing="border-box";var body=document.body||document.documentElement;body.appendChild(div);var style=getStyle(div);isBoxSizeOuter=Math.round(getStyleSize(style.width))==200;getSize.isBoxSizeOuter=isBoxSizeOuter;body.removeChild(div)}function getSize(elem){setup();if(typeof elem=="string"){elem=document.querySelector(elem)}if(!elem||typeof elem!="object"||!elem.nodeType){return}var style=getStyle(elem);if(style.display=="none"){return getZeroSize()}var size={};size.width=elem.offsetWidth;size.height=elem.offsetHeight;var isBorderBox=size.isBorderBox=style.boxSizing=="border-box";for(var i=0;i<measurementsLength;i++){var measurement=measurements[i];var value=style[measurement];var num=parseFloat(value);size[measurement]=!isNaN(num)?num:0}var paddingWidth=size.paddingLeft+size.paddingRight;var paddingHeight=size.paddingTop+size.paddingBottom;var marginWidth=size.marginLeft+size.marginRight;var marginHeight=size.marginTop+size.marginBottom;var borderWidth=size.borderLeftWidth+size.borderRightWidth;var borderHeight=size.borderTopWidth+size.borderBottomWidth;var isBorderBoxSizeOuter=isBorderBox&&isBoxSizeOuter;var styleWidth=getStyleSize(style.width);if(styleWidth!==false){size.width=styleWidth+(isBorderBoxSizeOuter?0:paddingWidth+borderWidth)}var styleHeight=getStyleSize(style.height);if(styleHeight!==false){size.height=styleHeight+(isBorderBoxSizeOuter?0:paddingHeight+borderHeight)}size.innerWidth=size.width-(paddingWidth+borderWidth);size.innerHeight=size.height-(paddingHeight+borderHeight);size.outerWidth=size.width+marginWidth;size.outerHeight=size.height+marginHeight;return size}return getSize});(function(window,factory){"use strict";if(typeof define=="function"&&define.amd){define("desandro-matches-selector/matches-selector",factory)}else if(typeof module=="object"&&module.exports){module.exports=factory()}else{window.matchesSelector=factory()}})(window,function factory(){"use strict";var matchesMethod=function(){var ElemProto=window.Element.prototype;if(ElemProto.matches){return"matches"}if(ElemProto.matchesSelector){return"matchesSelector"}var prefixes=["webkit","moz","ms","o"];for(var i=0;i<prefixes.length;i++){var prefix=prefixes[i];var method=prefix+"MatchesSelector";if(ElemProto[method]){return method}}}();return function matchesSelector(elem,selector){return elem[matchesMethod](selector)}});(function(window,factory){if(typeof define=="function"&&define.amd){define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(matchesSelector){return factory(window,matchesSelector)})}else if(typeof module=="object"&&module.exports){module.exports=factory(window,require("desandro-matches-selector"))}else{window.fizzyUIUtils=factory(window,window.matchesSelector)}})(window,function factory(window,matchesSelector){var utils={};utils.extend=function(a,b){for(var prop in b){a[prop]=b[prop]}return a};utils.modulo=function(num,div){return(num%div+div)%div};var arraySlice=Array.prototype.slice;utils.makeArray=function(obj){if(Array.isArray(obj)){return obj}if(obj===null||obj===undefined){return[]}var isArrayLike=typeof obj=="object"&&typeof obj.length=="number";if(isArrayLike){return arraySlice.call(obj)}return[obj]};utils.removeFrom=function(ary,obj){var index=ary.indexOf(obj);if(index!=-1){ary.splice(index,1)}};utils.getParent=function(elem,selector){while(elem.parentNode&&elem!=document.body){elem=elem.parentNode;if(matchesSelector(elem,selector)){return elem}}};utils.getQueryElement=function(elem){if(typeof elem=="string"){return document.querySelector(elem)}return elem};utils.handleEvent=function(event){var method="on"+event.type;if(this[method]){this[method](event)}};utils.filterFindElements=function(elems,selector){elems=utils.makeArray(elems);var ffElems=[];var isElement=function(elem){return typeof HTMLElement==="object"?elem instanceof HTMLElement:elem&&typeof elem==="object"&&elem!==null&&elem.nodeType===1&&typeof elem.nodeName==="string"};elems.forEach(function(elem){if(!isElement(elem)){return}if(!selector){ffElems.push(elem);return}if(matchesSelector(elem,selector)){ffElems.push(elem)}var childElems=elem.querySelectorAll(selector);for(var i=0;i<childElems.length;i++){ffElems.push(childElems[i])}});return ffElems};utils.debounceMethod=function(_class,methodName,threshold){threshold=threshold||100;var method=_class.prototype[methodName];var timeoutName=methodName+"Timeout";_class.prototype[methodName]=function(){var timeout=this[timeoutName];clearTimeout(timeout);var args=arguments;var _this=this;this[timeoutName]=setTimeout(function(){method.apply(_this,args);delete _this[timeoutName]},threshold)}};utils.docReady=function(callback){var readyState=document.readyState;if(readyState=="complete"||readyState=="interactive"){setTimeout(callback)}else{document.addEventListener("DOMContentLoaded",callback)}};utils.toDashed=function(str){return str.replace(/(.)([A-Z])/g,function(match,$1,$2){return $1+"-"+$2}).toLowerCase()};var console=window.console;utils.htmlInit=function(WidgetClass,namespace){utils.docReady(function(){var dashedNamespace=utils.toDashed(namespace);var dataAttr="data-"+dashedNamespace;var dataAttrElems=document.querySelectorAll("["+dataAttr+"]");var jsDashElems=document.querySelectorAll(".js-"+dashedNamespace);var elems=utils.makeArray(dataAttrElems).concat(utils.makeArray(jsDashElems));var dataOptionsAttr=dataAttr+"-options";var jQuery=window.jQuery;elems.forEach(function(elem){var attr=elem.getAttribute(dataAttr)||elem.getAttribute(dataOptionsAttr);var options;try{options=attr&&JSON.parse(attr)}catch(error){if(console){console.error("Error parsing "+dataAttr+" on "+elem.className+": "+error)}return}var instance=new WidgetClass(elem,options);if(jQuery){jQuery.data(elem,namespace,instance)}})})};return utils});(function(window,factory){if(typeof define=="function"&&define.amd){define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],factory)}else if(typeof module=="object"&&module.exports){module.exports=factory(require("ev-emitter"),require("get-size"))}else{window.Outlayer={};window.Outlayer.Item=factory(window.EvEmitter,window.getSize)}})(window,function factory(EvEmitter,getSize){"use strict";function isEmptyObj(obj){for(var prop in obj){return false}prop=null;return true}var docElemStyle=document.documentElement.style;var transitionProperty=typeof docElemStyle.transition=="string"?"transition":"WebkitTransition";var transformProperty=typeof docElemStyle.transform=="string"?"transform":"WebkitTransform";var transitionEndEvent={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[transitionProperty];var vendorProperties={transform:transformProperty,transition:transitionProperty,transitionDuration:transitionProperty+"Duration",transitionProperty:transitionProperty+"Property",transitionDelay:transitionProperty+"Delay"};function Item(element,layout){if(!element){return}this.element=element;this.layout=layout;this.position={x:0,y:0};this._create()}var proto=Item.prototype=Object.create(EvEmitter.prototype);proto.constructor=Item;proto._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}};this.css({position:"absolute"})};proto.handleEvent=function(event){var method="on"+event.type;if(this[method]){this[method](event)}};proto.getSize=function(){this.size=getSize(this.element)};proto.css=function(style){var elemStyle=this.element.style;for(var prop in style){var supportedProp=vendorProperties[prop]||prop;elemStyle[supportedProp]=style[prop]}};proto.getPosition=function(){var style=getComputedStyle(this.element);var isOriginLeft=this.layout._getOption("originLeft");var isOriginTop=this.layout._getOption("originTop");var xValue=style[isOriginLeft?"left":"right"];var yValue=style[isOriginTop?"top":"bottom"];var x=parseFloat(xValue);var y=parseFloat(yValue);var layoutSize=this.layout.size;if(xValue.indexOf("%")!=-1){x=x/100*layoutSize.width}if(yValue.indexOf("%")!=-1){y=y/100*layoutSize.height}x=isNaN(x)?0:x;y=isNaN(y)?0:y;x-=isOriginLeft?layoutSize.paddingLeft:layoutSize.paddingRight;y-=isOriginTop?layoutSize.paddingTop:layoutSize.paddingBottom;this.position.x=x;this.position.y=y};proto.layoutPosition=function(){var layoutSize=this.layout.size;var style={};var isOriginLeft=this.layout._getOption("originLeft");var isOriginTop=this.layout._getOption("originTop");var xPadding=isOriginLeft?"paddingLeft":"paddingRight";var xProperty=isOriginLeft?"left":"right";var xResetProperty=isOriginLeft?"right":"left";var x=this.position.x+layoutSize[xPadding];style[xProperty]=this.getXValue(x);style[xResetProperty]="";var yPadding=isOriginTop?"paddingTop":"paddingBottom";var yProperty=isOriginTop?"top":"bottom";var yResetProperty=isOriginTop?"bottom":"top";var y=this.position.y+layoutSize[yPadding];style[yProperty]=this.getYValue(y);style[yResetProperty]="";this.css(style);this.emitEvent("layout",[this])};proto.getXValue=function(x){var isHorizontal=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!isHorizontal?x/this.layout.size.width*100+"%":x+"px"};proto.getYValue=function(y){var isHorizontal=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&isHorizontal?y/this.layout.size.height*100+"%":y+"px"};proto._transitionTo=function(x,y){this.getPosition();var curX=this.position.x;var curY=this.position.y;var didNotMove=x==this.position.x&&y==this.position.y;this.setPosition(x,y);if(didNotMove&&!this.isTransitioning){this.layoutPosition();return}var transX=x-curX;var transY=y-curY;var transitionStyle={};transitionStyle.transform=this.getTranslate(transX,transY);this.transition({to:transitionStyle,onTransitionEnd:{transform:this.layoutPosition},isCleaning:true})};proto.getTranslate=function(x,y){var isOriginLeft=this.layout._getOption("originLeft");var isOriginTop=this.layout._getOption("originTop");x=isOriginLeft?x:-x;y=isOriginTop?y:-y;return"translate3d("+x+"px, "+y+"px, 0)"};proto.goTo=function(x,y){this.setPosition(x,y);this.layoutPosition()};proto.moveTo=proto._transitionTo;proto.setPosition=function(x,y){this.position.x=parseFloat(x);this.position.y=parseFloat(y)};proto._nonTransition=function(args){this.css(args.to);if(args.isCleaning){this._removeStyles(args.to)}for(var prop in args.onTransitionEnd){args.onTransitionEnd[prop].call(this)}};proto.transition=function(args){if(!parseFloat(this.layout.options.transitionDuration)){this._nonTransition(args);return}var _transition=this._transn;for(var prop in args.onTransitionEnd){_transition.onEnd[prop]=args.onTransitionEnd[prop]}for(prop in args.to){_transition.ingProperties[prop]=true;if(args.isCleaning){_transition.clean[prop]=true}}if(args.from){this.css(args.from);var h=this.element.offsetHeight;h=null}this.enableTransition(args.to);this.css(args.to);this.isTransitioning=true};function toDashedAll(str){return str.replace(/([A-Z])/g,function($1){return"-"+$1.toLowerCase()})}var transitionProps="opacity,"+toDashedAll(transformProperty);proto.enableTransition=function(){if(this.isTransitioning){return}var duration=this.layout.options.transitionDuration;duration=typeof duration=="number"?duration+"ms":duration;this.css({transitionProperty:transitionProps,transitionDuration:duration,transitionDelay:this.staggerDelay||0});this.element.addEventListener(transitionEndEvent,this,false)};proto.onwebkitTransitionEnd=function(event){this.ontransitionend(event)};proto.onotransitionend=function(event){this.ontransitionend(event)};var dashedVendorProperties={"-webkit-transform":"transform"};proto.ontransitionend=function(event){if(event.target!==this.element){return}var _transition=this._transn;var propertyName=dashedVendorProperties[event.propertyName]||event.propertyName;delete _transition.ingProperties[propertyName];if(isEmptyObj(_transition.ingProperties)){this.disableTransition()}if(propertyName in _transition.clean){this.element.style[event.propertyName]="";delete _transition.clean[propertyName]}if(propertyName in _transition.onEnd){var onTransitionEnd=_transition.onEnd[propertyName];onTransitionEnd.call(this);delete _transition.onEnd[propertyName]}this.emitEvent("transitionEnd",[this])};proto.disableTransition=function(){this.removeTransitionStyles();this.element.removeEventListener(transitionEndEvent,this,false);this.isTransitioning=false};proto._removeStyles=function(style){var cleanStyle={};for(var prop in style){cleanStyle[prop]=""}this.css(cleanStyle)};var cleanTransitionStyle={transitionProperty:"",transitionDuration:"",transitionDelay:""};proto.removeTransitionStyles=function(){this.css(cleanTransitionStyle)};proto.stagger=function(delay){delay=isNaN(delay)?0:delay;this.staggerDelay=delay+"ms"};proto.removeElem=function(){this.element.parentNode.removeChild(this.element);this.css({display:""});this.emitEvent("remove",[this])};proto.remove=function(){if(!transitionProperty||!parseFloat(this.layout.options.transitionDuration)){this.removeElem();return}this.once("transitionEnd",function(){this.removeElem()});this.hide()};proto.reveal=function(){delete this.isHidden;this.css({display:""});var options=this.layout.options;var onTransitionEnd={};var transitionEndProperty=this.getHideRevealTransitionEndProperty("visibleStyle");onTransitionEnd[transitionEndProperty]=this.onRevealTransitionEnd;this.transition({from:options.hiddenStyle,to:options.visibleStyle,isCleaning:true,onTransitionEnd:onTransitionEnd})};proto.onRevealTransitionEnd=function(){if(!this.isHidden){this.emitEvent("reveal")}};proto.getHideRevealTransitionEndProperty=function(styleProperty){var optionStyle=this.layout.options[styleProperty];if(optionStyle.opacity){return"opacity"}for(var prop in optionStyle){return prop}};proto.hide=function(){this.isHidden=true;this.css({display:""});var options=this.layout.options;var onTransitionEnd={};var transitionEndProperty=this.getHideRevealTransitionEndProperty("hiddenStyle");onTransitionEnd[transitionEndProperty]=this.onHideTransitionEnd;this.transition({from:options.visibleStyle,to:options.hiddenStyle,isCleaning:true,onTransitionEnd:onTransitionEnd})};proto.onHideTransitionEnd=function(){if(this.isHidden){this.css({display:"none"});this.emitEvent("hide")}};proto.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})};return Item});(function(window,factory){"use strict";if(typeof define=="function"&&define.amd){define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(EvEmitter,getSize,utils,Item){return factory(window,EvEmitter,getSize,utils,Item)})}else if(typeof module=="object"&&module.exports){module.exports=factory(window,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item"))}else{window.Outlayer=factory(window,window.EvEmitter,window.getSize,window.fizzyUIUtils,window.Outlayer.Item)}})(window,function factory(window,EvEmitter,getSize,utils,Item){"use strict";var console=window.console;var jQuery=window.jQuery;var noop=function(){};var GUID=0;var instances={};function Outlayer(element,options){var queryElement=utils.getQueryElement(element);if(!queryElement){if(console){console.error("Bad element for "+this.constructor.namespace+": "+(queryElement||element))}return}this.element=queryElement;if(jQuery){this.$element=jQuery(this.element)}this.options=utils.extend({},this.constructor.defaults);this.option(options);var id=++GUID;this.element.outlayerGUID=id;instances[id]=this;this._create();var isInitLayout=this._getOption("initLayout");if(isInitLayout){this.layout()}}Outlayer.namespace="outlayer";Outlayer.Item=Item;Outlayer.defaults={containerStyle:{position:"relative"},initLayout:true,originLeft:true,originTop:true,resize:true,resizeContainer:true,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var proto=Outlayer.prototype;utils.extend(proto,EvEmitter.prototype);proto.option=function(opts){utils.extend(this.options,opts)};proto._getOption=function(option){var oldOption=this.constructor.compatOptions[option];return oldOption&&this.options[oldOption]!==undefined?this.options[oldOption]:this.options[option]};Outlayer.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"};proto._create=function(){this.reloadItems();this.stamps=[];this.stamp(this.options.stamp);utils.extend(this.element.style,this.options.containerStyle);var canBindResize=this._getOption("resize");if(canBindResize){this.bindResize()}};proto.reloadItems=function(){this.items=this._itemize(this.element.children)};proto._itemize=function(elems){var itemElems=this._filterFindItemElements(elems);var Item=this.constructor.Item;var items=[];for(var i=0;i<itemElems.length;i++){var elem=itemElems[i];var item=new Item(elem,this);items.push(item)}return items};proto._filterFindItemElements=function(elems){return utils.filterFindElements(elems,this.options.itemSelector)};proto.getItemElements=function(){return this.items.map(function(item){return item.element})};proto.layout=function(){this._resetLayout();this._manageStamps();var layoutInstant=this._getOption("layoutInstant");var isInstant=layoutInstant!==undefined?layoutInstant:!this._isLayoutInited;this.layoutItems(this.items,isInstant);this._isLayoutInited=true};proto._init=proto.layout;proto._resetLayout=function(){this.getSize()};proto.getSize=function(){this.size=getSize(this.element)};proto._getMeasurement=function(measurement,size){var option=this.options[measurement];var elem;if(!option){this[measurement]=0}else{if(typeof option=="string"){elem=this.element.querySelector(option)}else if(option instanceof HTMLElement){elem=option}this[measurement]=elem?getSize(elem)[size]:option}};proto.layoutItems=function(items,isInstant){items=this._getItemsForLayout(items);this._layoutItems(items,isInstant);this._postLayout()};proto._getItemsForLayout=function(items){return items.filter(function(item){return!item.isIgnored})};proto._layoutItems=function(items,isInstant){this._emitCompleteOnItems("layout",items);if(!items||!items.length){return}var queue=[];items.forEach(function(item){var position=this._getItemLayoutPosition(item);position.item=item;position.isInstant=isInstant||item.isLayoutInstant;queue.push(position)},this);this._processLayoutQueue(queue)};proto._getItemLayoutPosition=function(){return{x:0,y:0}};proto._processLayoutQueue=function(queue){this.updateStagger();queue.forEach(function(obj,i){this._positionItem(obj.item,obj.x,obj.y,obj.isInstant,i)},this)};proto.updateStagger=function(){var stagger=this.options.stagger;if(stagger===null||stagger===undefined){this.stagger=0;return}this.stagger=getMilliseconds(stagger);return this.stagger};proto._positionItem=function(item,x,y,isInstant,i){if(isInstant){item.goTo(x,y)}else{item.stagger(i*this.stagger);item.moveTo(x,y)}};proto._postLayout=function(){this.resizeContainer()};proto.resizeContainer=function(){var isResizingContainer=this._getOption("resizeContainer");if(!isResizingContainer){return}var size=this._getContainerSize();if(size){this._setContainerMeasure(size.width,true);this._setContainerMeasure(size.height,false)}};proto._getContainerSize=noop;proto._setContainerMeasure=function(measure,isWidth){if(measure===undefined){return}var elemSize=this.size;if(elemSize.isBorderBox){measure+=isWidth?elemSize.paddingLeft+elemSize.paddingRight+elemSize.borderLeftWidth+elemSize.borderRightWidth:elemSize.paddingBottom+elemSize.paddingTop+elemSize.borderTopWidth+elemSize.borderBottomWidth}measure=Math.max(measure,0);this.element.style[isWidth?"width":"height"]=measure+"px"};proto._emitCompleteOnItems=function(eventName,items){var _this=this;function onComplete(){_this.dispatchEvent(eventName+"Complete",null,[items])}var count=items.length;if(!items||!count){onComplete();return}var doneCount=0;function tick(){doneCount++;if(doneCount==count){onComplete()}}items.forEach(function(item){item.once(eventName,tick)})};proto.dispatchEvent=function(type,event,args){var emitArgs=event?[event].concat(args):args;this.emitEvent(type,emitArgs);if(jQuery){this.$element=this.$element||jQuery(this.element);if(event){var $event=jQuery.Event(event);$event.type=type;this.$element.trigger($event,args)}else{this.$element.trigger(type,args)}}};proto.ignore=function(elem){var item=this.getItem(elem);if(item){item.isIgnored=true}};proto.unignore=function(elem){var item=this.getItem(elem);if(item){delete item.isIgnored}};proto.stamp=function(elems){elems=this._find(elems);if(!elems){return}this.stamps=this.stamps.concat(elems);elems.forEach(this.ignore,this)};proto.unstamp=function(elems){elems=this._find(elems);if(!elems){return}elems.forEach(function(elem){utils.removeFrom(this.stamps,elem);this.unignore(elem)},this)};proto._find=function(elems){if(!elems){return}if(typeof elems=="string"){elems=this.element.querySelectorAll(elems)}elems=utils.makeArray(elems);return elems};proto._manageStamps=function(){if(!this.stamps||!this.stamps.length){return}this._getBoundingRect();this.stamps.forEach(this._manageStamp,this)};proto._getBoundingRect=function(){var boundingRect=this.element.getBoundingClientRect();var size=this.size;this._boundingRect={left:boundingRect.left+size.paddingLeft+size.borderLeftWidth,top:boundingRect.top+size.paddingTop+size.borderTopWidth,right:boundingRect.right-(size.paddingRight+size.borderRightWidth),bottom:boundingRect.bottom-(size.paddingBottom+size.borderBottomWidth)}};proto._manageStamp=noop;proto._getElementOffset=function(elem){var boundingRect=elem.getBoundingClientRect();var thisRect=this._boundingRect;var size=getSize(elem);var offset={left:boundingRect.left-thisRect.left-size.marginLeft,top:boundingRect.top-thisRect.top-size.marginTop,right:thisRect.right-boundingRect.right-size.marginRight,bottom:thisRect.bottom-boundingRect.bottom-size.marginBottom};return offset};proto.handleEvent=utils.handleEvent;proto.bindResize=function(){window.addEventListener("resize",this);this.isResizeBound=true};proto.unbindResize=function(){window.removeEventListener("resize",this);this.isResizeBound=false};proto.onresize=function(){this.resize()};utils.debounceMethod(Outlayer,"onresize",100);proto.resize=function(){if(!this.isResizeBound||!this.needsResizeLayout()){return}this.layout()};proto.needsResizeLayout=function(){var size=getSize(this.element);var hasSizes=this.size&&size;return hasSizes&&size.innerWidth!==this.size.innerWidth};proto.addItems=function(elems){var items=this._itemize(elems);if(items.length){this.items=this.items.concat(items)}return items};proto.appended=function(elems){var items=this.addItems(elems);if(!items.length){return}this.layoutItems(items,true);this.reveal(items)};proto.prepended=function(elems){var items=this._itemize(elems);if(!items.length){return}var previousItems=this.items.slice(0);this.items=items.concat(previousItems);this._resetLayout();this._manageStamps();this.layoutItems(items,true);this.reveal(items);this.layoutItems(previousItems)};proto.reveal=function(items){this._emitCompleteOnItems("reveal",items);if(!items||!items.length){return}var stagger=this.updateStagger();items.forEach(function(item,i){item.stagger(i*stagger);item.reveal()})};proto.hide=function(items){this._emitCompleteOnItems("hide",items);if(!items||!items.length){return}var stagger=this.updateStagger();items.forEach(function(item,i){item.stagger(i*stagger);item.hide()})};proto.revealItemElements=function(elems){var items=this.getItems(elems);this.reveal(items)};proto.hideItemElements=function(elems){var items=this.getItems(elems);this.hide(items)};proto.getItem=function(elem){for(var i=0;i<this.items.length;i++){var item=this.items[i];if(item.element==elem){return item}}};proto.getItems=function(elems){elems=utils.makeArray(elems);var items=[];elems.forEach(function(elem){var item=this.getItem(elem);if(item){items.push(item)}},this);return items};proto.remove=function(elems){var removeItems=this.getItems(elems);this._emitCompleteOnItems("remove",removeItems);if(!removeItems||!removeItems.length){return}removeItems.forEach(function(item){item.remove();utils.removeFrom(this.items,item)},this)};proto.destroy=function(){var style=this.element.style;style.height="";style.position="";style.width="";this.items.forEach(function(item){item.destroy()});this.unbindResize();var id=this.element.outlayerGUID;delete instances[id];delete this.element.outlayerGUID;if(jQuery){jQuery.removeData(this.element,this.constructor.namespace)}};Outlayer.data=function(elem){elem=utils.getQueryElement(elem);var id=elem&&elem.outlayerGUID;return id&&instances[id]};Outlayer.create=function(namespace,options){var Layout=subclass(Outlayer);Layout.defaults=utils.extend({},Outlayer.defaults);utils.extend(Layout.defaults,options);Layout.compatOptions=utils.extend({},Outlayer.compatOptions);Layout.namespace=namespace;Layout.data=Outlayer.data;Layout.Item=subclass(Item);utils.htmlInit(Layout,namespace);if(jQuery&&jQuery.bridget){jQuery.bridget(namespace,Layout)}return Layout};function subclass(Parent){function SubClass(){Parent.apply(this,arguments)}SubClass.prototype=Object.create(Parent.prototype);SubClass.prototype.constructor=SubClass;return SubClass}var msUnits={ms:1,s:1e3};function getMilliseconds(time){if(typeof time=="number"){return time}var matches=time.match(/(^\d*\.?\d*)(\w*)/);var num=matches&&matches[1];var unit=matches&&matches[2];if(!num.length){return 0}num=parseFloat(num);var mult=msUnits[unit]||1;return num*mult}Outlayer.Item=Item;return Outlayer});(function(window,factory){if(typeof define=="function"&&define.amd){define("isotope-layout/js/item",["outlayer/outlayer"],factory)}else if(typeof module=="object"&&module.exports){module.exports=factory(require("outlayer"))}else{window.Isotope=window.Isotope||{};window.Isotope.Item=factory(window.Outlayer)}})(window,function factory(Outlayer){"use strict";function Item(){Outlayer.Item.apply(this,arguments)}var proto=Item.prototype=Object.create(Outlayer.Item.prototype);var _create=proto._create;proto._create=function(){this.id=this.layout.itemGUID++;_create.call(this);this.sortData={}};proto.updateSortData=function(){if(this.isIgnored){return}this.sortData.id=this.id;this.sortData["original-order"]=this.id;this.sortData.random=Math.random();var getSortData=this.layout.options.getSortData;var sorters=this.layout._sorters;for(var key in getSortData){var sorter=sorters[key];this.sortData[key]=sorter(this.element,this)}};var _setPosition=proto.setPosition;proto.setPosition=function(){_setPosition.apply(this,arguments);if(this.layout.options.imgSizes){if(!this.imageElements){this.imageElements=this.element.querySelectorAll('img[sizes="auto"]')}var images=this.imageElements;for(var i=0,len=images.length;i!==len;i++){var img=images[i];img.setAttribute("sizes",img.offsetWidth+"px")}}if(!this._lazyloadStarted&&this.layout.options.lazyload){this._lazyloadStarted=true;this._lazyload()}};proto._lazyload=function(){this.layout.dispatchEvent("beforeItemLoading",null,[this]);var images=this.element.querySelectorAll("img[data-src]");for(var i=0,len=images.length;i!==len;i++){var img=images[i];img.setAttribute("src",img.getAttribute("data-src"));img.removeAttribute("data-src");var srcset=img.getAttribute("data-srcset");if(srcset){img.setAttribute("srcset",img.getAttribute("data-srcset"));img.removeAttribute("data-srcset")}}var imagesLoadedInstance;if(this.layout.options.useImagesLoaded&&window.imagesLoaded){imagesLoadedInstance=window.imagesLoaded(this.element)}this.layout.dispatchEvent("itemLoading",null,[this,imagesLoadedInstance])};var _destroy=proto.destroy;proto.destroy=function(){_destroy.apply(this,arguments);this.css({display:""})};return Item});(function(window,factory){if(typeof define=="function"&&define.amd){define("isotope-layout/js/layout-mode",["get-size/get-size","outlayer/outlayer"],factory)}else if(typeof module=="object"&&module.exports){module.exports=factory(require("get-size"),require("outlayer"))}else{window.Isotope=window.Isotope||{};window.Isotope.LayoutMode=factory(window.getSize,window.Outlayer)}})(window,function factory(getSize,Outlayer){"use strict";function LayoutMode(isotope){this.isotope=isotope;if(isotope){this.options=isotope.options[this.namespace];this.element=isotope.element;this.items=isotope.filteredItems;this.size=isotope.size}}var proto=LayoutMode.prototype;var facadeMethods=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"];facadeMethods.forEach(function(methodName){proto[methodName]=function(){return Outlayer.prototype[methodName].apply(this.isotope,arguments)}});proto.needsVerticalResizeLayout=function(){var size=getSize(this.isotope.element);var hasSizes=this.isotope.size&&size;return hasSizes&&size.innerHeight!=this.isotope.size.innerHeight};proto._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)};proto.getColumnWidth=function(){this.getSegmentSize("column","Width")};proto.getRowHeight=function(){this.getSegmentSize("row","Height")};proto.getSegmentSize=function(segment,size){var segmentName=segment+size;var outerSize="outer"+size;this._getMeasurement(segmentName,outerSize);if(this[segmentName]){return}var firstItemSize=this.getFirstItemSize();this[segmentName]=firstItemSize&&firstItemSize[outerSize]||this.isotope.size["inner"+size]};proto.getFirstItemSize=function(){var firstItem=this.isotope.filteredItems[0];return firstItem&&firstItem.element&&getSize(firstItem.element)};proto.layout=function(){this.isotope.layout.apply(this.isotope,arguments)};proto.getSize=function(){this.isotope.getSize();this.size=this.isotope.size};LayoutMode.modes={};LayoutMode.create=function(namespace,options){function Mode(){LayoutMode.apply(this,arguments)}Mode.prototype=Object.create(proto);Mode.prototype.constructor=Mode;if(options){Mode.options=options}Mode.prototype.namespace=namespace;LayoutMode.modes[namespace]=Mode;return Mode};return LayoutMode});(function(window,factory){if(typeof define=="function"&&define.amd){define("masonry-layout/masonry",["outlayer/outlayer","get-size/get-size"],factory)}else if(typeof module=="object"&&module.exports){module.exports=factory(require("outlayer"),require("get-size"))}else{window.Masonry=factory(window.Outlayer,window.getSize)}})(window,function factory(Outlayer,getSize){var Masonry=Outlayer.create("masonry");Masonry.compatOptions.fitWidth="isFitWidth";var proto=Masonry.prototype;proto._resetLayout=function(){this.getSize();this._getMeasurement("columnWidth","outerWidth");this._getMeasurement("gutter","outerWidth");this.measureColumns();this.colYs=[];for(var i=0;i<this.cols;i++){this.colYs.push(0)}this.maxY=0;this.horizontalColIndex=0};proto.measureColumns=function(){this.getContainerWidth();if(!this.columnWidth){var firstItem=this.items[0];var firstItemElem=firstItem&&firstItem.element;this.columnWidth=firstItemElem&&getSize(firstItemElem).outerWidth||this.containerWidth}var columnWidth=this.columnWidth+=this.gutter;var containerWidth=this.containerWidth+this.gutter;var cols=containerWidth/columnWidth;var excess=columnWidth-containerWidth%columnWidth;var mathMethod=excess&&excess<1?"round":"floor";cols=Math[mathMethod](cols);this.cols=Math.max(cols,1)};proto.getContainerWidth=function(){var isFitWidth=this._getOption("fitWidth");var container=isFitWidth?this.element.parentNode:this.element;var size=getSize(container);this.containerWidth=size&&size.innerWidth};proto._getItemLayoutPosition=function(item){item.getSize();var remainder=item.size.outerWidth%this.columnWidth;var mathMethod=remainder&&remainder<1?"round":"ceil";var colSpan=Math[mathMethod](item.size.outerWidth/this.columnWidth);colSpan=Math.min(colSpan,this.cols);var colPosMethod=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition";var colPosition=this[colPosMethod](colSpan,item);var position={x:this.columnWidth*colPosition.col,y:colPosition.y};var setHeight=colPosition.y+item.size.outerHeight;var setMax=colSpan+colPosition.col;for(var i=colPosition.col;i<setMax;i++){this.colYs[i]=setHeight}return position};proto._getTopColPosition=function(colSpan){var colGroup=this._getTopColGroup(colSpan);var minimumY=Math.min.apply(Math,colGroup);return{col:colGroup.indexOf(minimumY),y:minimumY}};proto._getTopColGroup=function(colSpan){if(colSpan<2){return this.colYs}var colGroup=[];var groupCount=this.cols+1-colSpan;for(var i=0;i<groupCount;i++){colGroup[i]=this._getColGroupY(i,colSpan)}return colGroup};proto._getColGroupY=function(col,colSpan){if(colSpan<2){return this.colYs[col]}var groupColYs=this.colYs.slice(col,col+colSpan);return Math.max.apply(Math,groupColYs)};proto._getHorizontalColPosition=function(colSpan,item){var col=this.horizontalColIndex%this.cols;var isOver=colSpan>1&&col+colSpan>this.cols;col=isOver?0:col;var hasSize=item.size.outerWidth&&item.size.outerHeight;this.horizontalColIndex=hasSize?col+colSpan:this.horizontalColIndex;return{col:col,y:this._getColGroupY(col,colSpan)}};proto._manageStamp=function(stamp){var stampSize=getSize(stamp);var offset=this._getElementOffset(stamp);var isOriginLeft=this._getOption("originLeft");var firstX=isOriginLeft?offset.left:offset.right;var lastX=firstX+stampSize.outerWidth;var firstCol=Math.floor(firstX/this.columnWidth);firstCol=Math.max(0,firstCol);var lastCol=Math.floor(lastX/this.columnWidth);lastCol-=lastX%this.columnWidth?0:1;lastCol=Math.min(this.cols-1,lastCol);var isOriginTop=this._getOption("originTop");var stampMaxY=(isOriginTop?offset.top:offset.bottom)+stampSize.outerHeight;for(var i=firstCol;i<=lastCol;i++){this.colYs[i]=Math.max(stampMaxY,this.colYs[i])}};proto._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var size={height:this.maxY};if(this._getOption("fitWidth")){size.width=this._getContainerFitWidth()}return size};proto._getContainerFitWidth=function(){var unusedCols=0;var i=this.cols;while(--i){if(this.colYs[i]!==0){break}unusedCols++}return(this.cols-unusedCols)*this.columnWidth-this.gutter};proto.needsResizeLayout=function(){var previousWidth=this.containerWidth;this.getContainerWidth();return previousWidth!=this.containerWidth};return Masonry});(function(window,factory){if(typeof define=="function"&&define.amd){define("isotope-layout/js/layout-modes/masonry",["../layout-mode","masonry-layout/masonry"],factory)}else if(typeof module=="object"&&module.exports){module.exports=factory(require("../layout-mode"))}else{factory(window.Isotope.LayoutMode,window.Masonry)}})(window,function factory(LayoutMode,Masonry){"use strict";var MasonryMode=LayoutMode.create("masonry");var proto=MasonryMode.prototype;var keepModeMethods={_getElementOffset:true,layout:true,_getMeasurement:true};for(var method in Masonry.prototype){if(!keepModeMethods[method]){proto[method]=Masonry.prototype[method]}}var measureColumns=proto.measureColumns;proto.measureColumns=function(){this.items=this.isotope.filteredItems;measureColumns.call(this)};var _getOption=proto._getOption;proto._getOption=function(option){if(option=="fitWidth"){return this.options.isFitWidth!==undefined?this.options.isFitWidth:this.options.fitWidth}return _getOption.apply(this.isotope,arguments)};return MasonryMode});(function(window,factory){"use strict";if(typeof define=="function"&&define.amd){define("isotope-layout/js/layout-modes/justify-rows",["../layout-mode"],factory)}else if(typeof exports=="object"){module.exports=factory(require("../layout-mode"))}else{factory(window.Isotope.LayoutMode)}})(window,function factory(LayoutMode){"use strict";var JustifyRows=LayoutMode.create("justifyRows");var proto=JustifyRows.prototype;proto._resetLayout=function(){this.x=0;this.y=0;this.maxY=0;this._getMeasurement("gutter","outerWidth")};proto._getRowHeight=function(rowItems,containerWidth){containerWidth-=rowItems.length*this.gutter;var totalHeight=0;for(var i=0,len=rowItems.length;i!==len;i++){var itemEle=rowItems[i].element;var w=parseInt(itemEle.getAttribute("data-width"),10)||rowItems[i].size.outerWidth;var h=parseInt(itemEle.getAttribute("data-height"),10)||rowItems[i].size.outerHeight;totalHeight+=w/h}return containerWidth/totalHeight};proto._resizeItems=function(rowItems,rowHeight){for(var i=0,len=rowItems.length;i!==len;i++){var itemEle=rowItems[i].element;var w=parseInt(itemEle.getAttribute("data-width"),10)||rowItems[i].size.outerWidth;var h=parseInt(itemEle.getAttribute("data-height"),10)||rowItems[i].size.outerHeight;itemEle.style.width=rowHeight*w/h+"px";itemEle.style.height=rowHeight+"px"}};proto._beforeLayout=function(){var maxHeight=this.options.maxHeight||200;var containerWidth=this.isotope.size.innerWidth+this.gutter;var checkItems=this.isotope.filteredItems.slice(0);var row,rowHeight;newRow:while(checkItems.length>0){for(var i=0,len=checkItems.length;i!==len;i++){row=checkItems.slice(0,i+1),rowHeight=this._getRowHeight(row,containerWidth);if(rowHeight<maxHeight){this._resizeItems(row,rowHeight);checkItems=checkItems.slice(i+1);continue newRow}}this._resizeItems(row,Math.min(rowHeight,maxHeight));break}};proto._getItemLayoutPosition=function(item){item.getSize();var itemWidth=item.size.outerWidth+this.gutter;var containerWidth=this.isotope.size.innerWidth+this.gutter;if(this.x!==0&&itemWidth+this.x>containerWidth){this.x=0;this.y=this.maxY}var position={x:this.x,y:this.y};this.maxY=Math.max(this.maxY,this.y+item.size.outerHeight);this.x+=itemWidth;return position};proto._getContainerSize=function(){return{height:this.maxY}};return JustifyRows});(function(window,factory){if(typeof define=="function"&&define.amd){define("isotope-layout/js/layout-modes/fit-rows",["../layout-mode"],factory)}else if(typeof exports=="object"){module.exports=factory(require("../layout-mode"))}else{factory(window.Isotope.LayoutMode)}})(window,function factory(LayoutMode){"use strict";var FitRows=LayoutMode.create("fitRows");var proto=FitRows.prototype;proto._resetLayout=function(){this.x=0;this.y=0;this.maxY=0;this._getMeasurement("gutter","outerWidth")};proto._getItemLayoutPosition=function(item){item.getSize();var itemWidth=item.size.outerWidth+this.gutter;var containerWidth=this.isotope.size.innerWidth+this.gutter;if(this.x!==0&&itemWidth+this.x>containerWidth){this.x=0;this.y=this.maxY}var position={x:this.x,y:this.y};this.maxY=Math.max(this.maxY,this.y+item.size.outerHeight);this.x+=itemWidth;return position};proto._getContainerSize=function(){return{height:this.maxY}};return FitRows});(function(window,factory){if(typeof define=="function"&&define.amd){define("isotope-layout/js/layout-modes/vertical",["../layout-mode"],factory)}else if(typeof module=="object"&&module.exports){module.exports=factory(require("../layout-mode"))}else{factory(window.Isotope.LayoutMode)}})(window,function factory(LayoutMode){"use strict";var Vertical=LayoutMode.create("vertical",{horizontalAlignment:0});var proto=Vertical.prototype;proto._resetLayout=function(){this.y=0};proto._getItemLayoutPosition=function(item){item.getSize();var x=(this.isotope.size.innerWidth-item.size.outerWidth)*this.options.horizontalAlignment;var y=this.y;this.y+=item.size.outerHeight;return{x:x,y:y}};proto._getContainerSize=function(){return{height:this.y}};return Vertical});(function(window,factory){if(typeof define=="function"&&define.amd){define("isotope-layout/js/isotope",["outlayer/outlayer","get-size/get-size","desandro-matches-selector/matches-selector","fizzy-ui-utils/utils","./item","./layout-mode","./layout-modes/masonry","./layout-modes/justify-rows","./layout-modes/fit-rows","./layout-modes/vertical"],function(Outlayer,getSize,matchesSelector,utils,Item,LayoutMode){return factory(window,Outlayer,getSize,matchesSelector,utils,Item,LayoutMode)})}else if(typeof module=="object"&&module.exports){module.exports=factory(window,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("./item"),require("./layout-mode"),require("./layout-modes/masonry"),require("./layout-modes/fit-rows"),require("./layout-modes/justify-rows"),require("./layout-modes/vertical"))}else{window.Isotope=factory(window,window.Outlayer,window.getSize,window.matchesSelector,window.fizzyUIUtils,window.Isotope.Item,window.Isotope.LayoutMode)}})(window,function factory(window,Outlayer,getSize,matchesSelector,utils,Item,LayoutMode){var jQuery=window.jQuery;var trim=String.prototype.trim?function(str){return str.trim()}:function(str){return str.replace(/^\s+|\s+$/g,"")};var Isotope=Outlayer.create("isotope",{layoutMode:"masonry",isJQueryFiltering:true,sortAscending:true,pagination:false,inPage:20,page:1,useImagesLoaded:true,lazyload:false,resizeTransition:true});Isotope.Item=Item;Isotope.LayoutMode=LayoutMode;var proto=Isotope.prototype;proto._create=function(){this.itemGUID=0;this._sorters={};this._getSorters();Outlayer.prototype._create.call(this);this.modes={};this.filteredItems=this.items;this.sortHistory=["original-order"];for(var name in LayoutMode.modes){this._initLayoutMode(name)}};proto.reloadItems=function(){this.itemGUID=0;Outlayer.prototype.reloadItems.call(this)};proto._itemize=function(){var items=Outlayer.prototype._itemize.apply(this,arguments);for(var i=0;i<items.length;i++){var item=items[i];item.id=this.itemGUID++}this._updateItemsSortData(items);return items};proto._initLayoutMode=function(name){var Mode=LayoutMode.modes[name];var initialOpts=this.options[name]||{};this.options[name]=Mode.options?utils.extend(Mode.options,initialOpts):initialOpts;this.modes[name]=new Mode(this)};proto.layout=function(){if(!this._isLayoutInited&&this._getOption("initLayout")){this.arrange();return}this._layout()};proto._layout=function(){var isInstant=this._getIsInstant();this._resetLayout();this._manageStamps();this.layoutItems(this.filteredItems,isInstant);this._isLayoutInited=true};var _layoutItems=Isotope.prototype.layoutItems;Isotope.prototype.layoutItems=function(items,isInstant){this._beforeLayout(items,isInstant);_layoutItems.apply(this,arguments)};proto.arrange=function(opts){this.option(opts);this._getIsInstant();var filtered=this._filter(this.items);this.filteredItems=filtered.matches;this.notPaginatedItems=this.filteredItems;this._sort();if(this.options.pagination){var paginationResult=this._pagination();filtered.needHide=filtered.needHide.concat(paginationResult.needHide);filtered.needReveal=paginationResult.needReveal}this._bindArrangeComplete();this._hideRevealItems(filtered);this._layout();if(this.options.pagination){for(var i=0,l=this.filteredItems.length;i!==l;i++){this.filteredItems[i].isLayoutInstant=false}}};Isotope.prototype._init=Isotope.prototype.arrange;proto._hideRevealItems=function(items){if(this._isInstant){this._noTransition(this._hideReveal,[items])}else{this._hideReveal(items)}};proto._init=proto.arrange;proto._hideReveal=function(filtered){this.reveal(filtered.needReveal);this.hide(filtered.needHide)};proto._getIsInstant=function(){var isLayoutInstant=this._getOption("layoutInstant");var isInstant=isLayoutInstant!==undefined?isLayoutInstant:!this._isLayoutInited;this._isInstant=isInstant;return isInstant};proto._bindArrangeComplete=function(){var isLayoutComplete,isHideComplete,isRevealComplete;var _this=this;function arrangeParallelCallback(){if(isLayoutComplete&&isHideComplete&&isRevealComplete){_this.dispatchEvent("arrangeComplete",null,[_this.filteredItems])}}this.once("layoutComplete",function(){isLayoutComplete=true;arrangeParallelCallback()});this.once("hideComplete",function(){isHideComplete=true;arrangeParallelCallback()});this.once("revealComplete",function(){isRevealComplete=true;arrangeParallelCallback()})};proto._pagination=function(){if(this._lastFilter!==this.options.filter){this._lastFilter=this.options.filter;this.options.page=1}if(!this.notPaginatedItems){this.notPaginatedItems=this.filteredItems}var page=this.options.page;var items=this.notPaginatedItems;var startItemInPage=(page-1)*this.options.inPage;var endItemInPage=startItemInPage+this.options.inPage-1;var inPage=[];var needHide=[];var needReveal=[];var totalPages=Math.ceil(items.length/this.options.inPage);var pageChanged=this._lastPage!==page||this._totalPages!==totalPages;this._lastPage=page;this._totalPages=totalPages;for(var i=0,len=items.length;i!==len;i++){var item=items[i];if(i>=startItemInPage&&i<=endItemInPage){inPage.push(item);if(item.isHidden){needReveal.push(item);item.isLayoutInstant=true}}else if(!item.isHidden){needHide.push(item)}}this.filteredItems=inPage;if(pageChanged){this.dispatchEvent("paginationUpdate",null,[page,totalPages,inPage])}return{matches:inPage,needHide:needHide,needReveal:needReveal}};proto.page=function(pageNum){this.options.page=Math.max(1,Math.min(pageNum,this.totalPages()));this._hideRevealItems(this._pagination());this._layout()};proto.nextPage=function(){this.page(this.options.page+1)};proto.previousPage=function(){this.page(this.options.page-1)};proto.lastPage=function(){this.page(this.totalPages())};proto.firstPage=function(){this.page(1)};proto.totalPages=function(){return this._totalPages};proto.currentPage=function(){return this.options.page};proto._filter=function(items){var filter=this.options.filter;filter=filter||"*";var matches=[];var hiddenMatched=[];var visibleUnmatched=[];var test=this._getFilterTest(filter);for(var i=0;i<items.length;i++){var item=items[i];if(item.isIgnored){continue}var isMatched=test(item);if(isMatched){matches.push(item)}if(isMatched&&item.isHidden){hiddenMatched.push(item)}else if(!isMatched&&!item.isHidden){visibleUnmatched.push(item)}}return{matches:matches,needReveal:hiddenMatched,needHide:visibleUnmatched}};proto._getFilterTest=function(filter){if(jQuery&&this.options.isJQueryFiltering){return function(item){return jQuery(item.element).is(filter)}}if(typeof filter=="function"){return function(item){return filter(item.element)}}return function(item){return matchesSelector(item.element,filter)}};proto.updateSortData=function(elems){var items;if(elems){elems=utils.makeArray(elems);items=this.getItems(elems)}else{items=this.items}this._getSorters();this._updateItemsSortData(items)};var mungeSorter=function(){function mngSorter(sorter){if(typeof sorter!="string"){return sorter}var args=trim(sorter).split(" ");var query=args[0];var attrMatch=query.match(/^\[(.+)\]$/);var attr=attrMatch&&attrMatch[1];var getValue=getValueGetter(attr,query);var parser=Isotope.sortDataParsers[args[1]];sorter=parser?function(elem){return elem&&parser(getValue(elem))}:function(elem){return elem&&getValue(elem)};return sorter}function getValueGetter(attr,query){if(attr){return function getAttribute(elem){return elem.getAttribute(attr)}}return function getChildText(elem){var child=elem.querySelector(query);return child&&child.textContent}}return mngSorter}();proto._getSorters=function(){var getSortData=this.options.getSortData;for(var key in getSortData){var sorter=getSortData[key];this._sorters[key]=mungeSorter(sorter)}};proto._updateItemsSortData=function(items){var len=items&&items.length;if(!len){return}for(var i=0;i<len;i++){var item=items[i];item.updateSortData()}};Isotope.sortDataParsers={parseInt:function(val){return parseInt(val,10)},parseFloat:function(val){return parseFloat(val)}};proto._sort=function(){if(!this.options.sortBy){return}var sortBys=utils.makeArray(this.options.sortBy);if(!this._getIsSameSortBy(sortBys)){this.sortHistory=sortBys.concat(this.sortHistory)}var itemSorter=getItemSorter(this.sortHistory,this.options.sortAscending);if(this.options.pagination){this.notPaginatedItems.sort(itemSorter)}else{this.filteredItems.sort(itemSorter)}};proto._getIsSameSortBy=function(sortBys){for(var i=0;i<sortBys.length;i++){if(sortBys[i]!=this.sortHistory[i]){return false}}return true};function getItemSorter(sortBys,sortAsc){return function sorter(itemA,itemB){for(var i=0;i<sortBys.length;i++){var sortBy=sortBys[i];var a=itemA.sortData[sortBy];var b=itemB.sortData[sortBy];if(a>b||a<b){var isAscending=sortAsc[sortBy]!==undefined?sortAsc[sortBy]:sortAsc;var direction=isAscending?1:-1;return(a>b?1:-1)*direction}}return 0}}proto._mode=function(){var layoutMode=this.options.layoutMode;var mode=this.modes[layoutMode];if(!mode){throw new Error("No layout mode: "+layoutMode)}mode.options=this.options[layoutMode];return mode};proto._resetLayout=function(){Outlayer.prototype._resetLayout.call(this);this._mode()._resetLayout()};Isotope.prototype._beforeLayout=function(items,isInstant){var mode=this._mode();if(mode._beforeLayout){mode._beforeLayout(items,isInstant)}};proto._getItemLayoutPosition=function(item){return this._mode()._getItemLayoutPosition(item)};proto._manageStamp=function(stamp){this._mode()._manageStamp(stamp)};proto._getContainerSize=function(){return this._mode()._getContainerSize()};proto.needsResizeLayout=function(){return this._mode().needsResizeLayout()};Isotope.prototype.resize=function(){if(!this.isResizeBound||!this.needsResizeLayout()){return}if(!this.options.resizeTransition){this._noTransition(this.layout)}else{this.layout()}};proto.appended=function(elems){var items=this.addItems(elems);if(!items.length){return}var pagination=this.options.pagination;var filteredItems=this._filterRevealAdded(items,!pagination);if(!pagination){this.filteredItems=this.filteredItems.concat(filteredItems)}else{this.notPaginatedItems=this.notPaginatedItems.concat(filteredItems);this._resetLayout();this._manageStamps();var paginateResult=this._pagination();this._hideRevealItems(paginateResult);this.layoutItems(this.filteredItems)}};proto.prepended=function(elems){var items=this._itemize(elems);if(!items.length){return}this._resetLayout();this._manageStamps();var pagination=this.options.pagination;var filteredItems=this._filterRevealAdded(items,!pagination);if(!pagination){this.layoutItems(this.filteredItems);this.filteredItems=filteredItems.concat(this.filteredItems)}else{this.notPaginatedItems=filteredItems.concat(this.notPaginatedItems);var paginateResult=this._pagination();this._hideRevealItems(paginateResult);this.layoutItems(this.filteredItems)}this.items=items.concat(this.items)};proto._filterRevealAdded=function(items){var filtered=this._filter(items);this.hide(filtered.needHide);this.reveal(filtered.matches);this.layoutItems(filtered.matches,true);return filtered.matches};proto.insert=function(elems){var items=this.addItems(elems);if(!items.length){return}var i,item;var len=items.length;for(i=0;i<len;i++){item=items[i];this.element.appendChild(item.element)}var filteredInsertItems=this._filter(items).matches;for(i=0;i<len;i++){items[i].isLayoutInstant=true}this.arrange();for(i=0;i<len;i++){delete items[i].isLayoutInstant}this.reveal(filteredInsertItems)};var _remove=proto.remove;proto.remove=function(elems){elems=utils.makeArray(elems);var removeItems=this.getItems(elems);_remove.call(this,elems);var len=removeItems&&removeItems.length;if(!len){return}for(var i=0;i<len;i++){var item=removeItems[i];utils.removeFrom(this.filteredItems,item)}};proto.shuffle=function(){for(var i=0;i<this.items.length;i++){var item=this.items[i];item.sortData.random=Math.random()}this.options.sortBy="random";this._sort();this._layout()};proto._noTransition=function(fn,args){var transitionDuration=this.options.transitionDuration;this.options.transitionDuration=0;var returnValue=fn.apply(this,args);this.options.transitionDuration=transitionDuration;return returnValue};proto.getFilteredItemElements=function(){return this.filteredItems.map(function(item){return item.element})};return Isotope});(function($,window,document,undefined){"use strict";var pluginName="AuxIsotope",defaults={space:-1,layoutMode:"masonry",lazyload:false,paginationLoc:null,loadingHeight:500,searchFilter:false,grouping:null,deeplink:true,isOriginLeft:true,slug:"recent",filters:".aux-isotope-filters",revealTransitionDelay:50,revealTransitionDuration:50,revealBetweenDelay:200,hideTransitionDuration:null,hideTransitionDelay:0,hideBetweenDelay:200,loadingTransitionDuration:600,imgSizes:true,resizeTransition:false,paginationClass:"aux-pagination aux-round aux-page-no-border aux-iso-pagination",loadingClass:"aux-loading",afterInitClass:"aux-isotope-ready",groupingPrefix:".aux-grouping-",searchClass:".aux-isotope-search",updateUponResize:false,isInitLayout:false,transitionDuration:0,itemsLoading:".aux-items-loading",loadingVisible:"aux-loading-visible",loadingHide:"aux-loading-hide",transitionHelpers:{hiding:"aux-iso-hiding",hidden:"aux-iso-hidden",revealing:"aux-iso-revealing",visible:"aux-iso-visible"}},attributeOptionsMap={pagination:"pagination",perpage:"inPage",layout:"layoutMode",lazyload:"lazyload",space:"space","loading-height":"loadingHeight","search-filter":"searchFilter",grouping:"grouping",deeplink:"deeplink",slug:"slug",filters:"filters","pagination-class":"paginationClass"};function Plugin(element,options){if(!window.Isotope&&!$.fn.isotope){$.error("isotope is not available in this page.");return}this.element=element;this.$element=$(element);this.settings=$.extend({},defaults,options);this._defaults=defaults;this._name=pluginName;for(var attr in attributeOptionsMap){var value=this.$element.data(attr);if(value!==undefined){this.settings[attributeOptionsMap[attr]]=value}}if(this.settings.layoutMode==="grid"){this.settings.layoutMode="masonry"}this.init()}$.extend(Plugin.prototype,{init:function(){this.$element.addClass(this.settings.afterInitClass);if(this.settings.lazyload){this.$element.height(this.settings.loadingHeight)}if(this.$element.parents(".rtl").length){this.settings.isOriginLeft=false}this._isoElement=this.$element[0];if(this.settings.space>=0){this.$element.children(this.settings.itemSelector).css({"margin-bottom":this.settings.space+"px","padding-right":this.settings.space+"px"});this.$element.css("margin-right",-this.settings.space+"px")}this.settings.revealTransitionDuration=this.$element.data("reveal-transition-duration")||this.settings.revealTransitionDuration;this.settings.revealBetweenDelay=this.$element.data("reveal-between-delay")||this.settings.revealBetweenDelay;this.settings.revealTransitionDelay=this.$element.data("reveal-transition-delay")||this.settings.revealTransitionDelay;this.settings.hideTransitionDuration=this.$element.data("hide-transition-duration")||this.settings.hideTransitionDuration;this.settings.hideBetweenDelay=this.$element.data("hide-between-delay")||this.settings.hideBetweenDelay;this.settings.hideTransitionDelay=this.$element.data("hide-transition-delay")||this.settings.hideTransitionDelay;this._isotope=new Isotope(this._isoElement,this.settings);this._isotope.options.hiddenStyle={};this._isotope.options.visibleStyle={};this.$element.data("isotope",this._isotope);var self=this;this._isotope.options.filter=function(){return self._filtering(this)};this._groupValue=null;this._filterValue=null;this._searchValue=null;this._currentFilter=null;this._currentSearch=null;this._currentGroup=null;if(this.settings.grouping){this._setGroupValue()}if(this.settings.deeplink){this._initDeeplink()}if(this.settings.pagination){this._isotope.options.pagination=true;this._initPagination()}if(this.settings.lazyload&&window.imagesLoaded){this._isotope.on("itemLoading",this._setLazyload.bind(this))}else if(window.imagesLoaded){this.$element.imagesLoaded().always(function(instance,image){this._arrangeIsotope()}.bind(this))}this._isotope.arrange();this._currentPage=this._isotope.options.page;this._isotope.items.forEach(function(item){if(!item.$element){item.$element=$(item.element)}},this);if(this.settings.lazyload){this.$loading=this.$element.find(this.settings.itemsLoading).addClass(this.settings.loadingHide).appendTo(this.$element);this._instantlyHideItems();this._revealItems()}if(this.settings.updateUponResize){$(window).on("resize",this._arrangeIsotope.bind(this))}this.ـinitFilters()},arrange:function(method,options){var io=this._isotope.options;if(this._currentFilter===this._filterValue&&(!this.settings.grouping||this._currentGroup===this._groupValue)&&(!this.settings.searchFilter||this._currentSearch===this._searchValue)&&(!this.settings.pagination||this._currentPage===io.page)){return}else{this._currentPage=io.page;this._currentFilter=this._filterValue;this._currentSearch=this._searchValue;this._currentGroup=this._groupValue}var items=this._isotope.filteredItems,totalHideDuration=this.settings.transitionDelay,totalRevealDuration=0,helpers=this.settings.transitionHelpers,i=0,st=this.settings,self=this;items.forEach(function(item){self._hideItem(item,self.settings.hideBetweenDelay*++i+st.hideTransitionDelay,st.hideTransitionDuration)});totalHideDuration=st.hideBetweenDelay*i+st.hideTransitionDelay+st.hideTransitionDuration;clearTimeout(this._hidingTimeout);clearTimeout(this._revealingTimeout);this._hidingTimeout=setTimeout(function(){self._instantlyHideItems();if(!method||method==="arrange"){self._isotope._noTransition(self._isotope.arrange)}else{self._isotope[method].apply(self._isotope,options)}self._revealItems()},totalHideDuration);if(st.deeplink){self._updateHash()}this.$element.trigger("auxinIsotopeArrange")},insert:function($item){if(this.settings.space>=0){$item.css({"margin-bottom":this.settings.space+"px","padding-right":this.settings.space+"px"})}this._isotope.insert($item);this._isotope.items.forEach(function(item){if(!item.$element){item.$element=$(item.element)}},this)},remove:function(items){if(!Array.isArray(items)){items=[items]}this._isotope.remove(items.map(function(item){return item.element}));this._isotope.arrange()},removeAll:function(){this._isotope.remove(this._isotope.items.map(function(item){return item.element}));this.updateIsotope();this._isotope.options.page=1},updateIsotope:function(){this._arrangeIsotope()},destroy:function(){if(this.settings.pagination){this.$pagination.remove()}if(this.settings.updateUponResize){$(window).off("resize",this._arrangeIsotope.bind(this))}this.$element.data("isotope",null);this._isotope.destroy();this.$element.remove()},changeGroup:function(groupName){this._oldGroup=this._groupValue;this._groupValue=groupName;localStorage.setItem("auxinIsotopeGroup",this._groupValue);this.$filters.find(this.settings.groupingPrefix+this._groupValue).removeClass(this.settings.transitionHelpers.hidden);this.$filters.find(this.settings.groupingPrefix+this._oldGroup).addClass(this.settings.transitionHelpers.hidden);if(!this._internalFilterChange){this.arrange("arrange")}else{this._internalFilterChange=false}},showLoading:function(){if(this._loadingIsVisible){return}this.$element.height(this.settings.loadingHeight);this._loadingIsVisible=true;clearTimeout(this._loadingTimeout);this.$loading.show();setTimeout(function(){this.$loading.addClass(this.settings.loadingVisible).removeClass(this.settings.loadingHide)}.bind(this),1)},hideLoading:function(){if(!this._loadingIsVisible){return}this._loadingIsVisible=false;this.$loading.removeClass(this.settings.loadingVisible).addClass(this.settings.loadingHide);clearTimeout(this._loadingTimeout);this._loadingTimeout=setTimeout(function(){this.$loading.hide()}.bind(this),this.settings.loadingTransitionDuration)},_instantlyHideItems:function(){this._isotope.items.forEach(function(item){item.element.style[window._jcsspfx+"TransitionDelay"]="0";item.element.style[window._jcsspfx+"TransitionDuration"]="0";this._removeHelpers(item.$element);item.$element.addClass(this.settings.transitionHelpers.hidden)},this)},_isFilteredItemsLoaded:function(){var items=this._isotope.filteredItems;for(var i=0,l=items.length;i!==l;i++){if(!items[i].loaded){return false}}return true},_revealItems:function(){var items=this._isotope.filteredItems,st=this.settings,i=0;if(!st.lazyload||this._isFilteredItemsLoaded()){if(st.lazyload){this.hideLoading();this._isotope._noTransition(this._isotope.layout);this._waitForLoad=false}this._revealingTimeout=setTimeout(function(){items.forEach(function(item){this._removeHelpers(item.$element);item.$element.addClass(st.transitionHelpers.hidden);this._revealItem(item,st.revealBetweenDelay*++i,st.revealTransitionDuration)},this)}.bind(this),Math.max(st.revealTransitionDelay,10));this.$element.trigger("auxinIsotopeReveal",[items])}else{this.showLoading();this._waitForLoad=true}},_revealItem:function(item,delay,duration){item.element.style[window._jcsspfx+"TransitionDelay"]=delay+"ms";item.element.style[window._jcsspfx+"TransitionDuration"]=duration+"ms";this._removeHelpers(item.$element);item.$element.addClass(this.settings.transitionHelpers.revealing);clearTimeout(item._animTimeout);item._animTimeout=setTimeout(function(){this._removeHelpers(item.$element);item.element.style[window._jcsspfx+"TransitionDelay"]="";item.element.style[window._jcsspfx+"TransitionDuration"]="";item.$element.addClass(this.settings.transitionHelpers.visible)}.bind(this),delay+duration)},_hideItem:function(item,delay,duration){item.element.style[window._jcsspfx+"TransitionDelay"]=delay+"ms";item.element.style[window._jcsspfx+"TransitionDuration"]=duration+"ms";this._removeHelpers(item.$element);item.$element.addClass(this.settings.transitionHelpers.hiding);clearTimeout(item._animTimeout);item._animTimeout=setTimeout(function(){this._removeHelpers(item.$element);item.element.style[window._jcsspfx+"TransitionDelay"]="";item.element.style[window._jcsspfx+"TransitionDuration"]="";item.$element.addClass(this.settings.transitionHelpers.hidden)}.bind(this),delay+duration)},_arrangeIsotope:function(){this._isotope.layout()},_removeHelpers:function($item){var helpers=this.settings.transitionHelpers;for(var classKey in helpers){$item.removeClass(helpers[classKey])}},_setLazyload:function(item,imagesloaded){var iso=this._isotope,that=this;imagesloaded.on("always",function(e){item.loaded=true;item.element.style.height="";item.element.style.width="";setTimeout(function(){this.elements.forEach(function(element){$(element).removeClass(this.settings.loadingClass)},that);that._revealItems()}.bind(this))})},_filtering:function(itemElement){var $item=$(itemElement);if(this._filterValue&&this._filterValue!=="all"&&!$item.is(this._filterValue)){return false}if(this._searchValue&&!($item.text().match(this._searchValue)||itemElement.className.match(this._searchValue))){return false}if(this._groupValue&&!$item.is(this.settings.groupingPrefix+this._groupValue)){return false}return true},"ـinitFilters":function(){if(this.settings.filters){this.$filters=this.$element.siblings(this.settings.filters).eq(0);if(!this.$filters){return}var self=this;this.$filters.find("li").on("click",function(e){var $this=$(this),filter=$this.data("filter");if(filter.length){if(filter==="all"){self._filterValue=false}else{self._filterValue="."+filter}}else{self._filterValue=false}if(!self._internalFilterChange&&e.originalEvent){self.arrange("arrange")}else{self._internalFilterChange=false}e.preventDefault()});this.$filters.find(self.settings.searchClass).on("keyup",this._debounce(function(e){var $this=$(this),filter=$this.val();if(filter.length>2){self._searchValue=new RegExp(filter,"gi")}else{self._searchValue=false}if(!self._internalFilterChange&&e.originalEvent){self.arrange("arrange")}else{self._internalFilterChange=false}},200));setTimeout(this._updateSelectedFilter.bind(this),300)}},_setGroupValue:function(){this._localGroupValue=localStorage.getItem("auxinIsotopeGroup");this._groupValue=this._localGroupValue?this._localGroupValue:this.settings.grouping},_updateSelectedFilter:function(){this._internalFilterChange=true;this.$filters.find('[data-filter="'+(this._filterValue||"all").replace(".","")+'"] a').trigger("click")},_debounce:function(fn,threshold){var timeout;threshold=threshold||100;return function debounced(){clearTimeout(timeout);var args=arguments;var _this=this;function delayed(){fn.apply(_this,args)}timeout=setTimeout(delayed,threshold)}},_initPagination:function(){this.$pagination=$("<nav></nav>").addClass(this.settings.paginationClass);if(this.settings.paginationLoc){this.$pagination.appendTo(this.settings.paginationLoc)}else{this.$pagination.insertAfter(this.$element)}this.$pagination.on("click",this._updatePage.bind(this));this._isotope.on("paginationUpdate",this._updatePagination.bind(this))},_updatePagination:function(currentPage,totalPage,items){if(this._internalPaginate){this._internalPaginate=false;return}var html='<ul class="pagination">';if(totalPage>1){html+='<li class="prev"><a href="#" data-prev="true">Previous</a></li>';for(var i=0;i!==totalPage;i++){var page=i+1;html+='<li class="page '+(page===currentPage?"active":"")+' "><a data-page="'+page+'" href="#">'+page+"</a>"}html+='<li class="next"><a href="#" data-next="true">Next</a></li>'}html+="</ul>";this.$pagination.html(html)},_updatePage:function(event){var $btn=$(event.target),page;if($btn.data("page")!==undefined){page=$btn.data("page")}else if($btn.data("next")){page=Math.min(this._isotope.currentPage()+1,this._isotope.totalPages())}else if($btn.data("prev")){page=Math.max(this._isotope.currentPage()-1,1)}else{return}this._isotope.options.page=page;this.$pagination.find(".page").removeClass("active").eq(page-1).addClass("active");this._internalPaginate=true;this.arrange("arrange");event.preventDefault()},_initDeeplink:function(){this._readHash(false);$(window).on("hashchange",this._readHash.bind(this))},_findHashData:function(){var hash=window.location.hash.slice(1).split(","),result;for(var i=0,l=hash.length;i!==l;i++){result=hash[i].split("/");if(result.indexOf(this.settings.slug)!==-1){return result}}return false},_readHash:function(arrange){if(this._internalHashUpdate){this._internalHashUpdate=false;return}var result=this._findHashData();if(!result){return}var io=this._isotope.options,oldFilter=this._filterValue,oldPage=io.page;this._filterValue=this._parseFilter(result[2]);if(this.settings.pagination){io.page=this._checkPagePolicy(parseInt(result[3]))}if(!arrange||this._filterValue===oldFilter&&(!this.settings.pagination||io.page===oldPage)){return}if(this.$filters){this._updateSelectedFilter()}this._internalHashRead=true;this.arrange("arrange")},_updateHash:function(){if(this._internalHashRead){this._internalHashRead=false;return}var hashStr="/"+this.settings.slug+"/"+this._sanitizeFilter(this._filterValue),currentHash=window.location.hash.slice(1);if(this.settings.pagination){hashStr+="/"+this._isotope.options.page}var inHash=this._findHashData();this._internalHashUpdate=true;if(inHash){var hash=currentHash.split(",");for(var i=0,l=hash.length;i!==l;i++){if(hash[i].split("/").indexOf(this.settings.slug)!==-1){hash[i]=hashStr;break}}window.location.hash=hash.join(",")}else if(currentHash.length){window.location.hash=currentHash+","+hashStr}else{window.location.hash=hashStr}},_checkPagePolicy:function(page){if(!this._isotope.options.pagination){return undefined}if(page<=0){return 1}if(page>this._isotope.totalPages()){return this._isotope.totalPages()}if(isNaN(page)){return 1}return page},_sanitizeFilter:function(filter){if(!filter){return"all"}return filter.replace(/\s/g,"&").replace(".","")},_parseFilter:function(filter){if(filter==="all"||filter===undefined){return undefined}return"."+filter.replace("&"," .").trim()}});$.fn[pluginName]=function(options){var args=arguments,plugin="plugin_"+pluginName;if(options===undefined||typeof options==="object"){return this.each(function(){if(!$.data(this,plugin)){$.data(this,plugin,new Plugin(this,options))}})}else if(typeof options==="string"&&options[0]!=="_"&&options!=="init"){var returns;this.each(function(){var instance=$.data(this,plugin);if(instance instanceof Plugin&&typeof instance[options]==="function"){returns=instance[options].apply(instance,Array.prototype.slice.call(args,1))}if(options==="destroy"){$.data(this,plugin,null)}});return returns!==undefined?returns:this}}})(jQuery,window,document);(function($,window,document,undefined){"use strict";var pluginName="AuxinToggleSelected",defaults={isotope:null,overlayClass:"aux-overlay",overlay:"aux-select-overlay",event:"click",target:"li>a",selected:"aux-selected",resizeOverlay:true};function Plugin(element,options){this.element=element;this.$element=$(element);this.settings=$.extend({},defaults,options);this._defaults=defaults;this._name=pluginName;this.init()}$.extend(Plugin.prototype,{init:function(){this.$targets=this.$element.find(this.settings.target);this.$targets.on(this.settings.event,this._toggleSelected.bind(this));if(this.$element.hasClass(this.settings.overlayClass)){this.overlay=this.$element.find("."+this.settings.overlay)[0];$(window).on("resize",this._locateOverlay.bind(this))}if(this.$element.find("."+this.settings.selected).length===0){this.$current=this.$targets.eq(0);this._toggleSelected({currentTarget:this.$current[0]})}this._locateOverlay()},_toggleSelected:function(event){this.$targets.removeClass(this.settings.selected);var $this=$(event.currentTarget);$this.addClass(this.settings.selected);if(this.settings.isotope){this.settings.isotope.arrange({filter:$this.data("filter")})}this.$current=$this;this._locateOverlay()},_locateOverlay:function(){if(!this.overlay||!this.$current){return}this.overlay.style[window._jcsspfx+"Transform"]="translate("+(this.$current.offset().left-this.$element.offset().left)+"px, "+(this.$current.offset().top-this.$element.offset().top)+"px  )";if(this.settings.resizeOverlay){this.overlay.style.width=this.$current.outerWidth()-1+"px";this.overlay.style.height=this.$current.outerHeight()-1+"px"}},destroy:function(){$(window).off("resize",this._locateOverlay);this.$overlay=null;this.$element.remove()}});$.fn[pluginName]=function(options){var args=arguments,plugin="plugin_"+pluginName;if(options===undefined||typeof options==="object"){return this.each(function(){if(!$.data(this,plugin)){$.data(this,plugin,new Plugin(this,options))}})}else if(typeof options==="string"&&options[0]!=="_"&&options!=="init"){var returns;this.each(function(){var instance=$.data(this,plugin);if(instance instanceof Plugin&&typeof instance[options]==="function"){returns=instance[options].apply(instance,Array.prototype.slice.call(args,1))}if(options==="destroy"){$.data(this,plugin,null)}});return returns!==undefined?returns:this}}})(jQuery,window,document);var OptionControls=function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId]){return installedModules[moduleId].exports}var module=installedModules[moduleId]={i:moduleId,l:false,exports:{}};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.l=true;return module.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.d=function(exports,name,getter){if(!__webpack_require__.o(exports,name)){Object.defineProperty(exports,name,{enumerable:true,get:getter})}};__webpack_require__.r=function(exports){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(exports,"__esModule",{value:true})};__webpack_require__.t=function(value,mode){if(mode&1)value=__webpack_require__(value);if(mode&8)return value;if(mode&4&&typeof value==="object"&&value&&value.__esModule)return value;var ns=Object.create(null);__webpack_require__.r(ns);Object.defineProperty(ns,"default",{enumerable:true,value:value});if(mode&2&&typeof value!="string")for(var key in value)__webpack_require__.d(ns,key,function(key){return value[key]}.bind(null,key));return ns};__webpack_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module["default"]}:function getModuleExports(){return module};__webpack_require__.d(getter,"a",getter);return getter};__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)};__webpack_require__.p="";return __webpack_require__(__webpack_require__.s=67)}([function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _middlewares=__webpack_require__(42);var _middlewares2=_interopRequireDefault(_middlewares);var _isEqual=__webpack_require__(21);var _isEqual2=_interopRequireDefault(_isEqual);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var uniqueID=0;var BaseControl=function(){function BaseControl(element,rootContainer,parentContainer){var _this=this;_classCallCheck(this,BaseControl);this.element=element;this.name=element.getAttribute("data-name");this._value=this.element.getAttribute("data-default");this.rootContainer=rootContainer;this.parentContainer=parentContainer;this._defaultValue=this._value;this.hasDefaultValue=true;this.type=element.getAttribute("data-type");if(!["DIV","SECTION","UL"].includes(this.element.tagName)){console.warn('Use "div", "ul" or "section" for defining a control.')}this.middlewares=_middlewares2.default.map(function(mw){return mw(_this)}).filter(function(mw){return mw!==null});this.onchange=null;this.resetButton=this.element.querySelector(":scope > .aux-reset");if(this.resetButton){this.resetButton.addEventListener("click",function(event){event.preventDefault();_this.reset()})}this.cssValue="";this.styleTemplate=element.getAttribute("data-style-template");uniqueID+=1;this.uniqueID=uniqueID}_createClass(BaseControl,[{key:"update",value:function update(){}},{key:"internalSetValue",value:function internalSetValue(value){var emitChange=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var force=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;if(value===undefined){return}if(!(0,_isEqual2.default)(this._value,value)||force){this._value=value;this.hasDefaultValue=false;if(emitChange&&this.onchange){this.onchange()}}}},{key:"reset",value:function reset(){var emitChange=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;this.middlewares.forEach(function(mw){return mw.reset(false)});this.value=this._defaultValue;this.hasDefaultValue=true;if(emitChange&&this.onchange){this.onchange()}}},{key:"generateCSS",value:function generateCSS(){var emitProperty=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;var cssValue=this.middlewares.reduce(function(val,mw){return mw.generateCSS(val)},this._value);if((!cssValue&&cssValue!=="0"||this._defaultValue===this._value)&&!this.styleTemplate){this.cssValue="";return this.cssValue}if(this.styleTemplate){this.cssValue=this.replaceCSS(this.styleTemplate,cssValue)}else{this.cssValue=emitProperty?this.name+": "+cssValue+";":""+cssValue}return _defineProperty({},this.uniqueID,this.cssValue)}},{key:"replaceCSS",value:function replaceCSS(template,value){var _this2=this;var regex=/{{VALUE}}|{{PROPERTY}}/gi;var finalString=template.replace(regex,function(match,offset,string){if(match==="{{VALUE}}"){return value}if(match==="{{PROPERTY}}"){return _this2.name}return string});return finalString}},{key:"value",set:function set(value){value=this.middlewares.reduceRight(function(val,mw){return mw.set(val)},value);this.internalSetValue(value,false);this.update()},get:function get(){return this.middlewares.reduce(function(val,mw){return mw.get(val)},this._value)}}]);return BaseControl}();exports.default=BaseControl},function(module,exports){var isArray=Array.isArray;module.exports=isArray},function(module,exports,__webpack_require__){var freeGlobal=__webpack_require__(44);var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self;var root=freeGlobal||freeSelf||Function("return this")();module.exports=root},function(module,exports,__webpack_require__){var baseIsNative=__webpack_require__(80),getValue=__webpack_require__(86);function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:undefined}module.exports=getNative},function(module,exports){function isObject(value){var type=typeof value;return value!=null&&(type=="object"||type=="function")}module.exports=isObject},function(module,exports){function isObjectLike(value){return value!=null&&typeof value=="object"}module.exports=isObjectLike},function(module,exports,__webpack_require__){var root=__webpack_require__(2);var Symbol=root.Symbol;module.exports=Symbol},function(module,exports,__webpack_require__){var Symbol=__webpack_require__(6),getRawTag=__webpack_require__(82),objectToString=__webpack_require__(83);var nullTag="[object Null]",undefinedTag="[object Undefined]";var symToStringTag=Symbol?Symbol.toStringTag:undefined;function baseGetTag(value){if(value==null){return value===undefined?undefinedTag:nullTag}return symToStringTag&&symToStringTag in Object(value)?getRawTag(value):objectToString(value)}module.exports=baseGetTag},function(module,exports,__webpack_require__){var arrayLikeKeys=__webpack_require__(54),baseKeys=__webpack_require__(109),isArrayLike=__webpack_require__(17);function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}module.exports=keys},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _flatten=__webpack_require__(144);var _flatten2=_interopRequireDefault(_flatten);var _uniq=__webpack_require__(147);var _uniq2=_interopRequireDefault(_uniq);var _controlFactory=__webpack_require__(10);var _controlFactory2=_interopRequireDefault(_controlFactory);var _BaseControl2=__webpack_require__(0);var _BaseControl3=_interopRequireDefault(_BaseControl2);var _config=__webpack_require__(157);var _config2=_interopRequireDefault(_config);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Container=function(_BaseControl){_inherits(Container,_BaseControl);function Container(element,rootContainer,parentContainer){var _context;_classCallCheck(this,Container);var _this=_possibleConstructorReturn(this,(Container.__proto__||Object.getPrototypeOf(Container)).call(this,element,rootContainer,parentContainer));var filter=Array.prototype.filter;_this._value={};_this.children=[];_this.removeDefaults=_this.element.getAttribute("data-remove-defaults")==="true";_this.rootContainer=rootContainer||_this;_this.parentContainer=parentContainer||_this;if(_this.parentContainer!==_this){_this.parentContainer.children.push(_this)}_this.inheritedSelector=false;_this.selector=_this.defineSelector();_this.controlsCSS={};_this.rootContainerCSS={};_this.controls=(_context=_this.element.querySelectorAll("."+_config2.default.classNames.control),filter).call(_context,function(ctrlElement){return ctrlElement.parentElement.closest("."+_config2.default.classNames.control)===_this.element}).map(function(ctrlElement){return(0,_controlFactory2.default)(ctrlElement,_this.rootContainer,_this)}).filter(function(control){return!!control});_this.controls.forEach(function(control){_this._value[control.name]=control.value;control.onchange=function(){if(control.hasDefaultValue&&_this.removeDefaults){delete _this._value[control.name]}else{_this._value[control.name]=control.value}if(_this.hasDefaultValue){_this.hasDefaultValue=control.hasDefaultValue}if(_this.onchange)_this.onchange()}});return _this}_createClass(Container,[{key:"update",value:function update(){var _this2=this;this.controls.forEach(function(control){control.value=_this2._value[control.name]})}},{key:"reset",value:function reset(){var _this3=this;var emitChange=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;this.controls.forEach(function(control){control.reset(false);if(_this3.removeDefaults){delete _this3._value[control.name]}else{_this3._value[control.name]=control.value}});this.hasDefaultValue=true;if(emitChange&&this.onchange){this.onchange()}}},{key:"defineSelector",value:function defineSelector(){var selector=this.element.getAttribute("data-selector");if(!selector){throw new Error("The container doesn't have specific selector")}if(selector==="inherit"){this.inheritedSelector=true;return this.parentContainer.selector}return selector}},{key:"generateCSS",value:function generateCSS(){var controlsCSS={};this.controls.forEach(function(control){var id=control.uniqueID;var cssValue=control.generateCSS();if(!cssValue)return;controlsCSS[id]=cssValue[id]});if(!Object.keys(controlsCSS).length){return null}return _defineProperty({},this.uniqueID,{selector:this.selector,styles:controlsCSS})}},{key:"cssString",value:function cssString(values){var _this4=this;var desktopString="";var finalString="";Object.keys(values).forEach(function(breakPoint){if(breakPoint==="desktop"){Object.keys(values[breakPoint]).forEach(function(id){desktopString+=""+values[breakPoint][id]});finalString+=_this4.selector+" { "+desktopString+" } "}});return finalString}},{key:"getFonts",value:function getFonts(){var nestedContainers=this.children;var fontControls=this.controls.filter(function(control){return control.type==="font"});var fontsList=[];if(nestedContainers.length){nestedContainers.forEach(function(container){fontsList.push(container.getFonts())})}fontControls.forEach(function(control){fontsList.push(control.getURL())});return(0,_uniq2.default)((0,_flatten2.default)(fontsList))}}]);return Container}(_BaseControl3.default);exports.default=Container},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.types=undefined;exports.default=setupControl;var _Choose=__webpack_require__(11);var _Choose2=_interopRequireDefault(_Choose);var _FontFace=__webpack_require__(114);var _FontFace2=_interopRequireDefault(_FontFace);var _Select=__webpack_require__(117);var _Select2=_interopRequireDefault(_Select);var _Slider=__webpack_require__(118);var _Slider2=_interopRequireDefault(_Slider);var _Popover=__webpack_require__(119);var _Popover2=_interopRequireDefault(_Popover);var _Color=__webpack_require__(158);var _Color2=_interopRequireDefault(_Color);var _Dimension=__webpack_require__(159);var _Dimension2=_interopRequireDefault(_Dimension);var _Text=__webpack_require__(160);var _Text2=_interopRequireDefault(_Text);var _Container=__webpack_require__(9);var _Container2=_interopRequireDefault(_Container);var _Responsive=__webpack_require__(161);var _Responsive2=_interopRequireDefault(_Responsive);var _Hover=__webpack_require__(162);var _Hover2=_interopRequireDefault(_Hover);var _Repeater=__webpack_require__(191);var _Repeater2=_interopRequireDefault(_Repeater);var _GlobalColorPicker=__webpack_require__(192);var _GlobalColorPicker2=_interopRequireDefault(_GlobalColorPicker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var types=exports.types={choose:_Choose2.default,responsive:_Responsive2.default,hover:_Hover2.default,font:_FontFace2.default,select:_Select2.default,slider:_Slider2.default,container:_Container2.default,popover:_Popover2.default,color:_Color2.default,dimension:_Dimension2.default,text:_Text2.default,repeater:_Repeater2.default,GlobalColorPicker:_GlobalColorPicker2.default};function setupControl(element,rootContainer,parentContainer){var type=element.getAttribute("data-type");if(!type){console.warn("This control does not have data-type attribute.",element);return null}return new types[type](element,rootContainer,parentContainer)}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _BaseControl2=__webpack_require__(0);var _BaseControl3=_interopRequireDefault(_BaseControl2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Choose=function(_BaseControl){_inherits(Choose,_BaseControl);function Choose(element,rootContainer,parentContainer){_classCallCheck(this,Choose);var _this=_possibleConstructorReturn(this,(Choose.__proto__||Object.getPrototypeOf(Choose)).call(this,element,rootContainer,parentContainer));_this.options=_this.element.querySelectorAll(".aux-option-item");if(!_this.options.length){throw new Error('Choose control should contain at lease one option element specified by "aux-option-item" class name.')}_this.options.forEach(function(option){option.addEventListener("click",function(){_this.internalSetValue(option.getAttribute("data-value"));_this.update()})});_this.update();return _this}_createClass(Choose,[{key:"update",value:function update(){var _this2=this;this.options.forEach(function(option){if(option.getAttribute("data-value")===_this2._value){option.classList.add("aux-option-selected")}else{option.classList.remove("aux-option-selected")}})}}]);return Choose}(_BaseControl3.default);exports.default=Choose},function(module,exports,__webpack_require__){var listCacheClear=__webpack_require__(70),listCacheDelete=__webpack_require__(71),listCacheGet=__webpack_require__(72),listCacheHas=__webpack_require__(73),listCacheSet=__webpack_require__(74);function ListCache(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;module.exports=ListCache},function(module,exports,__webpack_require__){var eq=__webpack_require__(14);function assocIndexOf(array,key){var length=array.length;while(length--){if(eq(array[length][0],key)){return length}}return-1}module.exports=assocIndexOf},function(module,exports){function eq(value,other){return value===other||value!==value&&other!==other}module.exports=eq},function(module,exports,__webpack_require__){var getNative=__webpack_require__(3);var nativeCreate=getNative(Object,"create");module.exports=nativeCreate},function(module,exports,__webpack_require__){var isKeyable=__webpack_require__(95);function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data[typeof key=="string"?"string":"hash"]:data.map}module.exports=getMapData},function(module,exports,__webpack_require__){var isFunction=__webpack_require__(43),isLength=__webpack_require__(33);function isArrayLike(value){return value!=null&&isLength(value.length)&&!isFunction(value)}module.exports=isArrayLike},function(module,exports,__webpack_require__){var DataView=__webpack_require__(111),Map=__webpack_require__(24),Promise=__webpack_require__(112),Set=__webpack_require__(57),WeakMap=__webpack_require__(113),baseGetTag=__webpack_require__(7),toSource=__webpack_require__(45);var mapTag="[object Map]",objectTag="[object Object]",promiseTag="[object Promise]",setTag="[object Set]",weakMapTag="[object WeakMap]";var dataViewTag="[object DataView]";var dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap);var getTag=baseGetTag;if(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map&&getTag(new Map)!=mapTag||Promise&&getTag(Promise.resolve())!=promiseTag||Set&&getTag(new Set)!=setTag||WeakMap&&getTag(new WeakMap)!=weakMapTag){getTag=function(value){var result=baseGetTag(value),Ctor=result==objectTag?value.constructor:undefined,ctorString=Ctor?toSource(Ctor):"";if(ctorString){switch(ctorString){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return promiseTag;case setCtorString:return setTag;case weakMapCtorString:return weakMapTag}}return result}}module.exports=getTag},function(module,exports,__webpack_require__){var assignValue=__webpack_require__(58),baseAssignValue=__webpack_require__(59);function copyObject(source,props,object,customizer){var isNew=!object;object||(object={});var index=-1,length=props.length;while(++index<length){var key=props[index];var newValue=customizer?customizer(object[key],source[key],key,object,source):undefined;if(newValue===undefined){newValue=source[key]}if(isNew){baseAssignValue(object,key,newValue)}else{assignValue(object,key,newValue)}}return object}module.exports=copyObject},function(module,exports,__webpack_require__){var isSymbol=__webpack_require__(41);var INFINITY=1/0;function toKey(value){if(typeof value=="string"||isSymbol(value)){return value}var result=value+"";return result=="0"&&1/value==-INFINITY?"-0":result}module.exports=toKey},function(module,exports,__webpack_require__){var baseIsEqual=__webpack_require__(22);function isEqual(value,other){return baseIsEqual(value,other)}module.exports=isEqual},function(module,exports,__webpack_require__){var baseIsEqualDeep=__webpack_require__(69),isObjectLike=__webpack_require__(5);function baseIsEqual(value,other,bitmask,customizer,stack){if(value===other){return true}if(value==null||other==null||!isObjectLike(value)&&!isObjectLike(other)){return value!==value&&other!==other}return baseIsEqualDeep(value,other,bitmask,customizer,baseIsEqual,stack)}module.exports=baseIsEqual},function(module,exports,__webpack_require__){var ListCache=__webpack_require__(12),stackClear=__webpack_require__(75),stackDelete=__webpack_require__(76),stackGet=__webpack_require__(77),stackHas=__webpack_require__(78),stackSet=__webpack_require__(79);function Stack(entries){var data=this.__data__=new ListCache(entries);this.size=data.size}Stack.prototype.clear=stackClear;Stack.prototype["delete"]=stackDelete;Stack.prototype.get=stackGet;Stack.prototype.has=stackHas;Stack.prototype.set=stackSet;module.exports=Stack},function(module,exports,__webpack_require__){var getNative=__webpack_require__(3),root=__webpack_require__(2);var Map=getNative(root,"Map");module.exports=Map},function(module,exports,__webpack_require__){var mapCacheClear=__webpack_require__(87),mapCacheDelete=__webpack_require__(94),mapCacheGet=__webpack_require__(96),mapCacheHas=__webpack_require__(97),mapCacheSet=__webpack_require__(98);function MapCache(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}MapCache.prototype.clear=mapCacheClear;MapCache.prototype["delete"]=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;module.exports=MapCache},function(module,exports){function setToArray(set){var index=-1,result=Array(set.size);set.forEach(function(value){result[++index]=value});return result}module.exports=setToArray},function(module,exports){function arrayPush(array,values){var index=-1,length=values.length,offset=array.length;while(++index<length){array[offset+index]=values[index]}return array}module.exports=arrayPush},function(module,exports,__webpack_require__){var arrayFilter=__webpack_require__(104),stubArray=__webpack_require__(53);var objectProto=Object.prototype;var propertyIsEnumerable=objectProto.propertyIsEnumerable;var nativeGetSymbols=Object.getOwnPropertySymbols;var getSymbols=!nativeGetSymbols?stubArray:function(object){if(object==null){return[]}object=Object(object);return arrayFilter(nativeGetSymbols(object),function(symbol){return propertyIsEnumerable.call(object,symbol)})};module.exports=getSymbols},function(module,exports,__webpack_require__){var baseIsArguments=__webpack_require__(106),isObjectLike=__webpack_require__(5);var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var propertyIsEnumerable=objectProto.propertyIsEnumerable;var isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(value){return isObjectLike(value)&&hasOwnProperty.call(value,"callee")&&!propertyIsEnumerable.call(value,"callee")};module.exports=isArguments},function(module,exports,__webpack_require__){(function(module){var root=__webpack_require__(2),stubFalse=__webpack_require__(107);var freeExports=true&&exports&&!exports.nodeType&&exports;var freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module;var moduleExports=freeModule&&freeModule.exports===freeExports;var Buffer=moduleExports?root.Buffer:undefined;var nativeIsBuffer=Buffer?Buffer.isBuffer:undefined;var isBuffer=nativeIsBuffer||stubFalse;module.exports=isBuffer}).call(this,__webpack_require__(31)(module))},function(module,exports){module.exports=function(module){if(!module.webpackPolyfill){module.deprecate=function(){};module.paths=[];if(!module.children)module.children=[];Object.defineProperty(module,"loaded",{enumerable:true,get:function(){return module.l}});Object.defineProperty(module,"id",{enumerable:true,get:function(){return module.i}});module.webpackPolyfill=1}return module}},function(module,exports){var MAX_SAFE_INTEGER=9007199254740991;var reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(value,length){var type=typeof value;length=length==null?MAX_SAFE_INTEGER:length;return!!length&&(type=="number"||type!="symbol"&&reIsUint.test(value))&&(value>-1&&value%1==0&&value<length)}module.exports=isIndex},function(module,exports){var MAX_SAFE_INTEGER=9007199254740991;function isLength(value){return typeof value=="number"&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}module.exports=isLength},function(module,exports){function baseUnary(func){return function(value){return func(value)}}module.exports=baseUnary},function(module,exports,__webpack_require__){(function(module){var freeGlobal=__webpack_require__(44);var freeExports=true&&exports&&!exports.nodeType&&exports;var freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module;var moduleExports=freeModule&&freeModule.exports===freeExports;var freeProcess=moduleExports&&freeGlobal.process;var nodeUtil=function(){try{var types=freeModule&&freeModule.require&&freeModule.require("util").types;if(types){return types}return freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch(e){}}();module.exports=nodeUtil}).call(this,__webpack_require__(31)(module))},function(module,exports){var objectProto=Object.prototype;function isPrototype(value){var Ctor=value&&value.constructor,proto=typeof Ctor=="function"&&Ctor.prototype||objectProto;return value===proto}module.exports=isPrototype},function(module,exports,__webpack_require__){var baseClone=__webpack_require__(120);var CLONE_DEEP_FLAG=1,CLONE_SYMBOLS_FLAG=4;function cloneDeep(value){return baseClone(value,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG)}module.exports=cloneDeep},function(module,exports,__webpack_require__){var arrayLikeKeys=__webpack_require__(54),baseKeysIn=__webpack_require__(125),isArrayLike=__webpack_require__(17);function keysIn(object){return isArrayLike(object)?arrayLikeKeys(object,true):baseKeysIn(object)}module.exports=keysIn},function(module,exports,__webpack_require__){var Uint8Array=__webpack_require__(50);function cloneArrayBuffer(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);new Uint8Array(result).set(new Uint8Array(arrayBuffer));return result}module.exports=cloneArrayBuffer},function(module,exports,__webpack_require__){var isArray=__webpack_require__(1),isSymbol=__webpack_require__(41);var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(value,object){if(isArray(value)){return false}var type=typeof value;if(type=="number"||type=="symbol"||type=="boolean"||value==null||isSymbol(value)){return true}return reIsPlainProp.test(value)||!reIsDeepProp.test(value)||object!=null&&value in Object(object)}module.exports=isKey},function(module,exports,__webpack_require__){var baseGetTag=__webpack_require__(7),isObjectLike=__webpack_require__(5);var symbolTag="[object Symbol]";function isSymbol(value){return typeof value=="symbol"||isObjectLike(value)&&baseGetTag(value)==symbolTag}module.exports=isSymbol},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _units=__webpack_require__(68);var _units2=_interopRequireDefault(_units);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var middlewares=[_units2.default];exports.default=middlewares},function(module,exports,__webpack_require__){var baseGetTag=__webpack_require__(7),isObject=__webpack_require__(4);var asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(value){if(!isObject(value)){return false}var tag=baseGetTag(value);return tag==funcTag||tag==genTag||tag==asyncTag||tag==proxyTag}module.exports=isFunction},function(module,exports,__webpack_require__){(function(global){var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;module.exports=freeGlobal}).call(this,__webpack_require__(81))},function(module,exports){var funcProto=Function.prototype;var funcToString=funcProto.toString;function toSource(func){if(func!=null){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}module.exports=toSource},function(module,exports,__webpack_require__){var SetCache=__webpack_require__(47),arraySome=__webpack_require__(48),cacheHas=__webpack_require__(49);var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function equalArrays(array,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isPartial&&othLength>arrLength)){return false}var arrStacked=stack.get(array);var othStacked=stack.get(other);if(arrStacked&&othStacked){return arrStacked==other&&othStacked==array}var index=-1,result=true,seen=bitmask&COMPARE_UNORDERED_FLAG?new SetCache:undefined;stack.set(array,other);stack.set(other,array);while(++index<arrLength){var arrValue=array[index],othValue=other[index];if(customizer){var compared=isPartial?customizer(othValue,arrValue,index,other,array,stack):customizer(arrValue,othValue,index,array,other,stack)}if(compared!==undefined){if(compared){continue}result=false;break}if(seen){if(!arraySome(other,function(othValue,othIndex){if(!cacheHas(seen,othIndex)&&(arrValue===othValue||equalFunc(arrValue,othValue,bitmask,customizer,stack))){return seen.push(othIndex)}})){result=false;break}}else if(!(arrValue===othValue||equalFunc(arrValue,othValue,bitmask,customizer,stack))){result=false;break}}stack["delete"](array);stack["delete"](other);return result}module.exports=equalArrays},function(module,exports,__webpack_require__){var MapCache=__webpack_require__(25),setCacheAdd=__webpack_require__(99),setCacheHas=__webpack_require__(100);function SetCache(values){var index=-1,length=values==null?0:values.length;this.__data__=new MapCache;while(++index<length){this.add(values[index])}}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd;SetCache.prototype.has=setCacheHas;module.exports=SetCache},function(module,exports){function arraySome(array,predicate){var index=-1,length=array==null?0:array.length;while(++index<length){if(predicate(array[index],index,array)){return true}}return false}module.exports=arraySome},function(module,exports){function cacheHas(cache,key){return cache.has(key)}module.exports=cacheHas},function(module,exports,__webpack_require__){var root=__webpack_require__(2);var Uint8Array=root.Uint8Array;module.exports=Uint8Array},function(module,exports,__webpack_require__){var baseGetAllKeys=__webpack_require__(52),getSymbols=__webpack_require__(28),keys=__webpack_require__(8);function getAllKeys(object){return baseGetAllKeys(object,keys,getSymbols)}module.exports=getAllKeys},function(module,exports,__webpack_require__){var arrayPush=__webpack_require__(27),isArray=__webpack_require__(1);function baseGetAllKeys(object,keysFunc,symbolsFunc){var result=keysFunc(object);return isArray(object)?result:arrayPush(result,symbolsFunc(object))}module.exports=baseGetAllKeys},function(module,exports){function stubArray(){return[]}module.exports=stubArray},function(module,exports,__webpack_require__){var baseTimes=__webpack_require__(105),isArguments=__webpack_require__(29),isArray=__webpack_require__(1),isBuffer=__webpack_require__(30),isIndex=__webpack_require__(32),isTypedArray=__webpack_require__(55);var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function arrayLikeKeys(value,inherited){var isArr=isArray(value),isArg=!isArr&&isArguments(value),isBuff=!isArr&&!isArg&&isBuffer(value),isType=!isArr&&!isArg&&!isBuff&&isTypedArray(value),skipIndexes=isArr||isArg||isBuff||isType,result=skipIndexes?baseTimes(value.length,String):[],length=result.length;for(var key in value){if((inherited||hasOwnProperty.call(value,key))&&!(skipIndexes&&(key=="length"||isBuff&&(key=="offset"||key=="parent")||isType&&(key=="buffer"||key=="byteLength"||key=="byteOffset")||isIndex(key,length)))){result.push(key)}}return result}module.exports=arrayLikeKeys},function(module,exports,__webpack_require__){var baseIsTypedArray=__webpack_require__(108),baseUnary=__webpack_require__(34),nodeUtil=__webpack_require__(35);var nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray;var isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;module.exports=isTypedArray},function(module,exports){function overArg(func,transform){return function(arg){return func(transform(arg))}}module.exports=overArg},function(module,exports,__webpack_require__){var getNative=__webpack_require__(3),root=__webpack_require__(2);var Set=getNative(root,"Set");module.exports=Set},function(module,exports,__webpack_require__){var baseAssignValue=__webpack_require__(59),eq=__webpack_require__(14);var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function assignValue(object,key,value){var objValue=object[key];if(!(hasOwnProperty.call(object,key)&&eq(objValue,value))||value===undefined&&!(key in object)){baseAssignValue(object,key,value)}}module.exports=assignValue},function(module,exports,__webpack_require__){var defineProperty=__webpack_require__(122);function baseAssignValue(object,key,value){if(key=="__proto__"&&defineProperty){defineProperty(object,key,{configurable:true,enumerable:true,value:value,writable:true})}else{object[key]=value}}module.exports=baseAssignValue},function(module,exports,__webpack_require__){var arrayPush=__webpack_require__(27),getPrototype=__webpack_require__(61),getSymbols=__webpack_require__(28),stubArray=__webpack_require__(53);var nativeGetSymbols=Object.getOwnPropertySymbols;var getSymbolsIn=!nativeGetSymbols?stubArray:function(object){var result=[];while(object){arrayPush(result,getSymbols(object));object=getPrototype(object)}return result};module.exports=getSymbolsIn},function(module,exports,__webpack_require__){var overArg=__webpack_require__(56);var getPrototype=overArg(Object.getPrototypeOf,Object);module.exports=getPrototype},function(module,exports,__webpack_require__){var isObject=__webpack_require__(4);function isStrictComparable(value){return value===value&&!isObject(value)}module.exports=isStrictComparable},function(module,exports){function matchesStrictComparable(key,srcValue){return function(object){if(object==null){return false}return object[key]===srcValue&&(srcValue!==undefined||key in Object(object))}}module.exports=matchesStrictComparable},function(module,exports,__webpack_require__){var castPath=__webpack_require__(65),toKey=__webpack_require__(20);function baseGet(object,path){path=castPath(path,object);var index=0,length=path.length;while(object!=null&&index<length){object=object[toKey(path[index++])]}return index&&index==length?object:undefined}module.exports=baseGet},function(module,exports,__webpack_require__){var isArray=__webpack_require__(1),isKey=__webpack_require__(40),stringToPath=__webpack_require__(170),toString=__webpack_require__(173);function castPath(value,object){if(isArray(value)){return value}return isKey(value,object)?[value]:stringToPath(toString(value))}module.exports=castPath},function(module,exports,__webpack_require__){var castPath=__webpack_require__(65),isArguments=__webpack_require__(29),isArray=__webpack_require__(1),isIndex=__webpack_require__(32),isLength=__webpack_require__(33),toKey=__webpack_require__(20);function hasPath(object,path,hasFunc){path=castPath(path,object);var index=-1,length=path.length,result=false;while(++index<length){var key=toKey(path[index]);if(!(result=object!=null&&hasFunc(object,key))){break}object=object[key]}if(result||++index!=length){return result}length=object==null?0:object.length;return!!length&&isLength(length)&&isIndex(key,length)&&(isArray(object)||isArguments(object))}module.exports=hasPath},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.setup=setup;exports.inputAdapter=inputAdapter;var _controlFactory=__webpack_require__(10);var _controlFactory2=_interopRequireDefault(_controlFactory);__webpack_require__(42);var _CSSParser=__webpack_require__(193);var _CSSParser2=_interopRequireDefault(_CSSParser);var _Container=__webpack_require__(9);var _Container2=_interopRequireDefault(_Container);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var map=Array.prototype.map;function setup(query){if(typeof query==="string"){var _context;return(_context=document.querySelectorAll(query),map).call(_context,function(element){return(0,_controlFactory2.default)(element)})}if(query.tagName){return[(0,_controlFactory2.default)(query)]}return null}function inputAdapter(inputElement,controlElement,controlChange,controlInit){var control=setup(controlElement)[0];control.toCSS=function(){return(0,_CSSParser2.default)(control.generateCSS())};var inputValue=void 0;var isJson=inputElement.getAttribute("data-is-json")==="true";if(isJson){inputValue=inputElement.value;isJson=true;if(inputValue.length<1){inputValue={}}else{try{inputValue=JSON.parse(inputElement.value)}catch(error){throw new Error("There is an issue on parsing input value to object.")}}}control.onchange=function(){if(controlChange){controlChange(control)}if(isJson){inputElement.value=JSON.stringify(control.value);inputElement.dispatchEvent(new Event("change"));if(window.jQuery){window.jQuery(inputElement).trigger("change")}}};control.value=inputValue;if(controlInit){controlInit(control)}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _Choose=__webpack_require__(11);var _Choose2=_interopRequireDefault(_Choose);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var UnitsFactory=function(){function UnitsFactory(control,units){var _this=this;_classCallCheck(this,UnitsFactory);this.units=units;this.control=control;this.unitsControl=new _Choose2.default(this.units);this.unitsControl.onchange=function(){return _this.control.onchange()};this.cssValue=""}_createClass(UnitsFactory,[{key:"set",value:function set(value){if((typeof value==="undefined"?"undefined":_typeof(value))==="object"&&Object.hasOwnProperty.call(value,"unit")){this.unitsControl.value=value.unit;return value.value}return value}},{key:"get",value:function get(value){return{value:value,unit:this.unitsControl.value}}},{key:"reset",value:function reset(){var emitChange=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;this.unitsControl.reset(emitChange)}},{key:"generateCSS",value:function generateCSS(value){var unit=this.control.value.unit;this.cssValue=""+value+unit;return this.cssValue}}]);return UnitsFactory}();exports.default=function(control){var units=control.element.querySelector(":scope > .aux-units");if(units){return new UnitsFactory(control,units)}return null}},function(module,exports,__webpack_require__){var Stack=__webpack_require__(23),equalArrays=__webpack_require__(46),equalByTag=__webpack_require__(101),equalObjects=__webpack_require__(103),getTag=__webpack_require__(18),isArray=__webpack_require__(1),isBuffer=__webpack_require__(30),isTypedArray=__webpack_require__(55);var COMPARE_PARTIAL_FLAG=1;var argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]";var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function baseIsEqualDeep(object,other,bitmask,customizer,equalFunc,stack){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=objIsArr?arrayTag:getTag(object),othTag=othIsArr?arrayTag:getTag(other);objTag=objTag==argsTag?objectTag:objTag;othTag=othTag==argsTag?objectTag:othTag;var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&isBuffer(object)){if(!isBuffer(other)){return false}objIsArr=true;objIsObj=false}if(isSameTag&&!objIsObj){stack||(stack=new Stack);return objIsArr||isTypedArray(object)?equalArrays(object,other,bitmask,customizer,equalFunc,stack):equalByTag(object,other,objTag,bitmask,customizer,equalFunc,stack)}if(!(bitmask&COMPARE_PARTIAL_FLAG)){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped){var objUnwrapped=objIsWrapped?object.value():object,othUnwrapped=othIsWrapped?other.value():other;stack||(stack=new Stack);return equalFunc(objUnwrapped,othUnwrapped,bitmask,customizer,stack)}}if(!isSameTag){return false}stack||(stack=new Stack);return equalObjects(object,other,bitmask,customizer,equalFunc,stack)}module.exports=baseIsEqualDeep},function(module,exports){function listCacheClear(){this.__data__=[];this.size=0}module.exports=listCacheClear},function(module,exports,__webpack_require__){var assocIndexOf=__webpack_require__(13);var arrayProto=Array.prototype;var splice=arrayProto.splice;function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){return false}var lastIndex=data.length-1;if(index==lastIndex){data.pop()}else{splice.call(data,index,1)}--this.size;return true}module.exports=listCacheDelete},function(module,exports,__webpack_require__){var assocIndexOf=__webpack_require__(13);function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?undefined:data[index][1]}module.exports=listCacheGet},function(module,exports,__webpack_require__){var assocIndexOf=__webpack_require__(13);function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1}module.exports=listCacheHas},function(module,exports,__webpack_require__){var assocIndexOf=__webpack_require__(13);function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){++this.size;data.push([key,value])}else{data[index][1]=value}return this}module.exports=listCacheSet},function(module,exports,__webpack_require__){var ListCache=__webpack_require__(12);function stackClear(){this.__data__=new ListCache;this.size=0}module.exports=stackClear},function(module,exports){function stackDelete(key){var data=this.__data__,result=data["delete"](key);this.size=data.size;return result}module.exports=stackDelete},function(module,exports){function stackGet(key){return this.__data__.get(key)}module.exports=stackGet},function(module,exports){function stackHas(key){return this.__data__.has(key)}module.exports=stackHas},function(module,exports,__webpack_require__){var ListCache=__webpack_require__(12),Map=__webpack_require__(24),MapCache=__webpack_require__(25);var LARGE_ARRAY_SIZE=200;function stackSet(key,value){var data=this.__data__;if(data instanceof ListCache){var pairs=data.__data__;if(!Map||pairs.length<LARGE_ARRAY_SIZE-1){pairs.push([key,value]);this.size=++data.size;return this}data=this.__data__=new MapCache(pairs)}data.set(key,value);this.size=data.size;return this}module.exports=stackSet},function(module,exports,__webpack_require__){var isFunction=__webpack_require__(43),isMasked=__webpack_require__(84),isObject=__webpack_require__(4),toSource=__webpack_require__(45);var reRegExpChar=/[\\^$.*+?()[\]{}|]/g;var reIsHostCtor=/^\[object .+?Constructor\]$/;var funcProto=Function.prototype,objectProto=Object.prototype;var funcToString=funcProto.toString;var hasOwnProperty=objectProto.hasOwnProperty;var reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(value){if(!isObject(value)||isMasked(value)){return false}var pattern=isFunction(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}module.exports=baseIsNative},function(module,exports){var g;g=function(){return this}();try{g=g||new Function("return this")()}catch(e){if(typeof window==="object")g=window}module.exports=g},function(module,exports,__webpack_require__){var Symbol=__webpack_require__(6);var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var nativeObjectToString=objectProto.toString;var symToStringTag=Symbol?Symbol.toStringTag:undefined;function getRawTag(value){var isOwn=hasOwnProperty.call(value,symToStringTag),tag=value[symToStringTag];try{value[symToStringTag]=undefined;var unmasked=true}catch(e){}var result=nativeObjectToString.call(value);if(unmasked){if(isOwn){value[symToStringTag]=tag}else{delete value[symToStringTag]}}return result}module.exports=getRawTag},function(module,exports){var objectProto=Object.prototype;var nativeObjectToString=objectProto.toString;function objectToString(value){return nativeObjectToString.call(value)}module.exports=objectToString},function(module,exports,__webpack_require__){var coreJsData=__webpack_require__(85);var maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return uid?"Symbol(src)_1."+uid:""}();function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}module.exports=isMasked},function(module,exports,__webpack_require__){var root=__webpack_require__(2);var coreJsData=root["__core-js_shared__"];module.exports=coreJsData},function(module,exports){function getValue(object,key){return object==null?undefined:object[key]}module.exports=getValue},function(module,exports,__webpack_require__){var Hash=__webpack_require__(88),ListCache=__webpack_require__(12),Map=__webpack_require__(24);function mapCacheClear(){this.size=0;this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}module.exports=mapCacheClear},function(module,exports,__webpack_require__){var hashClear=__webpack_require__(89),hashDelete=__webpack_require__(90),hashGet=__webpack_require__(91),hashHas=__webpack_require__(92),hashSet=__webpack_require__(93);function Hash(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}Hash.prototype.clear=hashClear;Hash.prototype["delete"]=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;module.exports=Hash},function(module,exports,__webpack_require__){var nativeCreate=__webpack_require__(15);function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{};this.size=0}module.exports=hashClear},function(module,exports){function hashDelete(key){var result=this.has(key)&&delete this.__data__[key];this.size-=result?1:0;return result}module.exports=hashDelete},function(module,exports,__webpack_require__){var nativeCreate=__webpack_require__(15);var HASH_UNDEFINED="__lodash_hash_undefined__";var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?undefined:result}return hasOwnProperty.call(data,key)?data[key]:undefined}module.exports=hashGet},function(module,exports,__webpack_require__){var nativeCreate=__webpack_require__(15);var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function hashHas(key){var data=this.__data__;return nativeCreate?data[key]!==undefined:hasOwnProperty.call(data,key)}module.exports=hashHas},function(module,exports,__webpack_require__){var nativeCreate=__webpack_require__(15);var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet(key,value){var data=this.__data__;this.size+=this.has(key)?0:1;data[key]=nativeCreate&&value===undefined?HASH_UNDEFINED:value;return this}module.exports=hashSet},function(module,exports,__webpack_require__){var getMapData=__webpack_require__(16);function mapCacheDelete(key){var result=getMapData(this,key)["delete"](key);this.size-=result?1:0;return result}module.exports=mapCacheDelete},function(module,exports){function isKeyable(value){var type=typeof value;return type=="string"||type=="number"||type=="symbol"||type=="boolean"?value!=="__proto__":value===null}module.exports=isKeyable},function(module,exports,__webpack_require__){var getMapData=__webpack_require__(16);function mapCacheGet(key){return getMapData(this,key).get(key)}module.exports=mapCacheGet},function(module,exports,__webpack_require__){var getMapData=__webpack_require__(16);function mapCacheHas(key){return getMapData(this,key).has(key)}module.exports=mapCacheHas},function(module,exports,__webpack_require__){var getMapData=__webpack_require__(16);function mapCacheSet(key,value){var data=getMapData(this,key),size=data.size;data.set(key,value);this.size+=data.size==size?0:1;return this}module.exports=mapCacheSet},function(module,exports){var HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd(value){this.__data__.set(value,HASH_UNDEFINED);return this}module.exports=setCacheAdd},function(module,exports){function setCacheHas(value){return this.__data__.has(value)}module.exports=setCacheHas},function(module,exports,__webpack_require__){var Symbol=__webpack_require__(6),Uint8Array=__webpack_require__(50),eq=__webpack_require__(14),equalArrays=__webpack_require__(46),mapToArray=__webpack_require__(102),setToArray=__webpack_require__(26);var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;var boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",mapTag="[object Map]",numberTag="[object Number]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]";var arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]";var symbolProto=Symbol?Symbol.prototype:undefined,symbolValueOf=symbolProto?symbolProto.valueOf:undefined;function equalByTag(object,other,tag,bitmask,customizer,equalFunc,stack){switch(tag){case dataViewTag:if(object.byteLength!=other.byteLength||object.byteOffset!=other.byteOffset){return false}object=object.buffer;other=other.buffer;case arrayBufferTag:if(object.byteLength!=other.byteLength||!equalFunc(new Uint8Array(object),new Uint8Array(other))){return false}return true;case boolTag:case dateTag:case numberTag:return eq(+object,+other);case errorTag:return object.name==other.name&&object.message==other.message;case regexpTag:case stringTag:return object==other+"";case mapTag:var convert=mapToArray;case setTag:var isPartial=bitmask&COMPARE_PARTIAL_FLAG;convert||(convert=setToArray);if(object.size!=other.size&&!isPartial){return false}var stacked=stack.get(object);if(stacked){return stacked==other}bitmask|=COMPARE_UNORDERED_FLAG;stack.set(object,other);var result=equalArrays(convert(object),convert(other),bitmask,customizer,equalFunc,stack);stack["delete"](object);return result;case symbolTag:if(symbolValueOf){return symbolValueOf.call(object)==symbolValueOf.call(other)}}return false}module.exports=equalByTag},function(module,exports){function mapToArray(map){var index=-1,result=Array(map.size);map.forEach(function(value,key){result[++index]=[key,value]});return result}module.exports=mapToArray},function(module,exports,__webpack_require__){var getAllKeys=__webpack_require__(51);var COMPARE_PARTIAL_FLAG=1;var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function equalObjects(object,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG,objProps=getAllKeys(object),objLength=objProps.length,othProps=getAllKeys(other),othLength=othProps.length;if(objLength!=othLength&&!isPartial){return false}var index=objLength;while(index--){var key=objProps[index];if(!(isPartial?key in other:hasOwnProperty.call(other,key))){return false}}var objStacked=stack.get(object);var othStacked=stack.get(other);if(objStacked&&othStacked){return objStacked==other&&othStacked==object}var result=true;stack.set(object,other);stack.set(other,object);var skipCtor=isPartial;while(++index<objLength){key=objProps[index];var objValue=object[key],othValue=other[key];if(customizer){var compared=isPartial?customizer(othValue,objValue,key,other,object,stack):customizer(objValue,othValue,key,object,other,stack)}if(!(compared===undefined?objValue===othValue||equalFunc(objValue,othValue,bitmask,customizer,stack):compared)){result=false;break}skipCtor||(skipCtor=key=="constructor")}if(result&&!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;if(objCtor!=othCtor&&("constructor"in object&&"constructor"in other)&&!(typeof objCtor=="function"&&objCtor instanceof objCtor&&typeof othCtor=="function"&&othCtor instanceof othCtor)){result=false}}stack["delete"](object);stack["delete"](other);return result}module.exports=equalObjects},function(module,exports){function arrayFilter(array,predicate){var index=-1,length=array==null?0:array.length,resIndex=0,result=[];while(++index<length){var value=array[index];if(predicate(value,index,array)){result[resIndex++]=value}}return result}module.exports=arrayFilter},function(module,exports){function baseTimes(n,iteratee){var index=-1,result=Array(n);while(++index<n){result[index]=iteratee(index)}return result}module.exports=baseTimes},function(module,exports,__webpack_require__){var baseGetTag=__webpack_require__(7),isObjectLike=__webpack_require__(5);var argsTag="[object Arguments]";function baseIsArguments(value){return isObjectLike(value)&&baseGetTag(value)==argsTag}module.exports=baseIsArguments},function(module,exports){function stubFalse(){return false}module.exports=stubFalse},function(module,exports,__webpack_require__){var baseGetTag=__webpack_require__(7),isLength=__webpack_require__(33),isObjectLike=__webpack_require__(5);var argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]";var arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=true;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=false;function baseIsTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[baseGetTag(value)]}module.exports=baseIsTypedArray},function(module,exports,__webpack_require__){var isPrototype=__webpack_require__(36),nativeKeys=__webpack_require__(110);var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function baseKeys(object){if(!isPrototype(object)){return nativeKeys(object)}var result=[];for(var key in Object(object)){if(hasOwnProperty.call(object,key)&&key!="constructor"){result.push(key)}}return result}module.exports=baseKeys},function(module,exports,__webpack_require__){var overArg=__webpack_require__(56);var nativeKeys=overArg(Object.keys,Object);module.exports=nativeKeys},function(module,exports,__webpack_require__){var getNative=__webpack_require__(3),root=__webpack_require__(2);var DataView=getNative(root,"DataView");module.exports=DataView},function(module,exports,__webpack_require__){var getNative=__webpack_require__(3),root=__webpack_require__(2);var Promise=getNative(root,"Promise");module.exports=Promise},function(module,exports,__webpack_require__){var getNative=__webpack_require__(3),root=__webpack_require__(2);var WeakMap=getNative(root,"WeakMap");module.exports=WeakMap},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break}}catch(err){_d=true;_e=err}finally{try{if(!_n&&_i["return"])_i["return"]()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr)){return arr}else if(Symbol.iterator in Object(arr)){return sliceIterator(arr,i)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _BaseControl2=__webpack_require__(0);var _BaseControl3=_interopRequireDefault(_BaseControl2);var _gFonts=__webpack_require__(115);var _gFonts2=_interopRequireDefault(_gFonts);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var FontFace=function(_BaseControl){_inherits(FontFace,_BaseControl);function FontFace(element,rootContainer,parentContainer){_classCallCheck(this,FontFace);var _this=_possibleConstructorReturn(this,(FontFace.__proto__||Object.getPrototypeOf(FontFace)).call(this,element,rootContainer,parentContainer));var loadingElement=element.querySelector(".aux-loading");_this.fontList={};_this.useEarly=_this.element.getAttribute("data-early")==="true";_this.select=_this.element.querySelector("select");if(!_this.select){_this.select=document.createElement("select")}_this.gFontUrl="//fonts.googleapis.com/css?family={{NAME}}";_this.earlyUrl="//fonts.googleapis.com/earlyaccess/{{NAME}}.css";_this.customFontUrl="";_this.urlTarget=_this.element.getAttribute("data-target");if(_this.useEarly){_this.gEarlyList(_gFonts2.default.googleEarlyAccesFonts())}if(_this.select.querySelectorAll("option").length){var cFontsOptions=_this.select.querySelectorAll("select option");_this.cFontsList(cFontsOptions)}_this._value={value:_this._defaultValue.split("|")[0],type:_this._defaultValue.split("|")[1]};_gFonts2.default.getList(function(fontsData){if(loadingElement){_this.element.removeChild(loadingElement)}_this.loadingDone=true;_this.gFontList(fontsData);_this.listHandle(_this.fontList)});return _this}_createClass(FontFace,[{key:"listHandle",value:function listHandle(fontsList){var _this2=this;this.selectOptions='<option value="none">Select</option>';Object.keys(fontsList).forEach(function(type){var options=fontsList[type].join("");if(Object.keys(fontsList).length!==1){switch(type){case"cFont":options='<optgroup label="System Fonts">'+options+"</optgroup>";break;case"gEarly":options='<optgroup label="Google EarlyAccess">'+options+"</optgroup>";break;default:options='<optgroup label="Google Fonts">'+options+"</optgroup>"}}_this2.selectOptions+=options});this.select.innerHTML=this.selectOptions;this.element.appendChild(this.select);if(window.jQuery&&window.jQuery.fn.select2){this.select2=window.jQuery(this.select).select2();this.isSelect2=true;this.select2.on("change",function(){var selectedOption=_this2.select.options[_this2.select.selectedIndex];var finalValue={};finalValue.value=_this2.select.value;finalValue.type=selectedOption.getAttribute("data-type");if(finalValue.type==="cFont"){_this2.customFontUrl=selectedOption.getAttribute("data-url")}_this2.internalSetValue(finalValue)})}else{this.select.addEventListener("change",function(){var selectedOption=_this2.select.options[_this2.select.selectedIndex];var finalValue={};finalValue.value=_this2.select.value;finalValue.type=selectedOption.getAttribute("data-type");if(finalValue.type==="cFont"){_this2.customFontUrl=selectedOption.getAttribute("data-url")}_this2.internalSetValue(finalValue)})}this.update()}},{key:"cFontsList",value:function cFontsList(fontsData){fontsData=Array.from(fontsData);this.fontList.cFont=fontsData.map(function(font){return font.outerHTML})}},{key:"gEarlyList",value:function gEarlyList(fontsData){this.fontList.gEarly=Object.keys(fontsData).map(function(item){var font=fontsData[item];return'<option value="'+font.name+'" data-type="gEarly">'+font.title+"</option>"})}},{key:"gFontList",value:function gFontList(fontsData){this.fontList.gFont=fontsData.items.map(function(font){return'<option value="'+font.family+":"+font.variants.join(",")+'" data-type="gFont">'+font.family+"</option>"})}},{key:"update",value:function update(){if(typeof this._value==="string"||Object.hasOwnProperty.call(this._value,"url")){var optionValue=void 0;if(Object.hasOwnProperty.call(this._value,"url")){var value=this._value.value;delete this._value.url;optionValue=value}else{optionValue=this._value}var option=Object.values(this.select.options).find(function(selectedOption){return selectedOption.value===optionValue});var type=void 0;if(!option){type="gFont"}else{type=option.getAttribute("data-type")}this.internalSetValue({value:optionValue,type:type},true,true);this.update()}if(this.loadingDone){this.select.value=this._value.value;if(this.isSelect2){window.jQuery(this.select).trigger("change.select2")}}}},{key:"reset",value:function reset(){var emitChange=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;this.value={value:this._defaultValue.split("|")[0],type:this._defaultValue.split("|")[1]};this.hasDefaultValue=true;if(emitChange&&this.onchange){this.onchange()}}},{key:"generateCSS",value:function generateCSS(){var emitProperty=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;var _value$value$split=this._value.value.split(":"),_value$value$split2=_slicedToArray(_value$value$split,1),cssValue=_value$value$split2[0];var defaultValue=this._defaultValue.split("|")[0];if(!cssValue&&cssValue!=="0"||cssValue===defaultValue){this.cssValue="";return this.cssValue}this.cssValue=emitProperty?this.name+": '"+cssValue+"';":""+cssValue;return _defineProperty({},this.uniqueID,this.cssValue)}},{key:"getURL",value:function getURL(){var _value=this._value,value=_value.value,type=_value.type;var url="";if(type==="gFont"){url=this.gFontUrl.replace("{{NAME}}",value)}else if(type==="gEarly"){value=value.replace(/\s+/g,"").toLowerCase();url=this.earlyUrl.replace("{{NAME}}",value)}else{url=this.customFontUrl}return url}}]);return FontFace}(_BaseControl3.default);exports.default=FontFace},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _ajax=__webpack_require__(116);var _ajax2=_interopRequireDefault(_ajax);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var api="AIzaSyBYkMl1dDDRSmAyHjKInEk9nCgb9-tDQqo";var url="https://www.googleapis.com/webfonts/v1/webfonts";var waitingList=[];var loadedFonts=[];var fontsData=null;var options=null;var isLoading=-1;var listLoaded=false;function getList(onLoad){if(fontsData&&onLoad){onLoad.call(null,fontsData);return}if(isLoading===1){if(onLoad){waitingList.push(onLoad)}return}isLoading=1;(0,_ajax2.default)({url:url,method:"GET",data:{key:api}}).then(function(resp,context){isLoading=0;listLoaded=true;fontsData=resp;if(onLoad){onLoad.call(null,resp,context.responseText)}waitingList.forEach(function(item){return item.call(null,resp,context.responseText)})})}function generateSelectList(){if(!fontsData)return"";if(options)return options;var _options="";fontsData.items.forEach(function(value){_options+='<option value="'+value.family+'" data-variants="'+value.variants.join(",")+'">'+value.family+"</option>"});options=_options;return options}function load(font,variants){if(loadedFonts.indexOf(font)===-1){var head=document.getElementsByName("head");head.innerHTML='<link rel="stylesheet" href="//fonts.googleapis.com/css?family='+escape(font)+":"+variants+'" >';loadedFonts.push(font)}}function googleEarlyAccesFonts(){var earlyAccessList=[{name:"Alef Hebrew",title:"Alef Hebrew (Hebrew)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/alefhebrew.css"},{name:"Amiri",title:"Amiri (Arabic)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/amiri.css"},{name:"Dhurjati",title:"Dhurjati (Telugu)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/dhurjati.css"},{name:"Dhyana",title:"Dhyana (Lao)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/dhyana.css"},{name:"Droid Arabic Kufi",title:"Droid Arabic Kufi (Arabic)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/droidarabickufi.css"},{name:"Droid Arabic Naskh",title:"Droid Arabic Naskh (Arabic)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/droidarabicnaskh.css"},{name:"Droid Sans Ethiopic",title:"Droid Sans Ethiopic (Ethiopic)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/droidsansethiopic.css"},{name:"Droid Sans Tamil",title:"Droid Sans Tamil (Tamil)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/droidsanstamil.css"},{name:"Droid Sans Thai",title:"Droid Sans Thai (Thai)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/droidsansthai.css"},{name:"Droid Serif Thai",title:"Droid Serif Thai (Thai)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/droidserifthai.css"},{name:"Gidugu",title:"Gidugu (Telugu)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/gidugu.css"},{name:"Gurajada",title:"Gurajada (Telugu)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/gurajada.css"},{name:"Hanna",title:"Hanna (Korean)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/hanna.css"},{name:"Jeju Gothic",title:"Jeju Gothic (Korean)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/jejugothic.css"},{name:"Jeju Hallasan",title:"Jeju Hallasan (Korean)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/jejuhallasan.css"},{name:"Jeju Myeongjo",title:"Jeju Myeongjo (Korean)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/jejumyeongjo.css"},{name:"Karla Tamil Inclined",title:"Karla Tamil Inclined (Tamil)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/karlatamilinclined.css"},{name:"Karla Tamil Upright",title:"Karla Tamil Upright (Tamil)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/karlatamilupright.css"},{name:"KoPub Batang",title:"KoPub Batang (Korean)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/kopubbatang.css"},{name:"Lakki Reddy",title:"Lakki Reddy (Telugu)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/lakkireddy.css"},{name:"Lao Muang Don",title:"Lao Muang Don (Lao)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/laomuangdon.css"},{name:"Lao Muang Khong",title:"Lao Muang Khong (Lao)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/laomuangkhong.css"},{name:"Lao Sans Pro",title:"Lao Sans Pro (Lao)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/laosanspro.css"},{name:"Lateef",title:"Lateef (Arabic)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/lateef.css"},{name:"Lohit Bengali",title:"Lohit Bengali (Bengali)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/lohitbengali.css"},{name:"Lohit Devanagari",title:"Lohit Devanagari (Hindi)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/lohitdevanagari.css"},{name:"Lohit Tamil",title:"Lohit Tamil (Tamil)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/lohittamil.css"},{name:"Mallanna",title:"Mallanna (Telugu)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/mallanna.css"},{name:"Mandali",title:"Mandali (Telugu)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/mandali.css"},{name:"Myanmar Sans Pro",title:"Myanmar Sans Pro (Myanmar)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/myanmarsanspro.css"},{name:"NATS",title:"NATS (Telugu)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/nats.css"},{name:"NTR",title:"NTR (Telugu)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/ntr.css"},{name:"Nanum Brush Script",title:"Nanum Brush Script (Korean)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/nanumbrushscript.css"},{name:"Nanum Gothic",title:"Nanum Gothic (Korean)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/nanumgothic.css"},{name:"Nanum Gothic Coding",title:"Nanum Gothic Coding (Korean)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/nanumgothiccoding.css"},{name:"Nanum Myeongjo",title:"Nanum Myeongjo (Korean)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/nanummyeongjo.css"},{name:"Nanum Pen Script",title:"Nanum Pen Script (Korean)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/nanumpenscript.css"},{name:"Noto Kufi Arabic",title:"Noto Kufi Arabic (Arabic)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notokufiarabic.css"},{name:"Noto Naskh Arabic",title:"Noto Naskh Arabic (Arabic)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notonaskharabic.css"},{name:"Noto Nastaliq Urdu Draft",title:"Noto Nastaliq Urdu Draft (Arabic)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notonastaliqurdudraft.css"},{name:"Noto Sans Armenian",title:"Noto Sans Armenian (Armenian)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosansarmenian.css"},{name:"Noto Sans Bengali",title:"Noto Sans Bengali (Bengali)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosansbengali.css"},{name:"Noto Sans Cherokee",title:"Noto Sans Cherokee (Cherokee)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosanscherokee.css"},{name:"Noto Sans Devanagari",title:"Noto Sans Devanagari (Hindi)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosansdevanagari.css"},{name:"Noto Sans Devanagari UI",title:"Noto Sans Devanagari UI (Hindi)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosansdevanagariui.css"},{name:"Noto Sans Ethiopic",title:"Noto Sans Ethiopic (Ethiopic)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosansethiopic.css"},{name:"Noto Sans Georgian",title:"Noto Sans Georgian (Georgian)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosansgeorgian.css"},{name:"Noto Sans Gujarati",title:"Noto Sans Gujarati (Gujarati)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosansgujarati.css"},{name:"Noto Sans Gurmukhi",title:"Noto Sans Gurmukhi (Gurmukhi)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosansgurmukhi.css"},{name:"Noto Sans Hebrew",title:"Noto Sans Hebrew (Hebrew)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosanshebrew.css"},{name:"Noto Sans Japanese",title:"Noto Sans Japanese (Japanese)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosansjapanese.css"},{name:"Noto Sans Kannada",title:"Noto Sans Kannada (Kannada)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosanskannada.css"},{name:"Noto Sans Khmer",title:"Noto Sans Khmer (Khmer)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosanskhmer.css"},{name:"Noto Sans Kufi Arabic",title:"Noto Sans Kufi Arabic (Arabic)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosanskufiarabic.css"},{name:"Noto Sans Lao",title:"Noto Sans Lao (Lao)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosanslao.css"},{name:"Noto Sans Lao UI",title:"Noto Sans Lao UI (Lao)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosanslaoui.css"},{name:"Noto Sans Malayalam",title:"Noto Sans Malayalam (Malayalam)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosansmalayalam.css"},{name:"Noto Sans Myanmar",title:"Noto Sans Myanmar (Myanmar)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosansmyanmar.css"},{name:"Noto Sans Osmanya",title:"Noto Sans Osmanya (Osmanya)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosansosmanya.css"},{name:"Noto Sans Sinhala",title:"Noto Sans Sinhala (Sinhala)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosanssinhala.css"},{name:"Noto Sans Tamil",title:"Noto Sans Tamil (Tamil)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosanstamil.css"},{name:"Noto Sans Tamil UI",title:"Noto Sans Tamil UI (Tamil)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosanstamilui.css"},{name:"Noto Sans Telugu",title:"Noto Sans Telugu (Telugu)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosanstelugu.css"},{name:"Noto Sans Thai",title:"Noto Sans Thai (Thai)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosansthai.css"},{name:"Noto Sans Thai UI",title:"Noto Sans Thai UI (Thai)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notosansthaiui.css"},{name:"Noto Serif Armenian",title:"Noto Serif Armenian (Armenian)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notoserifarmenian.css"},{name:"Noto Serif Georgian",title:"Noto Serif Georgian (Georgian)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notoserifgeorgian.css"},{name:"Noto Serif Khmer",title:"Noto Serif Khmer (Khmer)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notoserifkhmer.css"},{name:"Noto Serif Lao",title:"Noto Serif Lao (Lao)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notoseriflao.css"},{name:"Noto Serif Thai",title:"Noto Serif Thai (Thai)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/notoserifthai.css"},{name:"Open Sans Hebrew",title:"Open Sans Hebrew (Hebrew)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/opensanshebrew.css"},{name:"Open Sans Hebrew Condensed",title:"Open Sans Hebrew Condensed (Hebrew)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/opensanshebrewcondensed.css"},{name:"Padauk",title:"Padauk (Myanmar)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/padauk.css"},{name:"Peddana",title:"Peddana (Telugu)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/peddana.css"},{name:"Phetsarath",title:"Phetsarath (Lao)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/phetsarath.css"},{name:"Ponnala",title:"Ponnala (Telugu)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/ponnala.css"},{name:"Ramabhadra",title:"Ramabhadra (Telugu)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/ramabhadra.css"},{name:"Ravi Prakash",title:"Ravi Prakash (Telugu)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/raviprakash.css"},{name:"Scheherazade",title:"Scheherazade (Arabic)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/scheherazade.css"},{name:"Souliyo",title:"Souliyo (Lao)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/souliyo.css"},{name:"Sree Krushnadevaraya",title:"Sree Krushnadevaraya (Telugu)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/sreekrushnadevaraya.css"},{name:"Suranna",title:"Suranna (Telugu)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/suranna.css"},{name:"Suravaram",title:"Suravaram (Telugu)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/suravaram.css"},{name:"Tenali Ramakrishna",title:"Tenali Ramakrishna (Telugu)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/tenaliramakrishna.css"},{name:"Thabit",title:"Thabit (Arabic)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/thabit.css"},{name:"Tharlon",title:"Tharlon (Myanmar)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/tharlon.css"},{name:"cwTeXFangSong",title:"cwTeXFangSong (Chinese_traditional)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/cwtexfangsong.css"},{name:"cwTeXHei",title:"cwTeXHei (Chinese-traditional)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/cwtexhei.css"},{name:"cwTeXKai",title:"cwTeXKai (Chinese_traditional)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/cwtexkai.css"},{name:"cwTeXMing",title:"cwTeXMing (Chinese_traditional)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/cwtexming.css"},{name:"cwTeXYen",title:"cwTeXYen (Chinese_traditional)",thickness:"400,700",url:"//fonts.googleapis.com/earlyaccess/cwtexyen.css"}];return earlyAccessList}exports.default={listLoaded:listLoaded,isLoading:isLoading,fontsData:fontsData,load:load,generateSelectList:generateSelectList,getList:getList,googleEarlyAccesFonts:googleEarlyAccesFonts}},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__;!function(e,t){"use strict";true?!(__WEBPACK_AMD_DEFINE_FACTORY__=t,__WEBPACK_AMD_DEFINE_RESULT__=typeof __WEBPACK_AMD_DEFINE_FACTORY__==="function"?__WEBPACK_AMD_DEFINE_FACTORY__.call(exports,__webpack_require__,exports,module):__WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)):undefined}(this,function(){"use strict";function e(e){var r=["get","post","put","delete"];return e=e||{},e.baseUrl=e.baseUrl||"",e.method&&e.url?n(e.method,e.baseUrl+e.url,t(e.data),e):r.reduce(function(r,o){return r[o]=function(r,u){return n(o,e.baseUrl+r,t(u),e)},r},{})}function t(e){return e||null}function n(e,t,n,u){var c=["then","catch","always"],i=c.reduce(function(e,t){return e[t]=function(n){return e[t]=n,e},e},{}),f=new XMLHttpRequest,p=r(t,n,e);return f.open(e,p,!0),f.withCredentials=u.hasOwnProperty("withCredentials"),o(f,u.headers,n),f.addEventListener("readystatechange",a(i,f),!1),f.send(s(n)?JSON.stringify(n):n),i.abort=function(){return f.abort()},i}function r(e,t,n){if("get"!==n.toLowerCase()||!t)return e;var r=i(t),o=e.indexOf("?")>-1?"&":"?";return e+o+r}function o(e,t,n){t=t||{},u(t)||(t["Content-Type"]=s(n)?"application/json":"application/x-www-form-urlencoded"),Object.keys(t).forEach(function(n){t[n]&&e.setRequestHeader(n,t[n])})}function u(e){return Object.keys(e).some(function(e){return"content-type"===e.toLowerCase()})}function a(e,t){return function n(){t.readyState===t.DONE&&(t.removeEventListener("readystatechange",n,!1),e.always.apply(e,c(t)),t.status>=200&&t.status<300?e.then.apply(e,c(t)):e["catch"].apply(e,c(t)))}}function c(e){var t;try{t=JSON.parse(e.responseText)}catch(n){t=e.responseText}return[t,e]}function i(e){return s(e)?f(e):e}function s(e){return"[object Object]"===Object.prototype.toString.call(e)}function f(e,t){return Object.keys(e).map(function(n){if(e.hasOwnProperty(n)&&void 0!==e[n]){var r=e[n];return n=t?t+"["+n+"]":n,null!==r&&"object"==typeof r?f(r,n):p(n)+"="+p(r)}}).filter(Boolean).join("&")}function p(e){return encodeURIComponent(e)}return e})},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _BaseControl2=__webpack_require__(0);var _BaseControl3=_interopRequireDefault(_BaseControl2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Select=function(_BaseControl){_inherits(Select,_BaseControl);function Select(element,rootContainer,parentContainer){_classCallCheck(this,Select);var _this=_possibleConstructorReturn(this,(Select.__proto__||Object.getPrototypeOf(Select)).call(this,element,rootContainer,parentContainer));_this.select=element.querySelector("select");if(!_this.select){throw new Error("Select element is missing. Select control should contain a select element")}if(window.jQuery&&window.jQuery.fn.select2&&_this.element.getAttribute("data-select2")==="true"){_this.select2=window.jQuery(_this.select).select2();_this.isSelect2=true;_this.select2.on("change",function(){return _this.internalSetValue(_this.select.value)})}else{_this.select.addEventListener("change",function(){return _this.internalSetValue(_this.select.value)})}_this.update();return _this}_createClass(Select,[{key:"update",value:function update(){this.select.value=this._value;if(this.isSelect2){window.jQuery(this.select).trigger("change.select2")}}}]);return Select}(_BaseControl3.default);exports.default=Select},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _BaseControl2=__webpack_require__(0);var _BaseControl3=_interopRequireDefault(_BaseControl2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Slider=function(_BaseControl){_inherits(Slider,_BaseControl);function Slider(element,rootContainer,parentContainer){_classCallCheck(this,Slider);var _this=_possibleConstructorReturn(this,(Slider.__proto__||Object.getPrototypeOf(Slider)).call(this,element,rootContainer,parentContainer));_this.numInput=_this.element.querySelector('input[type="number"]');if(!_this.numInput){throw new Error("Number input element is missing. Every slider control should contain one number input element.")}_this.numInput.value=_this._value;_this.numInput.addEventListener("change",function(){var value=_this.numInput.value;value=parseFloat(value);_this.internalSetValue(value);if(_this.sliderUI){_this.sliderUI.slider("option","value",value)}});if(window.jQuery&&window.jQuery.fn.slider){var sliderElement=document.createElement("div");var _this$numInput=_this.numInput,min=_this$numInput.min,max=_this$numInput.max,step=_this$numInput.step;_this.sliderUI=window.jQuery(sliderElement).slider({min:parseFloat(min),max:parseFloat(max),step:parseFloat(step),value:_this._value});_this.element.appendChild(sliderElement);_this.sliderUI.on("slide",function(e,ui){var value=ui.value;if(_this._value!==value){_this._lastValue=value;_this.numInput.value=value;_this.internalSetValue(value)}})}return _this}_createClass(Slider,[{key:"update",value:function update(){this.numInput.value=this._value;if(this.sliderUI){this.sliderUI.slider("option","value",this._value)}}}]);return Slider}(_BaseControl3.default);exports.default=Slider},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _cloneDeep=__webpack_require__(37);var _cloneDeep2=_interopRequireDefault(_cloneDeep);var _BaseControl2=__webpack_require__(0);var _BaseControl3=_interopRequireDefault(_BaseControl2);var _Container=__webpack_require__(9);var _Container2=_interopRequireDefault(_Container);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var popoverControls={};var has=Object.prototype.hasOwnProperty;var Popover=function(_BaseControl){_inherits(Popover,_BaseControl);function Popover(element,rootContainer,parentContainer){_classCallCheck(this,Popover);var _this=_possibleConstructorReturn(this,(Popover.__proto__||Object.getPrototypeOf(Popover)).call(this,element,rootContainer,parentContainer));_this.templateId=_this.element.getAttribute("data-template");if(!_this.templateId){throw new Error("Template ID is missing.")}_this.template=document.getElementById(_this.element.getAttribute("data-template"));if(!_this.template){throw new Error('The template "'+_this.templateId+'" is missing in the page.')}if(!has.call(popoverControls,_this.templateId)){popoverControls[_this.templateId]=new _Container2.default(_this.template,rootContainer,parentContainer)}_this.popoverContainer=popoverControls[_this.templateId];_this._value=(0,_cloneDeep2.default)(_this.popoverContainer.value);_this._defaultValue=_this._value;_this.popoverCSS="";_this.element.addEventListener("click",_this.openPopover.bind(_this));document.addEventListener("click",_this.closePopover.bind(_this));return _this}_createClass(Popover,[{key:"reset",value:function reset(){var emitChange=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;this.element.classList.remove("aux-popover-changed");this.popoverContainer.reset(false);this.internalSetValue((0,_cloneDeep2.default)(this.popoverContainer.value),emitChange,true);this.hasDefaultValue=true}},{key:"locatePopover",value:function locatePopover(){var localRect=this.element.getBoundingClientRect();if(this.container){var containerRect=this.container.getBoundingClientRect();this.template.style.top=this.container.scrollTop+localRect.bottom-containerRect.top+"px";this.template.style.left=this.container.scrollLeft+localRect.left-containerRect.left+"px"}else{this.template.style.top=localRect.bottom+window.scrollY+"px";this.template.style.left=localRect.left+window.scrollX+"px"}}},{key:"openPopover",value:function openPopover(event){var _this2=this;this.popoverContainer._value=(0,_cloneDeep2.default)(this._value);this.popoverContainer.parentContainer=this.parentContainer;this.popoverContainer.rootContainer=this.rootContainer;this.popoverContainer.selector=this.popoverContainer.defineSelector();this.popoverContainer.onchange=null;this.popoverContainer.update();this.generateCSS();this.templateContainer=this.element.getAttribute("data-container");this.popoverContainer.onchange=function(){if(_this2.suppressChangeEvent){return}if(!_this2.element.classList.contains("aux-popover-changed")){_this2.element.classList.add("aux-popover-changed")}_this2.hasDefaultValue=false;_this2.internalSetValue((0,_cloneDeep2.default)(_this2.popoverContainer.value),true,true)};if(this.templateContainer){this.container=document.querySelector(this.templateContainer);if(!this.container){throw new Error('The container of template "'+this.templateId+'" is missing in the page.')}if(this.template.parentNode!==this.container){this.container.appendChild(this.template)}}if(this.template.classList.contains("aux-is-open")){this.template.classList.remove("aux-is-open");event.preventDefault();return}this.locatePopover();event.preventDefault();event.stopImmediatePropagation();this.template.classList.remove("aux-is-open");setTimeout(function(){_this2.template.classList.add("aux-is-open")},1);var openEvent=document.createEvent("HTMLEvents");openEvent.initEvent("PopOverIsOpen",false,true);this.template.dispatchEvent(openEvent)}},{key:"closePopover",value:function closePopover(event){var select2=this.template.querySelector(".select2-container");if(event.target.closest("#"+this.templateId)||select2&&event.target.closest("."+"select2-container")){return}this.template.classList.remove("aux-is-open");var closeEvent=document.createEvent("HTMLEvents");closeEvent.initEvent("PopOverIsClosed",false,true);this.template.dispatchEvent(closeEvent)}},{key:"generateCSS",value:function generateCSS(){var _popoverContainer=this.popoverContainer,parentContainer=_popoverContainer.parentContainer,rootContainer=_popoverContainer.rootContainer,selector=_popoverContainer.selector,_value=_popoverContainer._value,onchange=_popoverContainer.onchange;this.popoverContainer.parentContainer=this.parentContainer;this.popoverContainer.rootContainer=this.rootContainer;this.popoverContainer.selector=this.popoverContainer.defineSelector();this.popoverContainer._value=(0,_cloneDeep2.default)(this._value);this.popoverContainer.onchange=null;this.popoverContainer.update();var controlValue=(0,_cloneDeep2.default)(this.popoverContainer.generateCSS());this.popoverContainer.parentContainer=parentContainer;this.popoverContainer.rootContainer=rootContainer;this.popoverContainer.selector=selector;this.popoverContainer._value=_value;this.popoverContainer.update();this.popoverContainer.onchange=onchange;if(!controlValue){return null}return _defineProperty({},this.uniqueID,controlValue[this.popoverContainer.uniqueID])}}]);return Popover}(_BaseControl3.default);exports.default=Popover},function(module,exports,__webpack_require__){var Stack=__webpack_require__(23),arrayEach=__webpack_require__(121),assignValue=__webpack_require__(58),baseAssign=__webpack_require__(123),baseAssignIn=__webpack_require__(124),cloneBuffer=__webpack_require__(127),copyArray=__webpack_require__(128),copySymbols=__webpack_require__(129),copySymbolsIn=__webpack_require__(130),getAllKeys=__webpack_require__(51),getAllKeysIn=__webpack_require__(131),getTag=__webpack_require__(18),initCloneArray=__webpack_require__(132),initCloneByTag=__webpack_require__(133),initCloneObject=__webpack_require__(138),isArray=__webpack_require__(1),isBuffer=__webpack_require__(30),isMap=__webpack_require__(140),isObject=__webpack_require__(4),isSet=__webpack_require__(142),keys=__webpack_require__(8),keysIn=__webpack_require__(38);var CLONE_DEEP_FLAG=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG=4;var argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",weakMapTag="[object WeakMap]";var arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[setTag]=cloneableTags[stringTag]=cloneableTags[symbolTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=true;cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=false;function baseClone(value,bitmask,customizer,key,object,stack){var result,isDeep=bitmask&CLONE_DEEP_FLAG,isFlat=bitmask&CLONE_FLAT_FLAG,isFull=bitmask&CLONE_SYMBOLS_FLAG;if(customizer){result=object?customizer(value,key,object,stack):customizer(value)}if(result!==undefined){return result}if(!isObject(value)){return value}var isArr=isArray(value);if(isArr){result=initCloneArray(value);if(!isDeep){return copyArray(value,result)}}else{var tag=getTag(value),isFunc=tag==funcTag||tag==genTag;if(isBuffer(value)){return cloneBuffer(value,isDeep)}if(tag==objectTag||tag==argsTag||isFunc&&!object){result=isFlat||isFunc?{}:initCloneObject(value);if(!isDeep){return isFlat?copySymbolsIn(value,baseAssignIn(result,value)):copySymbols(value,baseAssign(result,value))}}else{if(!cloneableTags[tag]){return object?value:{}}result=initCloneByTag(value,tag,isDeep)}}stack||(stack=new Stack);var stacked=stack.get(value);if(stacked){return stacked}stack.set(value,result);if(isSet(value)){value.forEach(function(subValue){result.add(baseClone(subValue,bitmask,customizer,subValue,value,stack))})}else if(isMap(value)){value.forEach(function(subValue,key){result.set(key,baseClone(subValue,bitmask,customizer,key,value,stack))})}var keysFunc=isFull?isFlat?getAllKeysIn:getAllKeys:isFlat?keysIn:keys;var props=isArr?undefined:keysFunc(value);arrayEach(props||value,function(subValue,key){if(props){key=subValue;subValue=value[key]}assignValue(result,key,baseClone(subValue,bitmask,customizer,key,value,stack))});return result}module.exports=baseClone},function(module,exports){function arrayEach(array,iteratee){var index=-1,length=array==null?0:array.length;while(++index<length){if(iteratee(array[index],index,array)===false){break}}return array}module.exports=arrayEach},function(module,exports,__webpack_require__){var getNative=__webpack_require__(3);var defineProperty=function(){try{var func=getNative(Object,"defineProperty");func({},"",{});return func}catch(e){}}();module.exports=defineProperty},function(module,exports,__webpack_require__){var copyObject=__webpack_require__(19),keys=__webpack_require__(8);function baseAssign(object,source){return object&&copyObject(source,keys(source),object)}module.exports=baseAssign},function(module,exports,__webpack_require__){var copyObject=__webpack_require__(19),keysIn=__webpack_require__(38);function baseAssignIn(object,source){return object&&copyObject(source,keysIn(source),object)}module.exports=baseAssignIn},function(module,exports,__webpack_require__){var isObject=__webpack_require__(4),isPrototype=__webpack_require__(36),nativeKeysIn=__webpack_require__(126);var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function baseKeysIn(object){if(!isObject(object)){return nativeKeysIn(object)}var isProto=isPrototype(object),result=[];for(var key in object){if(!(key=="constructor"&&(isProto||!hasOwnProperty.call(object,key)))){result.push(key)}}return result}module.exports=baseKeysIn},function(module,exports){function nativeKeysIn(object){var result=[];if(object!=null){for(var key in Object(object)){result.push(key)}}return result}module.exports=nativeKeysIn},function(module,exports,__webpack_require__){(function(module){var root=__webpack_require__(2);var freeExports=true&&exports&&!exports.nodeType&&exports;var freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module;var moduleExports=freeModule&&freeModule.exports===freeExports;var Buffer=moduleExports?root.Buffer:undefined,allocUnsafe=Buffer?Buffer.allocUnsafe:undefined;function cloneBuffer(buffer,isDeep){if(isDeep){return buffer.slice()}var length=buffer.length,result=allocUnsafe?allocUnsafe(length):new buffer.constructor(length);buffer.copy(result);return result}module.exports=cloneBuffer}).call(this,__webpack_require__(31)(module))},function(module,exports){function copyArray(source,array){var index=-1,length=source.length;array||(array=Array(length));while(++index<length){array[index]=source[index]}return array}module.exports=copyArray},function(module,exports,__webpack_require__){var copyObject=__webpack_require__(19),getSymbols=__webpack_require__(28);function copySymbols(source,object){return copyObject(source,getSymbols(source),object)}module.exports=copySymbols},function(module,exports,__webpack_require__){var copyObject=__webpack_require__(19),getSymbolsIn=__webpack_require__(60);function copySymbolsIn(source,object){return copyObject(source,getSymbolsIn(source),object)}module.exports=copySymbolsIn},function(module,exports,__webpack_require__){var baseGetAllKeys=__webpack_require__(52),getSymbolsIn=__webpack_require__(60),keysIn=__webpack_require__(38);function getAllKeysIn(object){return baseGetAllKeys(object,keysIn,getSymbolsIn)}module.exports=getAllKeysIn},function(module,exports){var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function initCloneArray(array){var length=array.length,result=new array.constructor(length);if(length&&typeof array[0]=="string"&&hasOwnProperty.call(array,"index")){result.index=array.index;result.input=array.input}return result}module.exports=initCloneArray},function(module,exports,__webpack_require__){var cloneArrayBuffer=__webpack_require__(39),cloneDataView=__webpack_require__(134),cloneRegExp=__webpack_require__(135),cloneSymbol=__webpack_require__(136),cloneTypedArray=__webpack_require__(137);var boolTag="[object Boolean]",dateTag="[object Date]",mapTag="[object Map]",numberTag="[object Number]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]";var arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";function initCloneByTag(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return cloneArrayBuffer(object);case boolTag:case dateTag:return new Ctor(+object);case dataViewTag:return cloneDataView(object,isDeep);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:return cloneTypedArray(object,isDeep);case mapTag:return new Ctor;case numberTag:case stringTag:return new Ctor(object);case regexpTag:return cloneRegExp(object);case setTag:return new Ctor;case symbolTag:return cloneSymbol(object)}}module.exports=initCloneByTag},function(module,exports,__webpack_require__){var cloneArrayBuffer=__webpack_require__(39);function cloneDataView(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength)}module.exports=cloneDataView},function(module,exports){var reFlags=/\w*$/;function cloneRegExp(regexp){var result=new regexp.constructor(regexp.source,reFlags.exec(regexp));result.lastIndex=regexp.lastIndex;return result}module.exports=cloneRegExp},function(module,exports,__webpack_require__){var Symbol=__webpack_require__(6);var symbolProto=Symbol?Symbol.prototype:undefined,symbolValueOf=symbolProto?symbolProto.valueOf:undefined;function cloneSymbol(symbol){return symbolValueOf?Object(symbolValueOf.call(symbol)):{}}module.exports=cloneSymbol},function(module,exports,__webpack_require__){var cloneArrayBuffer=__webpack_require__(39);function cloneTypedArray(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length)}module.exports=cloneTypedArray},function(module,exports,__webpack_require__){var baseCreate=__webpack_require__(139),getPrototype=__webpack_require__(61),isPrototype=__webpack_require__(36);function initCloneObject(object){return typeof object.constructor=="function"&&!isPrototype(object)?baseCreate(getPrototype(object)):{}}module.exports=initCloneObject},function(module,exports,__webpack_require__){var isObject=__webpack_require__(4);var objectCreate=Object.create;var baseCreate=function(){function object(){}return function(proto){if(!isObject(proto)){return{}}if(objectCreate){return objectCreate(proto)}object.prototype=proto;var result=new object;object.prototype=undefined;return result}}();module.exports=baseCreate},function(module,exports,__webpack_require__){var baseIsMap=__webpack_require__(141),baseUnary=__webpack_require__(34),nodeUtil=__webpack_require__(35);var nodeIsMap=nodeUtil&&nodeUtil.isMap;var isMap=nodeIsMap?baseUnary(nodeIsMap):baseIsMap;module.exports=isMap},function(module,exports,__webpack_require__){var getTag=__webpack_require__(18),isObjectLike=__webpack_require__(5);var mapTag="[object Map]";function baseIsMap(value){return isObjectLike(value)&&getTag(value)==mapTag}module.exports=baseIsMap},function(module,exports,__webpack_require__){var baseIsSet=__webpack_require__(143),baseUnary=__webpack_require__(34),nodeUtil=__webpack_require__(35);var nodeIsSet=nodeUtil&&nodeUtil.isSet;var isSet=nodeIsSet?baseUnary(nodeIsSet):baseIsSet;module.exports=isSet},function(module,exports,__webpack_require__){var getTag=__webpack_require__(18),isObjectLike=__webpack_require__(5);var setTag="[object Set]";function baseIsSet(value){return isObjectLike(value)&&getTag(value)==setTag}module.exports=baseIsSet},function(module,exports,__webpack_require__){var baseFlatten=__webpack_require__(145);function flatten(array){var length=array==null?0:array.length;return length?baseFlatten(array,1):[]}module.exports=flatten},function(module,exports,__webpack_require__){var arrayPush=__webpack_require__(27),isFlattenable=__webpack_require__(146);function baseFlatten(array,depth,predicate,isStrict,result){var index=-1,length=array.length;predicate||(predicate=isFlattenable);result||(result=[]);while(++index<length){var value=array[index];if(depth>0&&predicate(value)){if(depth>1){baseFlatten(value,depth-1,predicate,isStrict,result)}else{arrayPush(result,value)}}else if(!isStrict){result[result.length]=value}}return result}module.exports=baseFlatten},function(module,exports,__webpack_require__){var Symbol=__webpack_require__(6),isArguments=__webpack_require__(29),isArray=__webpack_require__(1);var spreadableSymbol=Symbol?Symbol.isConcatSpreadable:undefined;function isFlattenable(value){return isArray(value)||isArguments(value)||!!(spreadableSymbol&&value&&value[spreadableSymbol])}module.exports=isFlattenable},function(module,exports,__webpack_require__){var baseUniq=__webpack_require__(148);function uniq(array){return array&&array.length?baseUniq(array):[]}module.exports=uniq},function(module,exports,__webpack_require__){var SetCache=__webpack_require__(47),arrayIncludes=__webpack_require__(149),arrayIncludesWith=__webpack_require__(154),cacheHas=__webpack_require__(49),createSet=__webpack_require__(155),setToArray=__webpack_require__(26);var LARGE_ARRAY_SIZE=200;function baseUniq(array,iteratee,comparator){var index=-1,includes=arrayIncludes,length=array.length,isCommon=true,result=[],seen=result;if(comparator){isCommon=false;includes=arrayIncludesWith}else if(length>=LARGE_ARRAY_SIZE){var set=iteratee?null:createSet(array);if(set){return setToArray(set)}isCommon=false;includes=cacheHas;seen=new SetCache}else{seen=iteratee?[]:result}outer:while(++index<length){var value=array[index],computed=iteratee?iteratee(value):value;value=comparator||value!==0?value:0;if(isCommon&&computed===computed){var seenIndex=seen.length;while(seenIndex--){if(seen[seenIndex]===computed){continue outer}}if(iteratee){seen.push(computed)}result.push(value)}else if(!includes(seen,computed,comparator)){if(seen!==result){seen.push(computed)}result.push(value)}}return result}module.exports=baseUniq},function(module,exports,__webpack_require__){var baseIndexOf=__webpack_require__(150);function arrayIncludes(array,value){var length=array==null?0:array.length;return!!length&&baseIndexOf(array,value,0)>-1}module.exports=arrayIncludes},function(module,exports,__webpack_require__){var baseFindIndex=__webpack_require__(151),baseIsNaN=__webpack_require__(152),strictIndexOf=__webpack_require__(153);function baseIndexOf(array,value,fromIndex){return value===value?strictIndexOf(array,value,fromIndex):baseFindIndex(array,baseIsNaN,fromIndex)}module.exports=baseIndexOf},function(module,exports){function baseFindIndex(array,predicate,fromIndex,fromRight){var length=array.length,index=fromIndex+(fromRight?1:-1);while(fromRight?index--:++index<length){if(predicate(array[index],index,array)){return index}}return-1}module.exports=baseFindIndex},function(module,exports){function baseIsNaN(value){return value!==value}module.exports=baseIsNaN},function(module,exports){function strictIndexOf(array,value,fromIndex){var index=fromIndex-1,length=array.length;while(++index<length){if(array[index]===value){return index}}return-1}module.exports=strictIndexOf},function(module,exports){function arrayIncludesWith(array,value,comparator){var index=-1,length=array==null?0:array.length;while(++index<length){if(comparator(value,array[index])){return true}}return false}module.exports=arrayIncludesWith},function(module,exports,__webpack_require__){var Set=__webpack_require__(57),noop=__webpack_require__(156),setToArray=__webpack_require__(26);var INFINITY=1/0;var createSet=!(Set&&1/setToArray(new Set([,-0]))[1]==INFINITY)?noop:function(values){return new Set(values)};module.exports=createSet},function(module,exports){function noop(){}module.exports=noop},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default={classNames:{control:"aux-control"}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _BaseControl2=__webpack_require__(0);var _BaseControl3=_interopRequireDefault(_BaseControl2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Color=function(_BaseControl){_inherits(Color,_BaseControl);function Color(element,rootContainer,parentContainer){_classCallCheck(this,Color);var _this=_possibleConstructorReturn(this,(Color.__proto__||Object.getPrototypeOf(Color)).call(this,element,rootContainer,parentContainer));_this.colorInput=_this.element.querySelector('input[type="text"]');if(!_this.colorInput){throw new Error("Color input element is missing. Every color control should contain one color input element.")}_this.colorInput.value=_this._value;_this.colorInput.addEventListener("change",function(){var value=_this.colorInput.value;_this.internalSetValue(value);if(_this.spectrumUI){_this.spectrumUI.spectrum("set",_this._value)}});if(window.jQuery&&window.jQuery.fn.spectrum){_this.spectrumUI=window.jQuery(_this.colorInput).spectrum({value:_this._value,preferredFormat:"rgb",showAlpha:true,allowEmpty:true,showInput:true,disabled:false,showSelectionPalette:true,showPalette:true,hideAfterPaletteSelect:true,palette:[["black","white"," "]],clickoutFiresChange:true,showInitial:true,change:function change(color){var colorValue=void 0;if(!color){colorValue=""}else{colorValue=color.toRgbString()}if(_this._value!==colorValue){_this._lastValue=colorValue;_this.colorInput.value=colorValue;_this.internalSetValue(colorValue)}}})}return _this}_createClass(Color,[{key:"update",value:function update(){this.colorInput.value=this._value;if(this.spectrumUI){this.spectrumUI.spectrum("set",this._value)}}}]);return Color}(_BaseControl3.default);exports.default=Color},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _get=function get(object,property,receiver){if(object===null)object=Function.prototype;var desc=Object.getOwnPropertyDescriptor(object,property);if(desc===undefined){var parent=Object.getPrototypeOf(object);if(parent===null){return undefined}else{return get(parent,property,receiver)}}else if("value"in desc){return desc.value}else{var getter=desc.get;if(getter===undefined){return undefined}return getter.call(receiver)}};var _isEqual=__webpack_require__(21);var _isEqual2=_interopRequireDefault(_isEqual);var _BaseControl2=__webpack_require__(0);var _BaseControl3=_interopRequireDefault(_BaseControl2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Dimension=function(_BaseControl){_inherits(Dimension,_BaseControl);function Dimension(element,rootContainer,parentContainer){_classCallCheck(this,Dimension);var _this=_possibleConstructorReturn(this,(Dimension.__proto__||Object.getPrototypeOf(Dimension)).call(this,element,rootContainer,parentContainer));_this.finalValue=[];_this.dimensionInputs=_this.element.querySelectorAll('input[type="number"]');var oldDefaultValue=_this._defaultValue;_this._defaultValue={};_this.isLinked=true;_this.dimensionInputs.forEach(function(input){var sideName=input.getAttribute("data-side-name");_this._defaultValue[sideName]=oldDefaultValue;input.value=oldDefaultValue});_this._defaultValue.isLinked=true;if(!_this.dimensionInputs||_this.dimensionInputs.length<4){throw new Error("Number input element is missing or the number of number inputs is less than 4, Every Dimension control should contain four number input elements.")}_this.linkValuesButton=_this.element.querySelector("button");if(!_this.linkValuesButton){throw new Error("Button element is missing. Every dimension control should contain one button element.")}_this.linkValuesButton.addEventListener("click",_this.linkValuesHandler.bind(_this));_this.inputValuesHandler=_this.inputValuesHandler.bind(_this);_this.dimensionInputs.forEach(function(inputElement){inputElement.addEventListener("change",_this.inputValuesHandler)});_this.populateValue();_this.hasDefaultValue=true;return _this}_createClass(Dimension,[{key:"populateValue",value:function populateValue(){var finalValue={};this.dimensionInputs.forEach(function(input){var sideName=input.getAttribute("data-side-name");finalValue[sideName]=input.value});finalValue.isLinked=this.isLinked;this.hasDefaultValue=false;this.internalSetValue(finalValue)}},{key:"linkValuesHandler",value:function linkValuesHandler(event){event.preventDefault();this.isLinked=!this.isLinked;if(this.isLinked){this.linkValuesButton.classList.add("aux-is-active")}else{this.linkValuesButton.classList.remove("aux-is-active");this.dimensionInputs.forEach(function(input){input.value="0"})}this.populateValue()}},{key:"inputValuesHandler",value:function inputValuesHandler(event){if(this.isLinked){this.dimensionInputs.forEach(function(input){if(event.target.value===""){input.value=""}else{input.value=event.target.value}})}this.populateValue()}},{key:"update",value:function update(){var _this2=this;Object.keys(this._value).forEach(function(key){_this2.dimensionInputs.forEach(function(input){if(input.getAttribute("data-side-name")===key){input.value=_this2._value[key]}})});if(Object.hasOwnProperty.call(this._value,"isLinked")){this.isLinked=this._value.isLinked;if(this.isLinked){this.linkValuesButton.classList.add("aux-is-active")}}}},{key:"reset",value:function reset(){var emitChange=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;this.isLinked=true;this.hasDefaultValue=true;_get(Dimension.prototype.__proto__||Object.getPrototypeOf(Dimension.prototype),"reset",this).call(this,emitChange)}},{key:"generateCSS",value:function generateCSS(){var _this3=this;var emitProperty=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;var cssValue="";Object.keys(this._value).forEach(function(sideName){if(sideName!=="isLinked"){cssValue+=_this3.middlewares.reduce(function(val,mw){return mw.generateCSS(val)},_this3._value[sideName])+" "}});if((0,_isEqual2.default)(this._value,this._defaultValue)&&!this.styleTemplate){this.cssValue="";return this.cssValue}if(this.styleTemplate){this.cssValue=this.replaceCSS(this.styleTemplate,this._value)}else{this.cssValue=emitProperty?this.name+": "+cssValue+";":""+cssValue}return _defineProperty({},this.uniqueID,this.cssValue)}},{key:"replaceCSS",value:function replaceCSS(template,value){var _this4=this;var regex=/{{PROPERTY}}|{{TOP}}|{{RIGHT}}|{{BOTTOM}}|{{LEFT}}|{{UNIT}}/gi;var finalString=template.replace(regex,function(match,offset,string){switch(match){case"{{PROPERTY}}":return _this4.name;case"{{TOP}}":return value.top;case"{{RIGHT}}":return value.right;case"{{BOTTOM}}":return value.bottom;case"{{LEFT}}":return value.left;case"{{UNIT}}":return _this4.middlewares.reduce(function(val,mw){return mw.get(val)},value).unit;default:return string}});return finalString}}]);return Dimension}(_BaseControl3.default);exports.default=Dimension},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _BaseControl2=__webpack_require__(0);var _BaseControl3=_interopRequireDefault(_BaseControl2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Text=function(_BaseControl){_inherits(Text,_BaseControl);function Text(element,rootContainer,parentContainer){_classCallCheck(this,Text);var _this=_possibleConstructorReturn(this,(Text.__proto__||Object.getPrototypeOf(Text)).call(this,element,rootContainer,parentContainer));_this.textInput=_this.element.querySelector('input[type="text"]');if(!_this.textInput){throw new Error("Text input element is missing. Every text control should contain one text input element.")}_this.textInput.value=_this._value;_this.textInput.addEventListener("change",function(){var value=_this.textInput.value;_this.internalSetValue(value)});return _this}_createClass(Text,[{key:"update",value:function update(){this.textInput.value=this._value}}]);return Text}(_BaseControl3.default);exports.default=Text},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _cloneDeep=__webpack_require__(37);var _cloneDeep2=_interopRequireDefault(_cloneDeep);var _BaseControl2=__webpack_require__(0);var _BaseControl3=_interopRequireDefault(_BaseControl2);var _Choose=__webpack_require__(11);var _Choose2=_interopRequireDefault(_Choose);var _controlFactory=__webpack_require__(10);var _controlFactory2=_interopRequireDefault(_controlFactory);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var activeBreakPoint=null;var instances=[];var Responsive=function(_BaseControl){_inherits(Responsive,_BaseControl);function Responsive(element,rootContainer,parentContainer){_classCallCheck(this,Responsive);var _this=_possibleConstructorReturn(this,(Responsive.__proto__||Object.getPrototypeOf(Responsive)).call(this,element,rootContainer,parentContainer));instances.push(_this);var devicesElement=_this.element.querySelector(".aux-devices");if(!devicesElement){throw new Error("Devices control element not found inside the responsive control. It should specifies by `.aux-devices`")}_this.devices=new _Choose2.default(devicesElement);_this.devices.onchange=function(){return _this.update()};var controlElement=_this.element.querySelector(".aux-control");if(!controlElement){throw new Error("Inner control element not found inside the responsive control. It should specifies by `.aux-inner-control`")}_this.control=(0,_controlFactory2.default)(controlElement,rootContainer,parentContainer);_this._value={desktop:_this.control.value};_this.control.onchange=function(){_this._value[_this.devices.value]=(0,_cloneDeep2.default)(_this.control.value);_this.hasDefaultValue=_this.devices.hasDefaultValue&&_this.control.hasDefaultValue;_this.onchange();_this.generateCSS()};_this.cssValue={};return _this}_createClass(Responsive,[{key:"syncBreakPoint",value:function syncBreakPoint(){if(this.devices.value!==activeBreakPoint){this.devices.value=activeBreakPoint;this.update()}}},{key:"update",value:function update(){var _this2=this;activeBreakPoint=this.devices.value;this.hasDefaultValue=this.devices.hasDefaultValue&&this.control.hasDefaultValue;instances.forEach(function(ins){ins.syncBreakPoint()});Object.keys(this._value).forEach(function(breakPoint){_this2.control.value=(0,_cloneDeep2.default)(_this2._value[breakPoint]);_this2.cssValue[breakPoint]=_this2.control.generateCSS()});if(Object.hasOwnProperty.call(this._value,this.devices.value)){this.control.value=(0,_cloneDeep2.default)(this._value[this.devices.value])}else{this.control.value=(0,_cloneDeep2.default)(this._value.desktop)}}},{key:"reset",value:function reset(){var _this3=this;var emitChange=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;this.devices.reset(false);this.control.reset(emitChange);this._value[this.devices.value]=this.control.value;Object.keys(this._value).forEach(function(key){if(key!==_this3.devices._defaultValue){delete _this3._value[key];delete _this3.cssValue[key]}});this.hasDefaultValue=true}},{key:"generateCSS",value:function generateCSS(){var deviceValue=this.devices.value;if(!Object.hasOwnProperty.call(this.cssValue,deviceValue)){this.cssValue[deviceValue]={}}var controlValue=this.control.generateCSS();if(!controlValue){return null}this.cssValue[deviceValue]=(0,_cloneDeep2.default)(controlValue);return _defineProperty({},this.uniqueID,this.cssValue)}}]);return Responsive}(_BaseControl3.default);exports.default=Responsive},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _some2=__webpack_require__(163);var _some3=_interopRequireDefault(_some2);var _has2=__webpack_require__(189);var _has3=_interopRequireDefault(_has2);var _isEqual=__webpack_require__(21);var _isEqual2=_interopRequireDefault(_isEqual);var _cloneDeep=__webpack_require__(37);var _cloneDeep2=_interopRequireDefault(_cloneDeep);var _BaseControl2=__webpack_require__(0);var _BaseControl3=_interopRequireDefault(_BaseControl2);var _Choose=__webpack_require__(11);var _Choose2=_interopRequireDefault(_Choose);var _controlFactory=__webpack_require__(10);var _controlFactory2=_interopRequireDefault(_controlFactory);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Hover=function(_BaseControl){_inherits(Hover,_BaseControl);function Hover(element,rootContainer,parentContainer){_classCallCheck(this,Hover);var _this=_possibleConstructorReturn(this,(Hover.__proto__||Object.getPrototypeOf(Hover)).call(this,element,rootContainer,parentContainer));var devicesElement=_this.element.querySelector(".aux-states");if(!devicesElement){throw new Error("States control element not found inside the hover control. It should specifies by `.aux-states`")}_this.states=new _Choose2.default(devicesElement);_this.states.onchange=function(){return _this.update()};var controlElement=_this.element.querySelector(".aux-control");if(!controlElement){throw new Error("Inner control element not found inside the hover control. It should specifies by `.aux-control`")}_this.control=(0,_controlFactory2.default)(controlElement,rootContainer,parentContainer);_this._value={normal:_this.control.value};_this.control.onchange=function(){_this._value[_this.states.value]=(0,_cloneDeep2.default)(_this.control.value);_this.hasDefaultValue=_this.states.hasDefaultValue&&_this.control.hasDefaultValue;_this.onchange();_this.generateCSS()};_this.cssValue={};return _this}_createClass(Hover,[{key:"update",value:function update(){var _this2=this;this.hasDefaultValue=this.states.hasDefaultValue&&this.control.hasDefaultValue;Object.keys(this._value).forEach(function(state){_this2.control.value=(0,_cloneDeep2.default)(_this2._value[state]);_this2.cssValue[state]=_this2.control.generateCSS()});if(Object.hasOwnProperty.call(this._value,this.states.value)){this.control.value=(0,_cloneDeep2.default)(this._value[this.states.value])}else{this.control.value=this.control._defaultValue}if(!Object.hasOwnProperty.call(this.rootContainer._value,this.name)){var controlValue=(0,_cloneDeep2.default)(this.rootContainer._value[this.control.name]);if(!(0,_isEqual2.default)(controlValue,this.control._value)&&Object.hasOwnProperty.call(this.rootContainer._value,this.control.name)){this.control.value=controlValue;this._value.normal=this.control.value;delete this.rootContainer._value[this.control.name];this.internalSetValue(this._value,true,true)}}}},{key:"reset",value:function reset(){var _this3=this;var emitChange=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;this.states.reset(false);this.control.reset(emitChange);this._value[this.states.value]=this.control.value;Object.keys(this._value).forEach(function(key){if(key!==_this3.states._defaultValue){delete _this3._value[key];delete _this3.cssValue[key]}});this.hasDefaultValue=true}},{key:"generateCSS",value:function generateCSS(){var state=this.states.value;if(!Object.hasOwnProperty.call(this.cssValue,state)){this.cssValue[state]={}}var controlValue=this.control.generateCSS();if(!controlValue){return null}this.cssValue[state]=(0,_cloneDeep2.default)(controlValue);return _defineProperty({},this.uniqueID,this.cssValue)}},{key:"deepCheck",value:function deepCheck(source,object){return(0,_some3.default)(source,function(value){return(0,_has3.default)(value,object)})}}]);return Hover}(_BaseControl3.default);exports.default=Hover},function(module,exports,__webpack_require__){var arraySome=__webpack_require__(48),baseIteratee=__webpack_require__(164),baseSome=__webpack_require__(182),isArray=__webpack_require__(1),isIterateeCall=__webpack_require__(188);function some(collection,predicate,guard){var func=isArray(collection)?arraySome:baseSome;if(guard&&isIterateeCall(collection,predicate,guard)){predicate=undefined}return func(collection,baseIteratee(predicate,3))}module.exports=some},function(module,exports,__webpack_require__){var baseMatches=__webpack_require__(165),baseMatchesProperty=__webpack_require__(168),identity=__webpack_require__(178),isArray=__webpack_require__(1),property=__webpack_require__(179);function baseIteratee(value){if(typeof value=="function"){return value}if(value==null){return identity}if(typeof value=="object"){return isArray(value)?baseMatchesProperty(value[0],value[1]):baseMatches(value)}return property(value)}module.exports=baseIteratee},function(module,exports,__webpack_require__){var baseIsMatch=__webpack_require__(166),getMatchData=__webpack_require__(167),matchesStrictComparable=__webpack_require__(63);function baseMatches(source){var matchData=getMatchData(source);if(matchData.length==1&&matchData[0][2]){return matchesStrictComparable(matchData[0][0],matchData[0][1])}return function(object){return object===source||baseIsMatch(object,source,matchData)}}module.exports=baseMatches},function(module,exports,__webpack_require__){var Stack=__webpack_require__(23),baseIsEqual=__webpack_require__(22);var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function baseIsMatch(object,source,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(object==null){return!length}object=Object(object);while(index--){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object)){return false}}while(++index<length){data=matchData[index];var key=data[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(objValue===undefined&&!(key in object)){return false}}else{var stack=new Stack;if(customizer){var result=customizer(objValue,srcValue,key,object,source,stack)}if(!(result===undefined?baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG,customizer,stack):result)){return false}}}return true}module.exports=baseIsMatch},function(module,exports,__webpack_require__){var isStrictComparable=__webpack_require__(62),keys=__webpack_require__(8);function getMatchData(object){var result=keys(object),length=result.length;while(length--){var key=result[length],value=object[key];result[length]=[key,value,isStrictComparable(value)]}return result}module.exports=getMatchData},function(module,exports,__webpack_require__){var baseIsEqual=__webpack_require__(22),get=__webpack_require__(169),hasIn=__webpack_require__(176),isKey=__webpack_require__(40),isStrictComparable=__webpack_require__(62),matchesStrictComparable=__webpack_require__(63),toKey=__webpack_require__(20);var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function baseMatchesProperty(path,srcValue){if(isKey(path)&&isStrictComparable(srcValue)){return matchesStrictComparable(toKey(path),srcValue)}return function(object){var objValue=get(object,path);return objValue===undefined&&objValue===srcValue?hasIn(object,path):baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}module.exports=baseMatchesProperty},function(module,exports,__webpack_require__){var baseGet=__webpack_require__(64);function get(object,path,defaultValue){var result=object==null?undefined:baseGet(object,path);return result===undefined?defaultValue:result}module.exports=get},function(module,exports,__webpack_require__){var memoizeCapped=__webpack_require__(171);var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var reEscapeChar=/\\(\\)?/g;var stringToPath=memoizeCapped(function(string){var result=[];if(string.charCodeAt(0)===46){result.push("")}string.replace(rePropName,function(match,number,quote,subString){result.push(quote?subString.replace(reEscapeChar,"$1"):number||match)});return result});module.exports=stringToPath},function(module,exports,__webpack_require__){var memoize=__webpack_require__(172);var MAX_MEMOIZE_SIZE=500;function memoizeCapped(func){var result=memoize(func,function(key){if(cache.size===MAX_MEMOIZE_SIZE){cache.clear()}return key});var cache=result.cache;return result}module.exports=memoizeCapped},function(module,exports,__webpack_require__){var MapCache=__webpack_require__(25);var FUNC_ERROR_TEXT="Expected a function";function memoize(func,resolver){if(typeof func!="function"||resolver!=null&&typeof resolver!="function"){throw new TypeError(FUNC_ERROR_TEXT)}var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key)){return cache.get(key)}var result=func.apply(this,args);memoized.cache=cache.set(key,result)||cache;return result};memoized.cache=new(memoize.Cache||MapCache);return memoized}memoize.Cache=MapCache;module.exports=memoize},function(module,exports,__webpack_require__){var baseToString=__webpack_require__(174);function toString(value){return value==null?"":baseToString(value)}module.exports=toString},function(module,exports,__webpack_require__){var Symbol=__webpack_require__(6),arrayMap=__webpack_require__(175),isArray=__webpack_require__(1),isSymbol=__webpack_require__(41);var INFINITY=1/0;var symbolProto=Symbol?Symbol.prototype:undefined,symbolToString=symbolProto?symbolProto.toString:undefined;function baseToString(value){if(typeof value=="string"){return value}if(isArray(value)){return arrayMap(value,baseToString)+""}if(isSymbol(value)){return symbolToString?symbolToString.call(value):""}var result=value+"";return result=="0"&&1/value==-INFINITY?"-0":result}module.exports=baseToString},function(module,exports){function arrayMap(array,iteratee){var index=-1,length=array==null?0:array.length,result=Array(length);while(++index<length){result[index]=iteratee(array[index],index,array)}return result}module.exports=arrayMap},function(module,exports,__webpack_require__){var baseHasIn=__webpack_require__(177),hasPath=__webpack_require__(66);function hasIn(object,path){return object!=null&&hasPath(object,path,baseHasIn)}module.exports=hasIn},function(module,exports){function baseHasIn(object,key){return object!=null&&key in Object(object)}module.exports=baseHasIn},function(module,exports){function identity(value){return value}module.exports=identity},function(module,exports,__webpack_require__){var baseProperty=__webpack_require__(180),basePropertyDeep=__webpack_require__(181),isKey=__webpack_require__(40),toKey=__webpack_require__(20);function property(path){return isKey(path)?baseProperty(toKey(path)):basePropertyDeep(path)}module.exports=property},function(module,exports){function baseProperty(key){return function(object){return object==null?undefined:object[key]}}module.exports=baseProperty},function(module,exports,__webpack_require__){var baseGet=__webpack_require__(64);function basePropertyDeep(path){return function(object){return baseGet(object,path)}}module.exports=basePropertyDeep},function(module,exports,__webpack_require__){var baseEach=__webpack_require__(183);function baseSome(collection,predicate){var result;baseEach(collection,function(value,index,collection){result=predicate(value,index,collection);return!result});return!!result}module.exports=baseSome},function(module,exports,__webpack_require__){var baseForOwn=__webpack_require__(184),createBaseEach=__webpack_require__(187);var baseEach=createBaseEach(baseForOwn);module.exports=baseEach},function(module,exports,__webpack_require__){var baseFor=__webpack_require__(185),keys=__webpack_require__(8);function baseForOwn(object,iteratee){return object&&baseFor(object,iteratee,keys)}module.exports=baseForOwn},function(module,exports,__webpack_require__){var createBaseFor=__webpack_require__(186);var baseFor=createBaseFor();module.exports=baseFor},function(module,exports){function createBaseFor(fromRight){return function(object,iteratee,keysFunc){var index=-1,iterable=Object(object),props=keysFunc(object),length=props.length;while(length--){var key=props[fromRight?length:++index];if(iteratee(iterable[key],key,iterable)===false){break}}return object}}module.exports=createBaseFor},function(module,exports,__webpack_require__){var isArrayLike=__webpack_require__(17);function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){if(collection==null){return collection}if(!isArrayLike(collection)){return eachFunc(collection,iteratee)}var length=collection.length,index=fromRight?length:-1,iterable=Object(collection);while(fromRight?index--:++index<length){if(iteratee(iterable[index],index,iterable)===false){break}}return collection}}module.exports=createBaseEach},function(module,exports,__webpack_require__){var eq=__webpack_require__(14),isArrayLike=__webpack_require__(17),isIndex=__webpack_require__(32),isObject=__webpack_require__(4);function isIterateeCall(value,index,object){if(!isObject(object)){return false}var type=typeof index;if(type=="number"?isArrayLike(object)&&isIndex(index,object.length):type=="string"&&index in object){return eq(object[index],value)}return false}module.exports=isIterateeCall},function(module,exports,__webpack_require__){var baseHas=__webpack_require__(190),hasPath=__webpack_require__(66);function has(object,path){return object!=null&&hasPath(object,path,baseHas)}module.exports=has},function(module,exports){var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function baseHas(object,key){return object!=null&&hasOwnProperty.call(object,key)}module.exports=baseHas},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _BaseControl2=__webpack_require__(0);var _BaseControl3=_interopRequireDefault(_BaseControl2);var _Container=__webpack_require__(9);var _Container2=_interopRequireDefault(_Container);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Repeater=function(_BaseControl){_inherits(Repeater,_BaseControl);function Repeater(element,rootContainer,parentContainer){_classCallCheck(this,Repeater);var _this=_possibleConstructorReturn(this,(Repeater.__proto__||Object.getPrototypeOf(Repeater)).call(this,element,rootContainer,parentContainer));_this._value={};_this.items=new Map;_this.item=_this.element.querySelector(".aux-repeater-item");if(!_this.item){throw new Error("The repeater template is missing in the page.")}_this.add=_this.element.querySelector(".aux-add");if(!_this.add){throw new Error("Add button element is missing. Every repeater control should contain add button element.")}_this.delete=_this.item.querySelector(".aux-delete");if(!_this.delete){throw new Error("Delete button element is missing. Every repeater item should contain add button element.")}_this.newItem=_this.item.cloneNode(true);_this.setupRepeater(_this.item,rootContainer,parentContainer);_this.add.addEventListener("click",_this.createItem.bind(_this));if(window.jQuery&&window.jQuery.fn.sortable){_this.sortableUI=window.jQuery(_this.element).sortable({items:".aux-repeater-item"})}_this.sortableUI.on("sortstop",function(event,ui){var id=parseInt(ui.item[0].getAttribute("data-id"),10);var lastIndex=ui.item.index();_this.sortMap(id,lastIndex);_this.items.get(id).onchange()});return _this}_createClass(Repeater,[{key:"createItem",value:function createItem(){var newItem=this.newItem.cloneNode(true);if(window.jQuery&&window.jQuery.fn.sortable){this.sortableUI.sortable("option","appendTo",newItem)}this.setupRepeater(newItem,this.rootContainer,this.parentContainer);this.element.appendChild(newItem);return newItem}},{key:"removeItem",value:function removeItem(id){var item=this.items.get(id);item.element.remove();this.items.delete(id);item.onchange()}},{key:"setupRepeater",value:function setupRepeater(item,rootContainer,parentContainer){var _this2=this;var itemContainer=new _Container2.default(item,rootContainer,parentContainer);item.setAttribute("data-id",itemContainer.uniqueID);this.items.set(itemContainer.uniqueID,itemContainer);var deleteButton=item.querySelector(".aux-delete");itemContainer.onchange=function(){_this2._value=_this2.getValue();_this2.internalSetValue(_this2._value,true,true)};deleteButton.addEventListener("click",this.removeItem.bind(this,itemContainer.uniqueID));itemContainer.onchange()}},{key:"getValue",value:function getValue(){var value=[];this.items.forEach(function(item){value.push(item.value)});return value}},{key:"sortMap",value:function sortMap(id,newIndex){var _this3=this;var mapArray=[];var targetArray=void 0;newIndex-=1;this.items.forEach(function(item,uniqueID){var itemArray=[uniqueID,item];mapArray.push(itemArray);if(id===uniqueID){targetArray=itemArray}});var currentIndex=mapArray.indexOf(targetArray);mapArray=mapArray.slice();mapArray.splice(newIndex<0?mapArray.length+newIndex:newIndex,0,mapArray.splice(currentIndex,1)[0]);this.items=new Map;mapArray.forEach(function(item){_this3.items.set(item[0],item[1])});return this.items}},{key:"update",value:function update(){var _this4=this;this._value.forEach(function(controlValue,index){if(!index){var id=parseInt(_this4.item.getAttribute("data-id"),10);_this4.items.get(id).value=controlValue}else{var newItem=_this4.createItem();var _id=parseInt(newItem.getAttribute("data-id"),10);_this4.items.get(_id).value=controlValue}})}},{key:"reset",value:function reset(){var _this5=this;var emitChange=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;var firstItemID=parseInt(this.item.getAttribute("data-id"),10);this.items.forEach(function(item,id){item.reset(false);if(id!==firstItemID){_this5.items.delete(id);item.element.remove()}})}}]);return Repeater}(_BaseControl3.default);exports.default=Repeater},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _BaseControl2=__webpack_require__(0);var _BaseControl3=_interopRequireDefault(_BaseControl2);var _Container=__webpack_require__(9);var _Container2=_interopRequireDefault(_Container);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var GlobalColorColor=function(_BaseControl){_inherits(GlobalColorColor,_BaseControl);function GlobalColorColor(element,rootContainer,parentContainer){_classCallCheck(this,GlobalColorColor);var _this=_possibleConstructorReturn(this,(GlobalColorColor.__proto__||Object.getPrototypeOf(GlobalColorColor)).call(this,element,rootContainer,parentContainer));_this.colorContainer=new _Container2.default(_this.element,rootContainer,parentContainer);_this.colorPicker=_this.colorContainer.controls.filter(function(ctrl){return ctrl.type==="color"})[0];_this.contextWrapper=_this.colorContainer.controls.filter(function(ctrl){return ctrl.type==="popover"})[0];_this.colorsMap={};_this.contextWrapper.popoverContainer.controls[0].options.forEach(function(color){var variable=color.getAttribute("data-value");var colorValue=color.getAttribute("data-color");_this.colorsMap[variable]=colorValue});_this.colorContainer.onchange=function(){var variable=_this.colorContainer.value.popover.variable;_this.colorPicker.value=_this.colorsMap[variable];_this.internalSetValue(variable,true,true);_this.contextWrapper.template.classList.remove("aux-is-open")};_this.colorPicker.onchange=function(){_this.internalSetValue(_this.colorPicker.value,true,true)};return _this}_createClass(GlobalColorColor,[{key:"update",value:function update(){var isVariableColor=void 0;if(this._value){isVariableColor=this._value.startsWith("var");this.colorPicker.value=isVariableColor?this.colorsMap[this._value]:this._value;this.contextWrapper.value={variable:isVariableColor?this._value:null}}else{this.colorPicker.value=null;this.contextWrapper.value={variable:null}}}}]);return GlobalColorColor}(_BaseControl3.default);exports.default=GlobalColorColor},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};var breakpoints={};var activeBreakpoint="desktop";var currentSelector="";var isHovered=false;var parse=function parse(CSSObj){Object.keys(CSSObj).forEach(function(id){var value=CSSObj[id];if(value.styles){currentSelector=value.selector;parse(value.styles)}else if(typeof value==="string"){if(!breakpoints[activeBreakpoint]){breakpoints[activeBreakpoint]={}}var selector=isHovered?currentSelector+":hover":currentSelector;if(!breakpoints[activeBreakpoint][selector]){breakpoints[activeBreakpoint][selector]=[]}breakpoints[activeBreakpoint][selector].push(value)}else if((typeof value==="undefined"?"undefined":_typeof(value))==="object"){if(value.desktop){Object.keys(value).forEach(function(breakpoint){activeBreakpoint=breakpoint;parse(value[breakpoint])})}else if(value.normal){Object.keys(value).forEach(function(state){isHovered=state==="hover";parse(value[state]);isHovered=false})}}})};var parseSelectors=function parseSelectors(styles){return Object.keys(styles).map(function(selector){return selector+" { "+styles[selector].join("\n")+" }"}).join("\n")};var ToCSS=function ToCSS(CSSObj){if(!CSSObj){return""}var css="";breakpoints={};activeBreakpoint="desktop";currentSelector="";isHovered=false;parse(CSSObj);Object.keys(breakpoints).reverse().forEach(function(query){if(query==="desktop"){css+="\n"+parseSelectors(breakpoints[query])}else{css+="\n@media screen and (max-width:"+query+"px) { "+parseSelectors(breakpoints[query])+" }"}});return css};exports.default=ToCSS}]);var AuxinDependencyManager=function(e){var r={};function n(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=r,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,r){if(1&r&&(e=n(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)n.d(t,o,function(r){return e[r]}.bind(null,o));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s="./src/index.js")}({"./src/DependencyManager.js":function(e,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},o=function(){function e(e,r){for(var n=0;n<r.length;n++){var t=r[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(r,n,t){return n&&e(r.prototype,n),t&&e(r,t),r}}();var a=function(){function e(){!function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e),this.graph={sections:{},controls:{}}}return o(e,[{key:"getDependsStatus",value:function(e){var r=this.getDepends(e),n={};for(var t in r){var o=r[t],a=this.checkDependencies(o.dependencies);n[t]={isShow:a}}return n}},{key:"add",value:function(e,r,n){if(!["sections","controls"].includes(n))throw new Error("Wrong type, Use correct type for controller");"sections"===n&&(this.graph.sections[e]=r),"controls"===n&&(this.graph.controls[e]=r)}},{key:"getDepends",value:function(e){var r={},n=t({},this.graph.sections,this.graph.controls);return Object.keys(n).forEach(function(t){var o=n[t];o.dependencies&&(o.dependencies.some(function(r){return r.id===e})&&(r[t]=o))}),r}},{key:"checkDependencies",value:function(e){var r=void 0,n=[];for(var t in e){var o=e[t];o.relation?r=o.relation:n.push(this.inArray(this.getValue(o.id),o.value,o.operator))}return this.checkRelation(n,r)}},{key:"inArray",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"==",t=void 0;r.constructor!==Array&&(r="string"==typeof r?r.split(","):[r]);for(var o=0,a=r,u=a.length;o<u;o++){switch(n){case"==":t=e==r[o];break;case"===":t=e===r[o];break;case"!=":t=e!=r[o];break;case"!==":t=e!==r[o];break;case">=":t=e>=r[o];break;case"<=":t=e<=r[o];break;case">":t=e>r[o];break;case"<":t=e<r[o];break;default:t=e==r[o]}if(t)return!0}return!1}},{key:"checkRelation",value:function(e,r){var n=!1;return"and"===r?n=!e.includes(!1):"or"===r&&(n=!!e.includes(!0)),n}},{key:"getValue",value:function(e){return this.graph.controls[e].value}},{key:"update",value:function(e,r){return this.graph.controls[e].value=r,r}}]),e}();r.default=a},"./src/index.js":function(e,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.setup=void 0;var t,o=n("./src/DependencyManager.js"),a=(t=o)&&t.__esModule?t:{default:t};r.setup=function(){return new a.default}}});
//# sourceMappingURL=plugins.min.js.map

Zerion Mini Shell 1.0