/*! Isotope PACKAGED v3.0.5 Licensed GPLv3 for open source use or Isotope Commercial License for commercial use https://isotope.metafizzy.co Copyright 2017 Metafizzy */
!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function u(t,e,o){var n,s="$()."+i+'("'+e+'")';return t.each(function(t,u){var h=a.data(u,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var d=h[e];if(!d||"_"==e.charAt(0))return void r(s+" is not a valid method");var l=d.apply(h,o);n=void 0===n?l:n}),void 0!==n?n:t}function h(t,e){t.each(function(t,o){var n=a.data(o,i);n?(n.option(e),n._init()):(n=new s(o,e),a.data(o,i,n))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=n.call(arguments,1);return u(this,t,e)}return h(this,t),this},o(a))}function o(t){!t||t&&t.bridget||(t.bridget=i)}var n=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return o(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},o=i[t]=i[t]||[];return o.indexOf(e)==-1&&o.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},o=i[t]=i[t]||{};return o[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var o=i.indexOf(e);return o!=-1&&i.splice(o,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var o=this._onceEvents&&this._onceEvents[t],n=0;n<i.length;n++){var s=i[n],r=o&&o[s];r&&(this.off(t,s),delete o[s]),s.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return e()}):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=t.indexOf("%")==-1&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<h;e++){var i=u[e];t[i]=0}return t}function o(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),e}function n(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var n=o(e);s.isBoxSizeOuter=r=200==t(n.width),i.removeChild(e)}}function s(e){if(n(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var s=o(e);if("none"==s.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==s.boxSizing,l=0;l<h;l++){var f=u[l],c=s[f],m=parseFloat(c);a[f]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,y=a.paddingTop+a.paddingBottom,g=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,I=a.borderTopWidth+a.borderBottomWidth,z=d&&r,x=t(s.width);x!==!1&&(a.width=x+(z?0:p+_));var S=t(s.height);return S!==!1&&(a.height=S+(z?0:y+I)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(y+I),a.outerWidth=a.width+g,a.outerHeight=a.height+v,a}}var r,a="undefined"==typeof console?e:function(t){console.error(t)},u=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],h=u.length,d=!1;return s}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var o=e[i],n=o+"MatchesSelector";if(t[n])return n}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e},i.makeArray=function(t){var e=[];if(Array.isArray(t))e=t;else if(t&&"object"==typeof t&&"number"==typeof t.length)for(var i=0;i<t.length;i++)e.push(t[i]);else e.push(t);return e},i.removeFrom=function(t,e){var i=t.indexOf(e);i!=-1&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,o){t=i.makeArray(t);var n=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!o)return void n.push(t);e(t,o)&&n.push(t);for(var i=t.querySelectorAll(o),s=0;s<i.length;s++)n.push(i[s])}}),n},i.debounceMethod=function(t,e,i){var o=t.prototype[e],n=e+"Timeout";t.prototype[e]=function(){var t=this[n];t&&clearTimeout(t);var e=arguments,s=this;this[n]=setTimeout(function(){o.apply(s,e),delete s[n]},i||100)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var o=t.console;return i.htmlInit=function(e,n){i.docReady(function(){var s=i.toDashed(n),r="data-"+s,a=document.querySelectorAll("["+r+"]"),u=document.querySelectorAll(".js-"+s),h=i.makeArray(a).concat(i.makeArray(u)),d=r+"-options",l=t.jQuery;h.forEach(function(t){var i,s=t.getAttribute(r)||t.getAttribute(d);try{i=s&&JSON.parse(s)}catch(a){return void(o&&o.error("Error parsing "+r+" on "+t.className+": "+a))}var u=new e(t,i);l&&l.data(t,n,u)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function o(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function n(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var s=document.documentElement.style,r="string"==typeof s.transition?"transition":"WebkitTransition",a="string"==typeof s.transform?"transform":"WebkitTransform",u={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],h={transform:a,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"},d=o.prototype=Object.create(t.prototype);d.constructor=o,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var o=h[i]||i;e[o]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),o=t[e?"left":"right"],n=t[i?"top":"bottom"],s=this.layout.size,r=o.indexOf("%")!=-1?parseFloat(o)/100*s.width:parseInt(o,10),a=n.indexOf("%")!=-1?parseFloat(n)/100*s.height:parseInt(n,10);r=isNaN(r)?0:r,a=isNaN(a)?0:a,r-=e?s.paddingLeft:s.paddingRight,a-=i?s.paddingTop:s.paddingBottom,this.position.x=r,this.position.y=a},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop"),n=i?"paddingLeft":"paddingRight",s=i?"left":"right",r=i?"right":"left",a=this.position.x+t[n];e[s]=this.getXValue(a),e[r]="";var u=o?"paddingTop":"paddingBottom",h=o?"top":"bottom",d=o?"bottom":"top",l=this.position.y+t[u];e[h]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,o=this.position.y,n=parseInt(t,10),s=parseInt(e,10),r=n===this.position.x&&s===this.position.y;if(this.setPosition(t,e),r&&!this.isTransitioning)return void this.layoutPosition();var a=t-i,u=e-o,h={};h.transform=this.getTranslate(a,u),this.transition({to:h,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop");return t=i?t:-t,e=o?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+n(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(u,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var f={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,o=f[t.propertyName]||t.propertyName;if(delete e.ingProperties[o],i(e.ingProperties)&&this.disableTransition(),o in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[o]),o in e.onEnd){var n=e.onEnd[o];n.call(this),delete e.onEnd[o]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(u,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var c={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(c)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},o}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,o,n,s){return e(t,i,o,n,s)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,o,n){"use strict";function s(t,e){var i=o.getQueryElement(t);if(!i)return void(u&&u.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,h&&(this.$element=h(this.element)),this.options=o.extend({},this.constructor.defaults),this.option(e);var n=++l;this.element.outlayerGUID=n,f[n]=this,this._create();var s=this._getOption("initLayout");s&&this.layout()}function r(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],o=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var n=m[o]||1;return i*n}var u=t.console,h=t.jQuery,d=function(){},l=0,f={};s.namespace="outlayer",s.Item=n,s.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var c=s.prototype;o.extend(c,e.prototype),c.option=function(t){o.extend(this.options,t)},c._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},s.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},c._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),o.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},c.reloadItems=function(){this.items=this._itemize(this.element.children)},c._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,o=[],n=0;n<e.length;n++){var s=e[n],r=new i(s,this);o.push(r)}return o},c._filterFindItemElements=function(t){return o.filterFindElements(t,this.options.itemSelector)},c.getItemElements=function(){return this.items.map(function(t){return t.element})},c.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},c._init=c.layout,c._resetLayout=function(){this.getSize()},c.getSize=function(){this.size=i(this.element)},c._getMeasurement=function(t,e){var o,n=this.options[t];n?("string"==typeof n?o=this.element.querySelector(n):n instanceof HTMLElement&&(o=n),this[t]=o?i(o)[e]:n):this[t]=0},c.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},c._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},c._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var o=this._getItemLayoutPosition(t);o.item=t,o.isInstant=e||t.isLayoutInstant,i.push(o)},this),this._processLayoutQueue(i)}},c._getItemLayoutPosition=function(){return{x:0,y:0}},c._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},c.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},c._positionItem=function(t,e,i,o,n){o?t.goTo(e,i):(t.stagger(n*this.stagger),t.moveTo(e,i))},c._postLayout=function(){this.resizeContainer()},c.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},c._getContainerSize=d,c._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},c._emitCompleteOnItems=function(t,e){function i(){n.dispatchEvent(t+"Complete",null,[e])}function o(){r++,r==s&&i()}var n=this,s=e.length;if(!e||!s)return void i();var r=0;e.forEach(function(e){e.once(t,o)})},c.dispatchEvent=function(t,e,i){var o=e?[e].concat(i):i;if(this.emitEvent(t,o),h)if(this.$element=this.$element||h(this.element),e){var n=h.Event(e);n.type=t,this.$element.trigger(n,i)}else this.$element.trigger(t,i)},c.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},c.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},c.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},c.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){o.removeFrom(this.stamps,t),this.unignore(t)},this)},c._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o.makeArray(t)},c._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},c._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},c._manageStamp=d,c._getElementOffset=function(t){var e=t.getBoundingClientRect(),o=this._boundingRect,n=i(t),s={left:e.left-o.left-n.marginLeft,top:e.top-o.top-n.marginTop,right:o.right-e.right-n.marginRight,bottom:o.bottom-e.bottom-n.marginBottom};return s},c.handleEvent=o.handleEvent,c.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},c.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},c.onresize=function(){this.resize()},o.debounceMethod(s,"onresize",100),c.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},c.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},c.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},c.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},c.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},c.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},c.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},c.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},c.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},c.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},c.getItems=function(t){t=o.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},c.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),o.removeFrom(this.items,t)},this)},c.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete f[e],delete this.element.outlayerGUID,h&&h.removeData(this.element,this.constructor.namespace)},s.data=function(t){t=o.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&f[e]},s.create=function(t,e){var i=r(s);return i.defaults=o.extend({},s.defaults),o.extend(i.defaults,e),i.compatOptions=o.extend({},s.compatOptions),i.namespace=t,i.data=s.data,i.Item=r(n),o.htmlInit(i,t),h&&h.bridget&&h.bridget(t,i),i};var m={ms:1,s:1e3};return s.Item=n,s}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/item",["outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window,function(t){"use strict";function e(){t.Item.apply(this,arguments)}var i=e.prototype=Object.create(t.Item.prototype),o=i._create;i._create=function(){this.id=this.layout.itemGUID++,o.call(this),this.sortData={}},i.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var o=e[i];this.sortData[i]=o(this.element,this)}}};var n=i.destroy;return i.destroy=function(){n.apply(this,arguments),this.css({display:""})},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("get-size"),require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window,function(t,e){"use strict";function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}var o=i.prototype,n=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"];return n.forEach(function(t){o[t]=function(){return e.prototype[t].apply(this.isotope,arguments)}}),o.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;return i&&e.innerHeight!=this.isotope.size.innerHeight},o._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},o.getColumnWidth=function(){this.getSegmentSize("column","Width")},o.getRowHeight=function(){this.getSegmentSize("row","Height")},o.getSegmentSize=function(t,e){var i=t+e,o="outer"+e;if(this._getMeasurement(i,o),!this[i]){var n=this.getFirstItemSize();this[i]=n&&n[o]||this.isotope.size["inner"+e]}},o.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},o.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},o.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function n(){i.apply(this,arguments)}return n.prototype=Object.create(o),n.prototype.constructor=n,e&&(n.options=e),n.prototype.namespace=t,i.modes[t]=n,n},i}),function(t,e){"function"==typeof define&&define.amd?define("masonry-layout/masonry",["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var o=i.prototype;return o._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},o.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var o=this.columnWidth+=this.gutter,n=this.containerWidth+this.gutter,s=n/o,r=o-n%o,a=r&&r<1?"round":"floor";s=Math[a](s),this.cols=Math.max(s,1)},o.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,o=e(i);this.containerWidth=o&&o.innerWidth},o._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&e<1?"round":"ceil",o=Math[i](t.size.outerWidth/this.columnWidth);o=Math.min(o,this.cols);for(var n=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",s=this[n](o,t),r={x:this.columnWidth*s.col,y:s.y},a=s.y+t.size.outerHeight,u=o+s.col,h=s.col;h<u;h++)this.colYs[h]=a;return r},o._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},o._getTopColGroup=function(t){if(t<2)return this.colYs;for(var e=[],i=this.cols+1-t,o=0;o<i;o++)e[o]=this._getColGroupY(o,t);return e},o._getColGroupY=function(t,e){if(e<2)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},o._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,o=t>1&&i+t>this.cols;i=o?0:i;var n=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=n?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},o._manageStamp=function(t){var i=e(t),o=this._getElementOffset(t),n=this._getOption("originLeft"),s=n?o.left:o.right,r=s+i.outerWidth,a=Math.floor(s/this.columnWidth);a=Math.max(0,a);var u=Math.floor(r/this.columnWidth);u-=r%this.columnWidth?0:1,u=Math.min(this.cols-1,u);for(var h=this._getOption("originTop"),d=(h?o.top:o.bottom)+i.outerHeight,l=a;l<=u;l++)this.colYs[l]=Math.max(d,this.colYs[l])},o._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},o._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},o.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/masonry",["../layout-mode","masonry-layout/masonry"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode"),require("masonry-layout")):e(t.Isotope.LayoutMode,t.Masonry)}(window,function(t,e){"use strict";var i=t.create("masonry"),o=i.prototype,n={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(var s in e.prototype)n[s]||(o[s]=e.prototype[s]);var r=o.measureColumns;o.measureColumns=function(){this.items=this.isotope.filteredItems,r.call(this)};var a=o._getOption;return o._getOption=function(t){return"fitWidth"==t?void 0!==this.options.isFitWidth?this.options.isFitWidth:this.options.fitWidth:a.apply(this.isotope,arguments)},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/fit-rows",["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("fitRows"),i=e.prototype;return i._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},i._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);var o={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,o},i._getContainerSize=function(){return{height:this.maxY}},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/vertical",["../layout-mode"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("vertical",{horizontalAlignment:0}),i=e.prototype;return i._resetLayout=function(){this.y=0},i._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},i._getContainerSize=function(){return{height:this.y}},e}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","desandro-matches-selector/matches-selector","fizzy-ui-utils/utils","isotope-layout/js/item","isotope-layout/js/layout-mode","isotope-layout/js/layout-modes/masonry","isotope-layout/js/layout-modes/fit-rows","isotope-layout/js/layout-modes/vertical"],function(i,o,n,s,r,a){return e(t,i,o,n,s,r,a)}):"object"==typeof module&&module.exports?module.exports=e(t,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("isotope-layout/js/item"),require("isotope-layout/js/layout-mode"),require("isotope-layout/js/layout-modes/masonry"),require("isotope-layout/js/layout-modes/fit-rows"),require("isotope-layout/js/layout-modes/vertical")):t.Isotope=e(t,t.Outlayer,t.getSize,t.matchesSelector,t.fizzyUIUtils,t.Isotope.Item,t.Isotope.LayoutMode)}(window,function(t,e,i,o,n,s,r){function a(t,e){return function(i,o){for(var n=0;n<t.length;n++){var s=t[n],r=i.sortData[s],a=o.sortData[s];if(r>a||r<a){var u=void 0!==e[s]?e[s]:e,h=u?1:-1;return(r>a?1:-1)*h}}return 0}}var u=t.jQuery,h=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},d=e.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});d.Item=s,d.LayoutMode=r;var l=d.prototype;l._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),e.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var t in r.modes)this._initLayoutMode(t)},l.reloadItems=function(){this.itemGUID=0,e.prototype.reloadItems.call(this)},l._itemize=function(){for(var t=e.prototype._itemize.apply(this,arguments),i=0;i<t.length;i++){var o=t[i];o.id=this.itemGUID++}return this._updateItemsSortData(t),t},l._initLayoutMode=function(t){var e=r.modes[t],i=this.options[t]||{};this.options[t]=e.options?n.extend(e.options,i):i,this.modes[t]=new e(this)},l.layout=function(){return!this._isLayoutInited&&this._getOption("initLayout")?void this.arrange():void this._layout()},l._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},l.arrange=function(t){this.option(t),this._getIsInstant();var e=this._filter(this.items);this.filteredItems=e.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[e]):this._hideReveal(e),this._sort(),this._layout()},l._init=l.arrange,l._hideReveal=function(t){this.reveal(t.needReveal),this.hide(t.needHide)},l._getIsInstant=function(){var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;return this._isInstant=e,e},l._bindArrangeComplete=function(){function t(){e&&i&&o&&n.dispatchEvent("arrangeComplete",null,[n.filteredItems])}var e,i,o,n=this;this.once("layoutComplete",function(){e=!0,t()}),this.once("hideComplete",function(){i=!0,t()}),this.once("revealComplete",function(){o=!0,t()})},l._filter=function(t){var e=this.options.filter;e=e||"*";for(var i=[],o=[],n=[],s=this._getFilterTest(e),r=0;r<t.length;r++){var a=t[r];if(!a.isIgnored){var u=s(a);u&&i.push(a),u&&a.isHidden?o.push(a):u||a.isHidden||n.push(a)}}return{matches:i,needReveal:o,needHide:n}},l._getFilterTest=function(t){
return u&&this.options.isJQueryFiltering?function(e){return u(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return o(e.element,t)}},l.updateSortData=function(t){var e;t?(t=n.makeArray(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},l._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=f(i)}},l._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&i<e;i++){var o=t[i];o.updateSortData()}};var f=function(){function t(t){if("string"!=typeof t)return t;var i=h(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),s=n&&n[1],r=e(s,o),a=d.sortDataParsers[i[1]];return t=a?function(t){return t&&a(r(t))}:function(t){return t&&r(t)}}function e(t,e){return t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&i.textContent}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},l._sort=function(){if(this.options.sortBy){var t=n.makeArray(this.options.sortBy);this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory));var e=a(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(e)}},l._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},l._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},l._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},l._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},l._manageStamp=function(t){this._mode()._manageStamp(t)},l._getContainerSize=function(){return this._mode()._getContainerSize()},l.needsResizeLayout=function(){return this._mode().needsResizeLayout()},l.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},l.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},l._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},l.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;i<n;i++)o=e[i],this.element.appendChild(o.element);var s=this._filter(e).matches;for(i=0;i<n;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;i<n;i++)delete e[i].isLayoutInstant;this.reveal(s)}};var c=l.remove;return l.remove=function(t){t=n.makeArray(t);var e=this.getItems(t);c.call(this,t);for(var i=e&&e.length,o=0;i&&o<i;o++){var s=e[o];n.removeFrom(this.filteredItems,s)}},l.shuffle=function(){for(var t=0;t<this.items.length;t++){var e=this.items[t];e.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},l._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;var o=t.apply(this,e);return this.options.transitionDuration=i,o},l.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},d});
/*! @vimeo/player v2.2.0 | (c) 2017 Vimeo | MIT License | https://github.com/vimeo/player.js */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e.Vimeo=e.Vimeo||{},e.Vimeo.Player=t())}(this,function(){"use strict";function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}function t(e,t,n){var r=E.get(e.element)||{};t in r||(r[t]=[]),r[t].push(n),E.set(e.element,r)}function n(e,t){return(E.get(e.element)||{})[t]||[]}function r(e,t,n){var r=E.get(e.element)||{};if(!r[t])return!0;if(!n)return r[t]=[],E.set(e.element,r),!0;var i=r[t].indexOf(n);return-1!==i&&r[t].splice(i,1),E.set(e.element,r),r[t]&&0===r[t].length}function i(e,t){var i=n(e,t);if(i.length<1)return!1;var o=i.shift();return r(e,t,o),o}function o(e,t){var n=E.get(e);E.set(t,n),E.delete(e)}function a(e,t){return 0===e.indexOf(t.toLowerCase())?e:""+t.toLowerCase()+e.substr(0,1).toUpperCase()+e.substr(1)}function u(e){return e instanceof window.HTMLElement}function s(e){return!isNaN(parseFloat(e))&&isFinite(e)&&Math.floor(e)==e}function c(e){return/^(https?:)?\/\/((player|www).)?vimeo.com(?=$|\/)/.test(e)}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=e.url,r=t||n;if(!r)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(s(r))return"https://vimeo.com/"+r;if(c(r))return r.replace("http:","https:");if(t)throw new TypeError("“"+t+"” is not a valid video id.");throw new TypeError("“"+r+"” is not a vimeo.com url.")}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return T.reduce(function(t,n){var r=e.getAttribute("data-vimeo-"+n);return(r||""===r)&&(t[n]=""===r?1:r),t},t)}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(n,r){if(!c(e))throw new TypeError("“"+e+"” is not a vimeo.com url.");var i="https://vimeo.com/api/oembed.json?url="+encodeURIComponent(e);for(var o in t)t.hasOwnProperty(o)&&(i+="&"+o+"="+encodeURIComponent(t[o]));var a="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;a.open("GET",i,!0),a.onload=function(){if(404===a.status)return void r(new Error("“"+e+"” was not found."));if(403===a.status)return void r(new Error("“"+e+"” is not embeddable."));try{var t=JSON.parse(a.responseText);n(t)}catch(e){r(e)}},a.onerror=function(){var e=a.status?" ("+a.status+")":"";r(new Error("There was an error fetching the embed code from Vimeo"+e+"."))},a.send()})}function d(e,t){var n=e.html;if(!t)throw new TypeError("An element must be provided");if(null!==t.getAttribute("data-vimeo-initialized"))return t.querySelector("iframe");var r=document.createElement("div");return r.innerHTML=n,t.appendChild(r.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function v(e){return"string"==typeof e&&(e=JSON.parse(e)),e}function p(e,t,n){if(e.element.contentWindow&&e.element.contentWindow.postMessage){var r={method:t};void 0!==n&&(r.value=n);var i=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1"));i>=8&&i<10&&(r=JSON.stringify(r)),e.element.contentWindow.postMessage(r,e.origin)}}function y(e,t){t=v(t);var o=[],a=void 0;if(t.event){if("error"===t.event){n(e,t.data.method).forEach(function(n){var i=new Error(t.data.message);i.name=t.data.name,n.reject(i),r(e,t.data.method,n)})}o=n(e,"event:"+t.event),a=t.data}else if(t.method){var u=i(e,t.method);u&&(o.push(u),a=t.value)}o.forEach(function(t){try{if("function"==typeof t)return void t.call(e,a);t.resolve(a)}catch(e){}})}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var g=void 0!==Array.prototype.indexOf,w=void 0!==window.postMessage;if(!g||!w)throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var k="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},b=(e(function(e,t){!function(e){function t(e,t){function r(e){if(!this||this.constructor!==r)return new r(e);this._keys=[],this._values=[],this._itp=[],this.objectOnly=t,e&&n.call(this,e)}return t||w(e,"size",{get:y}),e.constructor=r,r.prototype=e,r}function n(e){this.add?e.forEach(this.add,this):e.forEach(function(e){this.set(e[0],e[1])},this)}function r(e){return this.has(e)&&(this._keys.splice(g,1),this._values.splice(g,1),this._itp.forEach(function(e){g<e[0]&&e[0]--})),-1<g}function i(e){return this.has(e)?this._values[g]:void 0}function o(e,t){if(this.objectOnly&&t!==Object(t))throw new TypeError("Invalid value used as weak collection key");if(t!=t||0===t)for(g=e.length;g--&&!k(e[g],t););else g=e.indexOf(t);return-1<g}function a(e){return o.call(this,this._values,e)}function u(e){return o.call(this,this._keys,e)}function s(e,t){return this.has(e)?this._values[g]=t:this._values[this._keys.push(e)-1]=t,this}function c(e){return this.has(e)||this._values.push(e),this}function f(){(this._keys||0).length=this._values.length=0}function l(){return p(this._itp,this._keys)}function h(){return p(this._itp,this._values)}function d(){return p(this._itp,this._keys,this._values)}function v(){return p(this._itp,this._values,this._values)}function p(e,t,n){var r=[0],i=!1;return e.push(r),{next:function(){var o,a=r[0];return!i&&a<t.length?(o=n?[t[a],n[a]]:t[a],r[0]++):(i=!0,e.splice(e.indexOf(r),1)),{done:i,value:o}}}}function y(){return this._values.length}function m(e,t){for(var n=this.entries();;){var r=n.next();if(r.done)break;e.call(t,r.value[1],r.value[0],this)}}var g,w=Object.defineProperty,k=function(e,t){return e===t||e!==e&&t!==t};"undefined"==typeof WeakMap&&(e.WeakMap=t({delete:r,clear:f,get:i,has:u,set:s},!0)),"undefined"!=typeof Map&&"function"==typeof(new Map).values&&(new Map).values().next||(e.Map=t({delete:r,has:u,get:i,set:s,keys:l,values:h,entries:d,forEach:m,clear:f})),"undefined"!=typeof Set&&"function"==typeof(new Set).values&&(new Set).values().next||(e.Set=t({has:a,add:c,delete:r,clear:f,keys:h,values:h,entries:v,forEach:m})),"undefined"==typeof WeakSet&&(e.WeakSet=t({delete:r,add:c,clear:f,has:a},!0))}(void 0!==k?k:window)}),e(function(e){var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(t,n,r){n[t]=n[t]||r(),e.exports&&(e.exports=n[t])}("Promise",k,function(){function e(e,t){d.add(e,t),h||(h=p(d.drain))}function n(e){var n,r=void 0===e?"undefined":t(e);return null==e||"object"!=r&&"function"!=r||(n=e.then),"function"==typeof n&&n}function r(){for(var e=0;e<this.chain.length;e++)i(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function i(e,t,r){var i,o;try{!1===t?r.reject(e.msg):(i=!0===t?e.msg:t.call(void 0,e.msg),i===r.promise?r.reject(TypeError("Promise-chain cycle")):(o=n(i))?o.call(i,r.resolve,r.reject):r.resolve(i))}catch(e){r.reject(e)}}function o(t){var i,u=this;if(!u.triggered){u.triggered=!0,u.def&&(u=u.def);try{(i=n(t))?e(function(){var e=new s(u);try{i.call(t,function(){o.apply(e,arguments)},function(){a.apply(e,arguments)})}catch(t){a.call(e,t)}}):(u.msg=t,u.state=1,u.chain.length>0&&e(r,u))}catch(e){a.call(new s(u),e)}}}function a(t){var n=this;n.triggered||(n.triggered=!0,n.def&&(n=n.def),n.msg=t,n.state=2,n.chain.length>0&&e(r,n))}function u(e,t,n,r){for(var i=0;i<t.length;i++)!function(i){e.resolve(t[i]).then(function(e){n(i,e)},r)}(i)}function s(e){this.def=e,this.triggered=!1}function c(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function f(t){if("function"!=typeof t)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var n=new c(this);this.then=function(t,i){var o={success:"function"!=typeof t||t,failure:"function"==typeof i&&i};return o.promise=new this.constructor(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");o.resolve=e,o.reject=t}),n.chain.push(o),0!==n.state&&e(r,n),o.promise},this.catch=function(e){return this.then(void 0,e)};try{t.call(void 0,function(e){o.call(n,e)},function(e){a.call(n,e)})}catch(e){a.call(n,e)}}var l,h,d,v=Object.prototype.toString,p="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),l=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(e){l=function(e,t,n){return e[t]=n,e}}d=function(){function e(e,t){this.fn=e,this.self=t,this.next=void 0}var t,n,r;return{add:function(i,o){r=new e(i,o),n?n.next=r:t=r,n=r,r=void 0},drain:function(){var e=t;for(t=n=h=void 0;e;)e.fn.call(e.self),e=e.next}}}();var y=l({},"constructor",f,!1);return f.prototype=y,l(y,"__NPO__",0,!1),l(f,"resolve",function(e){var n=this;return e&&"object"==(void 0===e?"undefined":t(e))&&1===e.__NPO__?e:new n(function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");t(e)})}),l(f,"reject",function(e){return new this(function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");n(e)})}),l(f,"all",function(e){var t=this;return"[object Array]"!=v.call(e)?t.reject(TypeError("Not an array")):0===e.length?t.resolve([]):new t(function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");var i=e.length,o=Array(i),a=0;u(t,e,function(e,t){o[e]=t,++a===i&&n(o)},r)})}),l(f,"race",function(e){var t=this;return"[object Array]"!=v.call(e)?t.reject(TypeError("Not an array")):new t(function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");u(t,e,function(e,t){n(t)},r)})}),f})})),E=new WeakMap,T=["id","url","width","maxwidth","height","maxheight","portrait","title","byline","color","autoplay","autopause","loop","responsive","speed"],_=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),j=new WeakMap,x=new WeakMap,Player=function(){function Player(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(m(this,Player),window.jQuery&&e instanceof jQuery&&(e.length>1&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),e=e[0]),"string"==typeof e&&(e=document.getElementById(e)),!u(e))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"!==e.nodeName){var r=e.querySelector("iframe");r&&(e=r)}if("IFRAME"===e.nodeName&&!c(e.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");if(j.has(e))return j.get(e);this.element=e,this.origin="*";var i=new b(function(r,i){var a=function(e){if(c(e.origin)&&t.element.contentWindow===e.source){"*"===t.origin&&(t.origin=e.origin);var n=v(e.data),i="event"in n&&"ready"===n.event,o="method"in n&&"ping"===n.method;if(i||o)return t.element.setAttribute("data-ready","true"),void r();y(t,n)}};if(window.addEventListener?window.addEventListener("message",a,!1):window.attachEvent&&window.attachEvent("onmessage",a),"IFRAME"!==t.element.nodeName){var u=l(e,n);h(f(u),u).then(function(n){var r=d(n,e);return t.element=r,o(e,r),j.set(t.element,t),n}).catch(function(e){return i(e)})}});return x.set(this,i),j.set(this.element,this),"IFRAME"===this.element.nodeName&&p(this,"ping"),this}return _(Player,[{key:"callMethod",value:function(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new b(function(i,o){return n.ready().then(function(){t(n,e,{resolve:i,reject:o}),p(n,e,r)})})}},{key:"get",value:function(e){var n=this;return new b(function(r,i){return e=a(e,"get"),n.ready().then(function(){t(n,e,{resolve:r,reject:i}),p(n,e)})})}},{key:"set",value:function(e,n){var r=this;return b.resolve(n).then(function(n){if(e=a(e,"set"),void 0===n||null===n)throw new TypeError("There must be a value to set.");return r.ready().then(function(){return new b(function(i,o){t(r,e,{resolve:i,reject:o}),p(r,e,n)})})})}},{key:"on",value:function(e,r){if(!e)throw new TypeError("You must pass an event name.");if(!r)throw new TypeError("You must pass a callback function.");if("function"!=typeof r)throw new TypeError("The callback must be a function.");0===n(this,"event:"+e).length&&this.callMethod("addEventListener",e).catch(function(){}),t(this,"event:"+e,r)}},{key:"off",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(t&&"function"!=typeof t)throw new TypeError("The callback must be a function.");r(this,"event:"+e,t)&&this.callMethod("removeEventListener",e).catch(function(e){})}},{key:"loadVideo",value:function(e){return this.callMethod("loadVideo",e)}},{key:"ready",value:function(){var e=x.get(this);return b.resolve(e)}},{key:"addCuePoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.callMethod("addCuePoint",{time:e,data:t})}},{key:"removeCuePoint",value:function(e){return this.callMethod("removeCuePoint",e)}},{key:"enableTextTrack",value:function(e,t){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:t})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(e){return this.set("autopause",e)}},{key:"getColor",value:function(){return this.get("color")}},{key:"setColor",value:function(e){return this.set("color",e)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(e){return this.set("currentTime",e)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(e){return this.set("loop",e)}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(e){return this.set("playbackRate",e)}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(e){return this.set("volume",e)}}]),Player}();return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=[].slice.call(e.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),n=function(e){"console"in window&&console.error&&console.error("There was an error creating an embed: "+e)};t.forEach(function(e){try{if(null!==e.getAttribute("data-vimeo-defer"))return;var t=l(e);h(f(t),t).then(function(t){return d(t,e)}).catch(n)}catch(e){n(e)}})}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=function(t){if(c(t.origin)&&t.data&&"spacechange"===t.data.event)for(var n=e.querySelectorAll("iframe"),r=0;r<n.length;r++)if(n[r].contentWindow===t.source){var i=n[r].parentElement;i&&-1!==i.className.indexOf("vimeo-space")&&(i.style.paddingBottom=t.data.data[0].bottom+"px");break}};window.addEventListener?window.addEventListener("message",t,!1):window.attachEvent&&window.attachEvent("onmessage",t)}(),Player});

jQuery(function($) {var $section = $('section.s123-page-data.s123-module-gallery.s123-page-data-gallery');var $details = $section.find('.g-item-details');var isShowSocialIcons = true;if ( $section.data('hide-social-icons') && $section.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
if ( $section.data('hide-info-bar') && $section.data('hide-info-bar') == 'on' ) return;var buttons = [];if ( $section.data('print-image-btn') && $section.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $section.data('download-image-btn') && $section.data('download-image-btn') == 'on' ) {buttons.push('download');}
var imageURL = $details.closest('.g-item-container').find('img').attr('src');var caption = Gallery_getImageMagnificPopupCaption($details.data('module-title'),$details.data('description'),$details.data('external-link'),$details.data('external-link-text'),$details.data('page-url'),$details.data('title'),isShowSocialIcons,imageURL,buttons);$details.html(caption);$details.find('.gallery-link-popup').on('click', function(event) {Gallery_popuplink($(this).data('link'));});if ( $section.data('prevent-download-image') && $section.data('prevent-download-image') == 'on' ) {$section.find('.g-item-container img').get(0).oncontextmenu = function() {return false;}}});
jQuery(function($) {GalleryModuleInitialize();});function GalleryModuleInitialize() {$( document ).on( 's123.page.ready', function( event ) {var skipHistoryEntry = false;var fixImagesWithJob = false;$(document).off('pjax_magnific_popup_reset').on('pjax_magnific_popup_reset', function() {skipHistoryEntry = true;$.magnificPopup.instance.close();skipHistoryEntry = false;});var $section = $('section.s123-module-gallery.isotope-gallery:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $isotopeContainer = $sectionThis.find('.isotope-gallery-container');var $categories = $sectionThis.find('.gallery-category');var $isotopeFilter = $sectionThis.find('.filter');var layout_customize = $sectionThis.find('.layout-customize').length > 0 ? tryParseJSON($sectionThis.find('.layout-customize').val()) : {};var $galleryItem = $sectionThis.find('.gallery-item');var $videoBar = '';$sectionThis.data('layout-customize',layout_customize);if ( parseInt(layout_customize.mobile_number_images_in_row) > 1 ) {$sectionThis.addClass('m-m-i-in-row');}
$sectionThis.magnificPopup({fixedContentPos: true,mainClass: 'mfp-module-gallery disable-context-menu',delegate: '.mfp-image:visible',						// Isotope Filter
closeOnContentClick: true,closeBtnInside: false,tLoading: translations.loading,						// Text that is displayed during loading
autoFocusLast: false,gallery: {enabled: true,tClose: translations.closeEsc,					// Alt text on close button
tPrev: translations.previousLeftArrowKey,		// Alt text on left arrow
tNext: translations.NextRightArrowKey,			// Alt text on right arrow
tCounter: '%curr% '+translations.of+' %total%'	// Markup for "1 of 7" counter
},image: {markup: '<div class="mfp-figure">'+'<div class="mfp-close"></div>'+'<div class="mfp-img"></div>'+'<div class="mfp-bottom-bar fancy-scrollbar">'+'<div class="mfp-title"></div>'+'<div class="mfp-counter"></div>'+'<span class="mfp-caption-close">'+S123.s123IconToSvg.getHtml('times','','')+'</span>'+'</div>'+'</div>',titleSrc: function(item) {if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {item.img.get(0).oncontextmenu = function() {return false;}}
var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
return Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);},tError: translations.imageCouldNotLoaded		// Error message when image could not be loaded
},iframe: {markup: '<div class="mfp-iframe-scaler">' +'<div class="mfp-close"></div>' +'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>' +'<div class="video-bottom-bar">'	+'<div class="mfp-title" style="position: absolute; padding-top: 5px;"></div>' +'</div>' +'</div>',patterns: {youtube: {index: 'youtube.com/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtu: {index: 'youtu.be/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtubeShorts: {index: 'youtube.com/shorts/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},vimeo: {index: 'vimeo.com/',id: function(url) {var matches = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);if ( !matches || !matches[5] ) return null;return matches[5];},src: '//player.vimeo.com/video/%id%?autoplay=1'
},site123: {index: $GLOBALS['cdn-user-videos-files'],id: function( url ) {if ( isMobileDevice.iOS() ) url += '&deviceType=ios';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'},site123Processing: {index: '/files/images/video-processing.png',id: function( url ) {if ( isMobileDevice.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'}}},callbacks: {elementParse: function( item ) {if( item.el.data('type') === 'video' ) {item.type = 'iframe';} else {item.type = 'image';}},markupParse: function(template, values, item) {var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( item.el.data('type') != 'video' ) {if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}}
values.title = Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);setTimeout(function(){$('.mfp-title').off('click').click(function( event ) {event.stopPropagation();});$('.mfp-content .gallery-link-popup').on('click', function(event) {Gallery_popuplink($(this).data('link'));});},500);if ( !this.mp_currentPageUrl ) this.mp_currentPageUrl = window.location.href;window.history.replaceState(this.mp_currentPageUrl,'Title',item.el.data('image-page-url'));$videoBar = template.find('.video-bottom-bar');},updateStatus: function( data ) {var $bar = $('.mfp-bottom-bar');var $close = $('.mfp-caption-close');if ( $sectionThis.data('info-bar-position') && $sectionThis.data('info-bar-position') == 'top' ) {$bar.addClass('custom-top-position');}
if ( $sectionThis.data('hide-info-bar') && $sectionThis.data('hide-info-bar') == 'on' ) {$bar.hide();if( $videoBar ? $videoBar.hide() : false);} else {$bar.show();if( $videoBar ? $videoBar.show() : false);}
$close.off('click').on('click',function( event ) {event.stopPropagation();$bar.hide();});$bar.height() > 50 ? $close.show() : $close.hide();},imageLoadComplete: function() {this.contentContainer.removeClass('mfp-tall-images-handler');var $bottomBar = this.content.find('.mfp-bottom-bar');var $scrollContainer = isMobileDevice.any() ? $bottomBar.s123ScrollParent() : $bottomBar;if ( $scrollContainer.get(0).scrollHeight > $scrollContainer.outerHeight() ) {this.contentContainer.addClass('mfp-tall-images-handler');}},open: function( item ) {var mc = new Hammer(this.container.get(0));mc.on('swipeleft', function(){$.magnificPopup.instance.next();});mc.on('swiperight', function(){$.magnificPopup.instance.prev();});$sectionThis.data('hammer-js',mc);$(document).trigger('s123.page.ready.ReplaceExternalLinksInFreeSubDomain');},change: function() {if ( this.isOpen ) {this.wrap.addClass('mfp-open');}},close: function( item ) {$sectionThis.data('hammer-js').destroy();if ( !skipHistoryEntry ) {window.history.replaceState('','Title',this.mp_currentPageUrl);}
setTimeout(function(){$(window).trigger('resize.gallery_handler');},100);bootbox.hideAll();}}});gallery_SetImageSize($sectionThis);$(document).off('gallery.isotope.handler').on('gallery.isotope.handler', function( event, $category ) {var $isotopeContainer = $category.find('.isotope-gallery-container');if ( $isotopeContainer.data('isotope') ) {$isotopeContainer.isotope('layout');} else {var transitionDuration = $.isNumeric($isotopeContainer.data('isotope-transition')) ? $isotopeContainer.data('isotope-transition') : '0.4s';$isotopeContainer.isotope({itemSelector: '.s123-module-gallery .gallery-item-wrapper',transitionDuration: transitionDuration});$isotopeContainer.on('layoutComplete', function( event ) {$(document).trigger('s123.page.ready.refreshAOS');});}});if ( $isotopeFilter.length !== 0 ) {var $firstCategory = $isotopeFilter.find('[data-filter]').first();var hash = window.location.hash.substring(1);if ( $isotopeFilter.find('[data-unique-id="'+hash+'"]').length > 0 ) {$firstCategory = $isotopeFilter.find('[data-unique-id="'+window.location.hash.replace('#','')+'"]');}
$categories.hide();$categories.filter('[data-filter="'+$firstCategory.attr('data-filter')+'"]').show();$(document).trigger('gallery.isotope.handler',[$categories.filter('[data-filter="'+$firstCategory.attr('data-filter')+'"]')]);$isotopeFilter.find('li').removeClass('active');$firstCategory.addClass('active');$sectionThis.find('.gallery-show-more-btn').hide();$sectionThis.find('.gallery-show-more-btn[data-filter="'+$firstCategory.data('filter')+'"]').show();}
$isotopeFilter.find('[data-filter]').off('click').on('click', function () {var filter = $(this).attr('data-filter');var $hideCategories = $categories.filter(':not([data-filter="'+filter+'"]):visible');var $showCategories = $categories.filter('[data-filter="'+filter+'"]');$sectionThis.css({ minHeight: $sectionThis.height() });$hideCategories.stop().fadeOut(200, function() {$showCategories.stop().fadeIn(200, function() {disableEnableInfinityScroll($sectionThis);$sectionThis.css({ minHeight: '' });showMoreButton($sectionThis,filter);$(document).trigger('gallery.isotope.handler',[$(this)]);});});$isotopeFilter.find('[data-filter]').removeClass('active');$(this).addClass('active');return false;});if ( !IsHomepage() && !IsRichPage() ) {galleryAddInfinityScroll($sectionThis);$sectionThis.find('.s123-infinity-scroll').off('infiniteScroll.loaded').on('infiniteScroll.loaded', function( event, data ) {var $this = $(this);var $items = $(data.itemsHtml);$this.find('.isotope-gallery-container').append($items);gallery_SetImageSize($this.find('.isotope-gallery-container').closest('section'));$this.find('.isotope-gallery-container').isotope('appended',$items);window.myLazyLoad.update();if ( IsIE11() ) {$.each($items, function( index, image ) {$(document).trigger('lazyload_enter.image',[$(image)]);});}});gallery_BrowserBackButtonHandler($isotopeFilter);}
if ( IsIE11() ) {$.each($isotopeContainer.find('img'), function( index, image ) {$(image).attr('src',$(image).attr('data-src'));});}
if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {$.each($galleryItem,function( index, image ) {image.oncontextmenu = function() {return false;}});}});$(window).off('resize.gallery_handler').on('resize.gallery_handler', function (event) {$section.each(function( index ) {gallery_SetImageSize($(this));$(document).trigger('gallery.isotope.handler',[$(this).find('.gallery-category:visible')]);});});$(document).off('lazyload_enter.image').on('lazyload_enter.image',function( event, $img ) {if ( $img.closest('.s123-module-gallery.isotope-gallery').length === 0 ) return;var $sectionThis = $img.closest('section');var $galleryItemWrapper = $img.closest('.gallery-item-wrapper');if ( $sectionThis.hasClass('o-c-s') ) {$galleryItemWrapper.imagesLoaded().progress( function( instance, image ) {$(document).trigger('gallery.isotope.handler',[$galleryItemWrapper.closest('.gallery-category')]);});} else {$img.one('load', function() {var dbRatio = parseInt($galleryItemWrapper.data('original-width')) / parseInt($galleryItemWrapper.data('original-height'));$img.addClass('size-tester');var imageWidth = $img.width();var imageHeight = $img.height();var imageRatio = imageWidth / imageHeight;$img.removeClass('size-tester');if ( !((Math.abs(dbRatio.toFixed(3) - imageRatio.toFixed(3)).toFixed(3)) <= 0.01) ) {$galleryItemWrapper.data('original-width',imageWidth);$galleryItemWrapper.data('original-height',imageHeight);fixImagesOnFly($galleryItemWrapper,imageRatio);if ( !fixImagesWithJob ) {fixImagesWithJob = true;$.ajax({type: "POST",url: '/versions/2/wizard/modules/gallery/recalculateGalleryImages.php',data: {websiteID: $('#websiteID').val(),w: $('#w').val()},success: function( data ) {}});}}});}});function fixImagesOnFly( $galleryItemWrapper, imageRatio ) {$galleryItemWrapper.height(( $galleryItemWrapper.width() / imageRatio ));$(document).trigger('gallery.isotope.handler',[$galleryItemWrapper.closest('.gallery-category')]);}});function showMoreButton( $sectionThis, filter ) {$sectionThis.find('.gallery-show-more-btn').hide();$sectionThis.find('.gallery-show-more-btn[data-filter="'+filter+'"]').show();}}
function gallery_BrowserBackButtonHandler( $categoriesFilter ) {var $categories = $categoriesFilter.find('[data-unique-id]');$categories.off('click.back_button_handler').on('click.back_button_handler', function( event, flag ) {event.preventDefault();var hash = window.location.hash.substring(1);if ( hash === $(this).data('unique-id') ) return;if ( flag == 'skipHistory' ) return;window.history.pushState('forward', null, '#'+$(this).data('unique-id'));});if ( window.history && window.history.pushState ) {$(window).off('popstate.back_button_handler').on('popstate.back_button_handler', function() {var hash = window.location.hash.substring(1);if ( hash.length === 0 ) {$categories.first().trigger('click',['skipHistory']);} else {$categories.filter('[data-unique-id="'+hash+'"]').trigger('click',['skipHistory']);}});}}
function galleryAddInfinityScroll( $sectionThis ) {$.each($sectionThis.find('.s123-infinity-scroll'), function( index, container ) {var $this = $(this);var infiniteScroll = new s123InfiniteScroll({isMobile: false,$container: $this,id: $this.data('unique-id'),offset: $('footer.global_footer').outerHeight(),ajax: {type: 'GET',url: '/versions/2/wizard/modules/gallery/front/infiniteScroll.php',data: {w: $('#w').val(),websiteID: $('#websiteID').val(),uniquePageID: $this.data('module-id'),toolTitle: $this.data('tool-title'),pageUrl: $this.data('page-url'),limit: isMobileDevice.any() ? 25 : $this.data('limit'),initiRecordsAmount: $this.data('limit'),filter: $this.data('filter'),toolStyle: $this.data('tool-style'),tranW: $this.data('language'),imageSize: $this.data('image-size'),},success: function( data ) {$this.trigger('infiniteScroll.loaded',[data]);}}});});disableEnableInfinityScroll($sectionThis);}
function disableEnableInfinityScroll( $sectionThis ) {$.each($sectionThis.find('.s123-infinity-scroll'), function( index, category ) {var $this = $(this);if ( !$this.data('s123InfiniteScroll') ) return;if ( $this.is(':visible') ) {$this.data('s123InfiniteScroll').enable();} else {$this.data('s123InfiniteScroll').disable();}});}
function gallery_SetImageSize( $sectionThis ) {var imageWidth = Math.floor($sectionThis.find('.isotope-gallery-container:visible').width()/S123.galleriesImageResize.decideNumberOfImageByScreenWidth($sectionThis,'.isotope-gallery-container'));var isOldCustomer = false;if ( $sectionThis.hasClass('layout-1') ) {imageWidth = imageWidth - 10;}
$sectionThis.find('.gallery-item-wrapper').each(function( index, itemWrapper ) {var $this = $(this);$this.width(imageWidth);if ( $.isNumeric($this.data('original-width')) && $.isNumeric($this.data('original-height')) ) {var aspectRatio = ( parseInt($this.data('original-width')) / parseInt($this.data('original-height')) );var newHeight = ( imageWidth / aspectRatio );$this.height(newHeight);} else {isOldCustomer = true;}});S123.galleriesImageResize.init({section: $sectionThis,container: '.isotope-gallery-container',attr: 'data-src',element: '.gallery-thumb img',rowImageNum: 1,isBackgroundSizeCover: false,imageWidth: imageWidth,calcImageWidth: false,magnificPopup: true,magnificPopupEle: '.mfp-image',magnificAttr: 'data-mfp-src'});if ( isOldCustomer ) {$sectionThis.addClass('o-c-s');}}
function Gallery_getSocialLinks( url, title ) {var url = encodeURIComponent(window.location.origin + url);var title = encodeURIComponent(title);var html = '<div class="gallery-social-links">';html += '<a href="https://www.facebook.com/sharer/sharer.php?u='+url+'&t='+title+'" title="Share on Facebook" target="_blank">'+S123.s123IconToSvg.getHtml('facebook','','')+'</a>';
html += '<a href="https://twitter.com/intent/tweet?source='+url+'&text='+title+':%20'+url+'" target="_blank" title="Tweet">'+S123.s123IconToSvg.getHtml('twitter','','')+'</a>';
html += '<a href="https://pinterest.com/pin/create/button/?url='+url+'&description='+title+'" target="_blank" title="Pin it">'+S123.s123IconToSvg.getHtml('pinterest','','')+'</a>';
html += '<a href="https://tumblr.com/share/link?url='+url+'&description='+title+'" target="_blank" title="tumblr">'+S123.s123IconToSvg.getHtml('tumblr','','')+'</a>';
html += '<a href="mailto:?subject='+title+'&amp;body=Check out this image '+url+'" target="_blank" title="Share by Email">'+S123.s123IconToSvg.getHtml('envelope','','')+'</a>';html += '<a href="https://wa.me/?text='+title+' - '+url+'" target="_blank" title="whatsapp">'+S123.s123IconToSvg.getHtml('whatsapp','','')+'</a>';
html += '<a class="gallery-link-popup" href="javascript:void(0);" data-link="'+url+'" title="link" style="cursor: pointer;">'+S123.s123IconToSvg.getHtml('link','','')+'</a>';html +='</div>';return html;}
function Gallery_popuplink(link) {let html = '';html += '<div class="share-copy input-group field">';html +='<input type="text" id="copyLinkInput" value="'+decodeURIComponent(link)+'" class="form-control" readonly>';html +='<span class="input-group-btn">';html +='<button class="btn btn-primary copy-link-btn">'+S123.s123IconToSvg.getHtml('clipboard','','')+'</button>';html += '</span>'
html += '</div>';$html = $(html);$html.find('button.copy-link-btn').off('click').on('click', function(){var copyText = $html.find('#copyLinkInput').get(0);S123.CopyToClipboard.copy(copyText);return false;});const galleryLinkBox = bootbox.dialog({className: 's123-modal gallery-link-bootbox',message: $html,show: false,backdrop: true,keyboard: false,container:'.mfp-wrap.mfp-module-gallery',});galleryLinkBox.find('.bootbox-body').off('click').on('click',function(event) {event.stopPropagation();});galleryLinkBox.on('click', '.modal-backdrop', function() {event.stopPropagation();galleryLinkBox.modal('hide');});galleryLinkBox.modal('show');}
function Gallery_getImageMagnificPopupCaption( toolTitle, imageDescription, externalLink ,externalLinkText , imagePageURL, title , addSocial, imageURL, buttons ) {var caption = '<div class="gallery-image-text">';if ( !title == '' && !imageDescription == '' ) {caption += title + ' - ' + imageDescription;} else if ( !title == '' ) {caption += title;} else if ( !imageDescription == '' ) {caption += imageDescription;} else if ( !addSocial && buttons.length == 0 ) {caption += '&nbsp;';}
caption += '</div>';if ( !externalLink == '' ) {caption += '<a class="gallery-image-external-link" target="_blank" href="'+externalLink+'">';caption += !externalLinkText == '' ?externalLinkText : externalLink;caption += '</a>';}
if ( addSocial ) {if ( title === '' ) {socialShareTitle = toolTitle;} else {socialShareTitle = title+' - '+toolTitle;}
caption += Gallery_getSocialLinks(imagePageURL,socialShareTitle);}
var printImageTitle = title === '' ? translations.image : title;caption += Gallery_getDownloadPrintBtns(imageURL,buttons,printImageTitle);return caption;}
function Gallery_getDownloadPrintBtns( imageURL, buttons, title ) {if ( !buttons || buttons.length == 0 ) return '';var html = '<div class="gallery-download-print-btns">';if ( buttons.includes('download') ) {html += '<a href="/versions/2/wizard/modules/fileManager/downloadDigitalFile.php?'+ ($('#w').val().length > 0 ? 'w='+$('#websiteID').val()+'&' : '') +'url='+encodeURIComponent(imageURL.replace('2000_','normal_'))+'">'+S123.s123IconToSvg.getHtml('download','','')+'</a>';}
if ( buttons.includes('print') ) {html += '<a href="#" onclick="Gallery_printImg(\''+imageURL+'\',\''+title+'\')" title="'+translations.print+'">'+S123.s123IconToSvg.getHtml('print','','')+'</a>';}
html +='</div>';return html;}
function Gallery_getImgSourcetoPrint( url, title ) {return "<html><head><script>function step1(){\n" +"setTimeout('step2()', 10);}\n" +"function step2(){window.print();window.close()}\n" +"</scri" + "pt><title>" + title + "</title></head><body onload='step1()'>\n" +"<img src='" + url + "' /></body></html>";}
function Gallery_printImg( url, title ) {var printImg = window.open(document.URL,"_new");printImg.document.open();printImg.document.write(Gallery_getImgSourcetoPrint(url,title));printImg.document.close();}
jQuery(function($) {GalleryModuleInitialize_Layout4();});function GalleryModuleInitialize_Layout4() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-gallery.layout-4:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $categoriesFilter = $sectionThis.find('.filter li');var $categories = $sectionThis.find('.gallery-category');var $images = $sectionThis.find('.gallery-image');var $firstCategory = $categoriesFilter.first();var $galleryItem = $sectionThis.find('.gallery-image');var $videoBar = '';var hash = window.location.hash.substring(1);if ( $categoriesFilter.filter('[data-unique-id="'+hash+'"]').length > 0 ) {$firstCategory = $categoriesFilter.filter('[data-unique-id="'+hash+'"]');}
$sectionThis.magnificPopup({fixedContentPos: true,mainClass: 'mfp-module-gallery disable-context-menu',delegate: '.mfp-image:visible',						// Categories Filter
closeOnContentClick: true,closeBtnInside: false,tLoading: translations.loading,						// Text that is displayed during loading
gallery: {enabled: true,tClose: translations.closeEsc,					// Alt text on close button
tPrev: translations.previousLeftArrowKey,		// Alt text on left arrow
tNext: translations.NextRightArrowKey,			// Alt text on right arrow
tCounter: '%curr% '+translations.of+' %total%'	// Markup for "1 of 7" counter
},image: {markup: '<div class="mfp-figure">'+'<div class="mfp-close"></div>'+'<div class="mfp-img"></div>'+'<div class="mfp-bottom-bar fancy-scrollbar">'+'<div class="mfp-title"></div>'+'<div class="mfp-counter"></div>'+'<span class="mfp-caption-close">'+S123.s123IconToSvg.getHtml('times','','')+'</span>'+'</div>'+'</div>',titleSrc: function(item) {if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {item.img.get(0).oncontextmenu = function() {return false;}}
var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
return Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);},tError: translations.imageCouldNotLoaded		// Error message when image could not be loaded
},iframe: {markup: '<div class="mfp-iframe-scaler">' +'<div class="mfp-close"></div>' +'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>' +'<div class="video-bottom-bar">'	+'<div class="mfp-title" style="position: absolute; padding-top: 5px;"></div>' +'</div>' +'</div>',patterns: {youtube: {index: 'youtube.com/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtu: {index: 'youtu.be/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtubeShorts: {index: 'youtube.com/shorts/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},vimeo: {index: 'vimeo.com/',id: function(url) {var matches = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);if ( !matches || !matches[5] ) return null;return matches[5];},src: '//player.vimeo.com/video/%id%?autoplay=1'
},site123: {index: $GLOBALS['cdn-user-videos-files'],id: function( url ) {if ( isMobileDevice.iOS() ) url += '&deviceType=ios';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'},site123Processing: {index: '/files/images/video-processing.png',id: function( url ) {if ( isMobileDevice.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'}}},callbacks: {elementParse: function( item ) {if( item.el.data('type') === 'video' ) {item.type = 'iframe';} else {item.type = 'image';}},markupParse: function(template, values, item) {var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
values.title = Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);setTimeout(function(){$('.mfp-title').off('click').click(function( event ) {event.stopPropagation();});$('.mfp-content .gallery-link-popup').on('click', function(event) {Gallery_popuplink($(this).data('link'));});},500);if ( !this.mp_currentPageUrl ) this.mp_currentPageUrl = window.location.href;window.history.replaceState(this.mp_currentPageUrl,'Title',item.el.data('image-page-url'));$videoBar = template.find('.video-bottom-bar');},updateStatus: function( data ) {var $bar = $('.mfp-bottom-bar');var $close = $('.mfp-caption-close');if ( $sectionThis.data('info-bar-position') && $sectionThis.data('info-bar-position') == 'top' ) {$bar.addClass('custom-top-position');}
if ( $sectionThis.data('hide-info-bar') && $sectionThis.data('hide-info-bar') == 'on' ) {$bar.hide();if( $videoBar ? $videoBar.hide() : false);} else {$bar.show();if( $videoBar ? $videoBar.show() : false);}
$close .off('click').on('click',function( event ) {event.stopPropagation();$bar.hide();});$bar.height() > 50 ? $close .show() : $close .hide();},imageLoadComplete: function() {this.contentContainer.removeClass('mfp-tall-images-handler');var $bottomBar = this.content.find('.mfp-bottom-bar');var $scrollContainer = isMobileDevice.any() ? $bottomBar.s123ScrollParent() : $bottomBar;if ( $scrollContainer.get(0).scrollHeight > $scrollContainer.outerHeight() ) {this.contentContainer.addClass('mfp-tall-images-handler');}},open: function( item ) {var mc = new Hammer(this.container.get(0));mc.on('swipeleft', function(){$.magnificPopup.instance.next();});mc.on('swiperight', function(){$.magnificPopup.instance.prev();});$sectionThis.data('hammer-js',mc);$(document).trigger('s123.page.ready.ReplaceExternalLinksInFreeSubDomain');},change: function() {if ( this.isOpen ) {this.wrap.addClass('mfp-open');}},close: function( item ) {$sectionThis.data('hammer-js').destroy();window.history.replaceState('','Title',this.mp_currentPageUrl);bootbox.hideAll();}}});$categoriesFilter.off('click').on('click',function ( event, pageLoad ) {event.preventDefault();var $this = $(this);var filter = $this.data('filter');var $hideCategories = $categories.filter(':not([data-filter="'+filter+'"]):visible');var $showCategories = $categories.filter('[data-filter="'+filter+'"]');if ( $showCategories.length === 0 || $hideCategories.length === 0 ) return;$categoriesFilter.removeClass('active');$this.addClass('active');$sectionThis.css({ minHeight: $sectionThis.height() });$hideCategories.stop().fadeOut(200, function() {$showCategories.stop().fadeIn(200, function() {$sectionThis.css({ minHeight: '' });showMoreButton($sectionThis,filter);disableEnableInfinityScroll($sectionThis);$(window).trigger('scroll');});});if ( pageLoad ) {showMoreButton($sectionThis,filter);}});if ( !IsHomepage() && !IsRichPage() ) {galleryAddInfinityScroll($sectionThis);$categories.off('infiniteScroll.loaded').on('infiniteScroll.loaded', function( event, data ) {var $this = $(this);var $items = $(data.itemsHtml);$this.append($items);window.myLazyLoad.update();});gallery_BrowserBackButtonHandler($sectionThis.find('.filter'));}
$firstCategory.trigger('click',[true]);if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {$.each($galleryItem,function( index, image ) {image.oncontextmenu = function() {return false;}});}
S123.galleriesImageResize.init({section: $sectionThis,container: '.gallery-category',attr: 'data-bg',element: '.gallery-image a',rowImageNum: 1,isBackgroundSizeCover: true,imageWidth: false,calcImageWidth: true,magnificPopup: true,magnificPopupEle: '.mfp-image',magnificAttr: 'data-mfp-src'});});});function showMoreButton( $sectionThis, filter ) {$sectionThis.find('.gallery-show-more-btn').hide();$sectionThis.find('.gallery-show-more-btn[data-filter="'+filter+'"]').show();$(document).trigger('s123.page.ready.refreshAOS');}}
jQuery(function($) {GalleryModuleInitialize_Layout5();});function GalleryModuleInitialize_Layout5() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-gallery.layout-5:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $categoriesFilter = $sectionThis.find('.filter li');var $categories = $sectionThis.find('.gallery-category');var $images = $sectionThis.find('.gallery-image');var $firstCategory = $categoriesFilter.first();var $galleryItem = $sectionThis.find('.gallery-image-box');var $videoBar = '';var hash = window.location.hash.substring(1);if ( $categoriesFilter.filter('[data-unique-id="'+hash+'"]').length > 0 ) {$firstCategory = $categoriesFilter.filter('[data-unique-id="'+hash+'"]');}
$sectionThis.magnificPopup({fixedContentPos: true,mainClass: 'mfp-module-gallery disable-context-menu',delegate: '.mfp-image:visible',						// Categories Filter
closeOnContentClick: true,closeBtnInside: false,tLoading: translations.loading,						// Text that is displayed during loading
gallery: {enabled: true,tClose: translations.closeEsc,					// Alt text on close button
tPrev: translations.previousLeftArrowKey,		// Alt text on left arrow
tNext: translations.NextRightArrowKey,			// Alt text on right arrow
tCounter: '%curr% '+translations.of+' %total%'	// Markup for "1 of 7" counter
},image: {markup: '<div class="mfp-figure">'+'<div class="mfp-close"></div>'+'<div class="mfp-img"></div>'+'<div class="mfp-bottom-bar fancy-scrollbar">'+'<div class="mfp-title"></div>'+'<div class="mfp-counter"></div>'+'<span class="mfp-caption-close">'+S123.s123IconToSvg.getHtml('times','','')+'</span>'+'</div>'+'</div>',titleSrc: function(item) {if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {item.img.get(0).oncontextmenu = function() {return false;}}
var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
return Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);},tError: translations.imageCouldNotLoaded		// Error message when image could not be loaded
},iframe: {markup: '<div class="mfp-iframe-scaler">' +'<div class="mfp-close"></div>' +'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>' +'<div class="video-bottom-bar">'	+'<div class="mfp-title" style="position: absolute; padding-top: 5px;"></div>' +'</div>' +'</div>',patterns: {youtube: {index: 'youtube.com/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtu: {index: 'youtu.be/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtubeShorts: {index: 'youtube.com/shorts/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},vimeo: {index: 'vimeo.com/',id: function(url) {var matches = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);if ( !matches || !matches[5] ) return null;return matches[5];},src: '//player.vimeo.com/video/%id%?autoplay=1'
},site123: {index: $GLOBALS['cdn-user-videos-files'],id: function( url ) {if ( isMobileDevice.iOS() ) url += '&deviceType=ios';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'},site123Processing: {index: '/files/images/video-processing.png',id: function( url ) {if ( isMobileDevice.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'}}},callbacks: {elementParse: function( item ) {if( item.el.data('type') === 'video' ) {item.type = 'iframe';} else {item.type = 'image';}},markupParse: function(template, values, item) {var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
values.title = Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);setTimeout(function(){$('.mfp-title').off('click').click(function( event ) {event.stopPropagation();});$('.mfp-content .gallery-link-popup').on('click', function(event) {Gallery_popuplink($(this).data('link'));});},500);if ( !this.mp_currentPageUrl ) this.mp_currentPageUrl = window.location.href;window.history.replaceState(this.mp_currentPageUrl,'Title',item.el.data('image-page-url'));$videoBar = template.find('.video-bottom-bar');},updateStatus: function( data ) {var $bar = $('.mfp-bottom-bar');var $close = $('.mfp-caption-close');if ( $sectionThis.data('info-bar-position') && $sectionThis.data('info-bar-position') == 'top' ) {$bar.addClass('custom-top-position');}
if ( $sectionThis.data('hide-info-bar') && $sectionThis.data('hide-info-bar') == 'on' ) {$bar.hide();if( $videoBar ? $videoBar.hide() : false);} else {$bar.show();if( $videoBar ? $videoBar.show() : false);}
$close .off('click').on('click',function( event ) {event.stopPropagation();$bar.hide();});$bar.height() > 50 ? $close .show() : $close .hide();},imageLoadComplete: function() {this.contentContainer.removeClass('mfp-tall-images-handler');var $bottomBar = this.content.find('.mfp-bottom-bar');var $scrollContainer = isMobileDevice.any() ? $bottomBar.s123ScrollParent() : $bottomBar;if ( $scrollContainer.get(0).scrollHeight > $scrollContainer.outerHeight() ) {this.contentContainer.addClass('mfp-tall-images-handler');}},open: function( item ) {var mc = new Hammer(this.container.get(0));mc.on('swipeleft', function(){$.magnificPopup.instance.next();});mc.on('swiperight', function(){$.magnificPopup.instance.prev();});$sectionThis.data('hammer-js',mc);$(document).trigger('s123.page.ready.ReplaceExternalLinksInFreeSubDomain');},change: function() {if ( this.isOpen ) {this.wrap.addClass('mfp-open');}},close: function( item ) {$sectionThis.data('hammer-js').destroy();window.history.replaceState('','Title',this.mp_currentPageUrl);bootbox.hideAll();}}});$categoriesFilter.off('click').on('click',function ( event, pageLoad ) {event.preventDefault();var $this = $(this);var filter = $this.data('filter');var $hideCategories = $categories.filter(':not([data-filter="'+filter+'"]):visible');var $showCategories = $categories.filter('[data-filter="'+filter+'"]');if ( $showCategories.length === 0 || $hideCategories.length === 0 ) return;$categoriesFilter.removeClass('active');$this.addClass('active');$sectionThis.css({ minHeight: $sectionThis.height() });$hideCategories.stop().fadeOut(200, function() {$showCategories.stop().fadeIn(200, function() {$sectionThis.css({ minHeight: '' });showMoreButton($sectionThis,filter);disableEnableInfinityScroll($sectionThis);$(window).trigger('scroll');});});if ( pageLoad ) {showMoreButton($sectionThis,filter);}});if ( !IsHomepage() && !IsRichPage() ) {galleryAddInfinityScroll($sectionThis);$categories.off('infiniteScroll.loaded').on('infiniteScroll.loaded', function( event, data ) {var $this = $(this);var $items = $(data.itemsHtml);$this.find('.gallery-images-container').append($items);window.myLazyLoad.update();});gallery_BrowserBackButtonHandler($sectionThis.find('.filter'));}
$firstCategory.trigger('click',[true]);if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {$.each($galleryItem,function( index, image ) {image.oncontextmenu = function() {return false;}});}
S123.galleriesImageResize.init({section: $sectionThis,container: '.gallery-images-container',attr: 'data-bg',element: '.gallery-image a',rowImageNum: 1,isBackgroundSizeCover: true,imageWidth: false,calcImageWidth: true,magnificPopup: true,magnificPopupEle: '.mfp-image',magnificAttr: 'data-mfp-src'});});});function showMoreButton( $sectionThis, filter ) {$sectionThis.find('.gallery-show-more-btn').hide();$sectionThis.find('.gallery-show-more-btn[data-filter="'+filter+'"]').show();$(document).trigger('s123.page.ready.refreshAOS');}}
jQuery(function($) {GalleryModuleInitialize_Layout6();});function GalleryModuleInitialize_Layout6() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-gallery.layout-6:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $isotopeContainer = $sectionThis.find('.isotope-gallery-container');var $categories = $sectionThis.find('.filter li');var $categoriesDescription = $sectionThis.find('.gallery-category-description');var $flickityContainer = $sectionThis.find('.gallery-images-container');var layout_customize = $sectionThis.find('.layout-customize').length > 0 ? tryParseJSON($sectionThis.find('.layout-customize').val()) : {};var flickitySettings = {imagesLoaded: true,initialIndex: 1,lazyLoad: 2};var $galleryItem = $sectionThis.find('.gallery-image');var isScrolling;$sectionThis.find('.gallery-container').prepend($sectionThis.find('.gallery-category-description'));if ( layout_customize && layout_customize.display_type === 'carousel' ) {flickitySettings.friction = 0.28;var animationOffset = flickitySettings.friction;flickitySettings.wrapAround = true;flickitySettings.pauseAutoPlayOnHover = true;flickitySettings.autoPlay = layout_customize.autoPlay ? parseFloat(layout_customize.carouselInterval) : false;if ( $.isNumeric(flickitySettings.autoPlay) ) {if ( flickitySettings.autoPlay === 0 ) flickitySettings.autoPlay = animationOffset;flickitySettings.autoPlay = (flickitySettings.autoPlay + animationOffset) * 1000;}}
if ( layout_customize && layout_customize.display_type === 'alwaysRun' ) {flickitySettings.friction = 0.28;flickitySettings.autoPlay = 1500;flickitySettings.freeScroll = false;flickitySettings.prevNextButtons = false;flickitySettings.pageDots = false;flickitySettings.pauseAutoPlayOnHover = false;flickitySettings.wrapAround = true;}
$flickityContainer.flickity(flickitySettings);$isotopeContainer.isotope({itemSelector: '.gallery-images-container, .gallery-image-caption'});if ( layout_customize && layout_customize.display_type === 'alwaysRun' ) {$flickityContainer.on( 'dragStart.flickity', function( event, pointer ) {clearTimeout(isScrolling);});$flickityContainer.on('dragEnd.flickity', function( event, pointer ) {clearTimeout(isScrolling);var $this = $(this);var flkty = Flickity.data( this );isScrolling = setTimeout(function() {flkty.playPlayer();}, 1000);});}
$flickityContainer.on('settle.flickity', function() {var $this = $(this);var flkty = Flickity.data( this );var caption = Gallery_getImageMagnificPopupCaption($(flkty.selectedElement).data('tool-title'),$(flkty.selectedElement).data('image-description'),$(flkty.selectedElement).data('image-link'),$(flkty.selectedElement).data('image-link-text'),$(flkty.selectedElement).data('image-page-url'),$(flkty.selectedElement).attr('title'),false,'',[]);$this.next('.gallery-image-caption').html(caption);$sectionThis.find('.gallery-image:not(.is-selected) iframe').each(function () { 	// YouTube/Vimeo
switch ( $(this).data('player') ) {case 'youtube':if ( this.src.indexOf("youtube.com") > -1 ) {this.contentWindow.postMessage('{"event":"command","func":"' + 'pauseVideo' + '","args":""}', '*');}
break;case 'vimeo':if ( this.src.indexOf("vimeo.com") > -1 ) {var player = new Vimeo.Player(this);player.pause();}
break;case 'site123':if (this.contentWindow.player) this.contentWindow.player.pause();break;}});$isotopeContainer.isotope('layout');});$isotopeContainer.on( 'arrangeComplete', function( event, filteredItems ) {$flickityContainer.flickity('resize');});$categories.off('click').on('click',function () {var $this = $(this);$isotopeContainer.isotope({filter: function() {return gallery_Filter_Layout6($(this),$this.data('filter'));}});$categories.removeClass('active');$this.addClass('active');$categoriesDescription.removeClass('active-description');$sectionThis.find('.gallery-category-description[data-filter="'+$this.data('filter')+'"]').addClass('active-description');$flickityContainer.flickity('resize');return false;});$categories.first().trigger('click');if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {$.each($galleryItem,function( index, image ) {image.oncontextmenu = function() {return false;}});}});});}
function gallery_Filter_Layout6( $item, filter ) {return $item.attr('data-filter') == filter;}
jQuery(function($) {GalleryModuleInitialize_Layout7();});function GalleryModuleInitialize_Layout7() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-gallery.layout-7:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $isotopeContainer = $sectionThis.find('.isotope-gallery-container');var $categories = $sectionThis.find('.filter li');var $categoriesDescription = $sectionThis.find('.gallery-category-description');var $flickityContainer = $sectionThis.find('.gallery-images-container');var layout_customize = $sectionThis.find('.layout-customize').length > 0 ? tryParseJSON($sectionThis.find('.layout-customize').val()) : {};var flickitySettings = {imagesLoaded: true,initialIndex: 1,lazyLoad: 2};var $galleryItem = $sectionThis.find('.g-i');var isScrolling;if ( layout_customize && layout_customize.display_type === 'carousel' ) {flickitySettings.friction = 0.28;var animationOffset = flickitySettings.friction;flickitySettings.wrapAround = true;flickitySettings.pauseAutoPlayOnHover = true;flickitySettings.autoPlay = layout_customize.autoPlay ? parseFloat(layout_customize.carouselInterval) : false;if ( $.isNumeric(flickitySettings.autoPlay) ) {if ( flickitySettings.autoPlay === 0 ) flickitySettings.autoPlay = animationOffset;flickitySettings.autoPlay = (flickitySettings.autoPlay + animationOffset) * 1000;}}
if ( layout_customize && layout_customize.display_type === 'alwaysRun' ) {flickitySettings.friction = 0.28;flickitySettings.autoPlay = 1500;flickitySettings.freeScroll = false;flickitySettings.prevNextButtons = false;flickitySettings.pageDots = false;flickitySettings.pauseAutoPlayOnHover = false;flickitySettings.wrapAround = true;}
if ( $isotopeContainer.hasClass('carousel-style-2') ) {flickitySettings.lazyLoad = 4;flickitySettings.initialIndex = 3;}
$flickityContainer.flickity(flickitySettings);$isotopeContainer.isotope({itemSelector: '.gallery-images-container, .gallery-image-caption'});if ( layout_customize && layout_customize.display_type === 'alwaysRun' ) {$flickityContainer.on( 'dragStart.flickity', function( event, pointer ) {clearTimeout(isScrolling);});$flickityContainer.on('dragEnd.flickity', function( event, pointer ) {clearTimeout(isScrolling);var $this = $(this);var flkty = Flickity.data( this );isScrolling = setTimeout(function() {flkty.playPlayer();}, 1000);});}
$flickityContainer.on('settle.flickity', function() {var $this = $(this);var flkty = Flickity.data( this );var caption = Gallery_getImageMagnificPopupCaption($(flkty.selectedElement).data('tool-title'),$(flkty.selectedElement).data('image-description'),$(flkty.selectedElement).data('image-link'),$(flkty.selectedElement).data('image-link-text'),$(flkty.selectedElement).data('image-page-url'),$(flkty.selectedElement).attr('title'),false,'',[]);$this.next('.gallery-image-caption').html(caption);$(flkty.selectedElement).attr('alt',$(flkty.selectedElement).data('alt'));$sectionThis.find('.gallery-video-container:not(.is-selected) iframe').each(function () { 	// YouTube/Vimeo
switch ( $(this).data('player') ) {case 'youtube':if ( this.src.indexOf("youtube.com") > -1 ) {this.contentWindow.postMessage('{"event":"command","func":"' + 'pauseVideo' + '","args":""}', '*');}
break;case 'vimeo':if ( this.src.indexOf("vimeo.com") > -1 ) {var player = new Vimeo.Player(this);player.pause();}
break;case 'site123':if (this.contentWindow.player) this.contentWindow.player.pause();break;}});$isotopeContainer.isotope('layout');});$isotopeContainer.on( 'arrangeComplete', function( event, filteredItems ) {$flickityContainer.flickity('resize');});if ( $categoriesDescription.length > 0 ) {$flickityContainer.addClass('gallery-images-container-with-description');}
$categories.off('click').on('click',function () {var $this = $(this);$isotopeContainer.isotope({filter: function() {return gallery_Filter_Layout7($(this),$this.data('filter'));}});$categories.removeClass('active');$this.addClass('active');$categoriesDescription.removeClass('active-description');$sectionThis.find('.gallery-category-description[data-filter="'+$this.data('filter')+'"]').addClass('active-description');$flickityContainer.flickity('resize');return false;});$categories.first().trigger('click');if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {$.each($galleryItem,function( index, image ) {image.oncontextmenu = function() {return false;}});}
if ( $sectionThis.find('.isotope-gallery-container').hasClass('carousel-style-2') ) {$sectionThis.magnificPopup({fixedContentPos: true,mainClass: 'mfp-module-gallery disable-context-menu',delegate: '.mfp-image:visible',						// Categories Filter
closeOnContentClick: true,closeBtnInside: false,tLoading: translations.loading,						// Text that is displayed during loading
gallery: {enabled: true,tClose: translations.closeEsc,					// Alt text on close button
tPrev: translations.previousLeftArrowKey,		// Alt text on left arrow
tNext: translations.NextRightArrowKey,			// Alt text on right arrow
tCounter: '%curr% '+translations.of+' %total%'	// Markup for "1 of 7" counter
},image: {markup: '<div class="mfp-figure">'+'<div class="mfp-close"></div>'+'<div class="mfp-img"></div>'+'<div class="mfp-bottom-bar fancy-scrollbar">'+'<div class="mfp-title"></div>'+'<div class="mfp-counter"></div>'+'<span class="mfp-caption-close">'+S123.s123IconToSvg.getHtml('times','','')+'</span>'+'</div>'+'</div>',titleSrc: function(item) {if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {item.img.get(0).oncontextmenu = function() {return false;}}
var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
return Gallery_getImageMagnificPopupCaption( $categories.data('tool-title'),item.el.data('image-description'), item.el.data('image-link'),  item.el.data('image-link-text') , item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);},tError: translations.imageCouldNotLoaded		// Error message when image could not be loaded
},iframe: {markup: '<div class="mfp-iframe-scaler">' +'<div class="mfp-close"></div>' +'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>' +'<div class="video-bottom-bar">'	+'<div class="mfp-title" style="position: absolute; padding-top: 5px;"></div>' +'</div>' +'</div>',patterns: {youtube: {index: 'youtube.com/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtu: {index: 'youtu.be/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtubeShorts: {index: 'youtube.com/shorts/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},vimeo: {index: 'vimeo.com/',id: function(url) {var matches = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);if ( !matches || !matches[5] ) return null;return matches[5];},src: '//player.vimeo.com/video/%id%?autoplay=1'
},site123: {index: $GLOBALS['cdn-user-videos-files'],id: function( url ) {if ( isMobileDevice.iOS() ) url += '&deviceType=ios';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'},site123Processing: {index: '/files/images/video-processing.png',id: function( url ) {if ( isMobileDevice.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'}}},callbacks: {elementParse: function( item ) {if( item.el.data('type') === 'video' ) {item.type = 'iframe';} else {item.type = 'image';}},markupParse: function(template, values, item) {var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
values.title = Gallery_getImageMagnificPopupCaption( $categories.data('tool-title'),item.el.data('image-description'), item.el.data('image-link'),  item.el.data('image-link-text') , item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);setTimeout(function(){$('.mfp-title').off('click').click(function( event ) {event.stopPropagation();});$('.mfp-content .gallery-link-popup').on('click', function(event) {Gallery_popuplink($(this).data('link'));});},500);if ( !this.mp_currentPageUrl ) this.mp_currentPageUrl = window.location.href;window.history.replaceState(this.mp_currentPageUrl,'Title',item.el.data('image-page-url'));$videoBar = template.find('.video-bottom-bar');},updateStatus: function( data ) {var $bar = $('.mfp-bottom-bar');var $close = $('.mfp-caption-close');if ( $sectionThis.data('info-bar-position') && $sectionThis.data('info-bar-position') == 'top' ) {$bar.addClass('custom-top-position');}
if ( $sectionThis.data('hide-info-bar') && $sectionThis.data('hide-info-bar') == 'on' ) {$bar.hide();if( $videoBar ? $videoBar.hide() : false);} else {$bar.show();if( $videoBar ? $videoBar.show() : false);}
$close .off('click').on('click',function( event ) {event.stopPropagation();$bar.hide();});$bar.height() > 50 ? $close .show() : $close .hide();},imageLoadComplete: function() {this.contentContainer.removeClass('mfp-tall-images-handler');var $bottomBar = this.content.find('.mfp-bottom-bar');var $scrollContainer = isMobileDevice.any() ? $bottomBar.s123ScrollParent() : $bottomBar;if ( $scrollContainer.get(0).scrollHeight > $scrollContainer.outerHeight() ) {this.contentContainer.addClass('mfp-tall-images-handler');}},open: function( item ) {var mc = new Hammer(this.container.get(0));mc.on('swipeleft', function(){$.magnificPopup.instance.next();});mc.on('swiperight', function(){$.magnificPopup.instance.prev();});$sectionThis.data('hammer-js',mc);$(document).trigger('s123.page.ready.ReplaceExternalLinksInFreeSubDomain');},change: function() {if ( this.isOpen ) {this.wrap.addClass('mfp-open');}},close: function( item ) {$sectionThis.data('hammer-js').destroy();window.history.replaceState('','Title',this.mp_currentPageUrl);bootbox.hideAll();}}});}});});}
function gallery_Filter_Layout7( $item, filter ) {return $item.attr('data-filter') == filter;}
jQuery(function($) {GalleryModuleInitialize_Layout8();});function GalleryModuleInitialize_Layout8() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-gallery.layout-8:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $categoriesFilter = $sectionThis.find('.filter li');var $categories = $sectionThis.find('.gallery-category');var $images = $sectionThis.find('.gallery-image');var $firstCategory = $categoriesFilter.first();var $galleryItem = $sectionThis.find('.gallery-image-box');var $videoBar = '';var hash = window.location.hash.substring(1);if ( $categoriesFilter.filter('[data-unique-id="'+hash+'"]').length > 0 ) {$firstCategory = $categoriesFilter.filter('[data-unique-id="'+hash+'"]');}
$sectionThis.magnificPopup({fixedContentPos: true,mainClass: 'mfp-module-gallery disable-context-menu',delegate: '.mfp-image:visible',						// Categories Filter
closeOnContentClick: true,closeBtnInside: false,tLoading: translations.loading,						// Text that is displayed during loading
gallery: {enabled: true,tClose: translations.closeEsc,					// Alt text on close button
tPrev: translations.previousLeftArrowKey,		// Alt text on left arrow
tNext: translations.NextRightArrowKey,			// Alt text on right arrow
tCounter: '%curr% '+translations.of+' %total%'	// Markup for "1 of 7" counter
},image: {markup: '<div class="mfp-figure">'+'<div class="mfp-close"></div>'+'<div class="mfp-img"></div>'+'<div class="mfp-bottom-bar fancy-scrollbar">'+'<div class="mfp-title"></div>'+'<div class="mfp-counter"></div>'+'<span class="mfp-caption-close">'+S123.s123IconToSvg.getHtml('times','','')+'</span>'+'</div>'+'</div>',titleSrc: function(item) {if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {item.img.get(0).oncontextmenu = function() {return false;}}
var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
return Gallery_getImageMagnificPopupCaption( $categories.data('tool-title'),item.el.data('image-description'), item.el.data('image-link'),  item.el.data('image-link-text') , item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);},tError: translations.imageCouldNotLoaded		// Error message when image could not be loaded
},iframe: {markup: '<div class="mfp-iframe-scaler">' +'<div class="mfp-close"></div>' +'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>' +'<div class="video-bottom-bar">'	+'<div class="mfp-title" style="position: absolute; padding-top: 5px;"></div>' +'</div>' +'</div>',patterns: {youtube: {index: 'youtube.com/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtu: {index: 'youtu.be/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtubeShorts: {index: 'youtube.com/shorts/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},vimeo: {index: 'vimeo.com/',id: function(url) {var matches = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);if ( !matches || !matches[5] ) return null;return matches[5];},src: '//player.vimeo.com/video/%id%?autoplay=1'
},site123: {index: $GLOBALS['cdn-user-videos-files'],id: function( url ) {if ( isMobileDevice.iOS() ) url += '&deviceType=ios';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'},site123Processing: {index: '/files/images/video-processing.png',id: function( url ) {if ( isMobileDevice.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'}}},callbacks: {elementParse: function( item ) {if( item.el.data('type') === 'video' ) {item.type = 'iframe';} else {item.type = 'image';}},markupParse: function(template, values, item) {var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
values.title = Gallery_getImageMagnificPopupCaption( $categories.data('tool-title'),item.el.data('image-description'), item.el.data('image-link'),  item.el.data('image-link-text') , item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);setTimeout(function(){$('.mfp-title').off('click').click(function( event ) {event.stopPropagation();});$('.mfp-content .gallery-link-popup').on('click', function(event) {Gallery_popuplink($(this).data('link'));});},500);if ( !this.mp_currentPageUrl ) this.mp_currentPageUrl = window.location.href;window.history.replaceState(this.mp_currentPageUrl,'Title',item.el.data('image-page-url'));$videoBar = template.find('.video-bottom-bar');},updateStatus: function( data ) {var $bar = $('.mfp-bottom-bar');var $close = $('.mfp-caption-close');if ( $sectionThis.data('info-bar-position') && $sectionThis.data('info-bar-position') == 'top' ) {$bar.addClass('custom-top-position');}
if ( $sectionThis.data('hide-info-bar') && $sectionThis.data('hide-info-bar') == 'on' ) {$bar.hide();if( $videoBar ? $videoBar.hide() : false);} else {$bar.show();if( $videoBar ? $videoBar.show() : false);}
$close .off('click').on('click',function( event ) {event.stopPropagation();$bar.hide();});$bar.height() > 50 ? $close .show() : $close .hide();},imageLoadComplete: function() {this.contentContainer.removeClass('mfp-tall-images-handler');var $bottomBar = this.content.find('.mfp-bottom-bar');var $scrollContainer = isMobileDevice.any() ? $bottomBar.s123ScrollParent() : $bottomBar;if ( $scrollContainer.get(0).scrollHeight > $scrollContainer.outerHeight() ) {this.contentContainer.addClass('mfp-tall-images-handler');}},open: function( item ) {var mc = new Hammer(this.container.get(0));mc.on('swipeleft', function(){$.magnificPopup.instance.next();});mc.on('swiperight', function(){$.magnificPopup.instance.prev();});$sectionThis.data('hammer-js',mc);$(document).trigger('s123.page.ready.ReplaceExternalLinksInFreeSubDomain');},change: function() {if ( this.isOpen ) {this.wrap.addClass('mfp-open');}},close: function( item ) {$sectionThis.data('hammer-js').destroy();window.history.replaceState('','Title',this.mp_currentPageUrl);bootbox.hideAll();}}});$categoriesFilter.off('click').on('click',function ( event, pageLoad ) {event.preventDefault();var $this = $(this);var filter = $this.data('filter');var $hideCategories = $categories.filter(':not([data-filter="'+filter+'"]):visible');var $showCategories = $categories.filter('[data-filter="'+filter+'"]');if ( $showCategories.length === 0 || $hideCategories.length === 0 ) return;$categoriesFilter.removeClass('active');$this.addClass('active');$sectionThis.css({ minHeight: $sectionThis.height() });$hideCategories.stop().fadeOut(200, function() {$showCategories.stop().fadeIn(200, function() {$sectionThis.css({ minHeight: '' });showMoreButton($sectionThis,filter);disableEnableInfinityScroll($sectionThis);$(window).trigger('scroll');});});if ( pageLoad ) {showMoreButton($sectionThis,filter);}});if ( !IsHomepage() && !IsRichPage() ) {galleryAddInfinityScroll($sectionThis);$categories.off('infiniteScroll.loaded').on('infiniteScroll.loaded', function( event, data ) {var $this = $(this);var $items = $(data.itemsHtml);$this.find('.gallery-images-container').append($items);window.myLazyLoad.update();});gallery_BrowserBackButtonHandler($sectionThis.find('.filter'));}
$firstCategory.trigger('click',[true]);if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {$.each($galleryItem,function( index, image ) {image.oncontextmenu = function() {return false;}});}
S123.galleriesImageResize.init({section: $sectionThis,container: '.gallery-images-container',attr: 'data-bg',element: '.gallery-image a',rowImageNum: 1,isBackgroundSizeCover: true,imageWidth: false,calcImageWidth: true,magnificPopup: true,magnificPopupEle: '.mfp-image',magnificAttr: 'data-mfp-src'});});});function showMoreButton( $sectionThis, filter ) {$sectionThis.find('.gallery-show-more-btn').hide();$sectionThis.find('.gallery-show-more-btn[data-filter="'+filter+'"]').show();$(document).trigger('s123.page.ready.refreshAOS');}}
jQuery(function($) {GalleryModuleInitialize_Layout9_10();});function GalleryModuleInitialize_Layout9_10() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-gallery.layout-9:not(.s123-module-videos),section.s123-module-gallery.layout-10:not(.s123-module-videos)');$section.each(function( index ) {var $sectionThis = $(this);var $categoriesFilter = $sectionThis.find('.filter li');var $categories = $sectionThis.find('.gallery-category');var $firstCategory = $categoriesFilter.first();var $galleryItem = $sectionThis.find('.grid-item');var $videoBar = '';var hash = window.location.hash.substring(1);if ( $categoriesFilter.filter('[data-unique-id="'+hash+'"]').length > 0 ) {$firstCategory = $categoriesFilter.filter('[data-unique-id="'+hash+'"]');}
$sectionThis.magnificPopup({fixedContentPos: true,mainClass: 'mfp-module-gallery disable-context-menu',delegate: '.mfp-image:visible',						// Categories Filter
closeOnContentClick: true,closeBtnInside: false,tLoading: translations.loading,						// Text that is displayed during loading
gallery: {enabled: true,tClose: translations.closeEsc,					// Alt text on close button
tPrev: translations.previousLeftArrowKey,		// Alt text on left arrow
tNext: translations.NextRightArrowKey,			// Alt text on right arrow
tCounter: '%curr% '+translations.of+' %total%'	// Markup for "1 of 7" counter
},image: {markup: '<div class="mfp-figure">'+'<div class="mfp-close"></div>'+'<div class="mfp-img"></div>'+'<div class="mfp-bottom-bar fancy-scrollbar">'+'<div class="mfp-title"></div>'+'<div class="mfp-counter"></div>'+'<span class="mfp-caption-close">'+S123.s123IconToSvg.getHtml('times','','')+'</span>'+'</div>'+'</div>',titleSrc: function(item) {if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {item.img.get(0).oncontextmenu = function() {return false;}}
var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
return Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.data('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);},tError: translations.imageCouldNotLoaded		// Error message when image could not be loaded
},iframe: {markup: '<div class="mfp-iframe-scaler">' +'<div class="mfp-close"></div>' +'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>' +'<div class="video-bottom-bar">'	+'<div class="mfp-title" style="position: absolute; padding-top: 5px;"></div>' +'</div>' +'</div>',patterns: {youtube: {index: 'youtube.com/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtu: {index: 'youtu.be/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},youtubeShorts: {index: 'youtube.com/shorts/',id: function(url) {var videoID = youtube_parser(url);return videoID ? videoID : null;},src: '//www.youtube.com/embed/%id%?autoplay=1'
},vimeo: {index: 'vimeo.com/',id: function(url) {var matches = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);if ( !matches || !matches[5] ) return null;return matches[5];},src: '//player.vimeo.com/video/%id%?autoplay=1'
},site123: {index: $GLOBALS['cdn-user-videos-files'],id: function( url ) {if ( isMobileDevice.iOS() ) url += '&deviceType=ios';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'},site123Processing: {index: '/files/images/video-processing.png',id: function( url ) {if ( isMobileDevice.any() ) url += '&autoplay=0';return url;},src: '/include/globalVideoPlayer.php?websiteID='+$('#websiteID').val()+'&website_uniqueID='+$('#website_uniqueID').val()+'&cad=1&url=%id%'}}},callbacks: {elementParse: function( item ) {if( item.el.data('type') === 'video' ) {item.type = 'iframe';} else {item.type = 'image';}},markupParse: function(template, values, item) {var isShowSocialIcons = true;if ( $sectionThis.data('hide-social-icons') && $sectionThis.data('hide-social-icons') == 'on' ) {isShowSocialIcons = false;}
var buttons = [];if ( $sectionThis.data('print-image-btn') && $sectionThis.data('print-image-btn') == 'on' ) {buttons.push('print');}
if ( $sectionThis.data('download-image-btn') && $sectionThis.data('download-image-btn') == 'on' ) {buttons.push('download');}
values.title = Gallery_getImageMagnificPopupCaption($categories.data('tool-title'),item.el.data('image-description'),item.el.data('image-link'),item.el.data('image-link-text'),item.el.data('image-page-url'),item.el.attr('title'),isShowSocialIcons,item.el.data('mfp-src'),buttons);setTimeout(function(){$('.mfp-title').off('click').click(function( event ) {event.stopPropagation();});$('.mfp-content .gallery-link-popup').on('click', function(event) {Gallery_popuplink($(this).data('link'));});},500);if ( !this.mp_currentPageUrl ) this.mp_currentPageUrl = window.location.href;window.history.replaceState(this.mp_currentPageUrl,'Title',item.el.data('image-page-url'));$videoBar = template.find('.video-bottom-bar');},updateStatus: function( data ) {var $bar = $('.mfp-bottom-bar');var $close = $('.mfp-caption-close');if ( $sectionThis.data('info-bar-position') && $sectionThis.data('info-bar-position') == 'top' ) {$bar.addClass('custom-top-position');}
if ( $sectionThis.data('hide-info-bar') && $sectionThis.data('hide-info-bar') == 'on' ) {$bar.hide();if( $videoBar ? $videoBar.hide() : false);} else {$bar.show();if( $videoBar ? $videoBar.show() : false);}
$close .off('click').on('click',function( event ) {event.stopPropagation();$bar.hide();});$bar.height() > 50 ? $close .show() : $close .hide();},imageLoadComplete: function() {this.contentContainer.removeClass('mfp-tall-images-handler');var $bottomBar = this.content.find('.mfp-bottom-bar');var $scrollContainer = isMobileDevice.any() ? $bottomBar.s123ScrollParent() : $bottomBar;if ( $scrollContainer.get(0).scrollHeight > $scrollContainer.outerHeight() ) {this.contentContainer.addClass('mfp-tall-images-handler');}},open: function( item ) {var mc = new Hammer(this.container.get(0));mc.on('swipeleft', function(){$.magnificPopup.instance.next();});mc.on('swiperight', function(){$.magnificPopup.instance.prev();});$sectionThis.data('hammer-js',mc);$(document).trigger('s123.page.ready.ReplaceExternalLinksInFreeSubDomain');},change: function() {if ( this.isOpen ) {this.wrap.addClass('mfp-open');}},close: function( item ) {$sectionThis.data('hammer-js').destroy();window.history.replaceState('','Title',this.mp_currentPageUrl);bootbox.hideAll();}}});$categoriesFilter.off('click.gallery.first.cat.click').on('click.gallery.first.cat.click',function ( event, pageLoad ) {event.preventDefault();var $this = $(this);var filter = $this.data('filter');var $hideCategories = $categories.filter(':not([data-filter="'+filter+'"]):visible');var $showCategories = $categories.filter('[data-filter="'+filter+'"]');if ( $showCategories.length === 0 || $hideCategories.length === 0 ) return;$categoriesFilter.removeClass('active');$this.addClass('active');$sectionThis.css({ minHeight: $sectionThis.height() });$hideCategories.stop().fadeOut(200, function() {$showCategories.stop().fadeIn(200, function() {$sectionThis.css({ minHeight: '' });showMoreButton($sectionThis,filter);disableEnableInfinityScroll($sectionThis);$(window).trigger('scroll');});});if ( pageLoad ) {showMoreButton($sectionThis,filter);}});if ( !IsHomepage() && !IsRichPage() ) {galleryAddInfinityScroll($sectionThis);$categories.off('infiniteScroll.loaded').on('infiniteScroll.loaded', function( event, data ) {var $this = $(this);var $items = $(data.itemsHtml);if ( $sectionThis.hasClass('layout-10') ) {$this.find('.grid .grid-item').addClass('grid-item-grow');$this.find('.grid').append($items);} else {$this.append($items);}
window.myLazyLoad.update();});gallery_BrowserBackButtonHandler($sectionThis.find('.filter'));}
$firstCategory.trigger('click.gallery.first.cat.click',[true]);if ( $sectionThis.data('prevent-download-image') && $sectionThis.data('prevent-download-image') == 'on' ) {$.each($galleryItem,function( index, image ) {image.oncontextmenu = function() {return false;}});}
S123.galleriesImageResize.init({section: $sectionThis,container: '.gallery-category',attr: 'data-src',element: '.grid-item img',rowImageNum: 1,isBackgroundSizeCover: false,imageWidth: false,calcImageWidth: false,magnificPopup: true,magnificPopupEle: '.mfp-image',magnificAttr: 'data-mfp-src'});});});function showMoreButton( $sectionThis, filter ) {$sectionThis.find('.gallery-show-more-btn').hide();$sectionThis.find('.gallery-show-more-btn[data-filter="'+filter+'"]').show();$(document).trigger('s123.page.ready.refreshAOS');}}
jQuery(function($) {ServicesModuleInitialize();});function ServicesModuleInitialize() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-services');$section.each(function( index ) {var $sectionThis = $(this);var categories = new ModuleLayoutCategories({$items :  $sectionThis.find('.services-category'),$categoriesContainer : $sectionThis.find('.categories-panel'),$filterButton : $sectionThis.find('.items-responsive-filter'),$categories : $sectionThis.find('.items-categories-container li')});if ( $sectionThis.hasClass('layout-10') ) {$sectionThis.find('.service-item-description').each(function() {const $paragraph = $(this);const lineHeight = parseFloat($paragraph.css('font-size')) * 1.5;const maxLines = 4;const actualHeight = $paragraph.height();const numberOfLines = actualHeight / lineHeight;if (numberOfLines > maxLines) {$paragraph.addClass('show-more');$paragraph.attr('data-rel', 'tooltip');$paragraph.css('height', lineHeight * maxLines);$paragraph.on('click', function() {var _this = $(this);bootbox.alert({title: _this.data('title'),message: _this.html(),backdrop: true});});}});}
ServicesModuleMobileViewCarouselInit($sectionThis);});});}
function ServicesModuleMobileViewCarouselInit( $section ) {let sectionID = $section.get(0).id.replace('section-','');let $sectionItemsContainer = $section.find('.service-grid');let mobileViewTypeNUM = $section.data('mobile-view-type');ServicesModuleMobileViewCarouselInitResizeHandler();if ( $sectionItemsContainer.hasClass('slick-initialized') ) {$sectionItemsContainer.css('visibility','none');$sectionItemsContainer.slick('unslick');$sectionItemsContainer.parent().find('.custom-arrow-container').remove();}
if ( findBootstrapEnvironment() != 'xs' || mobileViewTypeNUM != '2' ) {$sectionItemsContainer.css('visibility','visible');return;}
$sectionItemsContainer.on('init', function(event) {$sectionItemsContainer.css('visibility','visible');});$sectionItemsContainer.slick({dots: false,infinite: true,vertical: false,verticalSwiping: false,slidesToShow: 1,slidesToScroll: 1,adaptiveHeight: true,swipeToSlide: true,rtl: $('html').attr('dir') === 'rtl' ? true : false,centerMode: true,centerPadding: '8%',arrows: false});function ServicesModuleMobileViewCarouselInitResizeHandler() {$(window).off('resize.ServicesModuleMobileViewCarouselInit').on('resize.ServicesModuleMobileViewCarouselInit', function( event ) {clearTimeout(window.ServicesModuleMobileViewCarouselInit_Delay);window.ServicesModuleMobileViewCarouselInit_Delay = setTimeout( function() {var $sections = $('section.s123-module-services');$sections.each(function( index ) {ServicesModuleMobileViewCarouselInit($(this));});},50);});}}
jQuery(function($) {TestimonialsModuleInitialize_Layout1_Layout8_Layout9();});function TestimonialsModuleInitialize_Layout1_Layout8_Layout9() {$( document ).on( "s123.page.ready", function( event ) {var $sections = $('.s123-module-testimonials.layout-1, .s123-module-testimonials.layout-8, .s123-module-testimonials.layout-9');$sections.each(function( index ) {var $s = $(this);var $carousel = $s.find('[data-ride="carousel"]');var layout_customize = $s.find('.layout-customize').length > 0 ? tryParseJSON($s.find('.layout-customize').val()) : '';var testimonialsInterval = 10000;if ( layout_customize != '' ) {testimonialsInterval = layout_customize.testimonialsInterval * 1000;}
$carousel.carousel({interval: isMobileDevice.any() ? false : testimonialsInterval});$carousel.find('.carousel-control.left').click(function() {$carousel.carousel('prev');});$carousel.find('.carousel-control.right').click(function() {$carousel.carousel('next');});$carousel.find('.carousel-indicators li').click(function(){$carousel.carousel($(this).data('slide-to'));});});});$( document ).on( "s123.page.load", function( event ) {setTestimonialsHeight();});if ( IsWizard() ) {$(document).on('wizard.preview.device.changed', function( event ) {setTestimonialsHeight();});}
function setTestimonialsHeight() {var $sections = $('.s123-module-testimonials.layout-1, .s123-module-testimonials.layout-8, .s123-module-testimonials.layout-9');$sections.each(function( index ) {var $s = $(this);var $carousel = $s.find('[data-ride="carousel"]');$carousel.find('.item, .testimonial-image').css({ minHeight: '' });if ( !IsIE11() ) {var selector = $s.hasClass('layout-8') && findBootstrapEnvironment() !== 'xs' ? '.testimonial-image' : '.item';$carousel.find(selector).css({minHeight: Math.max.apply(Math, $carousel.find('.item').map(function() { return $(this).outerHeight(); }))});}});}}
jQuery(function($) {TestimonialsModuleInitialize_Layouts();});function TestimonialsModuleInitialize_Layouts() {$( document ).on( "s123.page.ready", function( event ) {var $sections = $('.s123-module-testimonials');$sections.each(function( index ) {var $s = $(this);var $categories = $s.find('.testimonials-category');var categories = new ModuleLayoutCategories({$items :  $s.find('.testimonials-category'),$categoriesContainer : $s.find('.categories-panel'),$filterButton : $s.find('.items-responsive-filter'),$categories : $s.find('.items-categories-container li')});});});}
jQuery(function($) {TestimonialsModuleInitialize_Layout12();});function TestimonialsModuleInitialize_Layout12() {$( document ).on( "s123.page.ready", function( event ) {var $sections = $('.s123-module-testimonials.layout-12');$sections.each(function( index ) {var $s = $(this);var $categories = $s.find('.testimonials-category');var categories = new ModuleLayoutCategories({$items :  $s.find('.testimonials-category'),$categoriesContainer : $s.find('.categories-panel'),$filterButton : $s.find('.items-responsive-filter'),$categories : $s.find('.items-categories-container li')});var $carousel = $($s.find('.testimonials-continuous-slider').get(0));var slidesToShow = whatScreen.any() == 'mobile' ? 1 : 3;$(window).on('resize', function() {if (whatScreen.any() == 'mobile') {slidesToShow = 1;} else {slidesToShow = 3;}
$carousel.slick('destroy');testimonialsLayout12Slick($carousel,slidesToShow);});if ( !$carousel.hasClass('slick-initialized') ) {testimonialsLayout12Slick($carousel,slidesToShow);}
$s.on('module_layout_categories.show', function (event, category) {$carousel.slick('destroy');$carousel = $s.find('.testimonials-category[data-categories-filter="'+category+'"] .testimonials-continuous-slider');if ( !$carousel.hasClass('slick-initialized') ) {testimonialsLayout12Slick($carousel,slidesToShow);}});});});}
function testimonialsLayout12Slick( $carousel, slidesToShow ) {$carousel.slick({slidesToShow: slidesToShow,  // number of slides to show at once
slidesToScroll: 1,  // number of slides to scroll at once
autoplay: true,infinite: true,speed: 8000,  // speed of the transition, play with this value to achieve desired effect
autoplaySpeed: 0,  // no delay between auto-play transitions
cssEase: 'linear',  // this gives the linear movement between slides
arrows: false,  // optional: disable arrows
pauseOnHover: true,  // optional: prevent pause when hover
draggable: false,centerMode: false,rtl: $('html').attr('dir') == 'rtl' ? true : false,adaptiveHeight: true});}
// Run when the page ready (before images and other resource)
jQuery(function($) {MultiCurrencies.init();ActiveOrderPopup.init();WishList.init();});var MultiCurrencies = function() {var that = {nameSpace: 'multi-currencies',isActive: false,isChangedCurrency: false};that.init = function() {$(document).on('s123.page.ready.multi_currencies', function( event ) {that.settings = tryParseJSON($('.s123-multi-currencies').val());if ( !that.settings ) return;if ( !that.settings.active ) return;that.activeCurrency = tryParseJSON($.cookie($(websiteID).val()+'-'+that.nameSpace));that.defaultCurrency = that.settings.defaultCurrency;that.currencies = that.settings.currencies;that.setActiveCurrency(that.activeCurrency.currency);that.$menuIcon = $('[data-toggle="multiCurrenciesPopup"]');that.isActive = true;$(document).off('build_popup.open.multi_currencies').on('build_popup.open.multi_currencies', function( event ) {handleMenuIcon($('#popupFloatDivMenu [data-toggle="multiCurrenciesPopup"]'),true);});handleMenuIcon(that.$menuIcon,false);that.priceOnlyType.backup();$(document).off('pageLoaded.multi_currencies').on('pageLoaded.multi_currencies', function( event ) {if ( $.isNumeric(S123.QueryString.clientZone) ) {$('.client-zone-orders-table [data-rel="multiCurrency"]').removeAttr('data-rel');}
if ( isDefaultCurrency() && that.isChangedCurrency ) {that.reset();} else if ( isDefaultCurrency() && !that.isChangedCurrency  ) {$('[data-rel="multiCurrency"]').css({visibility: 'visible'});} else {updateAllPrices();}});if ( $.isNumeric(S123.QueryString.clientZone) ) return;$(document).off('s123.pjax.complete.multi_currencies').on('s123.pjax.complete.multi_currencies', function() {that.$menuIcon = $('[data-toggle="multiCurrenciesPopup"]');handleMenuIcon(that.$menuIcon,false);that.priceOnlyType.backup();$(document).trigger('pageLoaded.multi_currencies');});$(document).off('multi_currencies_price_update').on('multi_currencies_price_update', function( event, settings ) {$.each(settings, function( index, setting ) {if ( !isDefaultCurrency() ) {updatePrice(setting.el,setting.newPrice,true);} else {setting.el.find('[data-rel="multiCurrency"]').css({visibility: 'visible'});}});});$(document).trigger('pageLoaded.multi_currencies');modulesExtraActions();$(document).off('multi_currency_update').on('multi_currency_update', function() {buildPopup_CloseAction('popupFloatDivMenu');});});};that.setActiveCurrency = function( currency ) {that.activeCurrency = that.currencies[currency];if ( !that.activeCurrency ) {that.activeCurrency = that.defaultCurrency;}
$.cookie($(websiteID).val()+'-'+that.nameSpace,JSON.stringify(that.activeCurrency),{ expires: 365, path: '/' });};that.reset = function( ) {if ( !that.isActive ) return;if ( getOrderScreen() > 1 ) return;if ( window.czIsLoggedIn ) return;$('[data-rel="multiCurrency"]').each(function( index, el ) {var originalPrice = $(this).find('[data-type="price"]').data(that.nameSpace + '-price');var $price = $(showPrice(that.defaultCurrency.data,originalPrice));$(this).replaceWith($price);$price.css({visibility: 'visible'});backUpPrice($price.find('[data-type="price"]'),$price.find('[data-type="price"]').html(),false);});$('[data-multi-currency-symbol-only="true"]').html(that.defaultCurrency.data.symbol);that.priceOnlyType.update();that.isChangedCurrency = false;};that.geConvertedPrice = function( price ) {if ( !that.isActive ) return price;if ( !$.isNumeric(price) ) return price;if ( isDefaultCurrency() ) return price;if ( getOrderScreen() > 1 ) return price;var result = parseFloat(price) * parseFloat(that.activeCurrency.rate);return result > 0 ? result.toFixed(2) : result;};that.getOriginalPrice = function( price ) {if ( !that.isActive ) return price;if ( !$.isNumeric(price) ) return price;return parseFloat(price) / parseFloat(that.activeCurrency.rate);};that.getActiveCurrency = function() {return that.activeCurrency.data;};that.getMobileIconHtml = function() {var $clone = that.$menuIcon.clone();$clone.attr('data-is-mobile',true);return $clone.prop('outerHTML');};function handleMenuIcon( $menuIcon, isMobileMenu ) {setMenuIconCurrency($menuIcon);var html = '';var maxHeight = 160;html += '<div class="currency-menu-container fancy-scrollbar" style="max-height:' + maxHeight + 'px;">';html += '<div class="currency-list">';html += '<div class="currency-list-item" data-value="' + S123.escapeHtml(that.defaultCurrency.currency) + '">';html += '<a href="#">';html += '<span>' + that.defaultCurrency.currency + '</span>';html += '<span>-</span>';html += '<span>' + that.defaultCurrency.data.symbol + '</span>';html += '</a>';html += '</div>';$.each(that.currencies, function( currencyCode, currency ) {html += '<div class="currency-list-item" data-value="' + S123.escapeHtml(currencyCode) + '">';html += '<a href="#">';html += '<span>' + currencyCode + '</span>';html += '<span>-</span>';html += '<span>' + currency.data.symbol + '</span>';html += '</a>';html += '</div>';});html += '</div>';html += '</div>';$html = $(html);setActiveCurrencyListItem($html);$html.find('.currency-list').on('click.multi_currencies', 'a', function( event ) {event.preventDefault();if ( !isDefaultCurrency() ) {that.isChangedCurrency = true;} else {that.isChangedCurrency = false;}
that.setActiveCurrency($(this).parent().data('value'));$(document).trigger('pageLoaded.multi_currencies');modulesExtraActions();setMenuIconCurrency($menuIcon);$menuIcon.popover('hide');setActiveCurrencyListItem($html);$(document).trigger('multi_currency_update',[that.activeCurrency]);});S123.popOver.init({$el: $menuIcon,elSelector: '.multi-currencies-controller',namespace: 'multi_currency_menu_icon',oneTimeUsage: false,popOverSettings: {selector: 'multi-currency',content: $html,html: true,trigger: 'manual',template: '<div class="popover multi-currency" role="tooltip"><div class="arrow"></div><div data-menu-dismiss="popover"><i class="fa fa-times" aria-hidden="true"></i></div><div class="popover-content"></div></div>',placementCallBack: function() {if ( isMobileMenu ) return 'top';if ( getWebsiteMenuPosition() === 'top' || getWebsiteMenuPosition() === 'bottom' ) {if ( ($('nav#mainNav').offset().top - $(window).scrollTop()) > maxHeight ) {return 'top';} else {return 'bottom';}} else {if ( $('html').attr('dir') === 'rtl' ) {return 'left';} else {return 'right';}}}}});$(document).on('s123_pop_over_wrapper.show.multi_currency_menu_icon', function() {$menuIcon.addClass('active');})
.on('s123_pop_over_wrapper.hide.multi_currency_menu_icon', function() {$menuIcon.removeClass('active');});$menuIcon.off('click.multi_currencies').on('click.multi_currencies', function() {if ( $(this).hasClass('active') ) {$(this).popover('hide');} else {$(this).popover('show');}});}
function setActiveCurrencyListItem( $currencyList ) {$currencyList.find('.currency-list-item').removeClass('active');$currencyList.find('.currency-list-item[data-value="'+that.activeCurrency.currency+'"]').addClass('active');}
function setMenuIconCurrency( $menuIcon ) {var html = '';if ( $menuIcon.data('is-mobile') ) {html += '<span>' + that.activeCurrency.currency + '</span>';} else {html += '<span>' + that.activeCurrency.currency + '</span>';html += '<span class="m-c-symbol">' + that.activeCurrency.data.symbol + '</span>';if ( getWebsiteMenuPosition() === 'top' || getWebsiteMenuPosition() === 'bottom' ) {html += S123.s123IconToSvg.getHtml('caret-down','mc-icon','');} else {if ( $('html').attr('dir') === 'rtl' ) {html += S123.s123IconToSvg.getHtml('caret-left','mc-icon','');} else {html += S123.s123IconToSvg.getHtml('caret-right','mc-icon','');}}}
$menuIcon.html(html);}
function updateAllPrices() {if ( isDefaultCurrency() && that.isChangedCurrency ) {that.reset();} else if ( isDefaultCurrency() && !that.isChangedCurrency  ) {$('[data-rel="multiCurrency"]').css({visibility: 'visible'});} else {$('[data-rel="multiCurrency"]').each(function( index, el ) {updatePrice($(this),$(this).find('[data-type="price"]').html(),false);});}
$('[data-multi-currency-symbol-only="true"]').html(that.activeCurrency.data.symbol);that.priceOnlyType.update();}
function updatePrice( $el, newPrice, force ) {backUpPrice($el.find('[data-type="price"]'),newPrice,force);if ( isReplaceDisabled() ) {$el.css({visibility: 'visible'});} else {var $price = $el.find('[data-type="price"]');var priceAsString = $price.data(that.nameSpace + '-price');var price = parseFloat(priceAsString);var $newEl = $(showPrice(that.activeCurrency.data,(price * parseFloat(that.activeCurrency.rate)).toFixed(2)));backUpPrice($newEl.find('[data-type="price"]'),priceAsString,false);$price.parent().replaceWith($newEl);$newEl.css({visibility: 'visible'});}}
function backUpPrice( $el, newPrice, force ) {if ( !that.isActive ) return;if ( !$el.data(that.nameSpace + '-price') || force ) {$el.data(that.nameSpace + '-price',newPrice);}}
function modulesExtraActions() {$(document).off('donate_price_update.multi_currencies giftCard_price_update.multi_currencies').on('donate_price_update.multi_currencies giftCard_price_update.multi_currencies', function( event, $el ) {if ( isDefaultCurrency() ) return;var price = $el.val();price = parseFloat(price) * parseFloat(that.activeCurrency.rate);$el.val(price.toFixed(2));});}
function isDefaultCurrency() {return that.defaultCurrency.currency === that.activeCurrency.currency;}
function isReplaceDisabled() {if ( getOrderScreen() > 1 ) {return true;} else if ( window.czIsLoggedIn ) {return true;} else {return false;}
return false;}
function getOrderScreen() {var path = window.location.pathname.split("/");var orderScreen = path[path.length - 2];if ( orderScreen == '-order1' ) return 1;if ( orderScreen == '-order2' ) return 2;if ( orderScreen == '-order3' ) return 3;return 0;}
that.priceOnlyType = {backup: function() {$('[data-multi-currency-price-only="true"]').each(function( index, el ) {if ( $.isNumeric($(this).data(that.nameSpace + '-price')) ) return;$(this).data(that.nameSpace + '-price',$(this).html());});},update: function() {$('[data-multi-currency-price-only="true"]').each(function( index, el ) {var originalPrice = $(this).data(that.nameSpace + '-price');var newPrice = parseFloat(originalPrice) * parseFloat(that.activeCurrency.rate);if ( newPrice % 1 === 0 ) {$(this).html(newPrice);} else {$(this).html(newPrice.toFixed(2));}});}};return that;}();var ActiveOrderPopup = function() {AO = {};AO.init = function() {$( document ).on( 's123.page.ready.activeOrderPopup', function( event ) {AO.initializeAddToCart();AO.productCallToAction.init();AO.initializeShowCart();});};AO.initializeAddToCart = function() {$('.orderButtonPopup').off('click').on('click', function( event ) {var $this = $(this);if ( $this.hasClass('a-o-out-of-stock') ) {bootbox.dialog({title: translations.activeOrderPopup.messageTitle,message: translations.activeOrderPopup.messageBody,buttons: {cancel: {label: translations.Ok,className: 'btn btn-primary'}}});return;}
if ( $this.data('disable-atc-validator') != '1' ) {if ( !AO.atcValidator() ) return;}
$this.attr('disabled','');S123.ButtonLoading.start($this);var multiProducts = $this.data('multi-products') ? $this.data('multi-products') : JSON.stringify([$this.data('unique-page')]);var formData = new FormData();formData.append('w',$('#w').val());formData.append('websiteID',$('#websiteID').val());formData.append('moduleID',$this.data('module'));if ( $this.data('product-page') ) {if ( $('#productOptions').prop('type') == 'textarea' ) {formData.append('productOptions',$('#productOptions').length !== 0 ? $('#productOptions').html() : '');} else {formData.append('productOptions',$('#productOptions').length !== 0 ? $('#productOptions').val() : '');}
formData.append('customText',$('#customText').length !== 0 ? $('#customText').html() : '');}
formData.append('amount',$this.data('quantity-amount') ? $this.data('quantity-amount') : '1');formData.append('multiProducts',multiProducts);formData.append('viewModeTXT',viewModeTXT);$('input[type="file"]').each(function( index, upload ) {if ( upload.files.length > 0 ) {formData.append(upload.id,upload.files[0]);}});if ( $('.product-subscription-pricing').length !== 0 ) {let checkedPricing = $('.product-subscription-pricing').find('input[type="radio"]:checked');if ( checkedPricing.length == 0 ) {$('.product-subscription-error').remove();$('.product-subscription-title').append(`<div class="product-subscription-error">${translations.productSubscriptionError}</div>`);S123.ButtonLoading.stop($this);$this.removeAttr('disabled');return;}
formData.append('subscriptionTicketID',checkedPricing.val());formData.append('activeProductSubscription',true);}
$.ajax({type: "POST",url: "/versions/2/wizard/orders/front/addToCart.php",data: formData,cache: false,contentType: false,processData: false,success: function( response ) {response = tryParseJSON(response);showCart_GetContent('/versions/2/wizard/orders/front/showCart.php?w='+$('#w').val()+'&websiteID='+$('#websiteID').val()+'&tranW='+websiteLanguageCountryFullCode+'&moduleID='+$this.data('module')+'&viewModeTXT='+viewModeTXT,true);CartCounter.updateCartIcon();S123.ButtonLoading.stop($this);$this.removeAttr('disabled');topWindow.eCommerce_cart_lastAdded = response.updatedCartIds ? response.updatedCartIds : false;}});});};AO.initializeShowCart = function() {$('.orderOpenCart').off('click').on('click',function( event ) {AO.showCart();});};AO.showCart = function() {showCart_GetContent('/versions/2/wizard/orders/front/showCart.php?w='+$('#w').val()+'&websiteID='+$('#websiteID').val()+'&moduleTypeNUM=37&tranW='+websiteLanguageCountryFullCode+'&cartButton=1',true);};AO.atcValidator = function() {var $ct = $("#product-custom-text");var $po = $('.product-options');if ( $ct.length !== 0 && $ct.data('mandatory') ) {var $ct_fieldTitle = $('#ct_fieldTitle');if ( $ct_fieldTitle.val().length === 0 ) {$ct_fieldTitle.popover({container: 'body',content: translations.productvalidatorPopover,trigger: 'manual',template: '<div class="popover product-validator-popover" role="tooltip"><div class="arrow"></div><div class="popover-content"></div></div>',placement: function(popover, input) {return isMobileDevice.any() ? 'auto' : ($('html').attr('dir') === 'rtl' ? 'left' : 'right');}});$ct_fieldTitle.popover('show').one('input', function(e) {$(this).popover('hide');});$ct_fieldTitle.focus();return false;}}
if ( $po.length !== 0 ) {var $options = $po.find('.p-o-container[data-mandatory="1"]');var addToCart = true;var $popoverContainer;var $firstErrorOption;var $errorsOptionsList = [];$.each($options, function( index, option ) {var $option = $(option);var addErrorMsg = false;switch( $option.data('type') ) {case 'color':case 'radio':case 'checkbox':case 'size':case 'list':if ( $option.find('[id*=poi].selected').length === 0 ) {addToCart = false;addErrorMsg = true;}
$popoverContainer = $(option);break;default:if ( $option.find('.fake-input').length > 0 ) {var id = $option.find('.fake-input').data('related-id');if ( $option.find('[data-id="'+id+'"]').val().length === 0 ) {addToCart = false;addErrorMsg = true;$popoverContainer = $(option).parent();}} else {if ( $option.find('.form-control').val().length === 0 ) {addToCart = false;addErrorMsg = true;$popoverContainer = $(option).parent();}}}
if ( addErrorMsg ) {$errorsOptionsList.push($option);var $popover = $option.find('.p-o-popover-box');if ( $popover.length === 0  ) $popover = $option;$popover.popover({container: 'body',content: translations.productvalidatorPopover,trigger: 'manual',template: '<div class="popover product-validator-popover" role="tooltip"><div class="arrow"></div><div class="popover-content"></div></div>',placement: function(popover, input) {return isMobileDevice.any() ? 'auto' : ($('html').attr('dir') === 'rtl' ? 'right' : 'left');}});}});if ( $errorsOptionsList.length !== 0 ) {var offset = $('#mainNav').outerHeight();if ( !$.isNumeric(offset) ) offset = 0;if ( !elementInViewport($errorsOptionsList[0].get(0)) ) {$('html, body').scrollTop($errorsOptionsList[0].offset().top - offset);}
$.each($errorsOptionsList, function( index, $option ) {var $popover = $option.find('.p-o-popover-box');if ( $popover.length === 0  ) $popover = $option;$popover.popover('show');});$po.off('po.update').on('po.update', function( event ) {$('.product-validator-popover').popover('hide');});}
return addToCart;}
return true;};AO.productCallToAction = function() {var _ = {};_.init = function( settings ) {_.$controllers = $('.orderButtonPopup[data-p-c-t-a]');if ( _.$controllers.length == 0 ) return;_.$controllers.each(function() {var $this = $(this);var callToAction = $this.data('p-c-t-a');if ( callToAction.type == 'externalLink' && callToAction.externalLink.length > 0 ) {$this.off('click').on('click', function( event ) {window.open(callToAction.externalLink,'_blank');});} else if ( callToAction.type == 'contactUs' ) {$this.off('click').on('click', function( event ) {buildPopup('popupFloatDivSearch','',generateContactForm(callToAction),'',true,true,true,'right','')
S123.globalContactEmail.submitHandler();fillDescription(callToAction);});}});};function generateContactForm( callToAction ) {var html = '';html += '<div class="global-contact-email-container">';html += '<div class="g-c-email-info-box">';html += '<h3>'+translations.productCallToAction.title+'</h3>';html += '<p>'+translations.productCallToAction.infoBox+'</p>';html += '</div>';html += '<form class="g-c-email-form">';html += '<div class="row">';html += '<div class="col-xs-12">';html += '<div class="form-group">';html += '<label for="emailForm_fullName" class="white">'+translations.productCallToAction.fullName+'</label>';html += '<input type="text" name="emailForm_fullName" placeholder="'+translations.productCallToAction.fullName+'" class="form-control" required data-msg-required="'+translations.jqueryValidMsgRequire+'">';html += '</div>';html += '</div>';html += '<div class="col-xs-12">';html += '<div class="form-group">';html += '<label for="emailForm_email" class="white">'+translations.emailAddress+'</label>';html += '<input type="text" name="emailForm_email" placeholder="'+translations.emailAddress+'" class="form-control" required data-msg-required="'+translations.jqueryValidMsgRequire+'" data-rule-email="true" data-msg-email="'+translations.jqueryValidMsgEmail+'">';html += '</div>';html += '</div>';html += '<div class="col-xs-12">';html += '<div class="form-group">';html += '<label for="emailForm_phone" class="white">'+translations.productCallToAction.phone+'</label>';html += '<input type="text" name="emailForm_phone" placeholder="'+translations.productCallToAction.phone+'" class="form-control">';html += '</div>';html += '</div>';html += '</div>';html += '<div class="row">';html += '<div class="col-xs-12">';html += '<button type="submit" class="btn btn-primary btn-block">'+translations.send+'</button>';html += '<input type="hidden" name="websiteID" value="'+$('#websiteID').val()+'">';html += '<input type="hidden" name="w" value="'+$('#w').val()+'">';html += '<input type="hidden" name="isAddToCartBtn" value="1">';html += '<input type="hidden" name="recaptchaToken" value="">';html += '<textarea class="form-control hidden" name="emailForm_description"></textarea>';html += '</div>';html += '</div>';html += '</form>';html +='<div class="g-c-email-message-sent-box">';html += '<div class="row">';html += '<div class="col-sm-6 col-xs-12 col-md-offset-3">';html += '<h3 class="g-c-email-message-content">'+translations.productCallToAction.thankYouMessage+'</h3>';html += '</div>';html += '</div>';html += '<div class="row">';html += '<div class="col-sm-6 col-xs-12 col-md-offset-3">';html += '<button type="button" class="btn btn-primary close-order-thank-you">'+translations.productCallToAction.thankYouCloseBtn+'</button>';html += '</div>';html += '</div>';html += '</div>';html += '</div>';return html;}
function fillDescription( callToAction ) {var pageURL = window.location.protocol+'//'+domain+callToAction.pageURL;
var html = '';html += '<br>';html += '<strong>'+translations.productCallToAction.productName+'<strong> ';html += '<a href="'+pageURL+'" target="_blank">'+callToAction.title+'</a>';$('#popupFloatDivSearch [name="emailForm_description"]').val(html);}
return _;}();return AO;}();var WishList = function() {var WL = {};WL.init = function( settings ) {$( document ).on( 's123.page.ready.wish_list', function( event ) {WL.websiteID = $('#websiteID').val();WL.$menuButton = $('.wishListActionButton');if ( WL.$menuButton.length === 0 ) return;WL.eventRecurring();WL.initilizeMenuButton();WL.initializeLayoutButtons();WL.initializeDataPageButtons();});};WL.markUnMarkIcons = function() {var $container = $('.s123-module-eCommerce');var $items = $container.find('.product-data-obj');var $icons = $items.find('.wish-list-btn');WL.items = tryParseJSON($.cookie(WL.websiteID+'-wishList'));if ( !WL.items || $container.length === 0 ) return;$icons.removeClass('wl-active');$.each(WL.items, function( index, item ) {$items.filter('.product-data-obj[data-unique-id="'+item.uniqueID+'"]').find('.wish-list-btn').addClass('wl-active');});if ( $container.hasClass('s123-page-data-eCommerce') ) {WL.setToolTip($container);}};WL.setToolTip = function( $container ) {var $wishListBtn = $container.find('.wish-list-btn');$wishListBtn.attr('data-original-title',$wishListBtn.data('add-tooltip'));$wishListBtn.filter('.wl-active').attr('data-original-title',$wishListBtn.data('remove-tooltip'));$wishListBtn.tooltip({container: 'body',placement: 'auto'});};WL.eventRecurring = function() {WL.markUnMarkIcons();WL.updateCounterIcon();};WL.refresh = function() {WL.eventRecurring();};WL.initilizeMenuButton = function() {if ( WL.$menuButton.length === 0 ) return;WL.$menuButton.off('click').on('click',function( event ) {var $this = $(this);showCart_GetContent('/versions/2/wizard/orders/front/showCart.php?w='+$('#w').val()+'&websiteID='+$('#websiteID').val()+'&moduleTypeNUM=112&tranW='+websiteLanguageCountryFullCode+'&cartButton=1&wishList=true',true);});};WL.initializeLayoutButtons = function() {var $container = $('.s123-module-eCommerce:not(.s123-page-data-eCommerce)');if ( $container.length === 0 ) return;$container.find('.wish-list-btn').off('click.wishList').on('click.wishList',function( event ) {event.stopPropagation();var $this = $(this);var $wishListItem = $this.closest('.product-data-obj');if ( $this.hasClass('disabled') ) return false;if ( $this.hasClass('wl-active') ) {WL.removeItem($this,$wishListItem.data('module'),$wishListItem.data('module-type-num'),$wishListItem.data('unique-id'));} else {WL.addItem($this,$wishListItem.data('module'),$wishListItem.data('unique-id'));}});};WL.initializeDataPageButtons = function() {var $container = $('.s123-module-eCommerce.s123-page-data-eCommerce');if ( $container.length === 0 ) return;$container.find('.wish-list-btn').off('click.wishList').on('click.wishList', function( event ) {var $this = $(this);var $wishListItem = $this.closest('.product-data-obj');if ( $this.hasClass('disabled') ) return false;if ( $this.hasClass('wl-active') ) {WL.removeItem($this,$wishListItem.data('module'),$wishListItem.data('module-type-num'),$wishListItem.data('unique-id'));} else {WL.addItem($this,$wishListItem.data('module'),$wishListItem.data('unique-id'));}});};WL.addItem = function( $item , moduleID, uniqueID ) {$item.addClass('disabled');$.ajax({type: "POST",url: "/versions/2/wizard/orders/front/addToCart.php",data:  {w: $('#w').val(),websiteID: WL.websiteID,moduleID: moduleID,wishList: true,multiProducts: JSON.stringify(Array(uniqueID)),viewModeTXT: viewModeTXT,},success: function( response ) {response = tryParseJSON(response);showCart_GetContent('/versions/2/wizard/orders/front/showCart.php?w='+$('#w').val()+'&websiteID='+$('#websiteID').val()+'&tranW='+websiteLanguageCountryFullCode+'&moduleID='+moduleID+'&wishList=true',true);WishList.eventRecurring();$item.removeClass('disabled');topWindow.eCommerce_cart_lastAdded = response.updatedCartIds ? response.updatedCartIds : false;}});};WL.removeItem = function( $item, moduleID, moduleTypeNUM, uniqueID ) {$item.addClass('disabled');$.ajax({type: "POST",url: "/versions/2/wizard/orders/front/removeCartItem.php",data: {w: $('#w').val(),websiteID: WL.websiteID,moduleID: moduleID,id: WL.items[uniqueID].id,uniqueID: uniqueID,wishList: true,cartType: moduleTypeNUM,tranW: websiteLanguageCountryFullCode},success: function( response ) {var response = JSON.parse(response);if ( !response.success ) return;WishList.eventRecurring();$item.removeClass('disabled');topWindow.eCommerce_cart_lastAdded = response.updatedCartIds ? response.updatedCartIds : false;}});};WL.updateCounterIcon = function() {var $headerWishListWrapper = $('.header-wish-list');if ( $headerWishListWrapper.length === 0 ) return;var itemsNumber = WL.items ? Object.keys(WL.items).length : 0 ;if ( parseInt(itemsNumber) === 0 ) {if ( !$headerWishListWrapper.hasClass('show-static') ) {$headerWishListWrapper.hide();ResetMoreButton();}
$headerWishListWrapper.find('.count').hide();} else {if ( !$headerWishListWrapper.hasClass('show-static') ) {$headerWishListWrapper.show();ResetMoreButton();}
$headerWishListWrapper.find('.count').html(itemsNumber).css({ display: 'flex' });}};return WL;}();var ShowCartMobileHandler = function() {var _ = {};_.step1 = function( settings ) {$(document).one('buildSmallPopup.open',function() {$('body').addClass('popupWinScroll');});$(document).one('buildSmallPopup.close',function() {$('body').removeClass('popupWinScroll');if ( window.visualViewport ) {$(window.visualViewport).off('resize.cartMobile scroll.cartMobile');}
$(window).off('resize.cartMobile');});};_.step2 = function() {if ( !isMobileDevice.any() ) return;const updateQuickCartHeight = () => {const quickCart = $('.quickCart');if ( !quickCart.length ) return;const visibleHeight = window.visualViewport?.height || window.innerHeight;quickCart.height(visibleHeight);};const handleViewportChange = () => {clearTimeout(window.updateQuickCartTimeout);window.updateQuickCartTimeout = setTimeout(updateQuickCartHeight,100);};if ( window.visualViewport ) {$(window.visualViewport).on('resize.cartMobile scroll.cartMobile',handleViewportChange);}
$(window).on('resize.cartMobile',handleViewportChange);updateQuickCartHeight();};return _;}();function showCart_GetContent( url, bsp ) {var window_object = S123.isWebsiteInSlidingWindow ? parent : window;var b_s_p = window_object.buildSmallPopup;ShowCartMobileHandler.step1();$.ajax({type: "GET",url: url,success: function( response ) {if ( bsp ) {b_s_p('popupCart',translations.cart,response,'',true,false,true,'');} else {$('#popupCart .content').html(response);}
showCart(window_object);}});}
function showCart( current_window ) {var $cartOrderPage = current_window.$('#popupCart').find('.content');init();function init() {eventRecurring();if ( $.isArray(topWindow.eCommerce_cart_lastAdded) ) {$.each(topWindow.eCommerce_cart_lastAdded, function( index, cart_id ) {$cartOrderPage.find('[data-cart-id="'+cart_id+'"]').addClass('last-added-highlight');});topWindow.eCommerce_cart_lastAdded = false;}}
function eventRecurring() {current_window.CartCounter.updateCartIcon();var aop_settings = tryParseJSON($cartOrderPage.find('#aopSettings').val());$cartOrderPage.height('auto');$cartOrderPage.find('.empty-cart-btn').off('click').on('click','a.empty-cart', function() {$.ajax({type: "GET",url: $(this).data('href')+'&wishList='+aop_settings.wishList,success: function( data ) {$cartOrderPage.closest('#popupCart .content').html(data);eventRecurring();showCart_UpdateCartWasChanged();}});});$cartOrderPage.find('.change-cart').on('click', function() {$.ajax({type: "GET",url: $(this).data('href'),success: function( data ) {$cartOrderPage.closest('#popupCart .content').html(data);eventRecurring();}});});$cartOrderPage.find('.continue-shopping-btn, .closeIcon').click(function() {current_window.buildSmallPopup_CloseAction('popupCart');});$cartOrderPage.find('.edit-quantity').on('click',function() {var $this = $(this);$cartOrderPage.find('#quantity_box_'+$this.data('product-id')+'').toggle();});$cartOrderPage.find('.edit-quantity-minus').on('click',function() {var $this = $(this);var $box = $cartOrderPage.find('#quantity_box_'+$this.data('product-id')+'');$box.find('.quantity_field').val(parseInt($box.find('.quantity_field').val())-1).trigger('input');updateAutomaticCouponMsg();});$cartOrderPage.find('.edit-quantity-plus').on('click',function() {var $this = $(this);var $box = $cartOrderPage.find('#quantity_box_'+$this.data('product-id')+'');$box.find('.quantity_field').val(parseInt($box.find('.quantity_field').val())+1).trigger('input');updateAutomaticCouponMsg();});function updateAutomaticCouponMsg() {$.ajax({type: 'POST',url: '/versions/' + $('#versionNUM').val() + '/wizard/orders/front/getAutomaticCouponMsg.php',data: {w: $('#w').val(),websiteID: $(websiteID).val(),total: $('#cartTotalPrice span[data-type="price"]').html(),cartType: $('.cartBottom').data('cart-type'),couponApplyTo: 'cartOrder',},success: function( response ) {$('.cart-automatic-coupon-container').html('').append(response);}});}
$cartOrderPage.find('.quantity_field').on('input', function() {var $input = $(this);if ( $input.val().length === 0 ) $input.val(1);if ( !$.isNumeric($input.val()) ) $input.val($input.val().replace(/[^0-9]/g,''));if ( $input.val() <= 0 ) $input.val(1);if ( parseInt($input.val()) > parseInt($input.data('inventory-limit')) ) {$input.val($input.data('inventory-limit'));showCart_QuantityPopover($cartOrderPage.find('[data-cart-id="'+$input.data('product-id')+'"]'),translations.productQuntityLimit.replace('{{units_limitation}}',$input.data('inventory-limit')));} else if ( parseInt($input.val()) > parseInt($input.data('maximum-purchase')) ) {$input.val($input.data('maximum-purchase'));showCart_QuantityPopover($cartOrderPage.find('[data-cart-id="'+$input.data('product-id')+'"]'),translations.productQuntityLimit.replace('{{units_limitation}}',$input.data('maximum-purchase')));} else if ( parseInt($input.val()) < parseInt($input.data('minimum-purchase')) ) {$input.val($input.data('minimum-purchase'));showCart_QuantityPopover($cartOrderPage.find('[data-cart-id="'+$input.data('product-id')+'"]'),translations.productQuntityLimitMin.replace('{{units_limitation}}',$input.data('minimum-purchase')));}
showCart_UpdateQuantityTotalPrice();clearTimeout(window.quantityInputFinished);window.quantityInputFinished = setTimeout( function() {$cartOrderPage.find('#q_u_loading_'+$input.data('product-id')).show();$.ajax({type: 'POST',url: '/versions/' + aop_settings.versionNUM + '/wizard/orders/front/quantityUpdate.php',data: {w: aop_settings.w,websiteID: aop_settings.websiteID,tranW: aop_settings.tranW,moduleID: aop_settings.moduleID,cartType: aop_settings.cartType,id: $input.data('product-id'),newQuantity: $input.val()},success: function( response ) {var response = JSON.parse(response);if ( response.success ) {$cartOrderPage.find('#q_u_loading_'+$input.data('product-id')).hide();current_window.CartCounter.updateCartIcon();showCart_UpdateCartWasChanged();}}});},300);});$cartOrderPage.find('.remove-product-btn').off('click').on('click', function() {var $this = $(this);$this.parent().children().hide();$this.parent().append('<div class="loading-primary r-p-loading" class="text-center">'+S123.s123IconToSvg.getHtml('spinner','fa-spin','')+'</div>');$.ajax({type: 'POST',url: '/versions/' + aop_settings.versionNUM + '/wizard/orders/front/removeCartItem.php',data: {id: $this.data('product-id'),uniqueID: $this.closest('.item').get(0).id,w: aop_settings.w,websiteID: aop_settings.websiteID,tranW: aop_settings.tranW,moduleID: aop_settings.moduleID,cartType: aop_settings.cartType,wishList: aop_settings.wishList},success: function( response ) {var response = tryParseJSON(response);if ( response.success ) {if ( $this.closest('.item').siblings().not('.mix-modules-products-buttons').length == 0 ) {$cartOrderPage.find('.cart-list-container').hide();$cartOrderPage.find('.empty-cart-container').show();}
$this.closest('.item').fadeOut(300,function() {$this.closest('.item').remove();showCart_UpdateQuantityTotalPrice();if ( aop_settings.wishList ) {WishList.markUnMarkIcons();WishList.updateCounterIcon();}
showCart_UpdateCartWasChanged();updateAutomaticCouponMsg();});} else {$cartOrderPage.find('.r-p-loading').remove();$this.show();showCart_UpdateQuantityTotalPrice();}
current_window.CartCounter.updateCartIcon();},error: function(data) {$cartOrderPage.find('.r-p-loading').remove();$this.show();}});});$cartOrderPage.find('#couponWebsite').validate({errorElement: 'div',errorClass: 'help-block',focusInvalid: true,ignore: ":hidden",highlight: function (e) {$(e).closest('.form-group').removeClass('has-info').addClass('has-error');},success: function (e) {$(e).closest('.form-group').removeClass('has-error');$(e).remove();},errorPlacement: function (error, element) {if( element.is('input[type=checkbox]') || element.is('input[type=radio]') ) {var controls = element.closest('div[class*="col-"]');if( controls.find(':checkbox,:radio').length > 1 ) controls.append(error);else error.insertAfter(element.nextAll('.lbl:eq(0)').eq(0));}
else if( element.is('.select2') ) {error.insertAfter(element.siblings('[class*="select2-container"]:eq(0)'));}
else if( element.is('.chosen-select') ) {error.insertAfter(element.siblings('[class*="chosen-container"]:eq(0)'));}
else {error.appendTo(element.closest('.form-group'));}},submitHandler: function( form ) {$(form).find('button:submit').prop('disabled', true);return true;}});ShowCartMobileHandler.step2();if ( aop_settings.foodDeliveryCart ) {foodDeliveryEditProductEvent($cartOrderPage);}
if ( $('html.onlyContent123').length > 0 ) {window.parent.$(window.parent.document).trigger('pageLoaded');} else {$(document).trigger('pageLoaded');}
if ( window.location.pathname == '/-order1/' ) {$(document).off('order1.reload').on('order1.reload', function(){if ( typeof window.isCartWasChanged != 'undefined' ) {delete window.isCartWasChanged;window.location.reload();}});}}
function showCart_QuantityPopover( $input, message ) {$input.popover({container: $cartOrderPage,content: message,trigger: 'manual',template: '<div class="popover cart-validator-popover" role="tooltip"><div class="arrow"></div><div class="popover-content"></div></div>',placement: function(popover, input) {return isMobileDevice.any() ? 'auto' : 'bottom';}});$input.popover('show');clearTimeout($input.data('q-p-timeout'));$input.data('q-p-timeout',setTimeout(function(){$input.popover('destroy');},3000));}
function showCart_UpdateQuantityTotalPrice() {var cartTotal = 0.00;$cartOrderPage.find('.quantity_field').each(function() {var $quantityInput = $(this);var $info            = $quantityInput.closest('.cart-product-info');var $priceBox        = $info.find('.cart-product-price');var $price           = $info.find('.cart-product-price [data-type="price"]');var $quantityPrice   = $info.find('.quantity-total-price');var $fullPrice           = $info.find('.cart-product-full-price [data-type="price"]');var $quantityFullPrice   = $info.find('.quantity-total-full-price');var total = (parseFloat($price.closest('[data-price]').data('price')) * parseInt($quantityInput.val()));var totalFullPrice = (parseFloat($fullPrice.closest('[data-price]').data('price')) * parseInt($quantityInput.val()));cartTotal += parseFloat(total);$quantityPrice.find('.main_price [data-type="price"]').html(total.toFixed(2));$quantityFullPrice.find('.main_price [data-type="price"]').html(totalFullPrice.toFixed(2));if (parseInt($quantityInput.val()) > 1) {$quantityPrice.show();$priceBox.hide();} else {$quantityPrice.hide();$priceBox.show();}
$info.find('.cart-product-quantity .qty_count').html($quantityInput.val());$(document).trigger('multi_currencies_price_update',[[{el: $quantityPrice.find('.main_price'),newPrice: total.toFixed(2)}]]);});$cartOrderPage.find('#cartTotalPrice [data-type="price"]').html(cartTotal.toFixed(2));$(document).trigger('multi_currencies_price_update',[[{el: $cartOrderPage.find('#cartTotalPrice'),newPrice: cartTotal.toFixed(2)}]]);}
function showCart_UpdateCartWasChanged() {window.isCartWasChanged = window.location.pathname == '/-order1/';}}
function Comments_Initialize( settings ) {var that = this;var $s123CommentsContainer = $('#'+settings.id);var $commentsForm = $s123CommentsContainer.find('.commentsForm');var $commentsContainer;var Rating = {};var submitMessage = {};var hasRating = false;that.onLoad = settings.onLoad;that.onFormSubmit = settings.onFormSubmit;that.customLabels = settings.customLabels ? settings.customLabels : {};switch( settings.type ) {case 0:$commentsContainer 	= $s123CommentsContainer.find('#commentsContainer');submitMessage.title = translations.sent;submitMessage.message = translations.blogReviewMessage;break;case 1:$commentsContainer 	= $s123CommentsContainer.find('#commentsContainer');hasRating = true;break;default:return;break;}
that.init = function() {that.loadComments(false);};that.showSubcomments = function ( subComments, $commentsContainer ) {$.each(subComments,function( index, comment ) {var $parentComments = $commentsContainer.find('.commentBox');$.each($parentComments,function( index, parentComment ) {if ($(this).data('comment-id') == comment.parentID ) {$(parentComment).find('.sub-comments-div').append(that.comment_HTML(comment.title,comment.time,comment.message));}});});};that.comment_HTML = function ( title, time, message ) {var html ='';html += '<div class="sub-comments-div-box">';html += '<h4 class="title">'+title+'</h4>';html += '<small class="time">'+time+'</small><br/>';html += '<div class="message">'+message+'</div>';html += '</div>';return html;};that.submitHandler = function ( $form ) {var forms_GoogleRecaptcha = new Forms_GoogleRecaptcha();forms_GoogleRecaptcha.init($form);$form.validate({errorElement: 'div',errorClass: 'help-block',focusInvalid: true,ignore: "",highlight: function (e) {$(e).closest('.form-group').removeClass('has-info').addClass('has-error');},success: function (e) {$(e).closest('.form-group').removeClass('has-error');$(e).remove();}});$form.off('submit.commentsForm').off('submit.commentsForm').on('submit.commentsForm', function( event ) {event.preventDefault();if ( hasRating ) {var formValid = $form.valid();var ratingValid = Rating.valid();if ( !formValid || !ratingValid ) return;} else {if ( !$form.valid() ) return;}
if ( forms_GoogleRecaptcha.isActive && !forms_GoogleRecaptcha.isGotToken ) {forms_GoogleRecaptcha.getToken();return false;}
$form.find('.blogSubmitButton').prop('disabled', true);$form.find('.blogSubmitButton').html(S123.s123IconToSvg.getHtml('spinner','fa-spin',''));$.ajax({type: "POST",url: "/versions/2/wizard/comments/addShowComments.php",data: $form.serialize(),success: function( data ) {var dataObj = tryParseJSON(data);if ( dataObj.blockComment  == '1' ) {that.showManagerApproveMessage();}
that.loadComments(data.commentsHtml);$form.trigger('reset');forms_GoogleRecaptcha.reset();$form.find('.blogSubmitButton').prop('disabled', false);$form.find('.blogSubmitButton').html($form.find('.blogSubmitButton').data('text'));WizardNotificationUpdate();if ( that.onFormSubmit ) that.onFormSubmit.call(this,dataObj.newCommentID,dataObj.blockComment);}});return false;});};that.showManagerApproveMessage = function () {if ( !submitMessage.message ) return;bootbox.alert({title: submitMessage.title,message: submitMessage.message,className: 'contactUsConfirm',buttons: {ok: {label: translations.Ok}},backdrop: true});};that.showReplyModal = function (t,childForm) {var x = '';x += '<form class="row" method="post" style="margin:0px;">';x += '<div class="col-xs-12 col-sm-12">';x += '<div class="form-group">';x += '<textarea class="form-control comment_message" name="comment_message" placeholder="'+(that.customLabels.commentResponseText ? that.customLabels.commentResponseText : t.data('tran-comment'))+'" style="min-height: 150px;" required data-msg-required="'+t.data('tran-this-field-is-required')+'"></textarea>';x += '</div>';x += '<div class="row">';x += '<div class="col-xs-12 col-sm-6">';x += '<div class="form-group">';x += '<input type="text" name="contact_name" placeholder="'+(that.customLabels.commentName ? that.customLabels.commentName : t.data('tran-name'))+'" class="form-control" required data-msg-required="'+t.data('tran-this-field-is-required')+'">';x += '</div>';x += '</div>';x += '<div class="col-xs-12 col-sm-6">';x += '<div class="form-group">';x += '<input type="text" name="contact_email" placeholder="'+(that.customLabels.commentEmail ? that.customLabels.commentEmail : t.data('tran-email-address'))+'" class="form-control" required data-msg-required="'+t.data('tran-this-field-is-required')+'" data-rule-email="true" data-msg-email="'+t.data('tran-please-enter-valid-email')+'">';x += '</div>';x += '</div>';x += '</div>';x += '<div class="text-center">';x += '<button type="submit" class="btn btn-primary blogSubmitButton" data-text="'+t.data('tran-post-reply')+'">'+(that.customLabels.replyButtonText ? that.customLabels.replyButtonText : t.data('tran-post-reply'))+'</button>';x += '</div>';x += '<div class="text-center comments-message-text">';x += '<small>* '+(that.customLabels.commentMessage ? that.customLabels.commentMessage : t.data('tran-the-email-will-not-be-published-on-the-website'))+'</small>';x += '</div>';x += '</div>';x += '<input type="hidden" name="w" value="'+t.data('hidden-w')+'">';x += '<input type="hidden" name="websiteID" value="'+t.data('hidden-website-id')+'">';x += '<input type="hidden" name="uniquePageID" value="'+t.data('hidden-unique-page-id')+'">';x += '<input type="hidden" name="moduleID" value="'+t.data('module-id')+'">';x += '<input type="hidden" name="moduleTypeNUM" value="'+t.data('module-type')+'">';x += '<input type="hidden" name="tranW" value="'+websiteLanguageCountryFullCode+'">';x += '<input type="hidden" class="commentTo" name="commentTo" value="'+t.data('hidden-comment-to')+'">';x += '<input type="hidden" name="act" value="addShow">';x += '</form>';childForm.html(x);that.submitHandler(childForm.find('form'));};Rating = new function() {var R = this;R.init = function( settings ) {if ( !settings.hasRating ) return;R.$form = settings.$form;R.$input = settings.$input;R.$json = settings.$json;if ( R.$form.length === 0 ) return;R.$raty = R.$form.find('.rating-plugin');R.$raty.raty({starType: 'i',cancel: false,number: 5,hints: R.getHints(),starHalf: (IsIE11() ? 'fa fa-star-half star-half' : 'star-half svg-m'),starOff: (IsIE11() ? 'fa fa-star-o star-o' : 'star-o svg-m'),starOn: (IsIE11() ? 'fa fa-star star' : 'star svg-m'),click: function( rating ,event ) {R.$input.val(rating);R.valid();}});};R.getHints = function() {var json = tryParseJSON(R.$json.val());if ( !json ) {return hints = [translations.reviewBad,translations.reviewPoor,translations.reviewRegular,translations.reviewGood,translations.reviewGorgeous];} else {return hints = json.hints;}};R.valid = function() {var valid = $.isNumeric(R.$input.val()) && parseInt(R.$input.val()) > 0;var $parent = R.$raty.closest('.form-group');$parent.removeClass('.has-error');$parent.find('#ratingError').remove();if ( !valid ) {$parent.addClass('has-error');$parent.append('<div id="ratingError" class="text-center help-block">'+R.$raty.data('msg-required')+'</div>');}
return valid;};};that.loadComments = function( commentsHtml ) {if ( !commentsHtml ) {loadCommentsByAjax();} else {addCommentsToPage(commentsHtml);}
$commentsForm.find('.blogCommentsBox #comment_message').focus(function() {$commentsForm.find('.blogCommentsBox').addClass('active');});that.submitHandler($commentsForm);Rating.init({$form: $commentsForm,$input: $commentsForm.find('.rating'),$json: $commentsForm.find('.rating-plugin-data'),hasRating: hasRating});};function loadCommentsByAjax() {$.ajax({type: "POST",url: '/versions/2/wizard/comments/addShowComments.php',data: {w: $('#w').val(),websiteID: $('#websiteID').val(),disableCssFiles: 1,moduleID: $commentsContainer.data('module-id'),moduleTypeNUM: $commentsContainer.data('module-type-num'),uniquePageID: $commentsContainer.data('unique-page-id'),tranW: $commentsContainer.data('tran-w'),act: $commentsContainer.data('action')},success: function( data ) {data = tryParseJSON(data);if ( !data ) return;addCommentsToPage(data.commentsHtml);}});}
function addCommentsToPage( commentsHtml ) {$commentsContainer.html(commentsHtml);$commentsContainer.find('.blog-reply-to').each(function( index, replyLink ) {$(replyLink).off('click').on('click',function() {$childForm = $(this).closest('.commentBox').find('.blogReplyForm');if ($childForm.hasClass('hidden')) {that.showReplyModal($(this),$childForm);$('.blogReplyForm').addClass('hidden');$('.blog-reply-to').html($(this).data('text-reply'));$(this).html($(this).data('text-hide'));$childForm.removeClass('hidden');} else {$childForm.addClass('hidden');$(this).html($(this).data('text-reply'));}
$childForm.find('.comment_message').select();});});var subComments = tryParseJSON($commentsContainer.find('.sub-comments').html());that.showSubcomments(subComments,$commentsContainer);if ( hasRating) {if ( that.onLoad ) that.onLoad.call(this,$commentsContainer.find('.commentBox').length,$commentsContainer.find('#reviewAvg').val(),false);}}
that.init();}
!function(e,t){"use strict";"function"==typeof define&&define.amd?define(t):"object"==typeof module&&module.exports?module.exports=t():e.matchesSelector=t()}(window,function(){"use strict";var e=function(){var e=window.Element.prototype;if(e.matches)return"matches";if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],o=0;o<t.length;o++){var r=t[o],n=r+"MatchesSelector";if(e[n])return n}}();return function(t,o){return t[e](o)}});
!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){"use strict";function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var n=this._events=this._events||{},i=n[e]=n[e]||[];return i.indexOf(t)==-1&&i.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var n=this._onceEvents=this._onceEvents||{},i=n[e]=n[e]||{};return i[t]=!0,this}},t.off=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var i=n.indexOf(t);return i!=-1&&n.splice(i,1),this}},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var i=this._onceEvents&&this._onceEvents[e],s=0;s<n.length;s++){var o=n[s],f=i&&i[o];f&&(this.off(e,o),delete i[o]),o.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e});
!function(e,t){"function"==typeof define&&define.amd?define(["desandro-matches-selector/matches-selector"],function(r){return t(e,r)}):"object"==typeof module&&module.exports?module.exports=t(e,require("desandro-matches-selector")):e.fizzyUIUtils=t(e,e.matchesSelector)}(window,function(e,t){"use strict";var r={};r.extend=function(e,t){for(var r in t)e[r]=t[r];return e},r.modulo=function(e,t){return(e%t+t)%t};var n=Array.prototype.slice;r.makeArray=function(e){if(Array.isArray(e))return e;if(null===e||void 0===e)return[];var t="object"==typeof e&&"number"==typeof e.length;return t?n.call(e):[e]},r.removeFrom=function(e,t){var r=e.indexOf(t);r!=-1&&e.splice(r,1)},r.getParent=function(e,r){for(;e.parentNode&&e!=document.body;)if(e=e.parentNode,t(e,r))return e},r.getQueryElement=function(e){return"string"==typeof e?document.querySelector(e):e},r.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.filterFindElements=function(e,n){e=r.makeArray(e);var o=[];return e.forEach(function(e){if(e instanceof HTMLElement){if(!n)return void o.push(e);t(e,n)&&o.push(e);for(var r=e.querySelectorAll(n),u=0;u<r.length;u++)o.push(r[u])}}),o},r.debounceMethod=function(e,t,r){r=r||100;var n=e.prototype[t],o=t+"Timeout";e.prototype[t]=function(){var e=this[o];clearTimeout(e);var t=arguments,u=this;this[o]=setTimeout(function(){n.apply(u,t),delete u[o]},r)}},r.docReady=function(e){var t=document.readyState;"complete"==t||"interactive"==t?setTimeout(e):document.addEventListener("DOMContentLoaded",e)},r.toDashed=function(e){return e.replace(/(.)([A-Z])/g,function(e,t,r){return t+"-"+r}).toLowerCase()};var o=e.console;return r.htmlInit=function(t,n){r.docReady(function(){var u=r.toDashed(n),a="data-"+u,i=document.querySelectorAll("["+a+"]"),c=document.querySelectorAll(".js-"+u),d=r.makeArray(i).concat(r.makeArray(c)),f=a+"-options",s=e.jQuery;d.forEach(function(e){var r,u=e.getAttribute(a)||e.getAttribute(f);try{r=u&&JSON.parse(u)}catch(i){return void(o&&o.error("Error parsing "+a+" on "+e.className+": "+i))}var c=new t(e,r);s&&s.data(e,n,c)})})},r});
!function(t,e){"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("fizzy-ui-utils")):t.InfiniteScroll=e(t,t.EvEmitter,t.fizzyUIUtils)}(window,function(t,e,i){function n(t,e){var a=i.getQueryElement(t);if(!a)return void console.error("Bad element for InfiniteScroll: "+(a||t));if(t=a,t.infiniteScrollGUID){var l=o[t.infiniteScrollGUID];return l.option(e),l}this.element=t,this.options=i.extend({},n.defaults),this.option(e),r&&(this.$element=r(this.element)),this.create()}var r=t.jQuery,o={};n.defaults={},n.create={},n.destroy={};var a=n.prototype;i.extend(a,e.prototype);var l=0;a.create=function(){var t=this.guid=++l;this.element.infiniteScrollGUID=t,o[t]=this,this.pageIndex=1,this.loadCount=0,this.updateGetPath();var e=this.getPath&&this.getPath();if(!e)return void console.error("Disabling InfiniteScroll");this.updateGetAbsolutePath(),this.log("initialized",[this.element.className]),this.callOnInit();for(var i in n.create)n.create[i].call(this)},a.option=function(t){i.extend(this.options,t)},a.callOnInit=function(){var t=this.options.onInit;t&&t.call(this,this)},a.dispatchEvent=function(t,e,i){this.log(t,i);var n=e?[e].concat(i):i;if(this.emitEvent(t,n),r&&this.$element){t+=".infiniteScroll";var o=t;if(e){var a=r.Event(e);a.type=t,o=a}this.$element.trigger(o,i)}};var s={initialized:function(t){return"on "+t},request:function(t){return"URL: "+t},load:function(t,e){return(t.title||"")+". URL: "+e},error:function(t,e){return t+". URL: "+e},append:function(t,e,i){return i.length+" items. URL: "+e},last:function(t,e){return"URL: "+e},history:function(t,e){return"URL: "+e},pageIndex:function(t,e){return"current page determined to be: "+t+" from "+e}};a.log=function(t,e){if(this.options.debug){var i="[InfiniteScroll] "+t,n=s[t];n&&(i+=". "+n.apply(this,e)),console.log(i)}},a.updateMeasurements=function(){this.windowHeight=t.innerHeight;var e=this.element.getBoundingClientRect();this.top=e.top+t.pageYOffset},a.updateScroller=function(){var e=this.options.elementScroll;if(!e)return void(this.scroller=t);if(this.scroller=e===!0?this.element:i.getQueryElement(e),!this.scroller)throw"Unable to find elementScroll: "+e},a.updateGetPath=function(){var t=this.options.path;if(!t)return void console.error("InfiniteScroll path option required. Set as: "+t);var e=typeof t;if("function"==e)return void(this.getPath=t);var i="string"==e&&t.match("{{#}}");return i?void this.updateGetPathTemplate(t):void this.updateGetPathSelector(t)},a.updateGetPathTemplate=function(t){this.getPath=function(){var e=this.pageIndex+1;return t.replace("{{#}}",e)}.bind(this);var e=t.replace("{{#}}","(\\d\\d?\\d?)"),i=new RegExp(e),n=location.href.match(i);n&&(this.pageIndex=parseInt(n[1],10),this.log("pageIndex",[this.pageIndex,"template string"]))};var h=[/^(.*?\/?page\/?)(\d\d?\d?)(.*?$)/,/^(.*?\/?\?page=)(\d\d?\d?)(.*?$)/,/(.*?)(\d\d?\d?)(?!.*\d)(.*?$)/];return a.updateGetPathSelector=function(t){var e=document.querySelector(t);if(!e)return void console.error("Bad InfiniteScroll path option. Next link not found: "+t);for(var i,n,r=e.getAttribute("href"),o=0;r&&o<h.length;o++){n=h[o];var a=r.match(n);if(a){i=a.slice(1);break}}return i?(this.isPathSelector=!0,this.getPath=function(){var t=this.pageIndex+1;return i[0]+t+i[2]}.bind(this),this.pageIndex=parseInt(i[1],10)-1,void this.log("pageIndex",[this.pageIndex,"next link"])):void console.error("InfiniteScroll unable to parse next link href: "+r)},a.updateGetAbsolutePath=function(){var t=this.getPath(),e=t.match(/^http/)||t.match(/^\//);if(e)return void(this.getAbsolutePath=this.getPath);var i=location.pathname,n=i.substring(0,i.lastIndexOf("/"));this.getAbsolutePath=function(){return n+"/"+this.getPath()}},n.create.hideNav=function(){var t=i.getQueryElement(this.options.hideNav);t&&(t.style.display="none",this.nav=t)},n.destroy.hideNav=function(){this.nav&&(this.nav.style.display="")},a.destroy=function(){this.allOff();for(var t in n.destroy)n.destroy[t].call(this);delete this.element.infiniteScrollGUID,delete o[this.guid],r&&this.$element&&r.removeData(this.element,"infiniteScroll")},n.throttle=function(t,e){e=e||200;var i,n;return function(){var r=+new Date,o=arguments,a=function(){i=r,t.apply(this,o)}.bind(this);i&&r<i+e?(clearTimeout(n),n=setTimeout(a,e)):a()}},n.data=function(t){t=i.getQueryElement(t);var e=t&&t.infiniteScrollGUID;return e&&o[e]},n.setJQuery=function(t){r=t},i.htmlInit(n,"infinite-scroll"),a._init=function(){},r&&r.bridget&&r.bridget("infiniteScroll",n),n});
!function(e,t){"function"==typeof define&&define.amd?define(["./core"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("./core")):t(e,e.InfiniteScroll)}(window,function(e,t){function i(e){for(var t=document.createDocumentFragment(),i=0;e&&i<e.length;i++)t.appendChild(e[i]);return t}function n(e){for(var t=e.querySelectorAll("script"),i=0;i<t.length;i++){var n=t[i],s=document.createElement("script");o(n,s),s.innerHTML=n.innerHTML,n.parentNode.replaceChild(s,n)}}function o(e,t){for(var i=e.attributes,n=0;n<i.length;n++){var o=i[n];t.setAttribute(o.name,o.value)}}function s(e,t,i,n){var o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType=t||"",o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.onload=function(){if(200==o.status)i(o.response);else{var e=new Error(o.statusText);n(e)}},o.onerror=function(){var t=new Error("Network error requesting "+e);n(t)},o.send()}var r=t.prototype;return t.defaults.loadOnScroll=!0,t.defaults.checkLastPage=!0,t.defaults.responseType="document",t.create.pageLoad=function(){this.canLoad=!0,this.on("scrollThreshold",this.onScrollThresholdLoad),this.on("load",this.checkLastPage),this.options.outlayer&&this.on("append",this.onAppendOutlayer)},r.onScrollThresholdLoad=function(){this.options.loadOnScroll&&this.loadNextPage()},r.loadNextPage=function(){if(!this.isLoading&&this.canLoad){var e=this.getAbsolutePath();this.isLoading=!0;var t=function(t){this.onPageLoad(t,e)}.bind(this),i=function(t){this.onPageError(t,e)}.bind(this);s(e,this.options.responseType,t,i),this.dispatchEvent("request",null,[e])}},r.onPageLoad=function(e,t){return this.options.append||(this.isLoading=!1),this.pageIndex++,this.loadCount++,this.dispatchEvent("load",null,[e,t]),this.appendNextPage(e,t),e},r.appendNextPage=function(e,t){var n=this.options.append,o="document"==this.options.responseType;if(o&&n){var s=e.querySelectorAll(n),r=i(s),a=function(){this.appendItems(s,r),this.isLoading=!1,this.dispatchEvent("append",null,[e,t,s])}.bind(this);this.options.outlayer?this.appendOutlayerItems(r,a):a()}},r.appendItems=function(e,t){e&&e.length&&(t=t||i(e),n(t),this.element.appendChild(t))},r.appendOutlayerItems=function(i,n){var o=t.imagesLoaded||e.imagesLoaded;return o?void o(i,n):(console.error("[InfiniteScroll] imagesLoaded required for outlayer option"),void(this.isLoading=!1))},r.onAppendOutlayer=function(e,t,i){this.options.outlayer.appended(i)},r.checkLastPage=function(e,t){var i=this.options.checkLastPage;if(i){var n=this.options.path;if("function"==typeof n){var o=this.getPath();if(!o)return void this.lastPageReached(e,t)}var s;if("string"==typeof i?s=i:this.isPathSelector&&(s=n),s&&e.querySelector){var r=e.querySelector(s);r||this.lastPageReached(e,t)}}},r.lastPageReached=function(e,t){this.canLoad=!1,this.dispatchEvent("last",null,[e,t])},r.onPageError=function(e,t){return this.isLoading=!1,this.canLoad=!1,this.dispatchEvent("error",null,[e,t]),e},t.create.prefill=function(){if(this.options.prefill){var e=this.options.append;if(!e)return void console.error("append option required for prefill. Set as :"+e);this.updateMeasurements(),this.updateScroller(),this.isPrefilling=!0,this.on("append",this.prefill),this.once("error",this.stopPrefill),this.once("last",this.stopPrefill),this.prefill()}},r.prefill=function(){var e=this.getPrefillDistance();this.isPrefilling=e>=0,this.isPrefilling?(this.log("prefill"),this.loadNextPage()):this.stopPrefill()},r.getPrefillDistance=function(){return this.options.elementScroll?this.scroller.clientHeight-this.scroller.scrollHeight:this.windowHeight-this.element.clientHeight},r.stopPrefill=function(){this.log("stopPrefill"),this.off("append",this.prefill)},t});
!function(t,e){"function"==typeof define&&define.amd?define(["./core","fizzy-ui-utils/utils"],function(i,o){return e(t,i,o)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){var o=e.prototype;return e.defaults.scrollThreshold=400,e.create.scrollWatch=function(){this.pageScrollHandler=this.onPageScroll.bind(this),this.resizeHandler=this.onResize.bind(this);var t=this.options.scrollThreshold,e=t||0===t;e&&this.enableScrollWatch()},e.destroy.scrollWatch=function(){this.disableScrollWatch()},o.enableScrollWatch=function(){this.isScrollWatching||(this.isScrollWatching=!0,this.updateMeasurements(),this.updateScroller(),this.on("last",this.disableScrollWatch),this.bindScrollWatchEvents(!0))},o.disableScrollWatch=function(){this.isScrollWatching&&(this.bindScrollWatchEvents(!1),delete this.isScrollWatching)},o.bindScrollWatchEvents=function(e){var i=e?"addEventListener":"removeEventListener";this.scroller[i]("scroll",this.pageScrollHandler),t[i]("resize",this.resizeHandler)},o.onPageScroll=e.throttle(function(){var t=this.getBottomDistance();t<=this.options.scrollThreshold&&this.dispatchEvent("scrollThreshold")}),o.getBottomDistance=function(){return this.options.elementScroll?this.getElementBottomDistance():this.getWindowBottomDistance()},o.getWindowBottomDistance=function(){var e=this.top+this.element.clientHeight,i=t.pageYOffset+this.windowHeight;return e-i},o.getElementBottomDistance=function(){var t=this.scroller.scrollHeight,e=this.scroller.scrollTop+this.scroller.clientHeight;return t-e},o.onResize=function(){this.updateMeasurements()},i.debounceMethod(e,"onResize",150),e});
!function(t,e){"function"==typeof define&&define.amd?define(["./core","fizzy-ui-utils/utils"],function(o,i){return e(t,o,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,o){var i=e.prototype;e.defaults.history="replace";var s=document.createElement("a");return e.create.history=function(){if(this.options.history){s.href=this.getAbsolutePath();var t=s.origin||s.protocol+"//"+s.host,e=t==location.origin;return e?void(this.options.append?this.createHistoryAppend():this.createHistoryPageLoad()):void console.error("[InfiniteScroll] cannot set history with different origin: "+s.origin+" on "+location.origin+" . History behavior disabled.")}},i.createHistoryAppend=function(){this.updateMeasurements(),this.updateScroller(),this.scrollPages=[{top:0,path:location.href,title:document.title}],this.scrollPageIndex=0,this.scrollHistoryHandler=this.onScrollHistory.bind(this),this.unloadHandler=this.onUnload.bind(this),this.scroller.addEventListener("scroll",this.scrollHistoryHandler),this.on("append",this.onAppendHistory),this.bindHistoryAppendEvents(!0)},i.bindHistoryAppendEvents=function(e){var o=e?"addEventListener":"removeEventListener";this.scroller[o]("scroll",this.scrollHistoryHandler),t[o]("unload",this.unloadHandler)},i.createHistoryPageLoad=function(){this.on("load",this.onPageLoadHistory)},e.destroy.history=i.destroyHistory=function(){var t=this.options.history&&this.options.append;t&&this.bindHistoryAppendEvents(!1)},i.onAppendHistory=function(t,e,o){if(o&&o.length){var i=o[0],n=this.getElementScrollY(i);s.href=e,this.scrollPages.push({top:n,path:s.href,title:t.title})}},i.getElementScrollY=function(t){return this.options.elementScroll?this.getElementElementScrollY(t):this.getElementWindowScrollY(t)},i.getElementWindowScrollY=function(e){var o=e.getBoundingClientRect();return o.top+t.pageYOffset},i.getElementElementScrollY=function(t){return t.offsetTop-this.top},i.onScrollHistory=function(){for(var t,e,o=this.getScrollViewY(),i=0;i<this.scrollPages.length;i++){var s=this.scrollPages[i];if(s.top>=o)break;t=i,e=s}t!=this.scrollPageIndex&&(this.scrollPageIndex=t,this.setHistory(e.title,e.path))},o.debounceMethod(e,"onScrollHistory",150),i.getScrollViewY=function(){return this.options.elementScroll?this.scroller.scrollTop+this.scroller.clientHeight/2:t.pageYOffset+this.windowHeight/2},i.setHistory=function(t,e){var o=this.options.history,i=o&&history[o+"State"];i&&(history[o+"State"](null,t,e),this.options.historyTitle&&(document.title=t),this.dispatchEvent("history",null,[t,e]))},i.onUnload=function(){var e=this.scrollPageIndex;if(0!==e){var o=this.scrollPages[e],i=t.pageYOffset-o.top+this.top;this.destroyHistory(),scrollTo(0,i)}},i.onPageLoadHistory=function(t,e){this.setHistory(t.title,e)},e});
!function(t,s){"function"==typeof define&&define.amd?define(["./core","fizzy-ui-utils/utils"],function(e,i){return s(t,e,i)}):"object"==typeof module&&module.exports?module.exports=s(t,require("./core"),require("fizzy-ui-utils")):s(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,s,e){function i(t){o(t,"none")}function n(t){o(t,"block")}function o(t,s){t&&(t.style.display=s)}var u=s.prototype;return s.create.status=function(){var t=e.getQueryElement(this.options.status);t&&(this.statusElement=t,this.statusEventElements={request:t.querySelector(".infinite-scroll-request"),error:t.querySelector(".infinite-scroll-error"),last:t.querySelector(".infinite-scroll-last")},this.on("request",this.showRequestStatus),this.on("error",this.showErrorStatus),this.on("last",this.showLastStatus),this.bindHideStatus("on"))},u.bindHideStatus=function(t){var s=this.options.append?"append":"load";this[t](s,this.hideAllStatus)},u.showRequestStatus=function(){this.showStatus("request")},u.showErrorStatus=function(){this.showStatus("error")},u.showLastStatus=function(){this.showStatus("last"),this.bindHideStatus("off")},u.showStatus=function(t){n(this.statusElement),this.hideStatusEventElements();var s=this.statusEventElements[t];n(s)},u.hideAllStatus=function(){i(this.statusElement),this.hideStatusEventElements()},u.hideStatusEventElements=function(){for(var t in this.statusEventElements){var s=this.statusEventElements[t];i(s)}},s});
!function(t,e){"function"==typeof define&&define.amd?define(["./core","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){function n(t,e){this.element=t,this.infScroll=e,this.clickHandler=this.onClick.bind(this),this.element.addEventListener("click",this.clickHandler),e.on("request",this.disable.bind(this)),e.on("load",this.enable.bind(this)),e.on("error",this.hide.bind(this)),e.on("last",this.hide.bind(this))}return e.create.button=function(){var t=i.getQueryElement(this.options.button);if(t)return void(this.button=new n(t,this))},e.destroy.button=function(){this.button&&this.button.destroy()},n.prototype.onClick=function(t){t.preventDefault(),this.infScroll.loadNextPage()},n.prototype.enable=function(){this.element.removeAttribute("disabled")},n.prototype.disable=function(){this.element.disabled="disabled"},n.prototype.hide=function(){this.element.style.display="none"},n.prototype.destroy=function(){this.element.removeEventListener("click",this.clickHandler)},e.Button=n,e});
!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=t.indexOf("%")==-1&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<g;e++){var i=a[e];t[i]=0}return t}function o(t){var e=getComputedStyle(t);return e||h("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function r(){if(!p){p=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var r=o(e);n=200==Math.round(t(r.width)),d.isBoxSizeOuter=n,i.removeChild(e)}}function d(e){if(r(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var d=o(e);if("none"==d.display)return i();var h={};h.width=e.offsetWidth,h.height=e.offsetHeight;for(var p=h.isBorderBox="border-box"==d.boxSizing,u=0;u<g;u++){var f=a[u],m=d[f],s=parseFloat(m);h[f]=isNaN(s)?0:s}var l=h.paddingLeft+h.paddingRight,c=h.paddingTop+h.paddingBottom,b=h.marginLeft+h.marginRight,x=h.marginTop+h.marginBottom,y=h.borderLeftWidth+h.borderRightWidth,v=h.borderTopWidth+h.borderBottomWidth,W=p&&n,w=t(d.width);w!==!1&&(h.width=w+(W?0:l+y));var B=t(d.height);return B!==!1&&(h.height=B+(W?0:c+v)),h.innerWidth=h.width-(l+y),h.innerHeight=h.height-(c+v),h.outerWidth=h.width+b,h.outerHeight=h.height+x,h}}var n,h="undefined"==typeof console?e:function(t){console.error(t)},a=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],g=a.length,p=!1;return d});
!function(t,i){"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter","get-size/get-size"],i):"object"==typeof module&&module.exports?module.exports=i(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=i(t.EvEmitter,t.getSize))}(window,function(t,i){"use strict";function n(t){for(var i in t)return!1;return i=null,!0}function o(t,i){t&&(this.element=t,this.layout=i,this.position={x:0,y:0},this._create())}function e(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var s=document.documentElement.style,r="string"==typeof s.transition?"transition":"WebkitTransition",a="string"==typeof s.transform?"transform":"WebkitTransform",h={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],l={transform:a,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"},u=o.prototype=Object.create(t.prototype);u.constructor=o,u._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},u.handleEvent=function(t){var i="on"+t.type;this[i]&&this[i](t)},u.getSize=function(){this.size=i(this.element)},u.css=function(t){var i=this.element.style;for(var n in t){var o=l[n]||n;i[o]=t[n]}},u.getPosition=function(){var t=getComputedStyle(this.element),i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=t[i?"left":"right"],e=t[n?"top":"bottom"],s=parseFloat(o),r=parseFloat(e),a=this.layout.size;o.indexOf("%")!=-1&&(s=s/100*a.width),e.indexOf("%")!=-1&&(r=r/100*a.height),s=isNaN(s)?0:s,r=isNaN(r)?0:r,s-=i?a.paddingLeft:a.paddingRight,r-=n?a.paddingTop:a.paddingBottom,this.position.x=s,this.position.y=r},u.layoutPosition=function(){var t=this.layout.size,i={},n=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop"),e=n?"paddingLeft":"paddingRight",s=n?"left":"right",r=n?"right":"left",a=this.position.x+t[e];i[s]=this.getXValue(a),i[r]="";var h=o?"paddingTop":"paddingBottom",l=o?"top":"bottom",u=o?"bottom":"top",d=this.position.y+t[h];i[l]=this.getYValue(d),i[u]="",this.css(i),this.emitEvent("layout",[this])},u.getXValue=function(t){var i=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!i?t/this.layout.size.width*100+"%":t+"px"},u.getYValue=function(t){var i=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&i?t/this.layout.size.height*100+"%":t+"px"},u._transitionTo=function(t,i){this.getPosition();var n=this.position.x,o=this.position.y,e=t==this.position.x&&i==this.position.y;if(this.setPosition(t,i),e&&!this.isTransitioning)return void this.layoutPosition();var s=t-n,r=i-o,a={};a.transform=this.getTranslate(s,r),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},u.getTranslate=function(t,i){var n=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop");return t=n?t:-t,i=o?i:-i,"translate3d("+t+"px, "+i+"px, 0)"},u.goTo=function(t,i){this.setPosition(t,i),this.layoutPosition()},u.moveTo=u._transitionTo,u.setPosition=function(t,i){this.position.x=parseFloat(t),this.position.y=parseFloat(i)},u._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var i in t.onTransitionEnd)t.onTransitionEnd[i].call(this)},u.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var i=this._transn;for(var n in t.onTransitionEnd)i.onEnd[n]=t.onTransitionEnd[n];for(n in t.to)i.ingProperties[n]=!0,t.isCleaning&&(i.clean[n]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var d="opacity,"+e(a);u.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:d,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(h,this,!1)}},u.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},u.onotransitionend=function(t){this.ontransitionend(t)};var p={"-webkit-transform":"transform"};u.ontransitionend=function(t){if(t.target===this.element){var i=this._transn,o=p[t.propertyName]||t.propertyName;if(delete i.ingProperties[o],n(i.ingProperties)&&this.disableTransition(),o in i.clean&&(this.element.style[t.propertyName]="",delete i.clean[o]),o in i.onEnd){var e=i.onEnd[o];e.call(this),delete i.onEnd[o]}this.emitEvent("transitionEnd",[this])}},u.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(h,this,!1),this.isTransitioning=!1},u._removeStyles=function(t){var i={};for(var n in t)i[n]="";this.css(i)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return u.removeTransitionStyles=function(){this.css(f)},u.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},u.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},u.remove=function(){return r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},u.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,i={},n=this.getHideRevealTransitionEndProperty("visibleStyle");i[n]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:i})},u.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},u.getHideRevealTransitionEndProperty=function(t){var i=this.layout.options[t];if(i.opacity)return"opacity";for(var n in i)return n},u.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,i={},n=this.getHideRevealTransitionEndProperty("hiddenStyle");i[n]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:i})},u.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},u.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},o});
!function(t,e){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,s,o){return e(t,i,n,s,o)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,s){"use strict";function o(t,e){var i=n.getQueryElement(t);if(!i)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,u&&(this.$element=u(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var s=++c;this.element.outlayerGUID=s,f[s]=this,this._create();var o=this._getOption("initLayout");o&&this.layout()}function r(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],n=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var s=d[n]||1;return i*s}var h=t.console,u=t.jQuery,m=function(){},c=0,f={};o.namespace="outlayer",o.Item=s,o.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var l=o.prototype;n.extend(l,e.prototype),l.option=function(t){n.extend(this.options,t)},l._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},o.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},l._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},l.reloadItems=function(){this.items=this._itemize(this.element.children)},l._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],s=0;s<e.length;s++){var o=e[s],r=new i(o,this);n.push(r)}return n},l._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},l.getItemElements=function(){return this.items.map(function(t){return t.element})},l.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},l._init=l.layout,l._resetLayout=function(){this.getSize()},l.getSize=function(){this.size=i(this.element)},l._getMeasurement=function(t,e){var n,s=this.options[t];s?("string"==typeof s?n=this.element.querySelector(s):s instanceof HTMLElement&&(n=s),this[t]=n?i(n)[e]:s):this[t]=0},l.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},l._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},l._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)},this),this._processLayoutQueue(i)}},l._getItemLayoutPosition=function(){return{x:0,y:0}},l._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},l.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},l._positionItem=function(t,e,i,n,s){n?t.goTo(e,i):(t.stagger(s*this.stagger),t.moveTo(e,i))},l._postLayout=function(){this.resizeContainer()},l.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},l._getContainerSize=m,l._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},l._emitCompleteOnItems=function(t,e){function i(){s.dispatchEvent(t+"Complete",null,[e])}function n(){r++,r==o&&i()}var s=this,o=e.length;if(!e||!o)return void i();var r=0;e.forEach(function(e){e.once(t,n)})},l.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),u)if(this.$element=this.$element||u(this.element),e){var s=u.Event(e);s.type=t,this.$element.trigger(s,i)}else this.$element.trigger(t,i)},l.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},l.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},l.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},l.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},l._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)},l._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},l._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},l._manageStamp=m,l._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,s=i(t),o={left:e.left-n.left-s.marginLeft,top:e.top-n.top-s.marginTop,right:n.right-e.right-s.marginRight,bottom:n.bottom-e.bottom-s.marginBottom};return o},l.handleEvent=n.handleEvent,l.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},l.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},l.onresize=function(){this.resize()},n.debounceMethod(o,"onresize",100),l.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},l.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},l.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},l.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},l.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},l.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},l.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},l.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},l.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},l.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},l.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},l.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},l.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete f[e],delete this.element.outlayerGUID,u&&u.removeData(this.element,this.constructor.namespace)},o.data=function(t){t=n.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&f[e]},o.create=function(t,e){var i=r(o);return i.defaults=n.extend({},o.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},o.compatOptions),i.namespace=t,i.data=o.data,i.Item=r(s),n.htmlInit(i,t),u&&u.bridget&&u.bridget(t,i),i};var d={ms:1,s:1e3};return o.Item=s,o});
!function(t,i){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],i):"object"==typeof module&&module.exports?module.exports=i(require("outlayer"),require("get-size")):t.Masonry=i(t.Outlayer,t.getSize)}(window,function(t,i){"use strict";var o=t.create("masonry");o.compatOptions.fitWidth="isFitWidth";var e=o.prototype;return e._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},e.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],o=t&&t.element;this.columnWidth=o&&i(o).outerWidth||this.containerWidth}var e=this.columnWidth+=this.gutter,h=this.containerWidth+this.gutter,n=h/e,s=e-h%e,r=s&&s<1?"round":"floor";n=Math[r](n),this.cols=Math.max(n,1)},e.getContainerWidth=function(){var t=this._getOption("fitWidth"),o=t?this.element.parentNode:this.element,e=i(o);this.containerWidth=e&&e.innerWidth},e._getItemLayoutPosition=function(t){t.getSize();var i=t.size.outerWidth%this.columnWidth,o=i&&i<1?"round":"ceil",e=Math[o](t.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var h=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",n=this[h](e,t),s={x:this.columnWidth*n.col,y:n.y},r=n.y+t.size.outerHeight,a=e+n.col,u=n.col;u<a;u++)this.colYs[u]=r;return s},e._getTopColPosition=function(t){var i=this._getTopColGroup(t),o=Math.min.apply(Math,i);return{col:i.indexOf(o),y:o}},e._getTopColGroup=function(t){if(t<2)return this.colYs;for(var i=[],o=this.cols+1-t,e=0;e<o;e++)i[e]=this._getColGroupY(e,t);return i},e._getColGroupY=function(t,i){if(i<2)return this.colYs[t];var o=this.colYs.slice(t,t+i);return Math.max.apply(Math,o)},e._getHorizontalColPosition=function(t,i){var o=this.horizontalColIndex%this.cols,e=t>1&&o+t>this.cols;o=e?0:o;var h=i.size.outerWidth&&i.size.outerHeight;return this.horizontalColIndex=h?o+t:this.horizontalColIndex,{col:o,y:this._getColGroupY(o,t)}},e._manageStamp=function(t){var o=i(t),e=this._getElementOffset(t),h=this._getOption("originLeft"),n=h?e.left:e.right,s=n+o.outerWidth,r=Math.floor(n/this.columnWidth);r=Math.max(0,r);var a=Math.floor(s/this.columnWidth);a-=s%this.columnWidth?0:1,a=Math.min(this.cols-1,a);for(var u=this._getOption("originTop"),l=(u?e.top:e.bottom)+o.outerHeight,c=r;c<=a;c++)this.colYs[c]=Math.max(l,this.colYs[c])},e._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},e._getContainerFitWidth=function(){for(var t=0,i=this.cols;--i&&0===this.colYs[i];)t++;return(this.cols-t)*this.columnWidth-this.gutter},e.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},o});
!function(t,e){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,function(t,e){"use strict";function i(t,e){for(var i in e)t[i]=e[i];return t}function o(t){if(Array.isArray(t))return t;var e="object"==typeof t&&"number"==typeof t.length;return e?d.call(t):[t]}function r(t,e,n){if(!(this instanceof r))return new r(t,e,n);var s=t;return"string"==typeof t&&(s=document.querySelectorAll(t)),s?(this.elements=o(s),this.options=i({},this.options),"function"==typeof e?n=e:i(this.options,e),n&&this.on("always",n),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||t))}function n(t){this.img=t}function s(t,e){this.url=t,this.element=e,this.img=new Image}var h=t.jQuery,a=t.console,d=Array.prototype.slice;r.prototype=Object.create(e.prototype),r.prototype.options={},r.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},r.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),this.options.background===!0&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&m[e]){for(var i=t.querySelectorAll("img"),o=0;o<i.length;o++){var r=i[o];this.addImage(r)}if("string"==typeof this.options.background){var n=t.querySelectorAll(this.options.background);for(o=0;o<n.length;o++){var s=n[o];this.addElementBackgroundImages(s)}}}};var m={1:!0,9:!0,11:!0};return r.prototype.addElementBackgroundImages=function(t){var e=getComputedStyle(t);if(e)for(var i=/url\((['"])?(.*?)\1\)/gi,o=i.exec(e.backgroundImage);null!==o;){var r=o&&o[2];r&&this.addBackground(r,t),o=i.exec(e.backgroundImage)}},r.prototype.addImage=function(t){var e=new n(t);this.images.push(e)},r.prototype.addBackground=function(t,e){var i=new s(t,e);this.images.push(i)},r.prototype.check=function(){function t(t,i,o){setTimeout(function(){e.progress(t,i,o)})}var e=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(e){e.once("progress",t),e.check()}):void this.complete()},r.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,t,e)},r.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){var e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},n.prototype=Object.create(e.prototype),n.prototype.check=function(){var t=this.getIsImageComplete();return t?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},n.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},n.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.img,e])},n.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},n.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},n.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(n.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var t=this.getIsImageComplete();t&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},r.makeJQueryPlugin=function(e){e=e||t.jQuery,e&&(h=e,h.fn.imagesLoaded=function(t,e){var i=new r(this,t,e);return i.jqDeferred.promise(h(this))})},r.makeJQueryPlugin(),r});
!function(){window.FizzyDocs={},window.filterBind=function(n,t,i,e){n.addEventListener(t,function(n){matchesSelector(n.target,i)&&e(n)})}}();
FizzyDocs["commercial-license-agreement"]=function(e){"use strict";function t(e){var t=o.querySelector(".is-selected");t&&t.classList.remove("is-selected"),e.classList.add("is-selected");var i=e.getAttribute("data-license-option"),n=r[i];l.forEach(function(e){e.element.textContent=n[e.property]})}var r={developer:{title:"Developer","for-official":"one (1) Licensed Developer","for-plain":"one individual Developer"},team:{title:"Team","for-official":"up to eight (8) Licensed Developer(s)","for-plain":"up to 8 Developers"},organization:{title:"Organization","for-official":"an unlimited number of Licensed Developer(s)","for-plain":"an unlimited number of Developers"}},o=e.querySelector(".button-group"),i=e.querySelector("h2"),n=i.cloneNode(!0);n.style.borderTop="none",n.style.marginTop=0,n.id="",n.innerHTML=n.innerHTML.replace("Commercial License",'Commercial <span data-license-property="title"></span> License'),i.textContent="",o.parentNode.insertBefore(n,o.nextSibling);for(var l=[],a=e.querySelectorAll("[data-license-property]"),c=0,s=a.length;c<s;c++){var p=a[c],u={property:p.getAttribute("data-license-property"),element:p};l.push(u)}t(o.querySelector(".button--developer")),filterBind(o,"click",".button",function(e){t(e.target)})};
!function(){var t=0;FizzyDocs["gh-button"]=function(n){function e(t){return t.toString().replace(/(\d)(?=(\d{3})+$)/g,"$1,")}var a=n.href.split("/"),r=a[3],c=a[4],o=n.querySelector(".gh-button__stat__text");t++;var u="ghButtonCallback"+t;window[u]=function(t){var n=e(t.data.stargazers_count);o.textContent=n};var i=document.createElement("script");i.src="https://api.github.com/repos/"+r+"/"+c+"?callback="+u,document.head.appendChild(i)}}();
FizzyDocs["shirt-promo"]=function(e){var t=new Date(2017,9,6),o=Math.round((t-new Date)/864e5),r=e.querySelector(".shirt-promo__title");r.textContent+=". Only on sale for "+o+" more days."};
!function(){"use strict";window.InfiniteScrollDocs={},window.utils=fizzyUIUtils}();
InfiniteScrollDocs.append=function(e){var t=e.querySelector(".scroller__content");new InfiniteScroll(t,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:e,status:e.querySelector(".scroller-status"),history:!1})};
InfiniteScrollDocs["button-option"]=function(e){var t=e.querySelector(".scroller__content");new InfiniteScroll(t,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",elementScroll:e,checkLastPage:".pagination__next",scrollThreshold:!1,button:e.querySelector(".view-more-button"),status:e.querySelector(".scroller-status"),history:!1})};
InfiniteScrollDocs["button-start"]=function(e){function t(){o.loadNextPage(),o.options.loadOnScroll=!0,n.style.display="none",n.removeEventListener("click",t)}var l=e.querySelector(".scroller__content"),o=new InfiniteScroll(l,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:e,loadOnScroll:!1,status:e.querySelector(".scroller-status"),history:!1}),n=e.querySelector(".view-more-button");n.addEventListener("click",t)};
InfiniteScrollDocs["check-last-page-disabled"]=function(e){var l=e.querySelector(".scroller__content");new InfiniteScroll(l,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",elementScroll:e,checkLastPage:!1,scrollThreshold:!1,button:e.querySelector(".view-more-button"),status:e.querySelector(".scroller-status"),history:!1})};
InfiniteScrollDocs.debug=function(e){var t=e.querySelector(".scroller__content");new InfiniteScroll(t,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:e,status:e.querySelector(".scroller-status"),history:!1,debug:!0})};
InfiniteScrollDocs["element-scroll-container"]=function(e){new InfiniteScroll(e,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:!0,history:!1})};
InfiniteScrollDocs["load-count"]=function(e){var t=e.querySelector(".scroller"),o=e.querySelector(".scroller__content"),l=e.querySelector(".demo-status"),n=new InfiniteScroll(o,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:t,status:e.querySelector(".scroller-status"),history:!1});n.on("load",function(){l.textContent=n.loadCount+" page"+(n.loadCount>1?"s":"")+" loaded"})};
InfiniteScrollDocs["masonry-small"]=function(e){var t=e.querySelector(".scroller__content"),r=new Masonry(t,{itemSelector:".image-grid__item",columnWidth:".image-grid__col-sizer",gutter:".image-grid__gutter-sizer",percentPosition:!0,stagger:30,visibleStyle:{transform:"translateY(0)",opacity:1},hiddenStyle:{transform:"translateY(100px)",opacity:0}});imagesLoaded(t,function(){r.layout()}),new InfiniteScroll(t,{path:"demo/masonry/page{{#}}.html",append:".image-grid__item",checkLastPage:".pagination__next",outlayer:r,history:!1,elementScroll:e,status:e.querySelector(".scroller-status")})};
InfiniteScrollDocs["page-index"]=function(e){var t=e.querySelector(".scroller"),l=e.querySelector(".scroller__content"),o=e.querySelector(".demo-status"),n=new InfiniteScroll(l,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:t,status:e.querySelector(".scroller-status"),history:!1});n.on("load",function(){o.textContent="Loaded page: "+this.pageIndex})};
InfiniteScrollDocs.prefill=function(e){function l(){new InfiniteScroll(r,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:t,prefill:!0,status:e.querySelector(".scroller-status"),history:!1}),c.disabled="disabled",c.removeEventListener("click",l)}var t=e.querySelector(".scroller"),r=e.querySelector(".scroller__content"),c=e.querySelector(".button");c.addEventListener("click",l)};
InfiniteScrollDocs["scroll-2"]=function(e){function l(){1==n.loadCount&&(n.options.loadOnScroll=!1,t.style.display="inline-block",n.off(l))}var o=e.querySelector(".scroller__content"),t=e.querySelector(".view-more-button"),n=new InfiniteScroll(o,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:e,button:t,status:e.querySelector(".scroller-status"),history:!1});n.on("load",l)};
InfiniteScrollDocs["scroll-threshold-option"]=function(e){var l=e.querySelector(".scroller__content");new InfiniteScroll(l,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:e,status:e.querySelector(".scroller-status"),scrollThreshold:100,history:!1})};
InfiniteScrollDocs.status=function(e){var l=e.querySelector(".scroller__content");new InfiniteScroll(l,{path:"demo/element-scroll/page{{#}}.html",append:".scroller-item",checkLastPage:".pagination__next",elementScroll:e,status:e.querySelector(".scroller-status"),scrollThreshold:50,history:!1})};
InfiniteScrollDocs["image-grid"]=function(e){var i=new Masonry(e,{itemSelector:"none",columnWidth:".image-grid__col-sizer",gutter:".image-grid__gutter-sizer",percentPosition:!0,stagger:30,visibleStyle:{transform:"translateY(0)",opacity:1},hiddenStyle:{transform:"translateY(100px)",opacity:0}});imagesLoaded(e,function(){e.classList.remove("are-images-unloaded"),i.options.itemSelector=".image-grid__item";var t=e.querySelectorAll(".image-grid__item");i.appended(t)}),new InfiniteScroll(e,{path:".pagination__next",hideNav:".pagination",append:".image-grid__item",outlayer:i,status:".scroller-status",debug:!0})};
!function(){var t;InfiniteScrollDocs["page-nav"]=function(e){var i=e.querySelector(".page-nav__list"),n=getComputedStyle(e,":after").content,a=n.match("sticky");if(t&&a)return void(e.style.display="none");t=e;var c=i.clientHeight<=window.innerHeight;c&&a&&e.classList.add("is-sticky")}}();
InfiniteScrollDocs["site-scroll"]=function(n){function e(){i=new InfiniteScroll(".main .container",{path:function(){var n=c+this.loadCount,e=a[n];return e&&e+".html"},append:".main__page"}),i.on("append",t),i.loadNextPage(),o.style.display="none",o.removeEventListener("click",e)}function t(n,e,t){for(var i=0;i<t.length;i++)InfiniteScrollDocs.initElementJS(t[i])}var i,o=n.querySelector(".button"),a=["index","options","api","events","extras","license"],l=document.body.getAttribute("data-basename"),c=a.indexOf(l)+1;o.addEventListener("click",e)};
!function(){"use strict";InfiniteScrollDocs.initElementJS=function(t){for(var n=t.querySelectorAll("[data-js]"),e=0;e<n.length;e++){var i=n[e],c=i.getAttribute("data-js"),l=InfiniteScrollDocs[c]||FizzyDocs[c];l&&l(i)}},InfiniteScrollDocs.initElementJS(document)}();
;(function ($, window, document, undefined) {'use strict';var pluginName = 'treeview';var _default = {};_default.settings = {injectStyle: true,levels: 2,expandIcon: 'glyphicon glyphicon-plus',collapseIcon: 'glyphicon glyphicon-minus',emptyIcon: 'glyphicon',nodeIcon: '',selectedIcon: '',checkedIcon: 'glyphicon glyphicon-check',uncheckedIcon: 'glyphicon glyphicon-unchecked',color: undefined, // '#000000',
backColor: undefined, // '#FFFFFF',
borderColor: undefined, // '#dddddd',
onhoverColor: '#F5F5F5',selectedColor: '#FFFFFF',selectedBackColor: '#428bca',searchResultColor: '#D9534F',searchResultBackColor: undefined, //'#FFFFFF',
enableLinks: false,highlightSelected: true,highlightSearchResults: true,showBorder: true,showIcon: true,showCheckbox: false,showTags: false,multiSelect: false,onNodeChecked: undefined,onNodeCollapsed: undefined,onNodeDisabled: undefined,onNodeEnabled: undefined,onNodeExpanded: undefined,onNodeSelected: undefined,onNodeUnchecked: undefined,onNodeUnselected: undefined,onSearchComplete: undefined,onSearchCleared: undefined};_default.options = {silent: false,ignoreChildren: false};_default.searchOptions = {ignoreCase: true,exactMatch: false,revealResults: true};var Tree = function (element, options) {this.$element = $(element);this.elementId = element.id;this.styleId = this.elementId + '-style';this.init(options);return {options: this.options,init: $.proxy(this.init, this),remove: $.proxy(this.remove, this),getNode: $.proxy(this.getNode, this),getParent: $.proxy(this.getParent, this),getSiblings: $.proxy(this.getSiblings, this),getSelected: $.proxy(this.getSelected, this),getUnselected: $.proxy(this.getUnselected, this),getExpanded: $.proxy(this.getExpanded, this),getCollapsed: $.proxy(this.getCollapsed, this),getChecked: $.proxy(this.getChecked, this),getUnchecked: $.proxy(this.getUnchecked, this),getDisabled: $.proxy(this.getDisabled, this),getEnabled: $.proxy(this.getEnabled, this),selectNode: $.proxy(this.selectNode, this),unselectNode: $.proxy(this.unselectNode, this),toggleNodeSelected: $.proxy(this.toggleNodeSelected, this),collapseAll: $.proxy(this.collapseAll, this),collapseNode: $.proxy(this.collapseNode, this),expandAll: $.proxy(this.expandAll, this),expandNode: $.proxy(this.expandNode, this),toggleNodeExpanded: $.proxy(this.toggleNodeExpanded, this),revealNode: $.proxy(this.revealNode, this),checkAll: $.proxy(this.checkAll, this),checkNode: $.proxy(this.checkNode, this),uncheckAll: $.proxy(this.uncheckAll, this),uncheckNode: $.proxy(this.uncheckNode, this),toggleNodeChecked: $.proxy(this.toggleNodeChecked, this),disableAll: $.proxy(this.disableAll, this),disableNode: $.proxy(this.disableNode, this),enableAll: $.proxy(this.enableAll, this),enableNode: $.proxy(this.enableNode, this),toggleNodeDisabled: $.proxy(this.toggleNodeDisabled, this),search: $.proxy(this.search, this),clearSearch: $.proxy(this.clearSearch, this)};};Tree.prototype.init = function (options) {this.tree = [];this.nodes = [];if (options.data) {if (typeof options.data === 'string') {options.data = $.parseJSON(options.data);}
this.tree = $.extend(true, [], options.data);delete options.data;}
this.options = $.extend({}, _default.settings, options);this.destroy();this.subscribeEvents();this.setInitialStates({ nodes: this.tree }, 0);this.render();};Tree.prototype.remove = function () {this.destroy();$.removeData(this, pluginName);$('#' + this.styleId).remove();};Tree.prototype.destroy = function () {if (!this.initialized) return;this.$wrapper.remove();this.$wrapper = null;this.unsubscribeEvents();this.initialized = false;};Tree.prototype.unsubscribeEvents = function () {this.$element.off('click');this.$element.off('nodeChecked');this.$element.off('nodeCollapsed');this.$element.off('nodeDisabled');this.$element.off('nodeEnabled');this.$element.off('nodeExpanded');this.$element.off('nodeSelected');this.$element.off('nodeUnchecked');this.$element.off('nodeUnselected');this.$element.off('searchComplete');this.$element.off('searchCleared');};Tree.prototype.subscribeEvents = function () {this.unsubscribeEvents();this.$element.on('click', $.proxy(this.clickHandler, this));if (typeof (this.options.onNodeChecked) === 'function') {this.$element.on('nodeChecked', this.options.onNodeChecked);}
if (typeof (this.options.onNodeCollapsed) === 'function') {this.$element.on('nodeCollapsed', this.options.onNodeCollapsed);}
if (typeof (this.options.onNodeDisabled) === 'function') {this.$element.on('nodeDisabled', this.options.onNodeDisabled);}
if (typeof (this.options.onNodeEnabled) === 'function') {this.$element.on('nodeEnabled', this.options.onNodeEnabled);}
if (typeof (this.options.onNodeExpanded) === 'function') {this.$element.on('nodeExpanded', this.options.onNodeExpanded);}
if (typeof (this.options.onNodeSelected) === 'function') {this.$element.on('nodeSelected', this.options.onNodeSelected);}
if (typeof (this.options.onNodeUnchecked) === 'function') {this.$element.on('nodeUnchecked', this.options.onNodeUnchecked);}
if (typeof (this.options.onNodeUnselected) === 'function') {this.$element.on('nodeUnselected', this.options.onNodeUnselected);}
if (typeof (this.options.onSearchComplete) === 'function') {this.$element.on('searchComplete', this.options.onSearchComplete);}
if (typeof (this.options.onSearchCleared) === 'function') {this.$element.on('searchCleared', this.options.onSearchCleared);}};Tree.prototype.setInitialStates = function (node, level) {if (!node.nodes) return;level += 1;var parent = node;var _this = this;$.each(node.nodes, function checkStates(index, node) {node.nodeId = _this.nodes.length;node.parentId = parent.nodeId;if (!node.hasOwnProperty('selectable')) {node.selectable = true;}
node.state = node.state || {};if (!node.state.hasOwnProperty('checked')) {node.state.checked = false;}
if (!node.state.hasOwnProperty('disabled')) {node.state.disabled = false;}
if (!node.state.hasOwnProperty('expanded')) {if (!node.state.disabled &&(level < _this.options.levels) &&(node.nodes && node.nodes.length > 0)) {node.state.expanded = true;}
else {node.state.expanded = false;}}
if (!node.state.hasOwnProperty('selected')) {node.state.selected = false;}
_this.nodes.push(node);if (node.nodes) {_this.setInitialStates(node, level);}});};Tree.prototype.clickHandler = function (event) {if (!this.options.enableLinks) event.preventDefault();var target = $(event.target);var node = this.findNode(target);if (!node || node.state.disabled) return;var classList = target.attr('class') ? target.attr('class').split(' ') : [];if ((classList.indexOf('expand-icon') !== -1)) {this.toggleExpandedState(node, _default.options);this.render();}
else if ((classList.indexOf('check-icon') !== -1)) {this.toggleCheckedState(node, _default.options);this.render();}
else {if (node.selectable) {this.toggleSelectedState(node, _default.options);} else {this.toggleExpandedState(node, _default.options);}
this.render();}};Tree.prototype.findNode = function (target) {var nodeId = target.closest('li.list-group-item').attr('data-nodeid');var node = this.nodes[nodeId];if (!node) {console.log('Error: node does not exist');}
return node;};Tree.prototype.toggleExpandedState = function (node, options) {if (!node) return;this.setExpandedState(node, !node.state.expanded, options);};Tree.prototype.setExpandedState = function (node, state, options) {if (state === node.state.expanded) return;if (state && node.nodes) {node.state.expanded = true;if (!options.silent) {this.$element.trigger('nodeExpanded', $.extend(true, {}, node));}}
else if (!state) {node.state.expanded = false;if (!options.silent) {this.$element.trigger('nodeCollapsed', $.extend(true, {}, node));}
if (node.nodes && !options.ignoreChildren) {$.each(node.nodes, $.proxy(function (index, node) {this.setExpandedState(node, false, options);}, this));}}};Tree.prototype.toggleSelectedState = function (node, options) {if (!node) return;this.setSelectedState(node, !node.state.selected, options);};Tree.prototype.setSelectedState = function (node, state, options) {if (state === node.state.selected) return;if (state) {if (!this.options.multiSelect) {$.each(this.findNodes('true', 'g', 'state.selected'), $.proxy(function (index, node) {this.setSelectedState(node, false, options);}, this));}
node.state.selected = true;if (!options.silent) {this.$element.trigger('nodeSelected', $.extend(true, {}, node));}}
else {node.state.selected = false;if (!options.silent) {this.$element.trigger('nodeUnselected', $.extend(true, {}, node));}}};Tree.prototype.toggleCheckedState = function (node, options) {if (!node) return;this.setCheckedState(node, !node.state.checked, options);};Tree.prototype.setCheckedState = function (node, state, options) {if (state === node.state.checked) return;if (state) {node.state.checked = true;if (!options.silent) {this.$element.trigger('nodeChecked', $.extend(true, {}, node));}}
else {node.state.checked = false;if (!options.silent) {this.$element.trigger('nodeUnchecked', $.extend(true, {}, node));}}};Tree.prototype.setDisabledState = function (node, state, options) {if (state === node.state.disabled) return;if (state) {node.state.disabled = true;this.setExpandedState(node, false, options);this.setSelectedState(node, false, options);this.setCheckedState(node, false, options);if (!options.silent) {this.$element.trigger('nodeDisabled', $.extend(true, {}, node));}}
else {node.state.disabled = false;if (!options.silent) {this.$element.trigger('nodeEnabled', $.extend(true, {}, node));}}};Tree.prototype.render = function () {if (!this.initialized) {this.$element.addClass(pluginName);this.$wrapper = $(this.template.list);this.injectStyle();this.initialized = true;}
this.$element.empty().append(this.$wrapper.empty());this.buildTree(this.tree, 0);};Tree.prototype.buildTree = function (nodes, level) {if (!nodes) return;level += 1;var _this = this;$.each(nodes, function addNodes(id, node) {var treeItem = $(_this.template.item)
.addClass('node-' + _this.elementId)
.addClass(node.state.checked ? 'node-checked' : '')
.addClass(node.state.disabled ? 'node-disabled': '')
.addClass(node.state.selected ? 'node-selected' : '')
.addClass(node.searchResult ? 'search-result' : '')
.attr('data-nodeid', node.nodeId)
.attr('style', _this.buildStyleOverride(node));for (var i = 0; i < (level - 1); i++) {treeItem.append(_this.template.indent);}
var classList = [];if (node.nodes) {classList.push('expand-icon');if (node.state.expanded) {classList.push(_this.options.collapseIcon);}
else {classList.push(_this.options.expandIcon);}}
else {classList.push(_this.options.emptyIcon);}
treeItem
.append($(_this.template.icon)
.addClass(classList.join(' ')));if (_this.options.showIcon) {var classList = ['node-icon'];classList.push(node.icon || _this.options.nodeIcon);if (node.state.selected) {classList.pop();classList.push(node.selectedIcon || _this.options.selectedIcon ||node.icon || _this.options.nodeIcon);}
treeItem
.append($(_this.template.icon)
.addClass(classList.join(' ')));}
if (_this.options.showCheckbox) {var classList = ['check-icon'];if (node.state.checked) {classList.push(_this.options.checkedIcon);}
else {classList.push(_this.options.uncheckedIcon);}
treeItem
.append($(_this.template.icon)
.addClass(classList.join(' ')));}
if (_this.options.enableLinks) {treeItem
.append($(_this.template.link)
.attr('href', node.href)
.append(node.text));}
else {treeItem
.append(node.text);}
if (_this.options.showTags && node.tags) {$.each(node.tags, function addTag(id, tag) {treeItem
.append($(_this.template.badge)
.append(tag));});}
_this.$wrapper.append(treeItem);if (node.nodes && node.state.expanded && !node.state.disabled) {return _this.buildTree(node.nodes, level);}});};Tree.prototype.buildStyleOverride = function (node) {if (node.state.disabled) return '';var color = node.color;var backColor = node.backColor;if (this.options.highlightSelected && node.state.selected) {if (this.options.selectedColor) {color = this.options.selectedColor;}
if (this.options.selectedBackColor) {backColor = this.options.selectedBackColor;}}
if (this.options.highlightSearchResults && node.searchResult && !node.state.disabled) {if (this.options.searchResultColor) {color = this.options.searchResultColor;}
if (this.options.searchResultBackColor) {backColor = this.options.searchResultBackColor;}}
return 'color:' + color +';background-color:' + backColor + ';';};Tree.prototype.injectStyle = function () {if (this.options.injectStyle && !document.getElementById(this.styleId)) {$('<style type="text/css" id="' + this.styleId + '"> ' + this.buildStyle() + ' </style>').appendTo('head');}};Tree.prototype.buildStyle = function () {var style = '.node-' + this.elementId + '{';if (this.options.color) {style += 'color:' + this.options.color + ';';}
if (this.options.backColor) {style += 'background-color:' + this.options.backColor + ';';}
if (!this.options.showBorder) {style += 'border:none;';}
else if (this.options.borderColor) {style += 'border:1px solid ' + this.options.borderColor + ';';}
style += '}';if (this.options.onhoverColor) {style += '.node-' + this.elementId + ':not(.node-disabled):hover{' +'background-color:' + this.options.onhoverColor + ';' +'}';}
return this.css + style;};Tree.prototype.template = {list: '<ul class="list-group"></ul>',item: '<li class="list-group-item"></li>',indent: '<span class="indent"></span>',icon: '<span class="icon"></span>',link: '<a href="#" style="color:inherit;"></a>',badge: '<span class="badge"></span>'};Tree.prototype.css = '.treeview .list-group-item{cursor:pointer}.treeview span.indent{margin-left:10px;margin-right:10px}.treeview span.icon{width:12px;margin-right:5px}.treeview .node-disabled{color:silver;cursor:not-allowed}'
Tree.prototype.getNode = function (nodeId) {return this.nodes[nodeId];};Tree.prototype.getParent = function (identifier) {var node = this.identifyNode(identifier);return this.nodes[node.parentId];};Tree.prototype.getSiblings = function (identifier) {var node = this.identifyNode(identifier);var parent = this.getParent(node);var nodes = parent ? parent.nodes : this.tree;return nodes.filter(function (obj) {return obj.nodeId !== node.nodeId;});};Tree.prototype.getSelected = function () {return this.findNodes('true', 'g', 'state.selected');};Tree.prototype.getUnselected = function () {return this.findNodes('false', 'g', 'state.selected');};Tree.prototype.getExpanded = function () {return this.findNodes('true', 'g', 'state.expanded');};Tree.prototype.getCollapsed = function () {return this.findNodes('false', 'g', 'state.expanded');};Tree.prototype.getChecked = function () {return this.findNodes('true', 'g', 'state.checked');};Tree.prototype.getUnchecked = function () {return this.findNodes('false', 'g', 'state.checked');};Tree.prototype.getDisabled = function () {return this.findNodes('true', 'g', 'state.disabled');};Tree.prototype.getEnabled = function () {return this.findNodes('false', 'g', 'state.disabled');};Tree.prototype.selectNode = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setSelectedState(node, true, options);}, this));this.render();};Tree.prototype.unselectNode = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setSelectedState(node, false, options);}, this));this.render();};Tree.prototype.toggleNodeSelected = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.toggleSelectedState(node, options);}, this));this.render();};Tree.prototype.collapseAll = function (options) {var identifiers = this.findNodes('true', 'g', 'state.expanded');this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setExpandedState(node, false, options);}, this));this.render();};Tree.prototype.collapseNode = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setExpandedState(node, false, options);}, this));this.render();};Tree.prototype.expandAll = function (options) {options = $.extend({}, _default.options, options);if (options && options.levels) {this.expandLevels(this.tree, options.levels, options);}
else {var identifiers = this.findNodes('false', 'g', 'state.expanded');this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setExpandedState(node, true, options);}, this));}
this.render();};Tree.prototype.expandNode = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setExpandedState(node, true, options);if (node.nodes && (options && options.levels)) {this.expandLevels(node.nodes, options.levels-1, options);}}, this));this.render();};Tree.prototype.expandLevels = function (nodes, level, options) {options = $.extend({}, _default.options, options);$.each(nodes, $.proxy(function (index, node) {this.setExpandedState(node, (level > 0) ? true : false, options);if (node.nodes) {this.expandLevels(node.nodes, level-1, options);}}, this));};Tree.prototype.revealNode = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {var parentNode = this.getParent(node);while (parentNode) {this.setExpandedState(parentNode, true, options);parentNode = this.getParent(parentNode);};}, this));this.render();};Tree.prototype.toggleNodeExpanded = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.toggleExpandedState(node, options);}, this));this.render();};Tree.prototype.checkAll = function (options) {var identifiers = this.findNodes('false', 'g', 'state.checked');this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setCheckedState(node, true, options);}, this));this.render();};Tree.prototype.checkNode = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setCheckedState(node, true, options);}, this));this.render();};Tree.prototype.uncheckAll = function (options) {var identifiers = this.findNodes('true', 'g', 'state.checked');this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setCheckedState(node, false, options);}, this));this.render();};Tree.prototype.uncheckNode = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setCheckedState(node, false, options);}, this));this.render();};Tree.prototype.toggleNodeChecked = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.toggleCheckedState(node, options);}, this));this.render();};Tree.prototype.disableAll = function (options) {var identifiers = this.findNodes('false', 'g', 'state.disabled');this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setDisabledState(node, true, options);}, this));this.render();};Tree.prototype.disableNode = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setDisabledState(node, true, options);}, this));this.render();};Tree.prototype.enableAll = function (options) {var identifiers = this.findNodes('true', 'g', 'state.disabled');this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setDisabledState(node, false, options);}, this));this.render();};Tree.prototype.enableNode = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setDisabledState(node, false, options);}, this));this.render();};Tree.prototype.toggleNodeDisabled = function (identifiers, options) {this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {this.setDisabledState(node, !node.state.disabled, options);}, this));this.render();};Tree.prototype.forEachIdentifier = function (identifiers, options, callback) {options = $.extend({}, _default.options, options);if (!(identifiers instanceof Array)) {identifiers = [identifiers];}
$.each(identifiers, $.proxy(function (index, identifier) {callback(this.identifyNode(identifier), options);}, this));};Tree.prototype.identifyNode = function (identifier) {return ((typeof identifier) === 'number') ?this.nodes[identifier] :identifier;};Tree.prototype.search = function (pattern, options) {options = $.extend({}, _default.searchOptions, options);this.clearSearch({ render: false });var results = [];if (pattern && pattern.length > 0) {if (options.exactMatch) {pattern = '^' + pattern + '$';}
var modifier = 'g';if (options.ignoreCase) {modifier += 'i';}
results = this.findNodes(pattern, modifier);$.each(results, function (index, node) {node.searchResult = true;})}
if (options.revealResults) {this.revealNode(results);}
else {this.render();}
this.$element.trigger('searchComplete', $.extend(true, {}, results));return results;};Tree.prototype.clearSearch = function (options) {options = $.extend({}, { render: true }, options);var results = $.each(this.findNodes('true', 'g', 'searchResult'), function (index, node) {node.searchResult = false;});if (options.render) {this.render();}
this.$element.trigger('searchCleared', $.extend(true, {}, results));};Tree.prototype.findNodes = function (pattern, modifier, attribute) {modifier = modifier || 'g';attribute = attribute || 'text';var _this = this;return $.grep(this.nodes, function (node) {var val = _this.getNodeValue(node, attribute);if (typeof val === 'string') {return val.match(new RegExp(pattern, modifier));}});};Tree.prototype.getNodeValue = function (obj, attr) {var index = attr.indexOf('.');if (index > 0) {var _obj = obj[attr.substring(0, index)];var _attr = attr.substring(index + 1, attr.length);return this.getNodeValue(_obj, _attr);}
else {if (obj.hasOwnProperty(attr)) {return obj[attr].toString();}
else {return undefined;}}};var logError = function (message) {if (window.console) {window.console.error(message);}};$.fn[pluginName] = function (options, args) {var result;this.each(function () {var _this = $.data(this, pluginName);if (typeof options === 'string') {if (!_this) {logError('Not initialized, can not call method : ' + options);}
else if (!$.isFunction(_this[options]) || options.charAt(0) === '_') {logError('No such method : ' + options);}
else {if (!(args instanceof Array)) {args = [ args ];}
result = _this[options].apply(_this, args);}}
else if (typeof options === 'boolean') {result = _this;}
else {$.data(this, pluginName, new Tree(this, $.extend(true, {}, options)));}});return result || this;};})(jQuery, window, document);
var eCommerceFilterTool = new function() {var filter = this;this.init = function ( settings ) {if ( !settings ) return;$('.e-commerce-filter-container').empty();filter.productsContainerSelector = '.products-container';filter.container = $('.e-commerce-filter-container');filter.$scrollTo = $('.breadcrumb-wrap');filter.isActive = settings.isActive;filter.products = settings.products;filter.currency = settings.currency;filter.filteredProducts = false;filter.translations = settings.translations;filter.deviceType = ['xs','sm'].includes(findBootstrapEnvironment()) ? 'mobile' : 'pc';filter.w = settings.w;filter.websiteID = settings.websiteID;filter.type = settings.type;filter.uniquePageID = settings.uniquePageID;filter.filterCombinations = {};filter.eCommerceSearch = settings.eCommerceSearch;filter.style = $('.s123-module-eCommerce .side-menu').data('menu-style');if ( !filter.isActive || !filter.container ) return;filter.brands = settings.brands;filter.price = settings.price;filter.collections = settings.collections;filter.pOptions = settings.pOptions;filter.pAttributes = settings.pAttributes;filter.ribbons = settings.ribbons;filter.addFilterTool();if ( filter.deviceType == 'pc' ) {filter.container.css({'display': 'flex', 'flex-direction': 'column'});var $allFilterBoxes = filter.container.find('.filter-options');$.each($allFilterBoxes, function( index, box ) {var $box = $(box);if ( $box.data('def-state') === 'opened') {$box.find('filter-option-content').addClass('expanded');filter.closeOpenBox($box.find('.expand-filter'),0);}});}
filter.addShowFilterMobileBtn();filter.mobileFilterBtnResponsiveHandler();filter.initialized = true;};this.mobileFilterBtnResponsiveHandler = function() {$(window).one('resize.eCommerceFilterToolMobileFilter', function( event ) {filter.adaptToScreenSize();setTimeout( function() {filter.mobileFilterBtnResponsiveHandler();},500);});}
this.adaptToScreenSize = function() {var widthIncludingScrollbar = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;if ( widthIncludingScrollbar > 991 ) {filter.container.css({display: 'flex',flexDirection: 'column'});if ( filter.containerParent ) filter.containerParent.append(filter.container);$('#ecommerceFilterMenuPopup').remove();filter.container.closest('.e-commerce-filter-parent').attr('data-style',filter.style);} else {if ( filter.containerParent ) return;filter.container.css({display: 'none',flexDirection: ''});filter.container.closest('.e-commerce-filter-parent').attr('data-style','');}};this.getBoxStateFromCookie = function( id ) {var eCommerceFilterBoxState = tryParseJSON($.cookie(filter.websiteID+'_eCommerceFilterBoxState'));if ( !eCommerceFilterBoxState ) return false;if ( !eCommerceFilterBoxState[id] ) return false;return eCommerceFilterBoxState[id].state;};this.saveBoxesStateToCookie = function() {var eCommerceFilterBoxState = {};var $allFilterBoxes = filter.container.find('.filter-options');$.each($allFilterBoxes, function( index, box ) {var $box = $(box);eCommerceFilterBoxState[$box.data('id')] = {state: $box.find('.filter-option-content.expanded').length ? 'opened' : 'closed'}});$.cookie(filter.websiteID+'_eCommerceFilterBoxState',JSON.stringify(eCommerceFilterBoxState),{ expires: 1, path: '/' });};this.addShowFilterMobileBtn = function() {var $mobileBtnContainer = $('<div class="m-f-b-container"><button class="mobile-filter-btn btn btn-primary">' + filter.translations.filterBy + '</button></div>');$mobileBtnContainer.insertBefore(filter.container);filter.$mobileBtn = $mobileBtnContainer.find('.mobile-filter-btn');filter.$mobileBtn.on('click', function() {var $customCover = $('<div class="custom-cover"></div>');var $ecommerceFilterMenuPopup = $('#ecommerceFilterMenuPopup');if ( $ecommerceFilterMenuPopup.length == 0 ) {filter.containerParent = filter.container.parent();buildPopup('ecommerceFilterMenuPopup','','','',true,true,true,'');$ecommerceFilterMenuPopup = $('#ecommerceFilterMenuPopup');$ecommerceFilterMenuPopup.attr('data-style',filter.style);$ecommerceFilterMenuPopup.find('.page').append(filter.container);$ecommerceFilterMenuPopup.append($customCover);filter.container.css({'display': 'flex', 'flex-direction': 'column'});$ecommerceFilterMenuPopup.find('.popupCloseButton').off('click').on('click', function() {$ecommerceFilterMenuPopup.removeClass('open');});$customCover.on('click', function() {$ecommerceFilterMenuPopup.removeClass('open');popupWinScrollAction(0);});$ecommerceFilterMenuPopup.find('.cover').off('click').on('click', function() {$ecommerceFilterMenuPopup.removeClass('open');popupWinScrollAction(0);});} else {$ecommerceFilterMenuPopup.addClass('open');}});};this.addFilterTool = function() {filter.addTagsContainer();filter.addCollectionsFilter();filter.addPriceFilter();filter.addBrandsFilter();filter.addProductOptionsFilter();filter.addProductAttributesFilter();filter.addRibbonsFilter();filter.resetProductsCounter();filter.addExpandBoxEvent();};this.addTagsContainer = function() {var html = '';html  = '<div class="filter-tags-container">';html += '<div>';html += '<span class="filter-by-title">';html += '<svg class="svg-icon" style="width: 1em; height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M640 288a64 64 0 1 1 0.032-128.032A64 64 0 0 1 640 288z m123.456-96c-14.304-55.04-64-96-123.456-96s-109.152 40.96-123.456 96H128v64h388.544c14.304 55.04 64 96 123.456 96s109.152-40.96 123.456-96H896V192h-132.544zM640 864a64 64 0 1 1 0.032-128.032A64 64 0 0 1 640 864m0-192c-59.456 0-109.152 40.96-123.456 96H128v64h388.544c14.304 55.04 64 96 123.456 96s109.152-40.96 123.456-96H896v-64h-132.544c-14.304-55.04-64-96-123.456-96M384 576a64 64 0 1 1 0.032-128.032A64 64 0 0 1 384 576m0-192c-59.456 0-109.152 40.96-123.456 96H128v64h132.544c14.304 55.04 64 96 123.456 96s109.152-40.96 123.456-96H896v-64H507.456c-14.304-55.04-64-96-123.456-96"/></svg>';
html += '<span class="filter-by-title-value">';html += filter.translations.filterBy;html += '</span>';html += '</span>';html += '<div class="tags"></div>';html += '</div>';html += '</div>';filter.container.append(html);filter.$tags = filter.container.find('.filter-tags-container .tags');};this.floorCeilPrice = function( number ) {var ceil = (Math.ceil(number / 10) * 10);var complete = ceil - number;if ( complete > 5 ) {number = Math.floor(number / 10) * 10;} else if ( complete < 5 ) {number = Math.ceil(number / 10) * 10;} else {number = number;}
return number;};this.addPriceFilter = function() {if ( !filter.price.active ) return;var rangeIncrease = filter.price.rangeIncrease;var range = filter.floorCeilPrice((parseFloat(filter.price.min) + rangeIncrease));var template = filter.getFilterBoxTemplate();var defState = filter.getBoxStateFromCookie('price');var html = '';filter.price.max = (Math.ceil(filter.price.max / 10) * 10);if ( rangeIncrease > 0 ) {template = template.replace('{{place}}',filter.price.place);template = template.replace('{{title}}',filter.translations.priceTitle);template = template.replace('{{class}}','filter-type-price');template = template.replace('{{type}}','price');template = template.replace('{{id}}','price');template = template.replace('{{defState}}',(defState ? defState : filter.price.filterBoxState));html += '<div class="filter-option-container">';html += '<a href="javascript:void(0);" class="range-filter" data-type="price" data-min="0" data-max="' + range + '">';html += filter.translations.priceUnder + ' ' + showPrice(filter.currency,range);html += '<span data-products-in-filter="0" class="products-in-filter"> (0)</span>';html += '</a>';html += '</div>';for ( var i = 1; i <= (filter.price.ranges-2); i++, range += rangeIncrease ) {range = filter.floorCeilPrice(range);html += '<div class="filter-option-container">';html += '<a href="javascript:void(0);" class="range-filter" data-type="price" data-min="' + (range + 1) + '" data-max="' + (range + rangeIncrease) + '">';html += showPrice(filter.currency,(range + 1)) + ' - ' + showPrice(filter.currency,(range + rangeIncrease)) + ' ';html += '<span data-products-in-filter="0" class="products-in-filter"> (0)</span>';html += '</a>';html += '</div>';}
range = filter.floorCeilPrice(range);html += '<div class="filter-option-container">';html += '<a href="javascript:void(0);" class="range-filter" data-type="price" data-min="' + (range + 1) + '" data-max="' + filter.price.max + '" data-custom-tag-text="' + range + ' ' + filter.translations.priceAbove + '">';html +=  showPrice(filter.currency,(range + 1)) + ' ' + filter.translations.priceAbove;html += '<span data-products-in-filter="0" class="products-in-filter"> (0)</span>';html += '</a>';html += '</div>';html += '<div class="form-group ' + ( filter.price.hideCustomFilter ? 'hidden' : '' ) + '">';html += '<div class="input-group">';html += '<input type="text" class="form-control minPrice" value="0">';html += '<input type="text" class="form-control maxPrice" value="' + filter.price.max + '">';html += '<button class="btn filter-by-price-btn">Filter</button>';html += '</div>';html += '</div>';template = template.replace('{{content}}',html);filter.container.append(template);filter.addPriceEvent();}};this.addCollectionsFilter = function() {if ( !filter.collections.active ) return;let $collectionsBox = $('#collectionsBox');if ( $collectionsBox.length == 0 ) return;$collectionsBox.attr('data-def-state',filter.collections.filterBoxState);$collectionsBox.attr('data-id',filter.collections.id);$collectionsBox.addClass('filter-options');$collectionsBox.find('#collectionsBoxBody').addClass('filter-option-content');$collectionsBox.find('.filter-type-title').replaceWith(`<span class="filter-type-title">${$collectionsBox.find('.filter-type-title').text()}</span>`);$collectionsBox.find('.filter-type-title').append(S123.s123IconToSvg.getHtml('plus','expand-filter plus-icon',''));$collectionsBox.find('.filter-type-title').append(S123.s123IconToSvg.getHtml('minus','expand-filter minus-icon',''));var defState = filter.getBoxStateFromCookie('collections-system-id');if ( defState ) {$collectionsBox.attr('data-def-state',defState);}
$collectionsBox.css({order: filter.collections.place,});filter.container.append($collectionsBox);$collectionsBox.show();};this.addBrandsFilter = function() {if ( !filter.brands.active ) return;var template = filter.getFilterBoxTemplate();var defState = filter.getBoxStateFromCookie('brands-system-id');var html = '';template = template.replace('{{place}}',(parseInt(filter.brands.place)));template = template.replace('{{title}}',filter.translations.brandsTitle);template = template.replace('{{class}}','filter-type-brands');template = template.replace('{{type}}','brand');template = template.replace('{{id}}','brands-system-id');template = template.replace('{{defState}}',(defState ? defState : filter.brands.filterBoxState));$.each(filter.brands.values, function( index, brand ) {brand.allSettings = JSON.parse(brand.allSettings);var obj = {title : brand.allSettings.title,value : index,dataAttr: 'data-type="brand" data-unique-id="' + escapeHtml(index) + '" data-parent-unique-id="brands-system-id"'}
html += filter.generateCheckBox(obj);html = html.replace('{{placeStyle}}','style="order:' + escapeHtml(brand.place) + '";');});template = template.replace('{{content}}',html);filter.container.append(template);filter.addCheckBoxEvent();};this.addProductOptionsFilter = function() {if ( !filter.pOptions.active ) return;$.each(filter.pOptions.options, function( index, po ) {var template = filter.getFilterBoxTemplate();var defState = filter.getBoxStateFromCookie(po.id);var html = '';template = template.replace('{{place}}',(parseInt(po.place)));template = template.replace('{{title}}',po.title);template = template.replace('{{class}}','filter-type-options');template = template.replace('{{type}}',po.type);template = template.replace('{{id}}',escapeHtml(po.id));template = template.replace('{{defState}}',(defState ? defState : po.filterBoxState));$.each(po.items, function( index, item ) {if ( po.type == 'color' ) {var obj = {title : item.title,value : item.color,dataAttr: 'data-type="' + escapeHtml(po.type) + '" data-unique-id="' + escapeHtml(item.color) + '" data-parent-unique-id="' + escapeHtml(po.id) + '" data-poi-id="' + escapeHtml(item.id) + '"'}
html += filter.generateColor(obj);} else  {var obj = {title : item.title,value : item.id,dataAttr: 'data-type="' + escapeHtml(po.type) + '" data-unique-id="' + escapeHtml(item.id) + '" data-parent-unique-id="' + escapeHtml(po.id) + '" data-poi-id="' + escapeHtml(item.id) + '"'}
html += filter.generateCheckBox(obj);html = html.replace('{{placeStyle}}','');}});template = template.replace('{{content}}',html);filter.container.append(template);});filter.container.find('.color').tooltip({container: '.e-commerce-filter-container',placement: 'top'});filter.addCheckBoxEvent();filter.addColorBoxEvent();};this.addProductAttributesFilter = function() {if ( !filter.pAttributes.active ) return;$.each(filter.pAttributes.attributes, function( index, attr ) {var template = filter.getFilterBoxTemplate();var defState = filter.getBoxStateFromCookie(attr.id);var html = '';template = template.replace('{{place}}',(parseInt(attr.place)));template = template.replace('{{title}}',attr.title);template = template.replace('{{class}}','filter-type-attributes');template = template.replace('{{type}}','attribute');template = template.replace('{{id}}',escapeHtml(attr.id));template = template.replace('{{defState}}',(defState ? defState : attr.filterBoxState));$.each(attr.values, function( index, value ) {var obj = {title : value.title,value : value.id,dataAttr: 'data-type="' + escapeHtml(attr.type) + '" data-unique-id="' + escapeHtml(value.id) + '" data-parent-unique-id="' + escapeHtml(attr.id) + '"'}
html += filter.generateCheckBox(obj);html = html.replace('{{placeStyle}}','');});template = template.replace('{{content}}',html);filter.container.append(template);});filter.addCheckBoxEvent();};this.addRibbonsFilter = function() {if ( !filter.ribbons.active ) return;var template = filter.getFilterBoxTemplate();var defState = filter.getBoxStateFromCookie('ribbonsObj-system-id');var html = '';template = template.replace('{{place}}',filter.ribbons.place);template = template.replace('{{title}}',filter.translations.ribbonsTitle);template = template.replace('{{class}}','filter-type-ribbons');template = template.replace('{{type}}','ribbon');template = template.replace('{{id}}','ribbonsObj-system-id');template = template.replace('{{defState}}',(defState ? defState : filter.ribbons.filterBoxState));$.each(filter.ribbons.values, function( index, ribbon ) {var obj = {title : ribbon.title,value : ribbon.id,dataAttr: 'data-type="ribbon" data-unique-id="' + escapeHtml(ribbon.id) + '" data-parent-unique-id="ribbonsObj-system-id"'}
html += filter.generateCheckBox(obj);html = html.replace('{{placeStyle}}','');});template = template.replace('{{content}}',html);filter.container.append(template);filter.addCheckBoxEvent();};this.resetProductsCounter = function() {var $counters = filter.container.find('.products-in-filter');var $filterOptions = filter.container.find('.filter-options');var products = filter.filteredProducts ? filter.filteredProducts : filter.products;$.each($counters, function( index, counter ) {var $this = $(this);$this.empty();var $parent = $(this).parent();switch( $parent.data('type') ) {case 'brand':var obj = {};obj.val = $parent.data('unique-id');break;case 'ribbon':var obj = {};obj.val = $parent.data('unique-id');break;case 'price':var obj = {};obj.min = $parent.data('min');obj.max = $parent.data('max');break;case 'color':var obj = {};obj.parentUniqueID = $this.data('parent-unique-id');obj.val = $this.data('unique-id');break;default :var obj = {};obj.parentUniqueID = $this.data('parent-unique-id');obj.val = $parent.data('unique-id');break;}
var result = filter.getProductByFilterType($parent.data('type'),obj,Array(),products);if ( $parent.data('type') === 'color' ) {var $color = $parent.find('.color');$color.attr('data-original-title', $color.data('title') + ' ('+result.length+')');filter.hideShowFilterOption($parent,$this,result.length);} else {filter.hideShowFilterOption($parent.parent(),$this,result.length);}});$.each($filterOptions, function( index, option ) {var $this = $(this);var $counters = $this.find('.products-in-filter');var $hiddenCounters  = $counters.filter('[data-products-in-filter="0"]');if ( $this.get(0).id == 'collectionsBox' ) return;if ( $counters.length === $hiddenCounters.length ) {$this.hide();} else {$this.show();}});filter.hideShowFilterSiblings();};this.hideShowFilterSiblings = function() {if ( filter.$tags.children('.tag').length === 0 ) {filter.container.siblings(':not(.m-f-b-container,#collectionsBox)').fadeIn(200);filter.$tags.addClass('no-tags');} else {filter.container.siblings(':not(.m-f-b-container,#collectionsBox)').fadeOut(200);filter.$tags.removeClass('no-tags');}};this.hideShowFilterOption = function( $option, $counter, productsCounter ) {if ( productsCounter == 0 ) {$option.hide();$counter.append('&nbsp;(' + productsCounter + ')');$counter.attr('data-products-in-filter',productsCounter);} else {$option.show();$counter.append('&nbsp;(' + productsCounter + ')');$counter.attr('data-products-in-filter',productsCounter);}};this.generateColor = function( obj ) {var html = '';html += '<label data-type="color">';html += '<div class="color" data-rel="tooltip" data-original-title="' + escapeHtml(obj.title) + '" title="' + escapeHtml(obj.title) + ' (0)" data-title="' + escapeHtml(obj.title) + '" ' + obj.dataAttr + ' style="background-color:' + escapeHtml(obj.value) + '; width:10px;height:10px;display:inline-block;border:solid 1px;">';html += S123.s123IconToSvg.getHtml('check','check-icon','');html += '</div>';html += '<span data-products-in-filter="0" '+ obj.dataAttr + ' class="products-in-filter hidden"> (0)</span>';html += '</label>';return html;};this.addPriceEvent = function() {var $rangeOptions = filter.container.find('.range-filter');var $filterByPriceBtn = filter.container.find('.filter-by-price-btn');var $minPrice = filter.container.find('.minPrice');var $maxPrice = filter.container.find('.maxPrice');$rangeOptions.on('click', function() {var $this = $(this);$minPrice.val($this.data('min'));$maxPrice.val($this.data('max'));$rangeOptions.removeClass('selected-filter');$this.addClass('selected-filter');$filterByPriceBtn.trigger('click');});$filterByPriceBtn.on('click', function() {filter.container.find('.filter-tags-container .tags .tag[data-type="price"]').remove();var dataAttr = 'data-type="price" data-min="' + $minPrice.val() + '" data-max="' + $maxPrice.val() + '"';var customTagText = $rangeOptions.filter('.selected-filter').data('custom-tag-text');if ( customTagText ) {filter.addFilterTag(customTagText,dataAttr);} else {filter.addFilterTag($minPrice.val()+'-'+$maxPrice.val(),dataAttr);}});};this.generateCheckBox = function( obj ) {var html = '';html += '<div class="filter-option-container" {{placeStyle}}>';html += '<label class="checkbox-label" ' + obj.dataAttr + '>';html += '<input class="checkboxInput" data-title="' + escapeHtml(obj.title) + '" ' + obj.dataAttr + ' type="checkbox" value="' + escapeHtml(obj.value) + '">';html += '<span class="checkbox-custom"></span>';html += '<span class="lbl input-title">&nbsp;' + obj.title + '</span>';html += '<span data-products-in-filter="0" '+ obj.dataAttr + ' class="products-in-filter"> (0)</span>';html += '</label>';html += '</div>';return html;};this.addFilterTag = function( title, dataAttr ) {var html = '';html += '<span class="tag" ' + dataAttr + ' style="display: inline-block;">';html += '<span class="filter-tag-title">' + title + '</span>&nbsp;|';html += '<button type="button" class="close">';html += S123.s123IconToSvg.getHtml('times','','');html += '</button>';html += '</span>';var $html = $(html);if ( $html.data('type') === 'price' ) {filter.multiCurrencyConvertion($html);$(document).off('multi_currency_update.eCommerce_filter').on('multi_currency_update.eCommerce_filter', function() {filter.multiCurrencyConvertion($html);});}
filter.container.find('.filter-tags-container .tags').append($html);filter.refreshTagsEvent();filter.filterProducts();};this.multiCurrencyConvertion = function( $html ) {var text = $html.find('.filter-tag-title').html();var min = MultiCurrencies.geConvertedPrice($html.data('min'));var max = MultiCurrencies.geConvertedPrice($html.data('max'));if ( text.indexOf('Above') != -1 ) {$html.find('.filter-tag-title').html(min + ' ' + filter.translations.priceAbove);} else {$html.find('.filter-tag-title').html(min + '-' + max);}};this.addCheckBoxEvent = function() {var $checkBoxes = filter.container.find('.checkboxInput');$checkBoxes.off('change').on('change', function() {var $this = $(this);if ( $this.is(':checked') ) {filter.checkBoxCheckedEvent($this);} else {filter.checkBoxUnCheckedEvent($this);}});}
this.addColorBoxEvent = function() {var $colors = filter.container.find('.color');$colors.off('click').on('click', function( event ) {var $this = $(this);if ( $this.hasClass('checked') ) {$this.removeClass('checked');var dataAttr = '.tag[data-unique-id="' + escapeHtml($this.data('unique-id')) + '"][data-type="color"][data-parent-unique-id="' + escapeHtml($this.data('parent-unique-id')) + '"]';filter.container.find(dataAttr).remove();filter.filterProducts();} else {$this.addClass('checked');if ( filter.container.find('.filter-tags-container .tags .tag[data-unique-id="' + escapeHtml($this.data('unique-id')) + '"] ').length > 0 ) return;var dataAttr = 'data-unique-id="' + $this.data('unique-id') + '" data-type="color" data-parent-unique-id="' + escapeHtml($this.data('parent-unique-id')) + '" data-poi-id="' + $this.data('poi-id') + '"';filter.addFilterTag($this.data('title'),dataAttr);}});}
this.refreshTagsEvent = function() {filter.container.find('.filter-tags-container .tags .close').off('click').on('click' ,function() {var $tag = $(this).parent();if ($tag.data('type') == 'color' ) {filter.container.find('.color[data-unique-id="' + escapeHtml($tag.data('unique-id')) + '"]').removeClass('checked');} else {filter.container.find('.checkboxInput[value="' + escapeHtml($tag.data('unique-id')) + '"]').prop('checked',false);}
$tag.remove();filter.filterProducts();});};this.checkBoxCheckedEvent = function( $checkbox ) {if ( filter.container.find('.filter-tags-container .tags .tag[data-unique-id="' + escapeHtml($checkbox.val()) + '"] ').length > 0 ) return;var dataAttr = '';dataAttr += 'data-unique-id="' + escapeHtml($checkbox.val()) + '" data-type="' + escapeHtml($checkbox.data('type')) + '" data-parent-unique-id="' + escapeHtml($checkbox.data('parent-unique-id')) + '"';if ( $checkbox.data('poi-id') ) {dataAttr += '" data-poi-id="' + $checkbox.data('poi-id') + '"';}
filter.addFilterTag($checkbox.data('title'),dataAttr);};this.checkBoxUnCheckedEvent = function( $this ) {var dataAttr = '';dataAttr += '.tag[data-unique-id="' + escapeHtml($this.val()) + '"][data-type="' + escapeHtml($this.data('type')) + '"]';filter.container.find(dataAttr).remove();filter.refreshTagsEvent();filter.filterProducts();};this.filterProducts = function() {var $tags = filter.container.find('.filter-tags-container .tag');if ( $tags.length == 0 ) filter.filteredProducts = false;var dataAttr = '';var products = Array();filter.filterCombinations = {};products = filter.filteredProducts;if ( $tags.length > 0 ) {$.each($tags, function( index, tag ) {var $this = $(this);switch ( $this.data('type') ) {case 'price':var obj = {};obj.min = $this.data('min');obj.max = $this.data('max');filter.filterCombinations.price = {min: obj.min,max: obj.max};break;default:var obj = {};obj.parentUniqueID = $this.data('parent-unique-id');obj.val = $this.data('unique-id');if ( filter.filterCombinations[$this.data('type')] && filter.filterCombinations[$this.data('type')].boxes ) {if ( filter.filterCombinations[$this.data('type')].boxes[obj.parentUniqueID] && filter.filterCombinations[$this.data('type')].boxes[obj.parentUniqueID].values ) {filter.filterCombinations[$this.data('type')].boxes[obj.parentUniqueID].values.push(obj.val);} else {filter.filterCombinations[$this.data('type')].boxes[obj.parentUniqueID] = {values: [obj.val]};}} else {var boxes = {};boxes[obj.parentUniqueID] = {values: [obj.val]}
filter.filterCombinations[$this.data('type')] = {boxes: boxes};}
break;}
var searchIn = Array();if ( $this.is(':first-child') ) {searchIn = filter.products;} else {searchIn = products;products = false;}
var tmp = filter.getProductByFilterType($this.data('type'),obj,Array(),searchIn);if ( products ) {Array.prototype.push.apply(products,tmp);} else {products = tmp;}});filter.filteredProducts = products;}
filter.resetProductsCounter();filter.getProductsByAjax();};this.getProductsByAjax = function() {var $productsContainer = $(filter.productsContainerSelector);var $loader = $productsContainer.parent().find('.s123-loader-ellips');$loader.parent().show();$loader.show();$productsContainer.fadeOut(200);scrollToProducts(false);if ( $productsContainer.data('infiniteScroll') ) $productsContainer.infiniteScroll('destroy');let ajaxData = {w: filter.w,websiteID: filter.websiteID,filterCombinations: JSON.stringify(filter.filterCombinations),filterOptionsIDS: encodeURIComponent(filter.getFilterOptionsIDS()),pageNumber: 1,type: filter.type,uniquePageID: filter.uniquePageID,eCommerceSearch: filter.eCommerceSearch,pageHasSideMenu: true,tranW: websiteLanguageCountryFullCode};if ( $('#productsSorting').length > 0 ) {ajaxData.sortBy = $('#productsSorting').val();}
$.ajax({type: "GET",url: '/versions/2/wizard/modules/eCommerceCollections/front/eCommerceFilterProducts.php',data: ajaxData,success: function( data ) {data = tryParseJSON(data);if ( !data ) return;$productsContainer.empty();$productsContainer.append(data.productsHtml);eCommerceProductrBoxesEvents();$loader.parent().hide();$loader.hide();$productsContainer.fadeIn(200, function() {window.myLazyLoad.update();scrollToProducts(function() {if ( data.productsLeft > 0 ) {InfiniteScroll_init(filter.type,filter.uniquePageID,JSON.stringify(filter.filterCombinations),encodeURIComponent(filter.getFilterOptionsIDS()),true);}});});}});};this.getProductByFilterType = function( type, obj, products, searchIn ) {$.each(searchIn, function( key, product ) {var as = product.as;var productOptions = tryParseJSON(as.pop);var productAttributes = tryParseJSON(as.pa);if ( productOptions.active && ['color','list','checkbox','radio','size'].indexOf(type) != -1 ) {$.each(productOptions.options, function( key, po ) {if ( po.ty == type && type == 'color' ) {$.each(po.items, function( key, item ) {if ( obj.val == item.c && obj.parentUniqueID === po.id ) {if ( !containsObject(product,products) ) {products.push(product);}}});} else if ( po.ty == type ) {$.each(po.items, function( key, item ) {if ( obj.val == item.id && obj.parentUniqueID === po.id ) {if ( !containsObject(product,products) ) {products.push(product);}}});}});}
if ( productAttributes.active && type == 'attribute' ) {$.each(productAttributes.attributes, function( key, attr ) {$.each(attr.values, function( key, value ) {if ( obj.val == value.id && obj.parentUniqueID === attr.id ) {if ( !containsObject(product,products) ) {products.push(product);}}});});}
if ( type == 'brand' ) {var brand = as[type];if ( obj.val == brand ) {if ( !containsObject(product,products) ) {products.push(product);}}}
if ( type == 'ribbon' ) {var ribbon = as[type];if ( obj.val == ribbon ) {if ( !containsObject(product,products) ) {products.push(product);}}}
if ( type == 'price' ) {var price = parseFloat(as.price);if ( as.onSale === 'on' && $.isNumeric(as.salePrice) ) {price = parseFloat(as.salePrice);}
if ( price >= obj.min && price <= obj.max ) {if ( !containsObject(product,products) ) {products.push(product);}}}});return products;};this.getFilterBoxTemplate = function() {var html = '';html = '<div class="filter-options {{class}}" data-def-state="{{defState}}" style="order:{{place}};" data-type="{{type}}" data-id="{{id}}">';html += '<span class="filter-type-title">';html += '{{title}}';html += S123.s123IconToSvg.getHtml('plus','expand-filter plus-icon','');html += S123.s123IconToSvg.getHtml('minus','expand-filter minus-icon','');html += '</span>';html += '<div class="filter-option-content">';html += '{{content}}';html += '</div>';html += '</div>';return html;};this.addExpandBoxEvent = function() {filter.container.find('.filter-type-title').on('click', function() {filter.closeOpenBox($(this).find('.expand-filter'),200);});};this.closeOpenBox = function( $expandIcon, animationTime ) {var $box = $expandIcon.closest('.filter-options');var $content = $box.find('.filter-option-content');if ( $content.hasClass('expanded') ) {$box.removeClass('is-open');$content.slideUp(animationTime,function() {$content.removeClass('expanded');filter.saveBoxesStateToCookie();});} else {$box.addClass('is-open');$content.slideDown(animationTime,function() {$content.addClass('expanded');filter.saveBoxesStateToCookie();});}};this.getFilterCombinations = function() {if ( !filter.initialized ) return {};return filter.filterCombinations;};this.getFilterOptionsIDS = function() {if ( !filter.isActive ) return [];let optionsOnlyOneTime = {};let optionsMoreThenOneTime = [];filter.container.find('.filter-tags-container .tag').each(function( index, tag ) {let $tag = $(tag);if ( !$tag.data('poi-id') ) return;if ( $tag.data('type') == 'checkbox' ) {optionsMoreThenOneTime.push($tag.data('poi-id'));} else {optionsOnlyOneTime[$tag.data('type')] = $tag.data('poi-id');}});return [...Object.values(optionsOnlyOneTime),...optionsMoreThenOneTime].join(',');};function containsObject( obj, list ) {var x;for (x in list) {if (list.hasOwnProperty(x) && list[x] === obj) {return true;}}
return false;}
function tryParseJSON( str ) {try {var Obj = JSON.parse(str);if ( Obj && typeof Obj === "object" ) {return Obj;}} catch (e) {}
return false;}
function escapeHtml(text) {if (!text) return text;var map = {'&': '&amp;','<': '&lt;','>': '&gt;','"': '&quot;',"'": '&#039;',};return text.toString().replace(/[&<>"']/g, function(m) {return map[m];});}
function scrollToProducts( callback ) {let scrollHeaderSize = 0;let scrollTop = 0;if ( $('nav#mainNav').length > 0 ) {scrollHeaderSize = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--scrollHeaderSize').trim()) - 1;}
if ( filter.$scrollTo.length > 0 ) {scrollTop = filter.$scrollTo.offset().top - parseInt(scrollHeaderSize)}
$('html').stop().animate({scrollTop: scrollTop},600,function() {if ( callback ) callback.call(this);});}};
$( document ).on( "s123.page.ready", function( event ) {var rtl = $('html[dir=rtl]').length === 1;eCommerceProductBoxCarousel_init();eCommerceFilterTool.init(tryParseJSON($('.filter-object-data').val()));if ( !['xs','sm'].includes(findBootstrapEnvironment()) ) {$('.e-commerce-filter-parent').attr('data-style',$('.s123-module-eCommerce .side-menu').data('menu-style'));}
productsSorting.init({w: $('#w').val(),isRtl: rtl,websiteID: $('#websiteID').val(),uniquePageID: $('.products-container').data('unique-page-id'),type: $('.products-container').data('type'),pageHasSideMenu: $('.products-container').data('has-side-menu'),productsContainerSelector: '.products-container',$container: $('.e-commerce-sort-container'),$mobileContainer: $('.e-commerce-filter-parent'),$scrollTo: $('.s123-module-eCommerce')});InfiniteScroll_init($('[data-s123-pagination="true"]').data('type'),$('[data-s123-pagination="true"]').data('unique-page-id'),'','',$('[data-s123-pagination="true"]').data('has-side-menu'));(function() {function getCategoriesTree( $collections, parentState ) {var obj = {parent: {state: parentState},nodes: []}
$.each($collections, function( index, collection ) {var $collection = $(collection);if ( $collection.data('active') == '1' ) {obj.parent.state.expanded = true;obj.parent.state.selected = false;}
var collectionObj = {text: $collection.data('title'),href: $collection.data('href'),state: {selected: $collection.data('active') == '1',expanded: $collection.data('active') == '1'},nodes: []}
var $children = $collection.children().filter('.sub-collections').find('ul').first().children();if ( $children.length > 0 ) {var tree = getCategoriesTree($children,collectionObj.state);collectionObj.nodes = tree.nodes;collectionObj.state = tree.parent.state;if ( tree.parent.state.expanded ) obj.parent.state.expanded = true;} else {delete collectionObj.nodes;}
obj.nodes.push(collectionObj);});return obj;}
var tree = [];var defState = {selected: false,expanded: false}
$('.collections-container.nav').hide();$('.collection-tree-view').remove();var $collectionTreeView = $('<div class="collection-tree-view"></div>');$collectionTreeView.insertAfter($('.collections-container.nav'));var categoriesNodes = getCategoriesTree($('.collections-container.nav .sub-collections ul').first().children(),defState).nodes;$.each(categoriesNodes, function( index, collection ) {tree.push(collection);});$collectionTreeView.on('mousedown', function() {setTimeout(function() {treeview_AddPajaxSupport();},200);});$collectionTreeView.treeview({data: tree,levels: 3,expandIcon: 'fa fa-plus',collapseIcon: 'fa fa-minus',showBorder: false,backColor: '#428bca00',color: '#428bca',selectedColor: '#428bca',selectedBackColor: '#428bca00',highlightSelected: true,enableLinks: true})
.show();treeview_AddPajaxSupport();function treeview_AddPajaxSupport() {$collectionTreeView.find('ul li a').addClass('s123-fast-page-load');S123.Pjax.refresh();}})();homepageSectionsCarouselInit(rtl);$(window).off('resize.homepageSectionsCarouselInit').on('resize.homepageSectionsCarouselInit', function( event ) {clearTimeout(window.homepageSectionsCarouselInit_delay);window.homepageSectionsCarouselInit_delay = setTimeout( function() {homepageSectionsCarouselInit(rtl);},50);});$('.search-result-page-e-commerce #eCommerceSearch').off('keydown').on('keydown', function( event ) {if ( event.which === 13 && $(this).val().length === 0 ) event.preventDefault();});loadCollectionsCounters();CollectionsTitleFixText();});function CollectionsTitleFixText() {let $collections_boxes = $('.s123-module-eCommerce .collection-container .c-box-layout-5');if ( $collections_boxes.length === 0 ) return;$.each($collections_boxes, function( index, collections_box ) {let $collections_box = $(collections_box);site123FixText.itemFixText($collections_box.find('.title'),$collections_box.find('.title-container'),3);});}
function eCommerceProductrBoxesEvents() {$(document).trigger('s123.page.ready.data-model');$(document).trigger('s123.page.ready.activeOrderPopup');$(document).trigger('s123.page.ready.wish_list');$(document).trigger('s123.page.ready.wizard_preview_manage_helpers');eCommerceProductBoxCarousel_init();$(document).trigger('pageLoaded');}
function InfiniteScroll_init( type, uniquePageID, filterCombinations, filterOptionsIDS, pageHasSideMenu ) {var $container = $('[data-s123-pagination="true"]');var $loadingIcon = $container.parent().children('.s123-page-load-status');var paginationProductsLeft = $container.data('pagination-products-left');if ( $container.length === 0 ) return;if ( $loadingIcon.length === 0 ) {$container.parent().append('<div class="s123-page-load-status"><div class="s123-loader-ellips infinite-scroll-request"><span class="s123-loader-ellips__dot"></span><span class="s123-loader-ellips__dot"></span><span class="s123-loader-ellips__dot"></span><span class="s123-loader-ellips__dot"></span></div></div>');}
if ( parseInt(paginationProductsLeft) === 0 ) return;$container.infiniteScroll({append: false,responseType: 'text',scrollThreshold: 400,loadOnScroll: true,history: false,status: '.s123-page-load-status',path: function() {if ( this.loadCount < 2 ) this.loadCount = 2;var path = '/versions/2/wizard/modules/eCommerceCollections/front/eCommerceFilterProducts.php?w='+encodeURIComponent(w.value)+'&websiteID='+encodeURIComponent(websiteID.value)+'&pageNumber='+encodeURIComponent(this.loadCount)+'&filterCombinations='+encodeURIComponent(filterCombinations)+'&type='+encodeURIComponent(type)+'&uniquePageID='+encodeURIComponent(uniquePageID)+'&pageHasSideMenu='+encodeURIComponent(pageHasSideMenu)+'&tranW='+websiteLanguageCountryFullCode
+'&filterOptionsIDS='+filterOptionsIDS;if ( $('#productsSorting').length > 0 ) path += '&sortBy='+encodeURIComponent($('#productsSorting').val());if ( $('#eCommerceSearch').length > 0 ) path += '&eCommerceSearch='+encodeURIComponent($('#eCommerceSearch').val());return path;}})
.off('load.infiniteScroll').on('load.infiniteScroll', function( event, response ) {response = tryParseJSON(response);$container.infiniteScroll('appendItems',$(response.productsHtml));eCommerceProductrBoxesEvents();window.myLazyLoad.update();if ( response.productsLeft == 0 ) $container.infiniteScroll('destroy');});}
function eCommerceProductBoxCarousel_init() {var rtl = $('html[dir=rtl]').length === 1;$('.s123-module-eCommerce').each(function() {$(this).find('.product-box-carousel').each(function() {var $product_box_carousel = $(this);$product_box_carousel.owlCarousel({items: 1,center: true,nav: true,slideTransition: 'ease',dots: false,navSpeed: 500,mouseDrag: false,loop: true,rtl :rtl,navText:  [S123.s123IconToSvg.getHtml('angle-'+(rtl ? 'right' : 'left'),'fa-2x',''),S123.s123IconToSvg.getHtml('angle-'+(rtl ? 'left' : 'right'),'fa-2x','')],});$product_box_carousel.find('.owl-nav')
.off('click.owl_nav')
.on('click.owl_nav', function( event ) {var $this = $(this);var $target = $(event.target);if ( $target.is($this) ) {$product_box_carousel.find('.owl-item.active .product-image').get(0).click();}})
.css({ cursor: 'pointer' });});});}
var productsSorting = function() {var that = {};that.init = function( settings ) {if ( !settings ) return;if ( settings.$container.length == 0 ) return;if ( that.initialized ) return;that.$container = settings.$container;that.$mobileContainer = settings.$mobileContainer;that.$scrollTo = settings.$scrollTo;that.w = settings.w;that.isRtl = settings.isRtl;that.websiteID = settings.websiteID;that.uniquePageID = settings.uniquePageID;that.type =  settings.type;that.pageHasSideMenu =  settings.pageHasSideMenu;that.productsContainerSelector = settings.productsContainerSelector;that.$el = $(generateHtml());that.$container.html(that.$el);that.$productsSorting = that.$el.find('#productsSorting');that.$mobileIcon = that.$el.find('.mobile-icon');that.$productsSorting.on('change.sort_products', function() {sortChange();});mobileResponsiveHandler();adaptToScreenSize();that.initialized = true;$(document).one('s123.pjax.send.productsSorting',function() {destroy();});};function destroy() {that.$productsSorting.off('change.sort_products');$(window).off('resize.eCommerceSortByMobileFilter');that.initialized = false;}
function sortChange() {var $productsContainer = $(that.productsContainerSelector);var $loader = $productsContainer.parent().find('.s123-loader-ellips');$loader.parent().show();$loader.show();$productsContainer.fadeOut(200);if ( $productsContainer.data('infiniteScroll') ) $productsContainer.infiniteScroll('destroy');$.ajax({type: "GET",url: '/versions/2/wizard/modules/eCommerceCollections/front/eCommerceFilterProducts.php',data: {w: that.w,websiteID: that.websiteID,filterCombinations: JSON.stringify(eCommerceFilterTool.getFilterCombinations()),filterOptionsIDS: encodeURIComponent(eCommerceFilterTool.getFilterOptionsIDS()),pageNumber: 1,type: that.type,uniquePageID: that.uniquePageID,eCommerceSearch: $('#eCommerceSearch').length > 0 ? $('#eCommerceSearch').val() : '',sortBy: that.$productsSorting.val(),pageHasSideMenu: that.pageHasSideMenu,tranW: websiteLanguageCountryFullCode},success: function( data ) {data = tryParseJSON(data);if ( !data ) return;$productsContainer.empty();$productsContainer.append(data.productsHtml);eCommerceProductrBoxesEvents();$loader.parent().hide();$loader.hide();$productsContainer.fadeIn(200, function() {window.myLazyLoad.update();$('html').stop().animate({scrollTop: that.$scrollTo.offset().top},600,function() {if ( data.productsLeft > 0 ) {InfiniteScroll_init(that.type,that.uniquePageID,JSON.stringify(eCommerceFilterTool.getFilterCombinations()),encodeURIComponent(eCommerceFilterTool.getFilterOptionsIDS()),that.pageHasSideMenu);}});});}});}
function generateHtml() {var html = '';html += '<div class="p-s-c" style="position: relative;">';html += '<span class="mobile-icon">';html += S123.s123IconToSvg.getHtml('sort-amount-asc','','');html += '</span>';html += '<select id="productsSorting" class="form-control">';html += '<option selected disabled hidden>' + translations.eCommerceSort.sortBy + '</option>';html += '<option value="recommended">' + translations.eCommerceSort.recommended + '</option>';html += '<option value="byHighPrice">' + translations.eCommerceSort.byHighPrice + '</option>';html += '<option value="byLowerPriceBy">' + translations.eCommerceSort.byLowerPriceBy + '</option>';html += '</select>';html += '</div>';return html;}
function mobileResponsiveHandler() {$(window).one('resize.eCommerceSortByMobileFilter', function( event ) {adaptToScreenSize();setTimeout( function() {mobileResponsiveHandler();},500);});}
function adaptToScreenSize() {var widthIncludingScrollbar = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;if ( widthIncludingScrollbar > 991 ) {that.$container.append(that.$el);that.$el.css({display: ''});that.$el.find('select').css({opacity: '',position: '',left: '',right: ''});that.$mobileIcon.hide();that.$container.show();} else {that.$mobileContainer.append(that.$el);that.$el.css({display: 'inline-flex'});that.$el.find('select').css({opacity: 0,position: 'absolute'});if ( that.isRtl ) {that.$el.find('select').css({right: 0});} else {that.$el.find('select').css({left: 0});}
that.$mobileIcon.show();that.$container.hide();}};return that;}();function loadCollectionsCounters() {var $counters = $('.collection-container.e-commerce-items .count');if ( $counters.hasClass('counters-loaded') ) return;if ( $counters.length > 0 ) {var colelctionBoxes = [];var uniqueIDS = [];var moduleTypeNUM = $('.s123-module-eCommerce').data('module-type-num');if ( moduleTypeNUM == 112 || IsEcommerceHighlight(moduleTypeNUM) ) moduleTypeNUM = 113;$counters.each(function(index, coutner) {var $coutner = $(coutner);var $colelctionBox = $coutner.closest('.e-c-box');var uniqueID = $colelctionBox.data('unique-id');if ( $.isNumeric(uniqueID) ) {uniqueID = uniqueID.toString();}
colelctionBoxes.push($colelctionBox);if ( uniqueIDS.indexOf(uniqueID) == -1 ) {uniqueIDS.push(uniqueID);}});$.ajax({type: "POST",url: '/versions/'+$(versionNUM).val()+'/wizard/modules/eCommerceCollections/front/getRelatedProductsAmount.php',data: {w: $('#w').val(),websiteID: $('#websiteID').val(),uniqueIDS: JSON.stringify(uniqueIDS),uniquePageID: $('#section-112 .collection-container').data('unique-page-id'),moduleTypeNUM: moduleTypeNUM},success: function( data ) {data = tryParseJSON(data);if ( !data ) return;if ( !data.success ) return;$.each(colelctionBoxes, function(index, $colelctionBox) {var uniqueID = $colelctionBox.data('unique-id');$colelctionBox.find('.count-amount').text(data.items[uniqueID]);$colelctionBox.addClass('show-counter');});$counters.addClass('counters-loaded');}});}}
function homepageSectionsCarouselInit( rtl ) {var $homepageSections = $('.s123-module-eCommerce .homepage-section');$.each($homepageSections, function( index, section ) {var $section = $(section);var $sectionItemsContainer = $section.find('.e-commerce-items');var sectionData = tryParseJSON($section.find('.section-data').val());var sectionID = sectionData.id;var sectionStyle = sectionData.style;if ( sectionStyle == 2 ) carousel_init();if ( $section.hasClass('highlight-carousel') ) {sectionID = $section.closest('.s123-module-eCommerce').get(0).id;carousel_init();}
function carousel_init() {if ( $sectionItemsContainer.hasClass('slick-initialized') ) {$sectionItemsContainer.css('visibility','none');$sectionItemsContainer.slick('unslick');$sectionItemsContainer.parent().find('.custom-arrow-container').remove();}
var $prevArrow = $('<div class="custom-arrow-container custom-slick-prev-container"><a href="javascript:void(0);" class="related-p-c-s-p slick-arrow" data-section-id="'+sectionID+'">'+S123.s123IconToSvg.getHtml('chevron-circle-up','','')+'</a></div>');var $nextArrow = $('<div class="custom-arrow-container custom-slick-next-container"><a href="javascript:void(0);" class="related-p-c-s-n slick-arrow"  data-section-id="'+sectionID+'">'+S123.s123IconToSvg.getHtml('chevron-circle-down','','')+'</a></div>');$sectionItemsContainer.css({ display: 'grid' });var slidesToShow = findBootstrapColPerRow($sectionItemsContainer);if ( slidesToShow == 0 ) slidesToShow = 1;if ( $sectionItemsContainer.children().length <= slidesToShow ) return;$sectionItemsContainer.children().each(function() {$(this).width($(this).width());});$sectionItemsContainer.css({ display: 'flex' });$sectionItemsContainer.parent().prepend($prevArrow);$sectionItemsContainer.parent().append($nextArrow);$sectionItemsContainer.parent().addClass('homepage-section-container');$sectionItemsContainer.slick({dots: false,infinite: true,vertical: false,verticalSwiping: false,slidesToShow: slidesToShow,slidesToScroll: 1,adaptiveHeight: true,swipeToSlide: true,rtl: rtl,prevArrow: '.related-p-c-s-p[data-section-id="'+sectionID+'"]',nextArrow: '.related-p-c-s-n[data-section-id="'+sectionID+'"]'});$sectionItemsContainer.on('init', function(event) {$sectionItemsContainer.css('visibility','');});}});}
jQuery(function($) {RichPageModuleInitialize();});function RichPageModuleInitialize() {$( document ).on( 's123.page.ready', function( event ) {if ( !IsWizard() ) {RichPagePromosHandler.init();}});var RichPagePromosHandler = function() {var _ = {fixColors: false};_.init = function() {_.$section = $('section.s123-module-rich-page');if ( _.$section.length === 0 ) return;_.$sections = _.$section.siblings();_.$sections.each(function( index, section ) {var $thisSection = $(this);if ( $thisSection.attr('class').indexOf('s123-promo-module') != -1 ) {$thisSection.remove();_.fixColors = true;} else if ( !(whatScreen.any() == 'mobile' && $thisSection.hasClass('h-s-f-hm') ) ) {return false;}});if ( _.fixColors ) {fixModuleColors();}};function fixModuleColors() {_.$sections.filter(':visible').each( function( index, module ) {var $module = $(this);if ( index % 2 == 0 ) {$module.addClass('bg-primary');} else {$module.removeClass('bg-primary');}});}
return _;}();}
(function(){var a="' of type ",l="SCRIPT",p="Uneven number of arguments",q="array",t="function",aa="google.charts.load",ba="hasOwnProperty",u="number",v="object",x="pre-45",ca="propertyIsEnumerable",y="string",da="text/javascript",ea="toLocaleString";function A(){return function(b){return b}}function B(){return function(){}}function D(b){return function(){return this[b]}}function E(b){return function(){return b}}var F,G=G||{};G.scope={};
G.Tk=function(b){var c=0;return function(){return c<b.length?{done:!1,value:b[c++]}:{done:!0}}};G.Sk=function(b){return{next:G.Tk(b)}};G.Dd=function(b){var c="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return c?c.call(b):G.Sk(b)};G.Rk=function(b){for(var c,d=[];!(c=b.next()).done;)d.push(c.value);return d};G.ve=function(b){return b instanceof Array?b:G.Rk(G.Dd(b))};
G.$t=function(b,c,d){b instanceof String&&(b=String(b));for(var e=b.length,f=0;f<e;f++){var g=b[f];if(c.call(d,g,f,b))return{Bm:f,Oo:g}}return{Bm:-1,Oo:void 0}};G.Aj=!1;G.hp=!1;G.ip=!1;G.Nr=!1;G.defineProperty=G.Aj||typeof Object.defineProperties==t?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)};G.fm=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global&&null!=global?global:b};G.global=G.fm(this);
G.Pc=function(b,c){if(c){var d=G.global;b=b.split(".");for(var e=0;e<b.length-1;e++){var f=b[e];f in d||(d[f]={});d=d[f]}b=b[b.length-1];e=d[b];c=c(e);c!=e&&null!=c&&G.defineProperty(d,b,{configurable:!0,writable:!0,value:c})}};G.Rg=function(b,c,d){if(null==b)throw new TypeError("The 'this' value for String.prototype."+d+" must not be null or undefined");if(c instanceof RegExp)throw new TypeError("First argument to String.prototype."+d+" must not be a regular expression");return b+""};
G.Pc("String.prototype.repeat",function(b){return b?b:function(c){var d=G.Rg(this,null,"repeat");if(0>c||1342177279<c)throw new RangeError("Invalid count value");c|=0;for(var e="";c;)if(c&1&&(e+=d),c>>>=1)d+=d;return e}});G.$j=!1;
G.Pc("Promise",function(b){function c(k){this.qa=g.$a;this.Ia=void 0;this.ic=[];var m=this.De();try{k(m.resolve,m.reject)}catch(n){m.reject(n)}}function d(){this.pb=null}function e(k){return k instanceof c?k:new c(function(m){m(k)})}if(b&&!G.$j)return b;d.prototype.Ig=function(k){if(null==this.pb){this.pb=[];var m=this;this.Jg(function(){m.Ol()})}this.pb.push(k)};var f=G.global.setTimeout;d.prototype.Jg=function(k){f(k,0)};d.prototype.Ol=function(){for(;this.pb&&this.pb.length;){var k=this.pb;this.pb=
[];for(var m=0;m<k.length;++m){var n=k[m];k[m]=null;try{n()}catch(r){this.el(r)}}}this.pb=null};d.prototype.el=function(k){this.Jg(function(){throw k;})};var g={$a:0,nb:1,Ja:2};c.prototype.De=function(){function k(r){return function(w){n||(n=!0,r.call(m,w))}}var m=this,n=!1;return{resolve:k(this.Qn),reject:k(this.sf)}};c.prototype.Qn=function(k){if(k===this)this.sf(new TypeError("A Promise cannot resolve to itself"));else if(k instanceof c)this.no(k);else{a:switch(typeof k){case v:var m=null!=k;break a;
case t:m=!0;break a;default:m=!1}m?this.Pn(k):this.qh(k)}};c.prototype.Pn=function(k){var m=void 0;try{m=k.then}catch(n){this.sf(n);return}typeof m==t?this.oo(m,k):this.qh(k)};c.prototype.sf=function(k){this.aj(g.Ja,k)};c.prototype.qh=function(k){this.aj(g.nb,k)};c.prototype.aj=function(k,m){if(this.qa!=g.$a)throw Error("Cannot settle("+k+", "+m+"): Promise already settled in state"+this.qa);this.qa=k;this.Ia=m;this.Ql()};c.prototype.Ql=function(){if(null!=this.ic){for(var k=0;k<this.ic.length;++k)h.Ig(this.ic[k]);
this.ic=null}};var h=new d;c.prototype.no=function(k){var m=this.De();k.dd(m.resolve,m.reject)};c.prototype.oo=function(k,m){var n=this.De();try{k.call(m,n.resolve,n.reject)}catch(r){n.reject(r)}};c.prototype.then=function(k,m){function n(z,C){return typeof z==t?function(U){try{r(z(U))}catch(V){w(V)}}:C}var r,w,W=new c(function(z,C){r=z;w=C});this.dd(n(k,r),n(m,w));return W};c.prototype["catch"]=function(k){return this.then(void 0,k)};c.prototype.dd=function(k,m){function n(){switch(r.qa){case g.nb:k(r.Ia);
break;case g.Ja:m(r.Ia);break;default:throw Error("Unexpected state: "+r.qa);}}var r=this;null==this.ic?h.Ig(n):this.ic.push(n)};c.resolve=e;c.reject=function(k){return new c(function(m,n){n(k)})};c.race=function(k){return new c(function(m,n){for(var r=G.Dd(k),w=r.next();!w.done;w=r.next())e(w.value).dd(m,n)})};c.all=function(k){var m=G.Dd(k),n=m.next();return n.done?e([]):new c(function(r,w){function W(U){return function(V){z[U]=V;C--;0==C&&r(z)}}var z=[],C=0;do z.push(void 0),C++,e(n.value).dd(W(z.length-
1),w),n=m.next();while(!n.done)})};return c});G.Pc("Object.is",function(b){return b?b:function(c,d){return c===d?0!==c||1/c===1/d:c!==c&&d!==d}});G.Pc("Array.prototype.includes",function(b){return b?b:function(c,d){var e=this;e instanceof String&&(e=String(e));var f=e.length;d=d||0;for(0>d&&(d=Math.max(d+f,0));d<f;d++){var g=e[d];if(g===c||Object.is(g,c))return!0}return!1}});G.Pc("String.prototype.includes",function(b){return b?b:function(c,d){return-1!==G.Rg(this,c,"includes").indexOf(c,d||0)}});
var H=H||{};H.global=this||self;H.ca=function(b){return void 0!==b};H.L=function(b){return typeof b==y};H.Em=function(b){return"boolean"==typeof b};H.Bb=function(b){return typeof b==u};H.ih=function(b,c,d){b=b.split(".");d=d||H.global;b[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+b[0]);for(var e;b.length&&(e=b.shift());)!b.length&&H.ca(c)?d[e]=c:d=d[e]&&d[e]!==Object.prototype[e]?d[e]:d[e]={}};H.define=function(b,c){return c};H.eq=2012;H.sa=!0;H.S="en";H.pe=!0;H.Ck=!1;H.Vj=!H.sa;
H.Yp=!1;H.kw=function(b){if(H.mi())throw Error("goog.provide cannot be used within a module.");H.Wg(b)};H.Wg=function(b,c){H.ih(b,c)};H.Sh=function(){null===H.Ee&&(H.Ee=H.km());return H.Ee};H.kk=/^[\w+/_-]+[=]{0,2}$/;H.Ee=null;H.km=function(){var b=H.global.document;return(b=b.querySelector&&b.querySelector("script[nonce]"))&&(b=b.nonce||b.getAttribute("nonce"))&&H.kk.test(b)?b:""};H.Jk=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/;
H.pf=function(b){if(!H.L(b)||!b||-1==b.search(H.Jk))throw Error("Invalid module identifier");if(!H.li())throw Error("Module "+b+" has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");
if(H.Fa.Mc)throw Error("goog.module may only be called once per module.");H.Fa.Mc=b};H.pf.get=E(null);H.pf.Au=E(null);H.rc={bg:"es6",je:"goog"};H.Fa=null;H.mi=function(){return H.li()||H.Lm()};H.li=function(){return!!H.Fa&&H.Fa.type==H.rc.je};H.Lm=function(){if(H.Fa&&H.Fa.type==H.rc.bg)return!0;var b=H.global.$jscomp;return b?typeof b.Ne!=t?!1:!!b.Ne():!1};H.pf.Fe=function(){H.Fa.Fe=!0};
H.Jt=function(b){if(H.Fa)H.Fa.Mc=b;else{var c=H.global.$jscomp;if(!c||typeof c.Ne!=t)throw Error('Module with namespace "'+b+'" has been loaded incorrectly.');c=c.Nn(c.Ne());H.Ei[b]={Sl:c,type:H.rc.bg,un:b}}};H.dx=function(b){if(H.Vj)throw b=b||"",Error("Importing test-only code into non-debug environment"+(b?": "+b:"."));};H.fu=B();H.wb=function(b){b=b.split(".");for(var c=H.global,d=0;d<b.length;d++)if(c=c[b[d]],!H.zb(c))return null;return c};
H.Qu=function(b,c){c=c||H.global;for(var d in b)c[d]=b[d]};H.As=B();H.Gx=!1;H.Zp=!0;H.Fi=function(b){H.global.console&&H.global.console.error(b)};H.Nn=B();H.vw=function(){return{}};H.hl="";H.Rb=B();H.ys=function(){throw Error("unimplemented abstract method");};H.Bs=B();H.bv=[];H.Wq=!0;H.yk=H.sa;H.Ei={};H.Kp=!1;H.ls="detect";H.gp=!1;H.ms="";H.Ek="transpile.js";H.$e=null;
H.Mo=function(){if(null==H.$e){try{var b=!eval('"use strict";let x = 1; function f() { return typeof x; };f() == "number";')}catch(c){b=!1}H.$e=b}return H.$e};H.Ro=function(b){return"(function(){"+b+"\n;})();\n"};
H.Pv=function(b){var c=H.Fa;try{H.Fa={Mc:"",Fe:!1,type:H.rc.je};if(H.Wa(b))var d=b.call(void 0,{});else if(H.L(b))H.Mo()&&(b=H.Ro(b)),d=H.gn.call(void 0,b);else throw Error("Invalid module definition");var e=H.Fa.Mc;if(H.L(e)&&e)H.Fa.Fe?H.Wg(e,d):H.yk&&Object.seal&&typeof d==v&&null!=d&&Object.seal(d),H.Ei[e]={Sl:d,type:H.rc.je,un:H.Fa.Mc};else throw Error('Invalid module name "'+e+'"');}finally{H.Fa=c}};H.gn=function(b){eval(b);return{}};
H.$v=function(b){b=b.split("/");for(var c=0;c<b.length;)"."==b[c]?b.splice(c,1):c&&".."==b[c]&&b[c-1]&&".."!=b[c-1]?b.splice(--c,2):c++;return b.join("/")};H.cn=function(b){if(H.global.Oj)return H.global.Oj(b);try{var c=new H.global.XMLHttpRequest;c.open("get",b,!1);c.send();return 0==c.status||200==c.status?c.responseText:null}catch(d){return null}};
H.Ax=function(b,c,d){var e=H.global.$jscomp;e||(H.global.$jscomp=e={});var f=e.Gf;if(!f){var g=H.hl+H.Ek,h=H.cn(g);if(h){(function(){(0,eval)(h+"\n//# sourceURL="+g)}).call(H.global);if(H.global.$gwtExport&&H.global.$gwtExport.$jscomp&&!H.global.$gwtExport.$jscomp.transpile)throw Error('The transpiler did not properly export the "transpile" method. $gwtExport: '+JSON.stringify(H.global.$gwtExport));H.global.$jscomp.Gf=H.global.$gwtExport.$jscomp.transpile;e=H.global.$jscomp;f=e.Gf}}if(!f){var k=" requires transpilation but no transpiler was found.";
k+=' Please add "//javascript/closure:transpiler" as a data dependency to ensure it is included.';f=e.Gf=function(m,n){H.Fi(n+k);return m}}return f(b,c,d)};
H.ra=function(b){var c=typeof b;if(c==v)if(b){if(b instanceof Array)return q;if(b instanceof Object)return c;var d=Object.prototype.toString.call(b);if("[object Window]"==d)return v;if("[object Array]"==d||typeof b.length==u&&"undefined"!=typeof b.splice&&"undefined"!=typeof b.propertyIsEnumerable&&!b.propertyIsEnumerable("splice"))return q;if("[object Function]"==d||"undefined"!=typeof b.call&&"undefined"!=typeof b.propertyIsEnumerable&&!b.propertyIsEnumerable("call"))return t}else return"null";
else if(c==t&&"undefined"==typeof b.call)return v;return c};H.zv=function(b){return null===b};H.zb=function(b){return null!=b};H.isArray=function(b){return H.ra(b)==q};H.ma=function(b){var c=H.ra(b);return c==q||c==v&&typeof b.length==u};H.kv=function(b){return H.Da(b)&&typeof b.getFullYear==t};H.Wa=function(b){return H.ra(b)==t};H.Da=function(b){var c=typeof b;return c==v&&null!=b||c==t};H.Uh=function(b){return b[H.Gb]||(b[H.Gb]=++H.Eo)};H.Vu=function(b){return!!b[H.Gb]};
H.Mn=function(b){null!==b&&"removeAttribute"in b&&b.removeAttribute(H.Gb);try{delete b[H.Gb]}catch(c){}};H.Gb="closure_uid_"+(1E9*Math.random()>>>0);H.Eo=0;H.yu=H.Uh;H.qw=H.Mn;H.ul=function(b){var c=H.ra(b);if(c==v||c==q){if(typeof b.clone===t)return b.clone();c=c==q?[]:{};for(var d in b)c[d]=H.ul(b[d]);return c}return b};H.jl=function(b,c,d){return b.call.apply(b.bind,arguments)};
H.il=function(b,c,d){if(!b)throw Error();if(2<arguments.length){var e=Array.prototype.slice.call(arguments,2);return function(){var f=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(f,e);return b.apply(c,f)}}return function(){return b.apply(c,arguments)}};H.bind=function(b,c,d){H.bind=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?H.jl:H.il;return H.bind.apply(null,arguments)};
H.Sb=function(b,c){var d=Array.prototype.slice.call(arguments,1);return function(){var e=d.slice();e.push.apply(e,arguments);return b.apply(this,e)}};H.Vv=function(b,c){for(var d in c)b[d]=c[d]};H.now=H.pe&&Date.now||function(){return+new Date};
H.Pu=function(b){if(H.global.execScript)H.global.execScript(b,"JavaScript");else if(H.global.eval){if(null==H.nd){try{H.global.eval("var _evalTest_ = 1;")}catch(e){}if("undefined"!=typeof H.global._evalTest_){try{delete H.global._evalTest_}catch(e){}H.nd=!0}else H.nd=!1}if(H.nd)H.global.eval(b);else{var c=H.global.document,d=c.createElement(l);d.type=da;d.defer=!1;d.appendChild(c.createTextNode(b));c.head.appendChild(d);c.head.removeChild(d)}}else throw Error("goog.globalEval not available");};
H.nd=null;H.vu=function(b,c){function d(g){g=g.split("-");for(var h=[],k=0;k<g.length;k++)h.push(e(g[k]));return h.join("-")}function e(g){return H.ah[g]||g}if("."==String(b).charAt(0))throw Error('className passed in goog.getCssName must not start with ".". You passed: '+b);var f=H.ah?"BY_WHOLE"==H.Bl?e:d:A();b=c?b+"-"+f(c):f(b);return H.global.Nj?H.global.Nj(b):b};H.Lw=function(b,c){H.ah=b;H.Bl=c};
H.Bu=function(b,c,d){d&&d.b&&(b=b.replace(/</g,"&lt;"));c&&(b=b.replace(/\{\$([^}]+)}/g,function(e,f){return null!=c&&f in c?c[f]:e}));return b};H.Cu=A();H.Dc=function(b,c){H.ih(b,c,void 0)};H.Wt=function(b,c,d){b[c]=d};H.yb=function(b,c){function d(){}d.prototype=c.prototype;b.gj=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.gl=function(e,f,g){for(var h=Array(arguments.length-2),k=2;k<arguments.length;k++)h[k-2]=arguments[k];return c.prototype[f].apply(e,h)}};
H.gl=function(b,c,d){var e=arguments.callee.caller;if(H.Ck||H.sa&&!e)throw Error("arguments.caller not defined.  goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");if("undefined"!==typeof e.gj){for(var f=Array(arguments.length-1),g=1;g<arguments.length;g++)f[g-1]=arguments[g];return e.gj.constructor.apply(b,f)}if(typeof c!=y&&"symbol"!=typeof c)throw Error("method names provided to goog.base must be a string or a symbol");f=Array(arguments.length-
2);for(g=2;g<arguments.length;g++)f[g-2]=arguments[g];g=!1;for(var h=b.constructor.prototype;h;h=Object.getPrototypeOf(h))if(h[c]===e)g=!0;else if(g)return h[c].apply(b,f);if(b[c]===e)return b.constructor.prototype[c].apply(b,f);throw Error("goog.base called from a method of one name to a method of a different name");};H.scope=function(b){if(H.mi())throw Error("goog.scope is not supported within a module.");b.call(H.global)};
H.La=function(b,c){var d=c.constructor,e=c.to;d&&d!=Object.prototype.constructor||(d=function(){throw Error("cannot instantiate an interface (no constructor defined).");});d=H.La.xl(d,b);b&&H.yb(d,b);delete c.constructor;delete c.to;H.La.Fg(d.prototype,c);null!=e&&(e instanceof Function?e(d):H.La.Fg(d,e));return d};H.La.xk=H.sa;
H.La.xl=function(b,c){function d(){var f=b.apply(this,arguments)||this;f[H.Gb]=f[H.Gb];this.constructor===d&&e&&Object.seal instanceof Function&&Object.seal(f);return f}if(!H.La.xk)return b;var e=!H.La.Wm(c);return d};H.La.Wm=function(b){return b&&b.prototype&&b.prototype[H.Gk]};H.La.ng=["constructor",ba,"isPrototypeOf",ca,ea,"toString","valueOf"];
H.La.Fg=function(b,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(b[d]=c[d]);for(var e=0;e<H.La.ng.length;e++)d=H.La.ng[e],Object.prototype.hasOwnProperty.call(c,d)&&(b[d]=c[d])};H.tx=B();H.Gk="goog_defineClass_legacy_unsealable";H.ad="";H.Ad=A();H.$g=function(b){var c=null;if("undefined"===typeof TrustedTypes||!TrustedTypes.createPolicy)return c;try{c=TrustedTypes.createPolicy(b,{createHTML:H.Ad,createScript:H.Ad,createScriptURL:H.Ad,createURL:H.Ad})}catch(d){H.Fi(d.message)}return c};
H.os=H.ad?H.$g(H.ad+"#base"):null;H.debug={};H.debug.Error=function(b){if(Error.captureStackTrace)Error.captureStackTrace(this,H.debug.Error);else{var c=Error().stack;c&&(this.stack=c)}b&&(this.message=String(b))};H.yb(H.debug.Error,Error);H.debug.Error.prototype.name="CustomError";H.a={};H.a.ua={mb:1,jp:2,$c:3,yp:4,aq:5,$p:6,zr:7,Fp:8,Uc:9,Sp:10,Wj:11,lr:12};H.m={};H.m.za=H.sa;H.m.oc=function(b,c){H.debug.Error.call(this,H.m.vo(b,c))};H.yb(H.m.oc,H.debug.Error);H.m.oc.prototype.name="AssertionError";H.m.Sj=function(b){throw b;};H.m.Ge=H.m.Sj;H.m.vo=function(b,c){b=b.split("%s");for(var d="",e=b.length-1,f=0;f<e;f++)d+=b[f]+(f<c.length?c[f]:"%s");return d+b[e]};H.m.Ta=function(b,c,d,e){var f="Assertion failed";if(d){f+=": "+d;var g=e}else b&&(f+=": "+b,g=c);b=new H.m.oc(""+f,g||[]);H.m.Ge(b)};H.m.Pw=function(b){H.m.za&&(H.m.Ge=b)};
H.m.assert=function(b,c,d){H.m.za&&!b&&H.m.Ta("",null,c,Array.prototype.slice.call(arguments,2));return b};H.m.Ms=function(b,c,d){H.m.za&&null==b&&H.m.Ta("Expected to exist: %s.",[b],c,Array.prototype.slice.call(arguments,2));return b};H.m.xa=function(b,c){H.m.za&&H.m.Ge(new H.m.oc("Failure"+(b?": "+b:""),Array.prototype.slice.call(arguments,1)))};H.m.Us=function(b,c,d){H.m.za&&!H.Bb(b)&&H.m.Ta("Expected number but got %s: %s.",[H.ra(b),b],c,Array.prototype.slice.call(arguments,2));return b};
H.m.Xs=function(b,c,d){H.m.za&&!H.L(b)&&H.m.Ta("Expected string but got %s: %s.",[H.ra(b),b],c,Array.prototype.slice.call(arguments,2));return b};H.m.Os=function(b,c,d){H.m.za&&!H.Wa(b)&&H.m.Ta("Expected function but got %s: %s.",[H.ra(b),b],c,Array.prototype.slice.call(arguments,2));return b};H.m.Vs=function(b,c,d){H.m.za&&!H.Da(b)&&H.m.Ta("Expected object but got %s: %s.",[H.ra(b),b],c,Array.prototype.slice.call(arguments,2));return b};
H.m.Js=function(b,c,d){H.m.za&&!H.isArray(b)&&H.m.Ta("Expected array but got %s: %s.",[H.ra(b),b],c,Array.prototype.slice.call(arguments,2));return b};H.m.Ks=function(b,c,d){H.m.za&&!H.Em(b)&&H.m.Ta("Expected boolean but got %s: %s.",[H.ra(b),b],c,Array.prototype.slice.call(arguments,2));return b};H.m.Ls=function(b,c,d){!H.m.za||H.Da(b)&&b.nodeType==H.a.ua.mb||H.m.Ta("Expected Element but got %s: %s.",[H.ra(b),b],c,Array.prototype.slice.call(arguments,2));return b};
H.m.Ps=function(b,c,d,e){!H.m.za||b instanceof c||H.m.Ta("Expected instanceof %s but got %s.",[H.m.Th(c),H.m.Th(b)],d,Array.prototype.slice.call(arguments,3));return b};H.m.Ns=function(b,c,d){!H.m.za||typeof b==u&&isFinite(b)||H.m.Ta("Expected %s to be a finite number but it is not.",[b],c,Array.prototype.slice.call(arguments,2));return b};H.m.Ws=function(){for(var b in Object.prototype)H.m.xa(b+" should not be enumerable in Object.prototype.")};
H.m.Th=function(b){return b instanceof Function?b.displayName||b.name||"unknown type name":b instanceof Object?b.constructor.displayName||b.constructor.name||Object.prototype.toString.call(b):null===b?"null":typeof b};H.g={};H.fb=H.pe;H.g.cb=!1;H.g.zn=function(b){return b[b.length-1]};H.g.Lv=H.g.zn;H.g.indexOf=H.fb&&(H.g.cb||Array.prototype.indexOf)?function(b,c,d){return Array.prototype.indexOf.call(b,c,d)}:function(b,c,d){d=null==d?0:0>d?Math.max(0,b.length+d):d;if(H.L(b))return H.L(c)&&1==c.length?b.indexOf(c,d):-1;for(;d<b.length;d++)if(d in b&&b[d]===c)return d;return-1};
H.g.lastIndexOf=H.fb&&(H.g.cb||Array.prototype.lastIndexOf)?function(b,c,d){return Array.prototype.lastIndexOf.call(b,c,null==d?b.length-1:d)}:function(b,c,d){d=null==d?b.length-1:d;0>d&&(d=Math.max(0,b.length+d));if(H.L(b))return H.L(c)&&1==c.length?b.lastIndexOf(c,d):-1;for(;0<=d;d--)if(d in b&&b[d]===c)return d;return-1};
H.g.forEach=H.fb&&(H.g.cb||Array.prototype.forEach)?function(b,c,d){Array.prototype.forEach.call(b,c,d)}:function(b,c,d){for(var e=b.length,f=H.L(b)?b.split(""):b,g=0;g<e;g++)g in f&&c.call(d,f[g],g,b)};H.g.ph=function(b,c){var d=b.length,e=H.L(b)?b.split(""):b;for(--d;0<=d;--d)d in e&&c.call(void 0,e[d],d,b)};
H.g.filter=H.fb&&(H.g.cb||Array.prototype.filter)?function(b,c,d){return Array.prototype.filter.call(b,c,d)}:function(b,c,d){for(var e=b.length,f=[],g=0,h=H.L(b)?b.split(""):b,k=0;k<e;k++)if(k in h){var m=h[k];c.call(d,m,k,b)&&(f[g++]=m)}return f};H.g.map=H.fb&&(H.g.cb||Array.prototype.map)?function(b,c,d){return Array.prototype.map.call(b,c,d)}:function(b,c,d){for(var e=b.length,f=Array(e),g=H.L(b)?b.split(""):b,h=0;h<e;h++)h in g&&(f[h]=c.call(d,g[h],h,b));return f};
H.g.reduce=H.fb&&(H.g.cb||Array.prototype.reduce)?function(b,c,d,e){e&&(c=H.bind(c,e));return Array.prototype.reduce.call(b,c,d)}:function(b,c,d,e){var f=d;H.g.forEach(b,function(g,h){f=c.call(e,f,g,h,b)});return f};H.g.reduceRight=H.fb&&(H.g.cb||Array.prototype.reduceRight)?function(b,c,d,e){e&&(c=H.bind(c,e));return Array.prototype.reduceRight.call(b,c,d)}:function(b,c,d,e){var f=d;H.g.ph(b,function(g,h){f=c.call(e,f,g,h,b)});return f};
H.g.some=H.fb&&(H.g.cb||Array.prototype.some)?function(b,c,d){return Array.prototype.some.call(b,c,d)}:function(b,c,d){for(var e=b.length,f=H.L(b)?b.split(""):b,g=0;g<e;g++)if(g in f&&c.call(d,f[g],g,b))return!0;return!1};H.g.every=H.fb&&(H.g.cb||Array.prototype.every)?function(b,c,d){return Array.prototype.every.call(b,c,d)}:function(b,c,d){for(var e=b.length,f=H.L(b)?b.split(""):b,g=0;g<e;g++)if(g in f&&!c.call(d,f[g],g,b))return!1;return!0};
H.g.count=function(b,c,d){var e=0;H.g.forEach(b,function(f,g,h){c.call(d,f,g,h)&&++e},d);return e};H.g.find=function(b,c,d){c=H.g.findIndex(b,c,d);return 0>c?null:H.L(b)?b.charAt(c):b[c]};H.g.findIndex=function(b,c,d){for(var e=b.length,f=H.L(b)?b.split(""):b,g=0;g<e;g++)if(g in f&&c.call(d,f[g],g,b))return g;return-1};H.g.au=function(b,c,d){c=H.g.Tl(b,c,d);return 0>c?null:H.L(b)?b.charAt(c):b[c]};
H.g.Tl=function(b,c,d){var e=b.length,f=H.L(b)?b.split(""):b;for(--e;0<=e;e--)if(e in f&&c.call(d,f[e],e,b))return e;return-1};H.g.contains=function(b,c){return 0<=H.g.indexOf(b,c)};H.g.Ca=function(b){return 0==b.length};H.g.clear=function(b){if(!H.isArray(b))for(var c=b.length-1;0<=c;c--)delete b[c];b.length=0};H.g.Zu=function(b,c){H.g.contains(b,c)||b.push(c)};H.g.bi=function(b,c,d){H.g.splice(b,d,0,c)};H.g.av=function(b,c,d){H.Sb(H.g.splice,b,d,0).apply(null,c)};
H.g.insertBefore=function(b,c,d){var e;2==arguments.length||0>(e=H.g.indexOf(b,d))?b.push(c):H.g.bi(b,c,e)};H.g.remove=function(b,c){c=H.g.indexOf(b,c);var d;(d=0<=c)&&H.g.kc(b,c);return d};H.g.sw=function(b,c){c=H.g.lastIndexOf(b,c);return 0<=c?(H.g.kc(b,c),!0):!1};H.g.kc=function(b,c){return 1==Array.prototype.splice.call(b,c,1).length};H.g.rw=function(b,c,d){c=H.g.findIndex(b,c,d);return 0<=c?(H.g.kc(b,c),!0):!1};
H.g.pw=function(b,c,d){var e=0;H.g.ph(b,function(f,g){c.call(d,f,g,b)&&H.g.kc(b,g)&&e++});return e};H.g.concat=function(b){return Array.prototype.concat.apply([],arguments)};H.g.join=function(b){return Array.prototype.concat.apply([],arguments)};H.g.jb=function(b){var c=b.length;if(0<c){for(var d=Array(c),e=0;e<c;e++)d[e]=b[e];return d}return[]};H.g.clone=H.g.jb;
H.g.extend=function(b,c){for(var d=1;d<arguments.length;d++){var e=arguments[d];if(H.ma(e)){var f=b.length||0,g=e.length||0;b.length=f+g;for(var h=0;h<g;h++)b[f+h]=e[h]}else b.push(e)}};H.g.splice=function(b,c,d,e){return Array.prototype.splice.apply(b,H.g.slice(arguments,1))};H.g.slice=function(b,c,d){return 2>=arguments.length?Array.prototype.slice.call(b,c):Array.prototype.slice.call(b,c,d)};
H.g.Jn=function(b,c){c=c||b;for(var d={},e=0,f=0;f<b.length;){var g=b[f++];var h=g;h=H.Da(h)?"o"+H.Uh(h):(typeof h).charAt(0)+h;Object.prototype.hasOwnProperty.call(d,h)||(d[h]=!0,c[e++]=g)}c.length=e};H.g.Kg=function(b,c,d){return H.g.Lg(b,d||H.g.sb,!1,c)};H.g.at=function(b,c,d){return H.g.Lg(b,c,!0,void 0,d)};H.g.Lg=function(b,c,d,e,f){for(var g=0,h=b.length,k;g<h;){var m=g+h>>1;var n=d?c.call(f,b[m],m,b):c(e,b[m]);0<n?g=m+1:(h=m,k=!n)}return k?g:~g};H.g.sort=function(b,c){b.sort(c||H.g.sb)};
H.g.mx=function(b,c){for(var d=Array(b.length),e=0;e<b.length;e++)d[e]={index:e,value:b[e]};var f=c||H.g.sb;H.g.sort(d,function(g,h){return f(g.value,h.value)||g.index-h.index});for(e=0;e<b.length;e++)b[e]=d[e].value};H.g.qo=function(b,c,d){var e=d||H.g.sb;H.g.sort(b,function(f,g){return e(c(f),c(g))})};H.g.jx=function(b,c,d){H.g.qo(b,function(e){return e[c]},d)};H.g.wi=function(b){for(var c=H.g.sb,d=1;d<b.length;d++)if(0<c(b[d-1],b[d]))return!1;return!0};
H.g.Ob=function(b,c){if(!H.ma(b)||!H.ma(c)||b.length!=c.length)return!1;for(var d=b.length,e=H.g.eh,f=0;f<d;f++)if(!e(b[f],c[f]))return!1;return!0};H.g.nt=function(b,c,d){d=d||H.g.sb;for(var e=Math.min(b.length,c.length),f=0;f<e;f++){var g=d(b[f],c[f]);if(0!=g)return g}return H.g.sb(b.length,c.length)};H.g.sb=function(b,c){return b>c?1:b<c?-1:0};H.g.dv=function(b,c){return-H.g.sb(b,c)};H.g.eh=function(b,c){return b===c};H.g.Zs=function(b,c,d){d=H.g.Kg(b,c,d);return 0>d?(H.g.bi(b,c,-(d+1)),!0):!1};
H.g.$s=function(b,c,d){c=H.g.Kg(b,c,d);return 0<=c?H.g.kc(b,c):!1};H.g.ct=function(b,c,d){for(var e={},f=0;f<b.length;f++){var g=b[f],h=c.call(d,g,f,b);H.ca(h)&&(e[h]||(e[h]=[])).push(g)}return e};H.g.Ao=function(b,c,d){var e={};H.g.forEach(b,function(f,g){e[c.call(d,f,g,b)]=f});return e};H.g.Qd=function(b,c,d){var e=[],f=0,g=b;d=d||1;void 0!==c&&(f=b,g=c);if(0>d*(g-f))return[];if(0<d)for(b=f;b<g;b+=d)e.push(b);else for(b=f;b>g;b+=d)e.push(b);return e};
H.g.repeat=function(b,c){for(var d=[],e=0;e<c;e++)d[e]=b;return d};H.g.flatten=function(b){for(var c=[],d=0;d<arguments.length;d++){var e=arguments[d];if(H.isArray(e))for(var f=0;f<e.length;f+=8192){var g=H.g.slice(e,f,f+8192);g=H.g.flatten.apply(null,g);for(var h=0;h<g.length;h++)c.push(g[h])}else c.push(e)}return c};H.g.rotate=function(b,c){b.length&&(c%=b.length,0<c?Array.prototype.unshift.apply(b,b.splice(-c,c)):0>c&&Array.prototype.push.apply(b,b.splice(0,-c)));return b};
H.g.Xv=function(b,c,d){c=Array.prototype.splice.call(b,c,1);Array.prototype.splice.call(b,d,0,c[0])};H.g.uj=function(b){if(!arguments.length)return[];for(var c=[],d=arguments[0].length,e=1;e<arguments.length;e++)arguments[e].length<d&&(d=arguments[e].length);for(e=0;e<d;e++){for(var f=[],g=0;g<arguments.length;g++)f.push(arguments[g][e]);c.push(f)}return c};H.g.ix=function(b,c){c=c||Math.random;for(var d=b.length-1;0<d;d--){var e=Math.floor(c()*(d+1)),f=b[d];b[d]=b[e];b[e]=f}};
H.g.tt=function(b,c){var d=[];H.g.forEach(c,function(e){d.push(b[e])});return d};H.g.qt=function(b,c,d){return H.g.concat.apply([],H.g.map(b,c,d))};H.async={};H.async.Wc=function(b,c,d){this.bn=d;this.Al=b;this.On=c;this.Fd=0;this.zd=null};H.async.Wc.prototype.get=function(){if(0<this.Fd){this.Fd--;var b=this.zd;this.zd=b.next;b.next=null}else b=this.Al();return b};H.async.Wc.prototype.put=function(b){this.On(b);this.Fd<this.bn&&(this.Fd++,b.next=this.zd,this.zd=b)};H.debug.pa={};H.debug.bq=B();H.debug.pa.jc=[];H.debug.pa.qf=[];H.debug.pa.Mi=!1;H.debug.pa.register=function(b){H.debug.pa.jc[H.debug.pa.jc.length]=b;if(H.debug.pa.Mi)for(var c=H.debug.pa.qf,d=0;d<c.length;d++)b(H.bind(c[d].So,c[d]))};H.debug.pa.Wv=function(b){H.debug.pa.Mi=!0;for(var c=H.bind(b.So,b),d=0;d<H.debug.pa.jc.length;d++)H.debug.pa.jc[d](c);H.debug.pa.qf.push(b)};H.debug.pa.Fx=function(b){var c=H.debug.pa.qf;b=H.bind(b.K,b);for(var d=0;d<H.debug.pa.jc.length;d++)H.debug.pa.jc[d](b);c.length--};H.a.m={};H.a.m.we=function(b){if(H.m.za){var c=H.a.m.ec(b);c&&(!b||!(b instanceof c.Location)&&b instanceof c.Element)&&H.m.xa("Argument is not a Location (or a non-Element mock); got: %s",H.a.m.dh(b))}};H.a.m.Aa=function(b,c){if(H.m.za){var d=H.a.m.ec(b);d&&"undefined"!=typeof d[c]&&(b&&(b instanceof d[c]||!(b instanceof d.Location||b instanceof d.Element))||H.m.xa("Argument is not a %s (or a non-Element, non-Location mock); got: %s",c,H.a.m.dh(b)))}return b};H.a.m.Uk=function(b){H.a.m.Aa(b,"HTMLAnchorElement")};
H.a.m.Wk=function(b){return H.a.m.Aa(b,"HTMLButtonElement")};H.a.m.bl=function(b){H.a.m.Aa(b,"HTMLLinkElement")};H.a.m.$k=function(b){H.a.m.Aa(b,"HTMLImageElement")};H.a.m.Vk=function(b){H.a.m.Aa(b,"HTMLAudioElement")};H.a.m.dl=function(b){H.a.m.Aa(b,"HTMLVideoElement")};H.a.m.al=function(b){return H.a.m.Aa(b,"HTMLInputElement")};H.a.m.Rs=function(b){return H.a.m.Aa(b,"HTMLTextAreaElement")};H.a.m.Qs=function(b){return H.a.m.Aa(b,"HTMLCanvasElement")};H.a.m.Xk=function(b){H.a.m.Aa(b,"HTMLEmbedElement")};
H.a.m.Yk=function(b){return H.a.m.Aa(b,"HTMLFormElement")};H.a.m.Zk=function(b){H.a.m.Aa(b,"HTMLFrameElement")};H.a.m.Gg=function(b){H.a.m.Aa(b,"HTMLIFrameElement")};H.a.m.cl=function(b){H.a.m.Aa(b,"HTMLObjectElement")};H.a.m.Hg=function(b){H.a.m.Aa(b,"HTMLScriptElement")};H.a.m.dh=function(b){if(H.Da(b))try{return b.constructor.displayName||b.constructor.name||Object.prototype.toString.call(b)}catch(c){return"<object could not be stringified>"}else return void 0===b?"undefined":null===b?"null":typeof b};
H.a.m.ec=function(b){try{var c=b&&b.ownerDocument,d=c&&(c.defaultView||c.parentWindow);d=d||H.global;if(d.Element&&d.Location)return d}catch(e){}return null};H.V={};H.V.Vg=function(b){return function(){return b}};H.V.cq=E(!1);H.V.ns=E(!0);H.V.mr=E(null);H.V.ai=A();H.V.error=function(b){return function(){throw Error(b);}};H.V.xa=function(b){return function(){throw b;}};H.V.lock=function(b,c){c=c||0;return function(){return b.apply(this,Array.prototype.slice.call(arguments,0,c))}};H.V.cw=function(b){return function(){return arguments[b]}};
H.V.iw=function(b,c){var d=Array.prototype.slice.call(arguments,1);return function(){var e=Array.prototype.slice.call(arguments);e.push.apply(e,d);return b.apply(this,e)}};H.V.Jx=function(b,c){return H.V.fo(b,H.V.Vg(c))};H.V.Ut=function(b,c){return function(d){return c?b==d:b===d}};H.V.ot=function(b,c){var d=arguments,e=d.length;return function(){var f;e&&(f=d[e-1].apply(this,arguments));for(var g=e-2;0<=g;g--)f=d[g].call(this,f);return f}};
H.V.fo=function(b){var c=arguments,d=c.length;return function(){for(var e,f=0;f<d;f++)e=c[f].apply(this,arguments);return e}};H.V.and=function(b){var c=arguments,d=c.length;return function(){for(var e=0;e<d;e++)if(!c[e].apply(this,arguments))return!1;return!0}};H.V.or=function(b){var c=arguments,d=c.length;return function(){for(var e=0;e<d;e++)if(c[e].apply(this,arguments))return!0;return!1}};H.V.xn=function(b){return function(){return!b.apply(this,arguments)}};
H.V.create=function(b,c){function d(){}d.prototype=b.prototype;var e=new d;b.apply(e,Array.prototype.slice.call(arguments,1));return e};H.V.Jj=!0;H.V.ol=function(b){var c=!1,d;return function(){if(!H.V.Jj)return b();c||(d=b(),c=!0);return d}};H.V.once=function(b){var c=b;return function(){if(c){var d=c;c=null;d()}}};H.V.It=function(b,c,d){var e=0;return function(f){H.global.clearTimeout(e);var g=arguments;e=H.global.setTimeout(function(){b.apply(d,g)},c)}};
H.V.vx=function(b,c,d){function e(){g=H.global.setTimeout(f,c);b.apply(d,k)}function f(){g=0;h&&(h=!1,e())}var g=0,h=!1,k=[];return function(m){k=arguments;g?h=!0:e()}};H.V.mw=function(b,c,d){function e(){f=0}var f=0;return function(g){f||(f=H.global.setTimeout(e,c),b.apply(d,arguments))}};H.a.zq=B();H.a.f=function(b){this.wo=b};H.a.f.prototype.toString=D("wo");H.a.f.Uo=new H.a.f("A");H.a.f.Vo=new H.a.f("ABBR");H.a.f.Xo=new H.a.f("ACRONYM");H.a.f.Yo=new H.a.f("ADDRESS");H.a.f.bp=new H.a.f("APPLET");H.a.f.cp=new H.a.f("AREA");H.a.f.ep=new H.a.f("ARTICLE");H.a.f.fp=new H.a.f("ASIDE");H.a.f.kp=new H.a.f("AUDIO");H.a.f.lp=new H.a.f("B");H.a.f.mp=new H.a.f("BASE");H.a.f.np=new H.a.f("BASEFONT");H.a.f.op=new H.a.f("BDI");H.a.f.pp=new H.a.f("BDO");H.a.f.sp=new H.a.f("BIG");H.a.f.tp=new H.a.f("BLOCKQUOTE");
H.a.f.up=new H.a.f("BODY");H.a.f.Xf=new H.a.f("BR");H.a.f.vp=new H.a.f("BUTTON");H.a.f.wp=new H.a.f("CANVAS");H.a.f.xp=new H.a.f("CAPTION");H.a.f.zp=new H.a.f("CENTER");H.a.f.Ap=new H.a.f("CITE");H.a.f.Bp=new H.a.f("CODE");H.a.f.Cp=new H.a.f("COL");H.a.f.Dp=new H.a.f("COLGROUP");H.a.f.Ep=new H.a.f("COMMAND");H.a.f.Gp=new H.a.f("DATA");H.a.f.Hp=new H.a.f("DATALIST");H.a.f.Ip=new H.a.f("DD");H.a.f.Jp=new H.a.f("DEL");H.a.f.Lp=new H.a.f("DETAILS");H.a.f.Mp=new H.a.f("DFN");H.a.f.Np=new H.a.f("DIALOG");
H.a.f.Op=new H.a.f("DIR");H.a.f.Pp=new H.a.f("DIV");H.a.f.Qp=new H.a.f("DL");H.a.f.Tp=new H.a.f("DT");H.a.f.Wp=new H.a.f("EM");H.a.f.Xp=new H.a.f("EMBED");H.a.f.fq=new H.a.f("FIELDSET");H.a.f.gq=new H.a.f("FIGCAPTION");H.a.f.hq=new H.a.f("FIGURE");H.a.f.iq=new H.a.f("FONT");H.a.f.jq=new H.a.f("FOOTER");H.a.f.kq=new H.a.f("FORM");H.a.f.lq=new H.a.f("FRAME");H.a.f.mq=new H.a.f("FRAMESET");H.a.f.oq=new H.a.f("H1");H.a.f.pq=new H.a.f("H2");H.a.f.qq=new H.a.f("H3");H.a.f.rq=new H.a.f("H4");H.a.f.sq=new H.a.f("H5");
H.a.f.tq=new H.a.f("H6");H.a.f.uq=new H.a.f("HEAD");H.a.f.vq=new H.a.f("HEADER");H.a.f.wq=new H.a.f("HGROUP");H.a.f.xq=new H.a.f("HR");H.a.f.yq=new H.a.f("HTML");H.a.f.Aq=new H.a.f("I");H.a.f.Dq=new H.a.f("IFRAME");H.a.f.Eq=new H.a.f("IMG");H.a.f.Fq=new H.a.f("INPUT");H.a.f.Gq=new H.a.f("INS");H.a.f.Lq=new H.a.f("ISINDEX");H.a.f.Oq=new H.a.f("KBD");H.a.f.Pq=new H.a.f("KEYGEN");H.a.f.Qq=new H.a.f("LABEL");H.a.f.Sq=new H.a.f("LEGEND");H.a.f.Tq=new H.a.f("LI");H.a.f.Uq=new H.a.f("LINK");H.a.f.Yq=new H.a.f("MAIN");
H.a.f.Zq=new H.a.f("MAP");H.a.f.$q=new H.a.f("MARK");H.a.f.ar=new H.a.f("MATH");H.a.f.cr=new H.a.f("MENU");H.a.f.dr=new H.a.f("MENUITEM");H.a.f.er=new H.a.f("META");H.a.f.fr=new H.a.f("METER");H.a.f.ir=new H.a.f("NAV");H.a.f.jr=new H.a.f("NOFRAMES");H.a.f.kr=new H.a.f("NOSCRIPT");H.a.f.nr=new H.a.f("OBJECT");H.a.f.qr=new H.a.f("OL");H.a.f.rr=new H.a.f("OPTGROUP");H.a.f.sr=new H.a.f("OPTION");H.a.f.tr=new H.a.f("OUTPUT");H.a.f.ur=new H.a.f("P");H.a.f.vr=new H.a.f("PARAM");H.a.f.wr=new H.a.f("PICTURE");
H.a.f.yr=new H.a.f("PRE");H.a.f.Ar=new H.a.f("PROGRESS");H.a.f.Q=new H.a.f("Q");H.a.f.Br=new H.a.f("RP");H.a.f.Cr=new H.a.f("RT");H.a.f.Dr=new H.a.f("RTC");H.a.f.Er=new H.a.f("RUBY");H.a.f.Gr=new H.a.f("S");H.a.f.Jr=new H.a.f("SAMP");H.a.f.Kr=new H.a.f(l);H.a.f.Lr=new H.a.f("SECTION");H.a.f.Mr=new H.a.f("SELECT");H.a.f.Or=new H.a.f("SMALL");H.a.f.Pr=new H.a.f("SOURCE");H.a.f.Qr=new H.a.f("SPAN");H.a.f.Rr=new H.a.f("STRIKE");H.a.f.Sr=new H.a.f("STRONG");H.a.f.Tr=new H.a.f("STYLE");H.a.f.Ur=new H.a.f("SUB");
H.a.f.Vr=new H.a.f("SUMMARY");H.a.f.Wr=new H.a.f("SUP");H.a.f.Xr=new H.a.f("SVG");H.a.f.Yr=new H.a.f("TABLE");H.a.f.Zr=new H.a.f("TBODY");H.a.f.$r=new H.a.f("TD");H.a.f.bs=new H.a.f("TEMPLATE");H.a.f.cs=new H.a.f("TEXTAREA");H.a.f.ds=new H.a.f("TFOOT");H.a.f.es=new H.a.f("TH");H.a.f.fs=new H.a.f("THEAD");H.a.f.gs=new H.a.f("TIME");H.a.f.hs=new H.a.f("TITLE");H.a.f.js=new H.a.f("TR");H.a.f.ks=new H.a.f("TRACK");H.a.f.ps=new H.a.f("TT");H.a.f.rs=new H.a.f("U");H.a.f.ss=new H.a.f("UL");H.a.f.ts=new H.a.f("VAR");
H.a.f.us=new H.a.f("VIDEO");H.a.f.vs=new H.a.f("WBR");H.object={};H.object.is=function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c};H.object.forEach=function(b,c,d){for(var e in b)c.call(d,b[e],e,b)};H.object.filter=function(b,c,d){var e={},f;for(f in b)c.call(d,b[f],f,b)&&(e[f]=b[f]);return e};H.object.map=function(b,c,d){var e={},f;for(f in b)e[f]=c.call(d,b[f],f,b);return e};H.object.some=function(b,c,d){for(var e in b)if(c.call(d,b[e],e,b))return!0;return!1};H.object.every=function(b,c,d){for(var e in b)if(!c.call(d,b[e],e,b))return!1;return!0};
H.object.ub=function(b){var c=0,d;for(d in b)c++;return c};H.object.tu=function(b){for(var c in b)return c};H.object.uu=function(b){for(var c in b)return b[c]};H.object.contains=function(b,c){return H.object.Mb(b,c)};H.object.ga=function(b){var c=[],d=0,e;for(e in b)c[d++]=b[e];return c};H.object.la=function(b){var c=[],d=0,e;for(e in b)c[d++]=e;return c};H.object.Ou=function(b,c){var d=H.ma(c),e=d?c:arguments;for(d=d?0:1;d<e.length;d++){if(null==b)return;b=b[e[d]]}return b};
H.object.Lb=function(b,c){return null!==b&&c in b};H.object.Mb=function(b,c){for(var d in b)if(b[d]==c)return!0;return!1};H.object.Ul=function(b,c,d){for(var e in b)if(c.call(d,b[e],e,b))return e};H.object.bu=function(b,c,d){return(c=H.object.Ul(b,c,d))&&b[c]};H.object.Ca=function(b){for(var c in b)return!1;return!0};H.object.clear=function(b){for(var c in b)delete b[c]};H.object.remove=function(b,c){var d;(d=c in b)&&delete b[c];return d};
H.object.add=function(b,c,d){if(null!==b&&c in b)throw Error('The object already contains the key "'+c+'"');H.object.set(b,c,d)};H.object.get=function(b,c,d){return null!==b&&c in b?b[c]:d};H.object.set=function(b,c,d){b[c]=d};H.object.Tw=function(b,c,d){return c in b?b[c]:b[c]=d};H.object.hx=function(b,c,d){if(c in b)return b[c];d=d();return b[c]=d};H.object.Ob=function(b,c){for(var d in b)if(!(d in c)||b[d]!==c[d])return!1;for(var e in c)if(!(e in b))return!1;return!0};
H.object.clone=function(b){var c={},d;for(d in b)c[d]=b[d];return c};H.object.Jo=function(b){var c=H.ra(b);if(c==v||c==q){if(H.Wa(b.clone))return b.clone();c=c==q?[]:{};for(var d in b)c[d]=H.object.Jo(b[d]);return c}return b};H.object.Co=function(b){var c={},d;for(d in b)c[b[d]]=d;return c};H.object.qg=["constructor",ba,"isPrototypeOf",ca,ea,"toString","valueOf"];
H.object.extend=function(b,c){for(var d,e,f=1;f<arguments.length;f++){e=arguments[f];for(d in e)b[d]=e[d];for(var g=0;g<H.object.qg.length;g++)d=H.object.qg[g],Object.prototype.hasOwnProperty.call(e,d)&&(b[d]=e[d])}};H.object.create=function(b){var c=arguments.length;if(1==c&&H.isArray(arguments[0]))return H.object.create.apply(null,arguments[0]);if(c%2)throw Error(p);for(var d={},e=0;e<c;e+=2)d[arguments[e]]=arguments[e+1];return d};
H.object.yl=function(b){var c=arguments.length;if(1==c&&H.isArray(arguments[0]))return H.object.yl.apply(null,arguments[0]);for(var d={},e=0;e<c;e++)d[arguments[e]]=!0;return d};H.object.zt=function(b){var c=b;Object.isFrozen&&!Object.isFrozen(b)&&(c=Object.create(b),Object.freeze(c));return c};H.object.pv=function(b){return!!Object.isFrozen&&Object.isFrozen(b)};
H.object.su=function(b,c,d){if(!b)return[];if(!Object.getOwnPropertyNames||!Object.getPrototypeOf)return H.object.la(b);for(var e={};b&&(b!==Object.prototype||c)&&(b!==Function.prototype||d);){for(var f=Object.getOwnPropertyNames(b),g=0;g<f.length;g++)e[f[g]]=!0;b=Object.getPrototypeOf(b)}return H.object.la(e)};H.object.Nu=function(b){return(b=Object.getPrototypeOf(b.prototype))&&b.constructor};H.a.tags={};H.a.tags.Nk={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};H.a.tags.Ym=function(b){return!0===H.a.tags.Nk[b]};H.b={};H.b.Ya={};H.b.Ya.ab=H.ad?H.$g(H.ad+"#html"):null;H.c={};H.c.qs=B();H.c.M=function(b,c){this.Ef=b===H.c.M.fg&&c||"";this.Dk=H.c.M.wg};H.c.M.prototype.Va=!0;H.c.M.prototype.Ga=D("Ef");H.c.M.prototype.toString=function(){return"Const{"+this.Ef+"}"};H.c.M.K=function(b){if(b instanceof H.c.M&&b.constructor===H.c.M&&b.Dk===H.c.M.wg)return b.Ef;H.m.xa("expected object of type Const, got '"+b+"'");return"type_error:Const"};H.c.M.from=function(b){return new H.c.M(H.c.M.fg,b)};H.c.M.wg={};H.c.M.fg={};H.c.M.EMPTY=H.c.M.from("");H.b.W=function(){this.Jd="";this.tk=H.b.W.wa};H.b.W.prototype.Va=!0;H.b.W.wa={};H.b.W.Fc=function(b){b=H.c.M.K(b);return 0===b.length?H.b.W.EMPTY:H.b.W.uc(b)};H.b.W.hu=function(b,c){for(var d=[],e=1;e<arguments.length;e++)d.push(H.b.W.ej(arguments[e]));return H.b.W.uc("("+H.c.M.K(b)+")("+d.join(", ")+");")};H.b.W.ku=function(b){return H.b.W.uc(H.b.W.ej(b))};H.b.W.prototype.Ga=function(){return this.Jd.toString()};H.sa&&(H.b.W.prototype.toString=function(){return"SafeScript{"+this.Jd+"}"});
H.b.W.K=function(b){return H.b.W.pj(b).toString()};H.b.W.pj=function(b){if(b instanceof H.b.W&&b.constructor===H.b.W&&b.tk===H.b.W.wa)return b.Jd;H.m.xa("expected object of type SafeScript, got '"+b+a+H.ra(b));return"type_error:SafeScript"};H.b.W.ej=function(b){return JSON.stringify(b).replace(/</g,"\\x3c")};H.b.W.uc=function(b){return(new H.b.W).Qb(b)};H.b.W.prototype.Qb=function(b){this.Jd=H.b.Ya.ab?H.b.Ya.ab.createScript(b):b;return this};H.b.W.EMPTY=H.b.W.uc("");H.Ua={};H.Ua.url={};H.Ua.url.wl=function(b){return H.Ua.url.Vh().createObjectURL(b)};H.Ua.url.yw=function(b){H.Ua.url.Vh().revokeObjectURL(b)};H.Ua.url.Vh=function(){var b=H.Ua.url.nh();if(null!=b)return b;throw Error("This browser doesn't seem to support blob URLs");};H.Ua.url.nh=function(){return H.ca(H.global.URL)&&H.ca(H.global.URL.createObjectURL)?H.global.URL:H.ca(H.global.webkitURL)&&H.ca(H.global.webkitURL.createObjectURL)?H.global.webkitURL:H.ca(H.global.createObjectURL)?H.global:null};
H.Ua.url.bt=function(){return null!=H.Ua.url.nh()};H.i={};H.i.j={};H.i.j.ak=!1;
H.i.j.jg=H.i.j.ak||("ar"==H.S.substring(0,2).toLowerCase()||"fa"==H.S.substring(0,2).toLowerCase()||"he"==H.S.substring(0,2).toLowerCase()||"iw"==H.S.substring(0,2).toLowerCase()||"ps"==H.S.substring(0,2).toLowerCase()||"sd"==H.S.substring(0,2).toLowerCase()||"ug"==H.S.substring(0,2).toLowerCase()||"ur"==H.S.substring(0,2).toLowerCase()||"yi"==H.S.substring(0,2).toLowerCase())&&(2==H.S.length||"-"==H.S.substring(2,3)||"_"==H.S.substring(2,3))||3<=H.S.length&&"ckb"==H.S.substring(0,3).toLowerCase()&&
(3==H.S.length||"-"==H.S.substring(3,4)||"_"==H.S.substring(3,4))||7<=H.S.length&&("-"==H.S.substring(2,3)||"_"==H.S.substring(2,3))&&("adlm"==H.S.substring(3,7).toLowerCase()||"arab"==H.S.substring(3,7).toLowerCase()||"hebr"==H.S.substring(3,7).toLowerCase()||"nkoo"==H.S.substring(3,7).toLowerCase()||"rohg"==H.S.substring(3,7).toLowerCase()||"thaa"==H.S.substring(3,7).toLowerCase())||8<=H.S.length&&("-"==H.S.substring(3,4)||"_"==H.S.substring(3,4))&&("adlm"==H.S.substring(4,8).toLowerCase()||"arab"==
H.S.substring(4,8).toLowerCase()||"hebr"==H.S.substring(4,8).toLowerCase()||"nkoo"==H.S.substring(4,8).toLowerCase()||"rohg"==H.S.substring(4,8).toLowerCase()||"thaa"==H.S.substring(4,8).toLowerCase());H.i.j.Wb={gk:"\u202a",pk:"\u202b",pg:"\u202c",hk:"\u200e",qk:"\u200f"};H.i.j.aa={Eb:1,Fb:-1,Za:0};H.i.j.Zc="right";H.i.j.Xc="left";H.i.j.Cq=H.i.j.jg?H.i.j.Xc:H.i.j.Zc;H.i.j.Bq=H.i.j.jg?H.i.j.Zc:H.i.j.Xc;
H.i.j.zo=function(b){return typeof b==u?0<b?H.i.j.aa.Eb:0>b?H.i.j.aa.Fb:H.i.j.aa.Za:null==b?null:b?H.i.j.aa.Fb:H.i.j.aa.Eb};H.i.j.gc="A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0900-\u1fff\u200e\u2c00-\ud801\ud804-\ud839\ud83c-\udbff\uf900-\ufb1c\ufe00-\ufe6f\ufefd-\uffff";H.i.j.lc="\u0591-\u06ef\u06fa-\u08ff\u200f\ud802-\ud803\ud83a-\ud83b\ufb1d-\ufdff\ufe70-\ufefc";H.i.j.Am=/<[^>]*>|&[^;]+;/g;H.i.j.Cb=function(b,c){return c?b.replace(H.i.j.Am,""):b};
H.i.j.Tn=new RegExp("["+H.i.j.lc+"]");H.i.j.kn=new RegExp("["+H.i.j.gc+"]");H.i.j.Ze=function(b,c){return H.i.j.Tn.test(H.i.j.Cb(b,c))};H.i.j.Uu=H.i.j.Ze;H.i.j.Zh=function(b){return H.i.j.kn.test(H.i.j.Cb(b,void 0))};H.i.j.nn=new RegExp("^["+H.i.j.gc+"]");H.i.j.Yn=new RegExp("^["+H.i.j.lc+"]");H.i.j.Tm=function(b){return H.i.j.Yn.test(b)};H.i.j.Pm=function(b){return H.i.j.nn.test(b)};H.i.j.xv=function(b){return!H.i.j.Pm(b)&&!H.i.j.Tm(b)};H.i.j.ln=new RegExp("^[^"+H.i.j.lc+"]*["+H.i.j.gc+"]");
H.i.j.Vn=new RegExp("^[^"+H.i.j.gc+"]*["+H.i.j.lc+"]");H.i.j.cj=function(b,c){return H.i.j.Vn.test(H.i.j.Cb(b,c))};H.i.j.Ev=H.i.j.cj;H.i.j.so=function(b,c){return H.i.j.ln.test(H.i.j.Cb(b,c))};H.i.j.vv=H.i.j.so;H.i.j.ui=/^http:\/\/.*/;H.i.j.yv=function(b,c){b=H.i.j.Cb(b,c);return H.i.j.ui.test(b)||!H.i.j.Zh(b)&&!H.i.j.Ze(b)};H.i.j.mn=new RegExp("["+H.i.j.gc+"][^"+H.i.j.lc+"]*$");H.i.j.Wn=new RegExp("["+H.i.j.lc+"][^"+H.i.j.gc+"]*$");H.i.j.Ll=function(b,c){return H.i.j.mn.test(H.i.j.Cb(b,c))};
H.i.j.uv=H.i.j.Ll;H.i.j.Ml=function(b,c){return H.i.j.Wn.test(H.i.j.Cb(b,c))};H.i.j.Cv=H.i.j.Ml;H.i.j.Xn=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;H.i.j.Dv=function(b){return H.i.j.Xn.test(b)};H.i.j.ll=/(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g;H.i.j.Su=function(b,c){c=(void 0===c?H.i.j.Ze(b):c)?H.i.j.Wb.qk:H.i.j.Wb.hk;return b.replace(H.i.j.ll,c+"$&"+c)};
H.i.j.Rt=function(b){return"<"==b.charAt(0)?b.replace(/<\w+/,"$& dir=rtl"):"\n<span dir=rtl>"+b+"</span>"};H.i.j.St=function(b){return H.i.j.Wb.pk+b+H.i.j.Wb.pg};H.i.j.Pt=function(b){return"<"==b.charAt(0)?b.replace(/<\w+/,"$& dir=ltr"):"\n<span dir=ltr>"+b+"</span>"};H.i.j.Qt=function(b){return H.i.j.Wb.gk+b+H.i.j.Wb.pg};H.i.j.Hl=/:\s*([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)/g;H.i.j.$m=/left/gi;H.i.j.Sn=/right/gi;H.i.j.xo=/%%%%/g;
H.i.j.Uv=function(b){return b.replace(H.i.j.Hl,":$1 $4 $3 $2").replace(H.i.j.$m,"%%%%").replace(H.i.j.Sn,H.i.j.Xc).replace(H.i.j.xo,H.i.j.Zc)};H.i.j.Jl=/([\u0591-\u05f2])"/g;H.i.j.po=/([\u0591-\u05f2])'/g;H.i.j.Zv=function(b){return b.replace(H.i.j.Jl,"$1\u05f4").replace(H.i.j.po,"$1\u05f3")};H.i.j.Qo=/\s+/;H.i.j.ym=/[\d\u06f0-\u06f9]/;H.i.j.Un=.4;
H.i.j.hh=function(b,c){var d=0,e=0,f=!1;b=H.i.j.Cb(b,c).split(H.i.j.Qo);for(c=0;c<b.length;c++){var g=b[c];H.i.j.cj(g)?(d++,e++):H.i.j.ui.test(g)?f=!0:H.i.j.Zh(g)?e++:H.i.j.ym.test(g)&&(f=!0)}return 0==e?f?H.i.j.aa.Eb:H.i.j.aa.Za:d/e>H.i.j.Un?H.i.j.aa.Fb:H.i.j.aa.Eb};H.i.j.Kt=function(b,c){return H.i.j.hh(b,c)==H.i.j.aa.Fb};H.i.j.Mw=function(b,c){b&&(c=H.i.j.zo(c))&&(b.style.textAlign=c==H.i.j.aa.Fb?H.i.j.Zc:H.i.j.Xc,b.dir=c==H.i.j.aa.Fb?"rtl":"ltr")};
H.i.j.Nw=function(b,c){switch(H.i.j.hh(c)){case H.i.j.aa.Eb:b.dir="ltr";break;case H.i.j.aa.Fb:b.dir="rtl";break;default:b.removeAttribute("dir")}};H.i.j.Up=B();H.b.H=function(){this.Nd="";this.Hf=null;this.Fk=H.b.H.wa};H.b.H.prototype.Va=!0;H.b.H.prototype.Ga=function(){return this.Nd.toString()};H.b.H.prototype.af=!0;H.b.H.prototype.vb=function(){return H.i.j.aa.Eb};H.sa&&(H.b.H.prototype.toString=function(){return"TrustedResourceUrl{"+this.Nd+"}"});H.b.H.K=function(b){return H.b.H.Zd(b).toString()};
H.b.H.Zd=function(b){if(b instanceof H.b.H&&b.constructor===H.b.H&&b.Fk===H.b.H.wa)return b.Nd;H.m.xa("expected object of type TrustedResourceUrl, got '"+b+a+H.ra(b));return"type_error:TrustedResourceUrl"};H.b.H.na=function(b){return b.Hf?b.Hf:H.b.H.K(b)};
H.b.H.format=function(b,c){var d=H.c.M.K(b);if(!H.b.H.Hj.test(d))throw Error("Invalid TrustedResourceUrl format: "+d);b=d.replace(H.b.H.bk,function(e,f){if(!Object.prototype.hasOwnProperty.call(c,f))throw Error('Found marker, "'+f+'", in format string, "'+d+'", but no valid label mapping found in args: '+JSON.stringify(c));e=c[f];return e instanceof H.c.M?H.c.M.K(e):encodeURIComponent(String(e))});return H.b.H.xc(b)};H.b.H.bk=/%{(\w+)}/g;H.b.H.Hj=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i;
H.b.H.Ik=/^([^?#]*)(\?[^#]*)?(#[\s\S]*)?/;H.b.H.eu=function(b,c,d,e){b=H.b.H.format(b,c);b=H.b.H.K(b);b=H.b.H.Ik.exec(b);c=b[3]||"";return H.b.H.xc(b[1]+H.b.H.dj("?",b[2]||"",d)+H.b.H.dj("#",c,e))};H.b.H.Fc=function(b){return H.b.H.xc(H.c.M.K(b))};H.b.H.iu=function(b){for(var c="",d=0;d<b.length;d++)c+=H.c.M.K(b[d]);return H.b.H.xc(c)};H.b.H.wa={};H.b.H.xc=function(b){var c=new H.b.H;c.Nd=H.b.Ya.ab?H.b.Ya.ab.createScriptURL(b):b;H.b.Ya.ab&&(c.Hf=H.b.Ya.ab.createURL(b));return c};
H.b.H.dj=function(b,c,d){if(null==d)return c;if(H.L(d))return d?b+encodeURIComponent(d):"";for(var e in d){var f=d[e];f=H.isArray(f)?f:[f];for(var g=0;g<f.length;g++){var h=f[g];null!=h&&(c||(c=b),c+=(c.length>b.length?"&":"")+encodeURIComponent(e)+"="+encodeURIComponent(String(h)))}}return c};H.c.A={};H.c.A.startsWith=function(b,c){return 0==b.lastIndexOf(c,0)};H.c.A.endsWith=function(b,c){var d=b.length-c.length;return 0<=d&&b.indexOf(c,d)==d};H.c.A.Ib=function(b,c){return 0==H.c.A.ed(c,b.substr(0,c.length))};H.c.A.Og=function(b,c){return 0==H.c.A.ed(c,b.substr(b.length-c.length,c.length))};H.c.A.Pg=function(b,c){return b.toLowerCase()==c.toLowerCase()};H.c.A.Lc=function(b){return/^[\s\xa0]*$/.test(b)};H.c.A.trim=H.pe&&String.prototype.trim?function(b){return b.trim()}:function(b){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(b)[1]};
H.c.A.ed=function(b,c){b=String(b).toLowerCase();c=String(c).toLowerCase();return b<c?-1:b==c?0:1};H.c.A.Nc=function(b,c){return b.replace(/(\r\n|\r|\n)/g,c?"<br />":"<br>")};
H.c.A.Ha=function(b,c){if(c)b=b.replace(H.c.A.Lf,"&amp;").replace(H.c.A.kg,"&lt;").replace(H.c.A.gg,"&gt;").replace(H.c.A.rg,"&quot;").replace(H.c.A.tg,"&#39;").replace(H.c.A.mg,"&#0;");else{if(!H.c.A.yj.test(b))return b;-1!=b.indexOf("&")&&(b=b.replace(H.c.A.Lf,"&amp;"));-1!=b.indexOf("<")&&(b=b.replace(H.c.A.kg,"&lt;"));-1!=b.indexOf(">")&&(b=b.replace(H.c.A.gg,"&gt;"));-1!=b.indexOf('"')&&(b=b.replace(H.c.A.rg,"&quot;"));-1!=b.indexOf("'")&&(b=b.replace(H.c.A.tg,"&#39;"));-1!=b.indexOf("\x00")&&
(b=b.replace(H.c.A.mg,"&#0;"))}return b};H.c.A.Lf=/&/g;H.c.A.kg=/</g;H.c.A.gg=/>/g;H.c.A.rg=/"/g;H.c.A.tg=/'/g;H.c.A.mg=/\x00/g;H.c.A.yj=/[\x00&<>"']/;H.c.A.sj=function(b){return H.c.A.Nc(b.replace(/  /g," &#160;"),void 0)};H.c.A.contains=function(b,c){return-1!=b.indexOf(c)};H.c.A.fd=function(b,c){return H.c.A.contains(b.toLowerCase(),c.toLowerCase())};
H.c.A.Kb=function(b,c){var d=0;b=H.c.A.trim(String(b)).split(".");c=H.c.A.trim(String(c)).split(".");for(var e=Math.max(b.length,c.length),f=0;0==d&&f<e;f++){var g=b[f]||"",h=c[f]||"";do{g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];h=/(\d*)(\D*)(.*)/.exec(h)||["","","",""];if(0==g[0].length&&0==h[0].length)break;d=H.c.A.Ae(0==g[1].length?0:parseInt(g[1],10),0==h[1].length?0:parseInt(h[1],10))||H.c.A.Ae(0==g[2].length,0==h[2].length)||H.c.A.Ae(g[2],h[2]);g=g[3];h=h[3]}while(0==d)}return d};
H.c.A.Ae=function(b,c){return b<c?-1:b>c?1:0};H.b.s=function(){this.Md="";this.wk=H.b.s.wa};H.b.s.ta="about:invalid#zClosurez";H.b.s.prototype.Va=!0;H.b.s.prototype.Ga=function(){return this.Md.toString()};H.b.s.prototype.af=!0;H.b.s.prototype.vb=function(){return H.i.j.aa.Eb};H.sa&&(H.b.s.prototype.toString=function(){return"SafeUrl{"+this.Md+"}"});H.b.s.K=function(b){return H.b.s.na(b).toString()};
H.b.s.na=function(b){if(b instanceof H.b.s&&b.constructor===H.b.s&&b.wk===H.b.s.wa)return b.Md;H.m.xa("expected object of type SafeUrl, got '"+b+a+H.ra(b));return"type_error:SafeUrl"};H.b.s.Fc=function(b){return H.b.s.Ba(H.c.M.K(b))};H.b.ne=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-wav|wav|webm)|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime))(?:;\w+=(?:\w+|"[\w;=]+"))*$/i;H.b.s.Gv=function(b){return H.b.ne.test(b)};
H.b.s.gu=function(b){b=H.b.ne.test(b.type)?H.Ua.url.wl(b):H.b.s.ta;return H.b.s.Ba(b)};H.b.Rj=/^data:([^,]*);base64,[a-z0-9+\/]+=*$/i;H.b.s.Wl=function(b){b=b.replace(/(%0A|%0D)/g,"");var c=b.match(H.b.Rj);c=c&&H.b.ne.test(c[1]);return H.b.s.Ba(c?b:H.b.s.ta)};H.b.s.pu=function(b){H.c.A.Ib(b,"tel:")||(b=H.b.s.ta);return H.b.s.Ba(b)};H.b.Ak=/^sip[s]?:[+a-z0-9_.!$%&'*\/=^`{|}~-]+@([a-z0-9-]+\.)+[a-z0-9]{2,63}$/i;H.b.s.mu=function(b){H.b.Ak.test(decodeURIComponent(b))||(b=H.b.s.ta);return H.b.s.Ba(b)};
H.b.s.ju=function(b){H.c.A.Ib(b,"fb-messenger://share")||(b=H.b.s.ta);return H.b.s.Ba(b)};H.b.s.ru=function(b){H.c.A.Ib(b,"whatsapp://send")||(b=H.b.s.ta);return H.b.s.Ba(b)};H.b.s.nu=function(b){H.c.A.Ib(b,"sms:")&&H.b.s.Um(b)||(b=H.b.s.ta);return H.b.s.Ba(b)};H.b.s.Um=function(b){var c=b.indexOf("#");0<c&&(b=b.substring(0,c));c=b.match(/[?&]body=/gi);if(!c)return!0;if(1<c.length)return!1;b=b.match(/[?&]body=([^&]*)/)[1];if(!b)return!0;try{decodeURIComponent(b)}catch(d){return!1}return/^(?:[a-z0-9\-_.~]|%[0-9a-f]{2})+$/i.test(b)};
H.b.s.ou=function(b){H.c.A.Ib(b,"ssh://")||(b=H.b.s.ta);return H.b.s.Ba(b)};H.b.s.Fw=function(b,c){return H.b.s.uf(/^chrome-extension:\/\/([^\/]+)\//,b,c)};H.b.s.Hw=function(b,c){return H.b.s.uf(/^moz-extension:\/\/([^\/]+)\//,b,c)};H.b.s.Gw=function(b,c){return H.b.s.uf(/^ms-browser-extension:\/\/([^\/]+)\//,b,c)};H.b.s.uf=function(b,c,d){(b=b.exec(c))?(b=b[1],-1==(d instanceof H.c.M?[H.c.M.K(d)]:d.map(function(e){return H.c.M.K(e)})).indexOf(b)&&(c=H.b.s.ta)):c=H.b.s.ta;return H.b.s.Ba(c)};
H.b.s.qu=function(b){return H.b.s.Ba(H.b.H.K(b))};H.b.oe=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;H.b.s.Ir=H.b.oe;H.b.s.Td=function(b){if(b instanceof H.b.s)return b;b=typeof b==v&&b.Va?b.Ga():String(b);H.b.oe.test(b)||(b=H.b.s.ta);return H.b.s.Ba(b)};H.b.s.Pa=function(b,c){if(b instanceof H.b.s)return b;b=typeof b==v&&b.Va?b.Ga():String(b);if(c&&/^data:/i.test(b)&&(c=H.b.s.Wl(b),c.Ga()==b))return c;H.b.oe.test(b)||(b=H.b.s.ta);return H.b.s.Ba(b)};H.b.s.wa={};
H.b.s.Ba=function(b){var c=new H.b.s;c.Md=H.b.Ya.ab?H.b.Ya.ab.createURL(b):b;return c};H.b.s.Wo=H.b.s.Ba("about:blank");H.b.D=function(){this.Ld="";this.vk=H.b.D.wa};H.b.D.prototype.Va=!0;H.b.D.wa={};H.b.D.Fc=function(b){b=H.c.M.K(b);return 0===b.length?H.b.D.EMPTY:H.b.D.vc(b)};H.b.D.prototype.Ga=D("Ld");H.sa&&(H.b.D.prototype.toString=function(){return"SafeStyle{"+this.Ld+"}"});H.b.D.K=function(b){if(b instanceof H.b.D&&b.constructor===H.b.D&&b.vk===H.b.D.wa)return b.Ld;H.m.xa("expected object of type SafeStyle, got '"+b+a+H.ra(b));return"type_error:SafeStyle"};H.b.D.vc=function(b){return(new H.b.D).Qb(b)};
H.b.D.prototype.Qb=function(b){this.Ld=b;return this};H.b.D.EMPTY=H.b.D.vc("");H.b.D.ta="zClosurez";H.b.D.create=function(b){var c="",d;for(d in b){if(!/^[-_a-zA-Z0-9]+$/.test(d))throw Error("Name allows only [-_a-zA-Z0-9], got: "+d);var e=b[d];null!=e&&(e=H.isArray(e)?H.g.map(e,H.b.D.Vi).join(" "):H.b.D.Vi(e),c+=d+":"+e+";")}return c?H.b.D.vc(c):H.b.D.EMPTY};
H.b.D.Vi=function(b){if(b instanceof H.b.s)return'url("'+H.b.s.K(b).replace(/</g,"%3c").replace(/[\\"]/g,"\\$&")+'")';b=b instanceof H.c.M?H.c.M.K(b):H.b.D.bo(String(b));if(/[{;}]/.test(b))throw new H.m.oc("Value does not allow [{;}], got: %s.",[b]);return b};
H.b.D.bo=function(b){var c=b.replace(H.b.D.eg,"$1").replace(H.b.D.eg,"$1").replace(H.b.D.xg,"url");if(H.b.D.Kk.test(c)){if(H.b.D.Pj.test(b))return H.m.xa("String value disallows comments, got: "+b),H.b.D.ta;if(!H.b.D.um(b))return H.m.xa("String value requires balanced quotes, got: "+b),H.b.D.ta;if(!H.b.D.vm(b))return H.m.xa("String value requires balanced square brackets and one identifier per pair of brackets, got: "+b),H.b.D.ta}else return H.m.xa("String value allows only "+H.b.D.Ag+" and simple functions, got: "+
b),H.b.D.ta;return H.b.D.co(b)};H.b.D.um=function(b){for(var c=!0,d=!0,e=0;e<b.length;e++){var f=b.charAt(e);"'"==f&&d?c=!c:'"'==f&&c&&(d=!d)}return c&&d};H.b.D.vm=function(b){for(var c=!0,d=/^[-_a-zA-Z0-9]$/,e=0;e<b.length;e++){var f=b.charAt(e);if("]"==f){if(c)return!1;c=!0}else if("["==f){if(!c)return!1;c=!1}else if(!c&&!d.test(f))return!1}return c};H.b.D.Ag="[-,.\"'%_!# a-zA-Z0-9\\[\\]]";H.b.D.Kk=new RegExp("^"+H.b.D.Ag+"+$");H.b.D.xg=/\b(url\([ \t\n]*)('[ -&(-\[\]-~]*'|"[ !#-\[\]-~]*"|[!#-&*-\[\]-~]*)([ \t\n]*\))/g;
H.b.D.eg=/\b(hsl|hsla|rgb|rgba|matrix|calc|minmax|fit-content|repeat|(rotate|scale|translate)(X|Y|Z|3d)?)\([-+*/0-9a-z.%\[\], ]+\)/g;H.b.D.Pj=/\/\*/;H.b.D.co=function(b){return b.replace(H.b.D.xg,function(c,d,e,f){var g="";e=e.replace(/^(['"])(.*)\1$/,function(h,k,m){g=k;return m});c=H.b.s.Td(e).Ga();return d+g+c+g+f})};H.b.D.concat=function(b){function c(e){H.isArray(e)?H.g.forEach(e,c):d+=H.b.D.K(e)}var d="";H.g.forEach(arguments,c);return d?H.b.D.vc(d):H.b.D.EMPTY};H.b.Y=function(){this.Kd="";this.uk=H.b.Y.wa};H.b.Y.prototype.Va=!0;H.b.Y.wa={};
H.b.Y.Bt=function(b,c){if(H.c.A.contains(b,"<"))throw Error("Selector does not allow '<', got: "+b);var d=b.replace(/('|")((?!\1)[^\r\n\f\\]|\\[\s\S])*\1/g,"");if(!/^[-_a-zA-Z0-9#.:* ,>+~[\]()=^$|]+$/.test(d))throw Error("Selector allows only [-_a-zA-Z0-9#.:* ,>+~[\\]()=^$|] and strings, got: "+b);if(!H.b.Y.tm(d))throw Error("() and [] in selector must be balanced, got: "+b);c instanceof H.b.D||(c=H.b.D.create(c));b=b+"{"+H.b.D.K(c).replace(/</g,"\\3C ")+"}";return H.b.Y.wc(b)};
H.b.Y.tm=function(b){for(var c={"(":")","[":"]"},d=[],e=0;e<b.length;e++){var f=b[e];if(c[f])d.push(c[f]);else if(H.object.contains(c,f)&&d.pop()!=f)return!1}return 0==d.length};H.b.Y.concat=function(b){function c(e){H.isArray(e)?H.g.forEach(e,c):d+=H.b.Y.K(e)}var d="";H.g.forEach(arguments,c);return H.b.Y.wc(d)};H.b.Y.Fc=function(b){b=H.c.M.K(b);return 0===b.length?H.b.Y.EMPTY:H.b.Y.wc(b)};H.b.Y.prototype.Ga=D("Kd");H.sa&&(H.b.Y.prototype.toString=function(){return"SafeStyleSheet{"+this.Kd+"}"});
H.b.Y.K=function(b){if(b instanceof H.b.Y&&b.constructor===H.b.Y&&b.uk===H.b.Y.wa)return b.Kd;H.m.xa("expected object of type SafeStyleSheet, got '"+b+a+H.ra(b));return"type_error:SafeStyleSheet"};H.b.Y.wc=function(b){return(new H.b.Y).Qb(b)};H.b.Y.prototype.Qb=function(b){this.Kd=b;return this};H.b.Y.EMPTY=H.b.Y.wc("");H.h={};H.h.userAgent={};H.h.userAgent.F={};H.h.userAgent.F.Fh=function(){var b=H.h.userAgent.F.hm();return b&&(b=b.userAgent)?b:""};H.h.userAgent.F.hm=function(){return H.global.navigator};H.h.userAgent.F.qj=H.h.userAgent.F.Fh();H.h.userAgent.F.fx=function(b){H.h.userAgent.F.qj=b||H.h.userAgent.F.Fh()};H.h.userAgent.F.cc=function(){return H.h.userAgent.F.qj};H.h.userAgent.F.T=function(b){return H.c.A.contains(H.h.userAgent.F.cc(),b)};
H.h.userAgent.F.nf=function(b){return H.c.A.fd(H.h.userAgent.F.cc(),b)};H.h.userAgent.F.jh=function(b){for(var c=/(\w[\w ]+)\/([^\s]+)\s*(?:\((.*?)\))?/g,d=[],e;e=c.exec(b);)d.push([e[1],e[2],e[3]||void 0]);return d};H.h.userAgent.B={};H.h.userAgent.B.Ii=function(){return H.h.userAgent.F.T("Opera")};H.h.userAgent.B.sn=function(){return H.h.userAgent.F.T("Trident")||H.h.userAgent.F.T("MSIE")};H.h.userAgent.B.lf=function(){return H.h.userAgent.F.T("Edge")};H.h.userAgent.B.Gi=function(){return H.h.userAgent.F.T("Edg/")};H.h.userAgent.B.Hi=function(){return H.h.userAgent.F.T("OPR")};H.h.userAgent.B.mf=function(){return H.h.userAgent.F.T("Firefox")||H.h.userAgent.F.T("FxiOS")};
H.h.userAgent.B.Ji=function(){return H.h.userAgent.F.T("Safari")&&!(H.h.userAgent.B.jf()||H.h.userAgent.B.kf()||H.h.userAgent.B.Ii()||H.h.userAgent.B.lf()||H.h.userAgent.B.Gi()||H.h.userAgent.B.Hi()||H.h.userAgent.B.mf()||H.h.userAgent.B.vi()||H.h.userAgent.F.T("Android"))};H.h.userAgent.B.kf=function(){return H.h.userAgent.F.T("Coast")};
H.h.userAgent.B.tn=function(){return(H.h.userAgent.F.T("iPad")||H.h.userAgent.F.T("iPhone"))&&!H.h.userAgent.B.Ji()&&!H.h.userAgent.B.jf()&&!H.h.userAgent.B.kf()&&!H.h.userAgent.B.mf()&&H.h.userAgent.F.T("AppleWebKit")};H.h.userAgent.B.jf=function(){return(H.h.userAgent.F.T("Chrome")||H.h.userAgent.F.T("CriOS"))&&!H.h.userAgent.B.lf()};H.h.userAgent.B.rn=function(){return H.h.userAgent.F.T("Android")&&!(H.h.userAgent.B.hi()||H.h.userAgent.B.Im()||H.h.userAgent.B.ff()||H.h.userAgent.B.vi())};
H.h.userAgent.B.ff=H.h.userAgent.B.Ii;H.h.userAgent.B.Bd=H.h.userAgent.B.sn;H.h.userAgent.B.Ab=H.h.userAgent.B.lf;H.h.userAgent.B.Gm=H.h.userAgent.B.Gi;H.h.userAgent.B.Bv=H.h.userAgent.B.Hi;H.h.userAgent.B.Im=H.h.userAgent.B.mf;H.h.userAgent.B.Fv=H.h.userAgent.B.Ji;H.h.userAgent.B.jv=H.h.userAgent.B.kf;H.h.userAgent.B.sv=H.h.userAgent.B.tn;H.h.userAgent.B.hi=H.h.userAgent.B.jf;H.h.userAgent.B.gv=H.h.userAgent.B.rn;H.h.userAgent.B.vi=function(){return H.h.userAgent.F.T("Silk")};
H.h.userAgent.B.Hc=function(){function b(f){f=H.g.find(f,e);return d[f]||""}var c=H.h.userAgent.F.cc();if(H.h.userAgent.B.Bd())return H.h.userAgent.B.gm(c);c=H.h.userAgent.F.jh(c);var d={};H.g.forEach(c,function(f){d[f[0]]=f[1]});var e=H.Sb(H.object.Lb,d);return H.h.userAgent.B.ff()?b(["Version","Opera"]):H.h.userAgent.B.Ab()?b(["Edge"]):H.h.userAgent.B.Gm()?b(["Edg"]):H.h.userAgent.B.hi()?b(["Chrome","CriOS"]):(c=c[2])&&c[1]||""};
H.h.userAgent.B.Xa=function(b){return 0<=H.c.A.Kb(H.h.userAgent.B.Hc(),b)};H.h.userAgent.B.gm=function(b){var c=/rv: *([\d\.]*)/.exec(b);if(c&&c[1])return c[1];c="";var d=/MSIE +([\d\.]+)/.exec(b);if(d&&d[1])if(b=/Trident\/(\d.\d)/.exec(b),"7.0"==d[1])if(b&&b[1])switch(b[1]){case "4.0":c="8.0";break;case "5.0":c="9.0";break;case "6.0":c="10.0";break;case "7.0":c="11.0"}else c="7.0";else c=d[1];return c};H.b.u=function(){this.Id="";this.sk=H.b.u.wa;this.md=null};H.b.u.prototype.af=!0;H.b.u.prototype.vb=D("md");H.b.u.prototype.Va=!0;H.b.u.prototype.Ga=function(){return this.Id.toString()};H.sa&&(H.b.u.prototype.toString=function(){return"SafeHtml{"+this.Id+"}"});H.b.u.K=function(b){return H.b.u.Db(b).toString()};H.b.u.Db=function(b){if(b instanceof H.b.u&&b.constructor===H.b.u&&b.sk===H.b.u.wa)return b.Id;H.m.xa("expected object of type SafeHtml, got '"+b+a+H.ra(b));return"type_error:SafeHtml"};
H.b.u.Ha=function(b){if(b instanceof H.b.u)return b;var c=typeof b==v,d=null;c&&b.af&&(d=b.vb());return H.b.u.Sa(H.c.A.Ha(c&&b.Va?b.Ga():String(b)),d)};H.b.u.Xu=function(b){if(b instanceof H.b.u)return b;b=H.b.u.Ha(b);return H.b.u.Sa(H.c.A.Nc(H.b.u.K(b)),b.vb())};H.b.u.Yu=function(b){if(b instanceof H.b.u)return b;b=H.b.u.Ha(b);return H.b.u.Sa(H.c.A.sj(H.b.u.K(b)),b.vb())};H.b.u.from=H.b.u.Ha;H.b.u.zg=/^[a-zA-Z0-9-]+$/;
H.b.u.Hk={action:!0,cite:!0,data:!0,formaction:!0,href:!0,manifest:!0,poster:!0,src:!0};H.b.u.lk={APPLET:!0,BASE:!0,EMBED:!0,IFRAME:!0,LINK:!0,MATH:!0,META:!0,OBJECT:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0};H.b.u.create=function(b,c,d){H.b.u.Po(String(b));return H.b.u.Nb(String(b),c,d)};H.b.u.Po=function(b){if(!H.b.u.zg.test(b))throw Error("Invalid tag name <"+b+">.");if(b.toUpperCase()in H.b.u.lk)throw Error("Tag name <"+b+"> is not allowed for SafeHtml.");};
H.b.u.xt=function(b,c,d,e){b&&H.b.H.K(b);var f={};f.src=b||null;f.srcdoc=c&&H.b.u.K(c);b=H.b.u.hd(f,{sandbox:""},d);return H.b.u.Nb("iframe",b,e)};H.b.u.Ct=function(b,c,d,e){if(!H.b.u.pl())throw Error("The browser does not support sandboxed iframes.");var f={};f.src=b?H.b.s.K(H.b.s.Td(b)):null;f.srcdoc=c||null;f.sandbox="";b=H.b.u.hd(f,{},d);return H.b.u.Nb("iframe",b,e)};H.b.u.pl=function(){return H.global.HTMLIFrameElement&&"sandbox"in H.global.HTMLIFrameElement.prototype};
H.b.u.Dt=function(b,c){H.b.H.K(b);b=H.b.u.hd({src:b},{},c);return H.b.u.Nb("script",b)};H.b.u.createScript=function(b,c){for(var d in c){var e=d.toLowerCase();if("language"==e||"src"==e||"text"==e||"type"==e)throw Error('Cannot set "'+e+'" attribute');}d="";b=H.g.concat(b);for(e=0;e<b.length;e++)d+=H.b.W.K(b[e]);b=H.b.u.Sa(d,H.i.j.aa.Za);return H.b.u.Nb("script",c,b)};
H.b.u.Et=function(b,c){c=H.b.u.hd({type:"text/css"},{},c);var d="";b=H.g.concat(b);for(var e=0;e<b.length;e++)d+=H.b.Y.K(b[e]);b=H.b.u.Sa(d,H.i.j.aa.Za);return H.b.u.Nb("style",c,b)};H.b.u.At=function(b,c){b=H.b.s.K(H.b.s.Td(b));(H.h.userAgent.B.Bd()||H.h.userAgent.B.Ab())&&H.c.A.contains(b,";")&&(b="'"+b.replace(/'/g,"%27")+"'");return H.b.u.Nb("meta",{"http-equiv":"refresh",content:(c||0)+"; url="+b})};
H.b.u.Yl=function(b,c,d){if(d instanceof H.c.M)d=H.c.M.K(d);else if("style"==c.toLowerCase())d=H.b.u.nm(d);else{if(/^on/i.test(c))throw Error('Attribute "'+c+'" requires goog.string.Const value, "'+d+'" given.');if(c.toLowerCase()in H.b.u.Hk)if(d instanceof H.b.H)d=H.b.H.K(d);else if(d instanceof H.b.s)d=H.b.s.K(d);else if(H.L(d))d=H.b.s.Td(d).Ga();else throw Error('Attribute "'+c+'" on tag "'+b+'" requires goog.html.SafeUrl, goog.string.Const, or string, value "'+d+'" given.');}d.Va&&(d=d.Ga());
return c+'="'+H.c.A.Ha(String(d))+'"'};H.b.u.nm=function(b){if(!H.Da(b))throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, '+typeof b+" given: "+b);b instanceof H.b.D||(b=H.b.D.create(b));return H.b.D.K(b)};H.b.u.Gt=function(b,c,d,e){c=H.b.u.create(c,d,e);c.md=b;return c};
H.b.u.join=function(b,c){function d(g){H.isArray(g)?H.g.forEach(g,d):(g=H.b.u.Ha(g),f.push(H.b.u.K(g)),g=g.vb(),e==H.i.j.aa.Za?e=g:g!=H.i.j.aa.Za&&e!=g&&(e=null))}b=H.b.u.Ha(b);var e=b.vb(),f=[];H.g.forEach(c,d);return H.b.u.Sa(f.join(H.b.u.K(b)),e)};H.b.u.concat=function(b){return H.b.u.join(H.b.u.EMPTY,Array.prototype.slice.call(arguments))};H.b.u.rt=function(b,c){var d=H.b.u.concat(H.g.slice(arguments,1));d.md=b;return d};H.b.u.wa={};H.b.u.Sa=function(b,c){return(new H.b.u).Qb(b,c)};
H.b.u.prototype.Qb=function(b,c){this.Id=H.b.Ya.ab?H.b.Ya.ab.createHTML(b):b;this.md=c;return this};H.b.u.Nb=function(b,c,d){var e=null;var f="<"+b+H.b.u.uo(b,c);H.zb(d)?H.isArray(d)||(d=[d]):d=[];H.a.tags.Ym(b.toLowerCase())?f+=">":(e=H.b.u.concat(d),f+=">"+H.b.u.K(e)+"</"+b+">",e=e.vb());(b=c&&c.dir)&&(e=/^(ltr|rtl|auto)$/i.test(b)?H.i.j.aa.Za:null);return H.b.u.Sa(f,e)};
H.b.u.uo=function(b,c){var d="";if(c)for(var e in c){if(!H.b.u.zg.test(e))throw Error('Invalid attribute name "'+e+'".');var f=c[e];H.zb(f)&&(d+=" "+H.b.u.Yl(b,e,f))}return d};H.b.u.hd=function(b,c,d){var e={},f;for(f in b)e[f]=b[f];for(f in c)e[f]=c[f];for(f in d){var g=f.toLowerCase();if(g in b)throw Error('Cannot override "'+g+'" attribute, got "'+f+'" with value "'+d[f]+'"');g in c&&delete e[g];e[f]=d[f]}return e};H.b.u.Rp=H.b.u.Sa("<!DOCTYPE html>",H.i.j.aa.Za);H.b.u.EMPTY=H.b.u.Sa("",H.i.j.aa.Za);
H.b.u.Xf=H.b.u.Sa("<br>",H.i.j.aa.Za);H.b.kb={};H.b.kb.Si=function(b,c){return H.b.u.Sa(c,null)};H.b.kb.Cw=function(b,c){return H.b.W.uc(c)};H.b.kb.Dw=function(b,c){return H.b.D.vc(c)};H.b.kb.Ew=function(b,c){return H.b.Y.wc(c)};H.b.kb.$n=function(b,c){return H.b.s.Ba(c)};H.b.kb.Cx=function(b,c){return H.b.H.xc(c)};H.a.O={};H.a.O.Mq={Zo:"afterbegin",$o:"afterend",qp:"beforebegin",rp:"beforeend"};H.a.O.$u=function(b,c,d){b.insertAdjacentHTML(c,H.b.u.Db(d))};H.a.O.zk={MATH:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0};H.a.O.Mm=H.V.ol(function(){if(H.sa&&"undefined"===typeof document)return!1;var b=document.createElement("div"),c=document.createElement("div");c.appendChild(document.createElement("div"));b.appendChild(c);if(H.sa&&!b.firstChild)return!1;c=b.firstChild.firstChild;b.innerHTML=H.b.u.Db(H.b.u.EMPTY);return!c.parentElement});
H.a.O.Ko=function(b,c){if(H.a.O.Mm())for(;b.lastChild;)b.removeChild(b.lastChild);b.innerHTML=H.b.u.Db(c)};H.a.O.xf=function(b,c){if(H.m.za&&H.a.O.zk[b.tagName.toUpperCase()])throw Error("goog.dom.safe.setInnerHtml cannot be used to set content of "+b.tagName+".");H.a.O.Ko(b,c)};H.a.O.Zw=function(b,c){b.outerHTML=H.b.u.Db(c)};H.a.O.Qw=function(b,c){c=c instanceof H.b.s?c:H.b.s.Pa(c);H.a.m.Yk(b).action=H.b.s.na(c)};H.a.O.Kw=function(b,c){c=c instanceof H.b.s?c:H.b.s.Pa(c);H.a.m.Wk(b).formAction=H.b.s.na(c)};
H.a.O.Vw=function(b,c){c=c instanceof H.b.s?c:H.b.s.Pa(c);H.a.m.al(b).formAction=H.b.s.na(c)};H.a.O.cx=function(b,c){b.style.cssText=H.b.D.K(c)};H.a.O.Il=function(b){b.write(H.b.u.Db(H.b.u.EMPTY))};H.a.O.Iw=function(b,c){H.a.m.Uk(b);c=c instanceof H.b.s?c:H.b.s.Pa(c);b.href=H.b.s.na(c)};H.a.O.io=function(b,c){H.a.m.$k(b);c=c instanceof H.b.s?c:H.b.s.Pa(c,/^data:image\//i.test(c));b.src=H.b.s.na(c)};
H.a.O.Jw=function(b,c){H.a.m.Vk(b);c=c instanceof H.b.s?c:H.b.s.Pa(c,/^data:audio\//i.test(c));b.src=H.b.s.na(c)};H.a.O.gx=function(b,c){H.a.m.dl(b);c=c instanceof H.b.s?c:H.b.s.Pa(c,/^data:video\//i.test(c));b.src=H.b.s.na(c)};H.a.O.Ow=function(b,c){H.a.m.Xk(b);b.src=H.b.H.Zd(c)};H.a.O.Sw=function(b,c){H.a.m.Zk(b);b.src=H.b.H.na(c)};H.a.O.ho=function(b){var c=H.b.H.Fc(H.c.M.EMPTY);H.a.m.Gg(b);b.src=H.b.H.na(c)};H.a.O.Uw=function(b,c){H.a.m.Gg(b);b.srcdoc=H.b.u.Db(c)};
H.a.O.Ww=function(b,c,d){H.a.m.bl(b);b.rel=d;H.c.A.fd(d,"stylesheet")?b.href=H.b.H.na(c):b.href=c instanceof H.b.H?H.b.H.na(c):c instanceof H.b.s?H.b.s.na(c):H.b.s.na(H.b.s.Pa(c))};H.a.O.Yw=function(b,c){H.a.m.cl(b);b.data=H.b.H.Zd(c)};H.a.O.mo=function(b,c){H.a.m.Hg(b);b.src=H.b.H.Zd(c);(c=H.Sh())&&b.setAttribute("nonce",c)};H.a.O.bx=function(b,c){H.a.m.Hg(b);b.text=H.b.W.pj(c);(c=H.Sh())&&b.setAttribute("nonce",c)};H.a.O.Xw=function(b,c){H.a.m.we(b);c=c instanceof H.b.s?c:H.b.s.Pa(c);b.href=H.b.s.na(c)};
H.a.O.Ys=function(b,c){H.a.m.we(b);c=c instanceof H.b.s?c:H.b.s.Pa(c);b.assign(H.b.s.na(c))};H.a.O.uw=function(b,c){H.a.m.we(b);c=c instanceof H.b.s?c:H.b.s.Pa(c);b.replace(H.b.s.na(c))};H.a.O.fw=function(b,c,d,e,f){b=b instanceof H.b.s?b:H.b.s.Pa(b);return(c||H.global).open(H.b.s.na(b),d?H.c.M.K(d):"",e,f)};H.a.O.hw=function(b,c){return H.a.O.parseFromString(b,c,"text/html")};H.a.O.parseFromString=function(b,c,d){return b.parseFromString(H.b.u.Db(c),d)};
H.a.O.yt=function(b){if(!/^image\/.*/g.test(b.type))throw Error("goog.dom.safe.createImageFromBlob only accepts MIME type image/.*.");var c=H.global.URL.createObjectURL(b);b=new H.global.Image;b.onload=function(){H.global.URL.revokeObjectURL(c)};H.a.O.io(b,H.b.kb.$n(H.c.M.from("Image blob URL."),c));return b};H.c.Uj=!1;H.c.Zj=!1;H.c.yg={lg:"\u00a0"};H.c.startsWith=H.c.A.startsWith;H.c.endsWith=H.c.A.endsWith;H.c.Ib=H.c.A.Ib;H.c.Og=H.c.A.Og;H.c.Pg=H.c.A.Pg;H.c.sx=function(b,c){for(var d=b.split("%s"),e="",f=Array.prototype.slice.call(arguments,1);f.length&&1<d.length;)e+=d.shift()+f.shift();return e+d.join("%s")};H.c.kt=function(b){return b.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")};H.c.Lc=H.c.A.Lc;H.c.nv=function(b){return 0==b.length};H.c.Ca=H.c.Lc;H.c.Hm=function(b){return H.c.Lc(H.c.on(b))};
H.c.mv=H.c.Hm;H.c.hv=function(b){return!/[^\t\n\r ]/.test(b)};H.c.ev=function(b){return!/[^a-zA-Z]/.test(b)};H.c.Av=function(b){return!/[^0-9]/.test(b)};H.c.fv=function(b){return!/[^a-zA-Z0-9]/.test(b)};H.c.Hv=function(b){return" "==b};H.c.Iv=function(b){return 1==b.length&&" "<=b&&"~">=b||"\u0080"<=b&&"\ufffd">=b};H.c.qx=function(b){return b.replace(/(\r\n|\r|\n)+/g," ")};H.c.rl=function(b){return b.replace(/(\r\n|\r|\n)/g,"\n")};H.c.bw=function(b){return b.replace(/\xa0|\s/g," ")};
H.c.aw=function(b){return b.replace(/\xa0|[ \t]+/g," ")};H.c.jt=function(b){return b.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")};H.c.trim=H.c.A.trim;H.c.trimLeft=function(b){return b.replace(/^[\s\xa0]+/,"")};H.c.trimRight=function(b){return b.replace(/[\s\xa0]+$/,"")};H.c.ed=H.c.A.ed;
H.c.Ni=function(b,c,d){if(b==c)return 0;if(!b)return-1;if(!c)return 1;for(var e=b.toLowerCase().match(d),f=c.toLowerCase().match(d),g=Math.min(e.length,f.length),h=0;h<g;h++){d=e[h];var k=f[h];if(d!=k)return b=parseInt(d,10),!isNaN(b)&&(c=parseInt(k,10),!isNaN(c)&&b-c)?b-c:d<k?-1:1}return e.length!=f.length?e.length-f.length:b<c?-1:1};H.c.cv=function(b,c){return H.c.Ni(b,c,/\d+|\D+/g)};H.c.Vl=function(b,c){return H.c.Ni(b,c,/\d+|\.\d+|\D+/g)};H.c.dw=H.c.Vl;H.c.Rc=function(b){return encodeURIComponent(String(b))};
H.c.$d=function(b){return decodeURIComponent(b.replace(/\+/g," "))};H.c.Nc=H.c.A.Nc;H.c.Ha=function(b,c){b=H.c.A.Ha(b,c);H.c.Uj&&(b=b.replace(H.c.Yj,"&#101;"));return b};H.c.Yj=/e/g;H.c.nj=function(b){return H.c.contains(b,"&")?!H.c.Zj&&"document"in H.global?H.c.oj(b):H.c.Ho(b):b};H.c.Dx=function(b,c){return H.c.contains(b,"&")?H.c.oj(b,c):b};
H.c.oj=function(b,c){var d={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'};var e=c?c.createElement("div"):H.global.document.createElement("div");return b.replace(H.c.dk,function(f,g){var h=d[f];if(h)return h;"#"==g.charAt(0)&&(g=Number("0"+g.substr(1)),isNaN(g)||(h=String.fromCharCode(g)));h||(H.a.O.xf(e,H.b.kb.Si(H.c.M.from("Single HTML entity."),f+" ")),h=e.firstChild.nodeValue.slice(0,-1));return d[f]=h})};
H.c.Ho=function(b){return b.replace(/&([^;]+);/g,function(c,d){switch(d){case "amp":return"&";case "lt":return"<";case "gt":return">";case "quot":return'"';default:return"#"!=d.charAt(0)||(d=Number("0"+d.substr(1)),isNaN(d))?c:String.fromCharCode(d)}})};H.c.dk=/&([^;\s<&]+);?/g;H.c.sj=function(b){return H.c.Nc(b.replace(/  /g," &#160;"),void 0)};H.c.jw=function(b){return b.replace(/(^|[\n ]) /g,"$1"+H.c.yg.lg)};
H.c.rx=function(b,c){for(var d=c.length,e=0;e<d;e++){var f=1==d?c:c.charAt(e);if(b.charAt(0)==f&&b.charAt(b.length-1)==f)return b.substring(1,b.length-1)}return b};H.c.truncate=function(b,c,d){d&&(b=H.c.nj(b));b.length>c&&(b=b.substring(0,c-3)+"...");d&&(b=H.c.Ha(b));return b};H.c.Bx=function(b,c,d,e){d&&(b=H.c.nj(b));e&&b.length>c?(e>c&&(e=c),b=b.substring(0,c-e)+"..."+b.substring(b.length-e)):b.length>c&&(e=Math.floor(c/2),b=b.substring(0,e+c%2)+"..."+b.substring(b.length-e));d&&(b=H.c.Ha(b));return b};
H.c.Bf={"\x00":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\x0B",'"':'\\"',"\\":"\\\\","<":"\\u003C"};H.c.Cd={"'":"\\'"};H.c.quote=function(b){b=String(b);for(var c=['"'],d=0;d<b.length;d++){var e=b.charAt(d),f=e.charCodeAt(0);c[d+1]=H.c.Bf[e]||(31<f&&127>f?e:H.c.gh(e))}c.push('"');return c.join("")};H.c.Vt=function(b){for(var c=[],d=0;d<b.length;d++)c[d]=H.c.gh(b.charAt(d));return c.join("")};
H.c.gh=function(b){if(b in H.c.Cd)return H.c.Cd[b];if(b in H.c.Bf)return H.c.Cd[b]=H.c.Bf[b];var c=b.charCodeAt(0);if(31<c&&127>c)var d=b;else{if(256>c){if(d="\\x",16>c||256<c)d+="0"}else d="\\u",4096>c&&(d+="0");d+=c.toString(16).toUpperCase()}return H.c.Cd[b]=d};H.c.contains=H.c.A.contains;H.c.fd=H.c.A.fd;H.c.ut=function(b,c){return b&&c?b.split(c).length-1:0};H.c.kc=A();H.c.remove=function(b,c){return b.replace(c,"")};H.c.ow=function(b,c){c=new RegExp(H.c.rf(c),"g");return b.replace(c,"")};
H.c.tw=function(b,c,d){c=new RegExp(H.c.rf(c),"g");return b.replace(c,d.replace(/\$/g,"$$$$"))};H.c.rf=function(b){return String(b).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")};H.c.repeat=String.prototype.repeat?function(b,c){return b.repeat(c)}:function(b,c){return Array(c+1).join(b)};H.c.gw=function(b,c,d){b=H.ca(d)?b.toFixed(d):String(b);d=b.indexOf(".");-1==d&&(d=b.length);return H.c.repeat("0",Math.max(0,c-d))+b};H.c.on=function(b){return null==b?"":String(b)};
H.c.nl=function(b){return Array.prototype.join.call(arguments,"")};H.c.Ph=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^H.now()).toString(36)};H.c.Kb=H.c.A.Kb;H.c.Wu=function(b){for(var c=0,d=0;d<b.length;++d)c=31*c+b.charCodeAt(d)>>>0;return c};H.c.Io=2147483648*Math.random()|0;H.c.Ft=function(){return"goog_"+H.c.Io++};H.c.xx=function(b){var c=Number(b);return 0==c&&H.c.Lc(b)?NaN:c};H.c.tv=function(b){return/^[a-z]+([A-Z][a-z]*)*$/.test(b)};
H.c.Jv=function(b){return/^([A-Z][a-z]*)+$/.test(b)};H.c.wx=function(b){return String(b).replace(/\-([a-z])/g,function(c,d){return d.toUpperCase()})};H.c.yx=function(b){return String(b).replace(/([A-Z])/g,"-$1").toLowerCase()};H.c.zx=function(b,c){c=H.L(c)?H.c.rf(c):"\\s";return b.replace(new RegExp("(^"+(c?"|["+c+"]+":"")+")([a-z])","g"),function(d,e,f){return e+f.toUpperCase()})};H.c.ft=function(b){return String(b.charAt(0)).toUpperCase()+String(b.substr(1)).toLowerCase()};
H.c.parseInt=function(b){isFinite(b)&&(b=String(b));return H.L(b)?/^\s*-?0x/i.test(b)?parseInt(b,16):parseInt(b,10):NaN};H.c.kx=function(b,c,d){b=b.split(c);for(var e=[];0<d&&b.length;)e.push(b.shift()),d--;b.length&&e.push(b.join(c));return e};H.c.Mv=function(b,c){if(c)typeof c==y&&(c=[c]);else return b;for(var d=-1,e=0;e<c.length;e++)if(""!=c[e]){var f=b.lastIndexOf(c[e]);f>d&&(d=f)}return-1==d?b:b.slice(d+1)};
H.c.Ot=function(b,c){var d=[],e=[];if(b==c)return 0;if(!b.length||!c.length)return Math.max(b.length,c.length);for(var f=0;f<c.length+1;f++)d[f]=f;for(f=0;f<b.length;f++){e[0]=f+1;for(var g=0;g<c.length;g++)e[g+1]=Math.min(e[g]+1,d[g+1]+1,d[g]+Number(b[f]!=c[g]));for(g=0;g<d.length;g++)d[g]=e[g]}return e[c.length]};H.h.userAgent.ea={};H.h.userAgent.ea.Rm=function(){return H.h.userAgent.F.T("Presto")};H.h.userAgent.ea.Vm=function(){return H.h.userAgent.F.T("Trident")||H.h.userAgent.F.T("MSIE")};H.h.userAgent.ea.Ab=function(){return H.h.userAgent.F.T("Edge")};H.h.userAgent.ea.yi=function(){return H.h.userAgent.F.nf("WebKit")&&!H.h.userAgent.ea.Ab()};H.h.userAgent.ea.Jm=function(){return H.h.userAgent.F.T("Gecko")&&!H.h.userAgent.ea.yi()&&!H.h.userAgent.ea.Vm()&&!H.h.userAgent.ea.Ab()};
H.h.userAgent.ea.Hc=function(){var b=H.h.userAgent.F.cc();if(b){b=H.h.userAgent.F.jh(b);var c=H.h.userAgent.ea.dm(b);if(c)return"Gecko"==c[0]?H.h.userAgent.ea.rm(b):c[1];b=b[0];var d;if(b&&(d=b[2])&&(d=/Trident\/([^\s;]+)/.exec(d)))return d[1]}return""};H.h.userAgent.ea.dm=function(b){if(!H.h.userAgent.ea.Ab())return b[1];for(var c=0;c<b.length;c++){var d=b[c];if("Edge"==d[0])return d}};H.h.userAgent.ea.Xa=function(b){return 0<=H.c.Kb(H.h.userAgent.ea.Hc(),b)};
H.h.userAgent.ea.rm=function(b){return(b=H.g.find(b,function(c){return"Firefox"==c[0]}))&&b[1]||""};H.async.jj=function(b){H.global.setTimeout(function(){throw b;},0)};H.async.Na=function(b,c,d){var e=b;c&&(e=H.bind(b,c));e=H.async.Na.tj(e);H.Wa(H.global.setImmediate)&&(d||H.async.Na.No())?H.global.setImmediate(e):(H.async.Na.Zi||(H.async.Na.Zi=H.async.Na.mm()),H.async.Na.Zi(e))};H.async.Na.No=function(){return H.global.Window&&H.global.Window.prototype&&!H.h.userAgent.B.Ab()&&H.global.Window.prototype.setImmediate==H.global.setImmediate?!1:!0};
H.async.Na.mm=function(){var b=H.global.MessageChannel;"undefined"===typeof b&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!H.h.userAgent.ea.Rm()&&(b=function(){var f=document.createElement("IFRAME");f.style.display="none";H.a.O.ho(f);document.documentElement.appendChild(f);var g=f.contentWindow;f=g.document;f.open();H.a.O.Il(f);f.close();var h="callImmediate"+Math.random(),k="file:"==g.location.protocol?"*":g.location.protocol+"//"+g.location.host;f=H.bind(function(m){if(("*"==
k||m.origin==k)&&m.data==h)this.port1.onmessage()},this);g.addEventListener("message",f,!1);this.port1={};this.port2={postMessage:function(){g.postMessage(h,k)}}});if("undefined"!==typeof b&&!H.h.userAgent.B.Bd()){var c=new b,d={},e=d;c.port1.onmessage=function(){if(H.ca(d.next)){d=d.next;var f=d.Qg;d.Qg=null;f()}};return function(f){e.next={Qg:f};e=e.next;c.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement(l)?function(f){var g=document.createElement(l);
g.onreadystatechange=function(){g.onreadystatechange=null;g.parentNode.removeChild(g);g=null;f();f=null};document.documentElement.appendChild(g)}:function(f){H.global.setTimeout(f,0)}};H.async.Na.tj=H.V.ai;H.debug.pa.register(function(b){H.async.Na.tj=b});H.async.gb=function(){this.be=this.nc=null};H.async.gb.ge=100;H.async.gb.Ec=new H.async.Wc(function(){return new H.async.re},function(b){b.reset()},H.async.gb.ge);H.async.gb.prototype.add=function(b,c){var d=H.async.gb.Ec.get();d.set(b,c);this.be?this.be.next=d:this.nc=d;this.be=d};H.async.gb.prototype.remove=function(){var b=null;this.nc&&(b=this.nc,this.nc=this.nc.next,this.nc||(this.be=null),b.next=null);return b};H.async.re=function(){this.next=this.scope=this.Je=null};
H.async.re.prototype.set=function(b,c){this.Je=b;this.scope=c;this.next=null};H.async.re.prototype.reset=function(){this.next=this.scope=this.Je=null};H.Dj=!1;H.async.X=function(b,c){H.async.X.Ud||H.async.X.Dm();H.async.X.ae||(H.async.X.Ud(),H.async.X.ae=!0);H.async.X.Jf.add(b,c)};H.async.X.Dm=function(){if(H.Dj||H.global.Promise&&H.global.Promise.resolve){var b=H.global.Promise.resolve(void 0);H.async.X.Ud=function(){b.then(H.async.X.Od)}}else H.async.X.Ud=function(){H.async.Na(H.async.X.Od)}};H.async.X.du=function(b){H.async.X.Ud=function(){H.async.Na(H.async.X.Od);b&&b(H.async.X.Od)}};H.async.X.ae=!1;H.async.X.Jf=new H.async.gb;
H.sa&&(H.async.X.xw=function(){H.async.X.ae=!1;H.async.X.Jf=new H.async.gb});H.async.X.Od=function(){for(var b;b=H.async.X.Jf.remove();){try{b.Je.call(b.scope)}catch(c){H.async.jj(c)}H.async.gb.Ec.put(b)}H.async.X.ae=!1};H.h.userAgent.platform={};H.h.userAgent.platform.gi=function(){return H.h.userAgent.F.T("Android")};H.h.userAgent.platform.ri=function(){return H.h.userAgent.F.T("iPod")};H.h.userAgent.platform.pi=function(){return H.h.userAgent.F.T("iPhone")&&!H.h.userAgent.F.T("iPod")&&!H.h.userAgent.F.T("iPad")};H.h.userAgent.platform.oi=function(){return H.h.userAgent.F.T("iPad")};H.h.userAgent.platform.ni=function(){return H.h.userAgent.platform.pi()||H.h.userAgent.platform.oi()||H.h.userAgent.platform.ri()};
H.h.userAgent.platform.ti=function(){return H.h.userAgent.F.T("Macintosh")};H.h.userAgent.platform.Om=function(){return H.h.userAgent.F.T("Linux")};H.h.userAgent.platform.Bi=function(){return H.h.userAgent.F.T("Windows")};H.h.userAgent.platform.ii=function(){return H.h.userAgent.F.T("CrOS")};H.h.userAgent.platform.iv=function(){return H.h.userAgent.F.T("CrKey")};H.h.userAgent.platform.si=function(){return H.h.userAgent.F.nf("KaiOS")};H.h.userAgent.platform.Km=function(){return H.h.userAgent.F.nf("GAFP")};
H.h.userAgent.platform.Hc=function(){var b=H.h.userAgent.F.cc(),c="";H.h.userAgent.platform.Bi()?(c=/Windows (?:NT|Phone) ([0-9.]+)/,c=(b=c.exec(b))?b[1]:"0.0"):H.h.userAgent.platform.ni()?(c=/(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/,c=(b=c.exec(b))&&b[1].replace(/_/g,".")):H.h.userAgent.platform.ti()?(c=/Mac OS X ([0-9_.]+)/,c=(b=c.exec(b))?b[1].replace(/_/g,"."):"10"):H.h.userAgent.platform.si()?(c=/(?:KaiOS)\/(\S+)/i,c=(b=c.exec(b))&&b[1]):H.h.userAgent.platform.gi()?(c=/Android\s+([^\);]+)(\)|;)/,
c=(b=c.exec(b))&&b[1]):H.h.userAgent.platform.ii()&&(c=/(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/,c=(b=c.exec(b))&&b[1]);return c||""};H.h.userAgent.platform.Xa=function(b){return 0<=H.c.Kb(H.h.userAgent.platform.Hc(),b)};H.ib={};H.ib.object=function(b,c){return c};H.ib.Af=function(b){H.ib.Af[" "](b);return b};H.ib.Af[" "]=H.Rb;H.ib.dt=function(b,c){try{return H.ib.Af(b[c]),!0}catch(d){}return!1};H.ib.cache=function(b,c,d,e){e=e?e(c):c;return Object.prototype.hasOwnProperty.call(b,e)?b[e]:b[e]=d(c)};H.userAgent={};H.userAgent.Pf=!1;H.userAgent.Nf=!1;H.userAgent.Of=!1;H.userAgent.Uf=!1;H.userAgent.fe=!1;H.userAgent.Sf=!1;H.userAgent.zj=!1;H.userAgent.pc=H.userAgent.Pf||H.userAgent.Nf||H.userAgent.Of||H.userAgent.fe||H.userAgent.Uf||H.userAgent.Sf;H.userAgent.pm=function(){return H.h.userAgent.F.cc()};H.userAgent.We=function(){return H.global.navigator||null};H.userAgent.Du=function(){return H.userAgent.We()};H.userAgent.og=H.userAgent.pc?H.userAgent.Sf:H.h.userAgent.B.ff();
H.userAgent.oa=H.userAgent.pc?H.userAgent.Pf:H.h.userAgent.B.Bd();H.userAgent.ag=H.userAgent.pc?H.userAgent.Nf:H.h.userAgent.ea.Ab();H.userAgent.Vp=H.userAgent.ag||H.userAgent.oa;H.userAgent.he=H.userAgent.pc?H.userAgent.Of:H.h.userAgent.ea.Jm();H.userAgent.sc=H.userAgent.pc?H.userAgent.Uf||H.userAgent.fe:H.h.userAgent.ea.yi();H.userAgent.Qm=function(){return H.userAgent.sc&&H.h.userAgent.F.T("Mobile")};H.userAgent.gr=H.userAgent.fe||H.userAgent.Qm();H.userAgent.Hr=H.userAgent.sc;
H.userAgent.Fl=function(){var b=H.userAgent.We();return b&&b.platform||""};H.userAgent.xr=H.userAgent.Fl();H.userAgent.Rf=!1;H.userAgent.Vf=!1;H.userAgent.Qf=!1;H.userAgent.Wf=!1;H.userAgent.Mf=!1;H.userAgent.de=!1;H.userAgent.ce=!1;H.userAgent.ee=!1;H.userAgent.Cj=!1;H.userAgent.Bj=!1;H.userAgent.Ra=H.userAgent.Rf||H.userAgent.Vf||H.userAgent.Qf||H.userAgent.Wf||H.userAgent.Mf||H.userAgent.de||H.userAgent.ce||H.userAgent.ee;H.userAgent.Xq=H.userAgent.Ra?H.userAgent.Rf:H.h.userAgent.platform.ti();
H.userAgent.ws=H.userAgent.Ra?H.userAgent.Vf:H.h.userAgent.platform.Bi();H.userAgent.Nm=function(){return H.h.userAgent.platform.Om()||H.h.userAgent.platform.ii()};H.userAgent.Vq=H.userAgent.Ra?H.userAgent.Qf:H.userAgent.Nm();H.userAgent.Zm=function(){var b=H.userAgent.We();return!!b&&H.c.contains(b.appVersion||"","X11")};H.userAgent.xs=H.userAgent.Ra?H.userAgent.Wf:H.userAgent.Zm();H.userAgent.ap=H.userAgent.Ra?H.userAgent.Mf:H.h.userAgent.platform.gi();
H.userAgent.Jq=H.userAgent.Ra?H.userAgent.de:H.h.userAgent.platform.pi();H.userAgent.Iq=H.userAgent.Ra?H.userAgent.ce:H.h.userAgent.platform.oi();H.userAgent.Kq=H.userAgent.Ra?H.userAgent.ee:H.h.userAgent.platform.ri();H.userAgent.Hq=H.userAgent.Ra?H.userAgent.de||H.userAgent.ce||H.userAgent.ee:H.h.userAgent.platform.ni();H.userAgent.Nq=H.userAgent.Ra?H.userAgent.Cj:H.h.userAgent.platform.si();H.userAgent.nq=H.userAgent.Ra?H.userAgent.Bj:H.h.userAgent.platform.Km();
H.userAgent.Gl=function(){var b="",c=H.userAgent.sm();c&&(b=c?c[1]:"");return H.userAgent.oa&&(c=H.userAgent.xh(),null!=c&&c>parseFloat(b))?String(c):b};H.userAgent.sm=function(){var b=H.userAgent.pm();if(H.userAgent.he)return/rv:([^\);]+)(\)|;)/.exec(b);if(H.userAgent.ag)return/Edge\/([\d\.]+)/.exec(b);if(H.userAgent.oa)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(b);if(H.userAgent.sc)return/WebKit\/(\S+)/.exec(b);if(H.userAgent.og)return/(?:Version)[ \/]?(\S+)/.exec(b)};
H.userAgent.xh=function(){var b=H.global.document;return b?b.documentMode:void 0};H.userAgent.VERSION=H.userAgent.Gl();H.userAgent.compare=function(b,c){return H.c.Kb(b,c)};H.userAgent.Xm={};H.userAgent.Xa=function(b){return H.userAgent.zj||H.ib.cache(H.userAgent.Xm,b,function(){return 0<=H.c.Kb(H.userAgent.VERSION,b)})};H.userAgent.Kv=H.userAgent.Xa;H.userAgent.Kc=function(b){return Number(H.userAgent.Xj)>=b};H.userAgent.lv=H.userAgent.Kc;var fa;
fa=H.global.document&&H.userAgent.oa?H.userAgent.xh():void 0;H.userAgent.Xj=fa;H.a.ha={};H.a.ha.Ej=!1;H.a.ha.Fj=!1;H.a.ha.El=function(){try{return!!(new self.OffscreenCanvas(0,0)).getContext("2d")}catch(b){}return!1};H.a.ha.pr=!H.a.ha.Ej&&(H.a.ha.Fj||H.a.ha.El());H.a.ha.Kj=!H.userAgent.oa||H.userAgent.Kc(9);H.a.ha.Lj=!H.userAgent.he&&!H.userAgent.oa||H.userAgent.oa&&H.userAgent.Kc(9)||H.userAgent.he&&H.userAgent.Xa("1.9.1");H.a.ha.Yf=H.userAgent.oa&&!H.userAgent.Xa("9");H.a.ha.Mj=H.userAgent.oa||H.userAgent.og||H.userAgent.sc;H.a.ha.ek=H.userAgent.oa;
H.a.ha.Rq=H.userAgent.oa&&!H.userAgent.Kc(9);H.C={};H.C.lw=function(b){return Math.floor(Math.random()*b)};H.C.Ex=function(b,c){return b+Math.random()*(c-b)};H.C.ht=function(b,c,d){return Math.min(Math.max(b,c),d)};H.C.Li=function(b,c){b%=c;return 0>b*c?b+c:b};H.C.Nv=function(b,c,d){return b+d*(c-b)};H.C.Yv=function(b,c,d){return Math.abs(b-c)<=(d||1E-6)};H.C.Df=function(b){return H.C.Li(b,360)};H.C.nx=function(b){return H.C.Li(b,2*Math.PI)};H.C.mj=function(b){return b*Math.PI/180};H.C.yo=function(b){return 180*b/Math.PI};
H.C.Es=function(b,c){return c*Math.cos(H.C.mj(b))};H.C.Fs=function(b,c){return c*Math.sin(H.C.mj(b))};H.C.angle=function(b,c,d,e){return H.C.Df(H.C.yo(Math.atan2(e-c,d-b)))};H.C.Ds=function(b,c){b=H.C.Df(c)-H.C.Df(b);180<b?b-=360:-180>=b&&(b=360+b);return b};H.C.sign=function(b){return 0<b?1:0>b?-1:b};
H.C.Rv=function(b,c,d,e){d=d||function(r,w){return r==w};e=e||function(r){return b[r]};for(var f=b.length,g=c.length,h=[],k=0;k<f+1;k++)h[k]=[],h[k][0]=0;for(var m=0;m<g+1;m++)h[0][m]=0;for(k=1;k<=f;k++)for(m=1;m<=g;m++)d(b[k-1],c[m-1])?h[k][m]=h[k-1][m-1]+1:h[k][m]=Math.max(h[k-1][m],h[k][m-1]);var n=[];k=f;for(m=g;0<k&&0<m;)d(b[k-1],c[m-1])?(n.unshift(e(k-1,m-1)),k--,m--):h[k-1][m]>h[k][m-1]?k--:m--;return n};H.C.Ff=function(b){return H.g.reduce(arguments,function(c,d){return c+d},0)};
H.C.fl=function(b){return H.C.Ff.apply(null,arguments)/arguments.length};H.C.ao=function(b){var c=arguments.length;if(2>c)return 0;var d=H.C.fl.apply(null,arguments);return H.C.Ff.apply(null,H.g.map(arguments,function(e){return Math.pow(e-d,2)}))/(c-1)};H.C.ox=function(b){return Math.sqrt(H.C.ao.apply(null,arguments))};H.C.rv=function(b){return isFinite(b)&&0==b%1};H.C.ov=function(b){return isFinite(b)};H.C.wv=function(b){return 0==b&&0>1/b};
H.C.Qv=function(b){if(0<b){var c=Math.round(Math.log(b)*Math.LOG10E);return c-(parseFloat("1e"+c)>b?1:0)}return 0==b?-Infinity:NaN};H.C.Aw=function(b,c){return Math.floor(b+(c||2E-15))};H.C.zw=function(b,c){return Math.ceil(b-(c||2E-15))};H.C.ia=function(b,c){this.x=H.ca(b)?b:0;this.y=H.ca(c)?c:0};H.C.ia.prototype.clone=function(){return new H.C.ia(this.x,this.y)};H.sa&&(H.C.ia.prototype.toString=function(){return"("+this.x+", "+this.y+")"});H.C.ia.prototype.Ob=function(b){return b instanceof H.C.ia&&H.C.ia.Ob(this,b)};H.C.ia.Ob=function(b,c){return b==c?!0:b&&c?b.x==c.x&&b.y==c.y:!1};H.C.ia.Mt=function(b,c){var d=b.x-c.x;b=b.y-c.y;return Math.sqrt(d*d+b*b)};H.C.ia.Sv=function(b){return Math.sqrt(b.x*b.x+b.y*b.y)};
H.C.ia.azimuth=function(b){return H.C.angle(0,0,b.x,b.y)};H.C.ia.lx=function(b,c){var d=b.x-c.x;b=b.y-c.y;return d*d+b*b};H.C.ia.Lt=function(b,c){return new H.C.ia(b.x-c.x,b.y-c.y)};H.C.ia.Ff=function(b,c){return new H.C.ia(b.x+c.x,b.y+c.y)};F=H.C.ia.prototype;F.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};F.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};F.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};
F.translate=function(b,c){b instanceof H.C.ia?(this.x+=b.x,this.y+=b.y):(this.x+=Number(b),H.Bb(c)&&(this.y+=c));return this};F.scale=function(b,c){c=H.Bb(c)?c:b;this.x*=b;this.y*=c;return this};H.C.Yb=function(b,c){this.width=b;this.height=c};H.C.Yb.Ob=function(b,c){return b==c?!0:b&&c?b.width==c.width&&b.height==c.height:!1};H.C.Yb.prototype.clone=function(){return new H.C.Yb(this.width,this.height)};H.sa&&(H.C.Yb.prototype.toString=function(){return"("+this.width+" x "+this.height+")"});F=H.C.Yb.prototype;F.aspectRatio=function(){return this.width/this.height};F.Ca=function(){return!(this.width*this.height)};
F.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};F.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};F.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};F.scale=function(b,c){c=H.Bb(c)?c:b;this.width*=b;this.height*=c;return this};H.a.Gj=!1;H.a.Tf=!1;H.a.Qj=H.a.Gj||H.a.Tf;H.a.Qe=function(b){return b?new H.a.Vb(H.a.xb(b)):H.a.Cl||(H.a.Cl=new H.a.Vb)};H.a.Zl=function(){return document};H.a.Re=function(b){return H.a.Ue(document,b)};H.a.Ue=function(b,c){return H.L(c)?b.getElementById(c):c};H.a.jm=function(b){return H.a.Rh(document,b)};H.a.Rh=function(b,c){return H.a.Ue(b,c)};H.a.vj=H.a.Re;H.a.getElementsByTagName=function(b,c){return(c||document).getElementsByTagName(String(b))};
H.a.Ve=function(b,c,d){return H.a.qd(document,b,c,d)};H.a.cm=function(b,c,d){return H.a.Te(document,b,c,d)};H.a.Ah=function(b,c){var d=c||document;return H.a.ze(d)?d.querySelectorAll("."+b):H.a.qd(document,"*",b,c)};H.a.Se=function(b,c){var d=c||document;return(d.getElementsByClassName?d.getElementsByClassName(b)[0]:H.a.Te(document,"*",b,c))||null};H.a.Qh=function(b,c){return H.a.Se(b,c)};H.a.ze=function(b){return!(!b.querySelectorAll||!b.querySelector)};
H.a.qd=function(b,c,d,e){b=e||b;c=c&&"*"!=c?String(c).toUpperCase():"";if(H.a.ze(b)&&(c||d))return b.querySelectorAll(c+(d?"."+d:""));if(d&&b.getElementsByClassName){b=b.getElementsByClassName(d);if(c){e={};for(var f=0,g=0,h;h=b[g];g++)c==h.nodeName&&(e[f++]=h);e.length=f;return e}return b}b=b.getElementsByTagName(c||"*");if(d){e={};for(g=f=0;h=b[g];g++)c=h.className,typeof c.split==t&&H.g.contains(c.split(/\s+/),d)&&(e[f++]=h);e.length=f;return e}return b};
H.a.Te=function(b,c,d,e){var f=e||b,g=c&&"*"!=c?String(c).toUpperCase():"";return H.a.ze(f)&&(g||d)?f.querySelector(g+(d?"."+d:"")):H.a.qd(b,c,d,e)[0]||null};H.a.wj=H.a.Ve;H.a.Wd=function(b,c){H.object.forEach(c,function(d,e){d&&typeof d==v&&d.Va&&(d=d.Ga());"style"==e?b.style.cssText=d:"class"==e?b.className=d:"for"==e?b.htmlFor=d:H.a.$f.hasOwnProperty(e)?b.setAttribute(H.a.$f[e],d):H.c.startsWith(e,"aria-")||H.c.startsWith(e,"data-")?b.setAttribute(e,d):b[e]=d})};
H.a.$f={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};H.a.Wh=function(b){return H.a.Xh(b||window)};H.a.Xh=function(b){b=b.document;b=H.a.Jc(b)?b.documentElement:b.body;return new H.C.Yb(b.clientWidth,b.clientHeight)};H.a.$l=function(){return H.a.Oe(window)};H.a.wu=function(b){return H.a.Oe(b)};
H.a.Oe=function(b){var c=b.document,d=0;if(c){d=c.body;var e=c.documentElement;if(!e||!d)return 0;b=H.a.Xh(b).height;if(H.a.Jc(c)&&e.scrollHeight)d=e.scrollHeight!=b?e.scrollHeight:e.offsetHeight;else{c=e.scrollHeight;var f=e.offsetHeight;e.clientHeight!=f&&(c=d.scrollHeight,f=d.offsetHeight);d=c>b?c>f?c:f:c<f?c:f}}return d};H.a.Fu=function(b){return H.a.Qe((b||H.global||window).document).yh()};H.a.yh=function(){return H.a.zh(document)};
H.a.zh=function(b){var c=H.a.Pe(b);b=H.a.ec(b);return H.userAgent.oa&&H.userAgent.Xa("10")&&b.pageYOffset!=c.scrollTop?new H.C.ia(c.scrollLeft,c.scrollTop):new H.C.ia(b.pageXOffset||c.scrollLeft,b.pageYOffset||c.scrollTop)};H.a.am=function(){return H.a.Pe(document)};H.a.Pe=function(b){return b.scrollingElement?b.scrollingElement:!H.userAgent.sc&&H.a.Jc(b)?b.documentElement:b.body||b.documentElement};H.a.dc=function(b){return b?H.a.ec(b):window};H.a.ec=function(b){return b.parentWindow||b.defaultView};
H.a.Ce=function(b,c,d){return H.a.Yg(document,arguments)};H.a.Yg=function(b,c){var d=String(c[0]),e=c[1];if(!H.a.ha.Kj&&e&&(e.name||e.type)){d=["<",d];e.name&&d.push(' name="',H.c.Ha(e.name),'"');if(e.type){d.push(' type="',H.c.Ha(e.type),'"');var f={};H.object.extend(f,e);delete f.type;e=f}d.push(">");d=d.join("")}d=b.createElement(d);e&&(H.L(e)?d.className=e:H.isArray(e)?d.className=e.join(" "):H.a.Wd(d,e));2<c.length&&H.a.Eg(b,d,c,2);return d};
H.a.Eg=function(b,c,d,e){function f(h){h&&c.appendChild(H.L(h)?b.createTextNode(h):h)}for(;e<d.length;e++){var g=d[e];H.ma(g)&&!H.a.df(g)?H.g.forEach(H.a.ef(g)?H.g.jb(g):g,f):f(g)}};H.a.xj=H.a.Ce;H.a.createElement=function(b){return H.a.rb(document,b)};H.a.rb=function(b,c){return b.createElement(String(c))};H.a.createTextNode=function(b){return document.createTextNode(String(b))};H.a.zl=function(b,c,d){return H.a.Zg(document,b,c,!!d)};
H.a.Zg=function(b,c,d,e){for(var f=H.a.rb(b,"TABLE"),g=f.appendChild(H.a.rb(b,"TBODY")),h=0;h<c;h++){for(var k=H.a.rb(b,"TR"),m=0;m<d;m++){var n=H.a.rb(b,"TD");e&&H.a.yf(n,H.c.yg.lg);k.appendChild(n)}g.appendChild(k)}return f};H.a.st=function(b){var c=H.g.map(arguments,H.c.M.K);c=H.b.kb.Si(H.c.M.from("Constant HTML string, that gets turned into a Node later, so it will be automatically balanced."),c.join(""));return H.a.Ti(c)};H.a.Ti=function(b){return H.a.Ui(document,b)};
H.a.Ui=function(b,c){var d=H.a.rb(b,"DIV");H.a.ha.ek?(H.a.O.xf(d,H.b.u.concat(H.b.u.Xf,c)),d.removeChild(d.firstChild)):H.a.O.xf(d,c);return H.a.tl(b,d)};H.a.tl=function(b,c){if(1==c.childNodes.length)return c.removeChild(c.firstChild);for(b=b.createDocumentFragment();c.firstChild;)b.appendChild(c.firstChild);return b};H.a.Fm=function(){return H.a.Jc(document)};H.a.Jc=function(b){return H.a.Qj?H.a.Tf:"CSS1Compat"==b.compatMode};H.a.canHaveChildren=function(b){if(b.nodeType!=H.a.ua.mb)return!1;switch(b.tagName){case "APPLET":case "AREA":case "BASE":case "BR":case "COL":case "COMMAND":case "EMBED":case "FRAME":case "HR":case "IMG":case "INPUT":case "IFRAME":case "ISINDEX":case "KEYGEN":case "LINK":case "NOFRAMES":case "NOSCRIPT":case "META":case "OBJECT":case "PARAM":case l:case "SOURCE":case "STYLE":case "TRACK":case "WBR":return!1}return!0};
H.a.appendChild=function(b,c){b.appendChild(c)};H.a.append=function(b,c){H.a.Eg(H.a.xb(b),b,arguments,1)};H.a.tf=function(b){for(var c;c=b.firstChild;)b.removeChild(c)};H.a.ei=function(b,c){c.parentNode&&c.parentNode.insertBefore(b,c)};H.a.di=function(b,c){c.parentNode&&c.parentNode.insertBefore(b,c.nextSibling)};H.a.ci=function(b,c,d){b.insertBefore(c,b.childNodes[d]||null)};H.a.removeNode=function(b){return b&&b.parentNode?b.parentNode.removeChild(b):null};
H.a.Ri=function(b,c){var d=c.parentNode;d&&d.replaceChild(b,c)};H.a.oh=function(b){var c,d=b.parentNode;if(d&&d.nodeType!=H.a.ua.Wj){if(b.removeNode)return b.removeNode(!1);for(;c=b.firstChild;)d.insertBefore(c,b);return H.a.removeNode(b)}};H.a.vh=function(b){return H.a.ha.Lj&&void 0!=b.children?b.children:H.g.filter(b.childNodes,function(c){return c.nodeType==H.a.ua.mb})};H.a.Bh=function(b){return H.ca(b.firstElementChild)?b.firstElementChild:H.a.sd(b.firstChild,!0)};
H.a.Eh=function(b){return H.ca(b.lastElementChild)?b.lastElementChild:H.a.sd(b.lastChild,!1)};H.a.Gh=function(b){return H.ca(b.nextElementSibling)?b.nextElementSibling:H.a.sd(b.nextSibling,!0)};H.a.Nh=function(b){return H.ca(b.previousElementSibling)?b.previousElementSibling:H.a.sd(b.previousSibling,!1)};H.a.sd=function(b,c){for(;b&&b.nodeType!=H.a.ua.mb;)b=c?b.nextSibling:b.previousSibling;return b};
H.a.Hh=function(b){if(!b)return null;if(b.firstChild)return b.firstChild;for(;b&&!b.nextSibling;)b=b.parentNode;return b?b.nextSibling:null};H.a.Oh=function(b){if(!b)return null;if(!b.previousSibling)return b.parentNode;for(b=b.previousSibling;b&&b.lastChild;)b=b.lastChild;return b};H.a.df=function(b){return H.Da(b)&&0<b.nodeType};H.a.bf=function(b){return H.Da(b)&&b.nodeType==H.a.ua.mb};H.a.zi=function(b){return H.Da(b)&&b.window==b};
H.a.Mh=function(b){var c;if(H.a.ha.Mj&&!(H.userAgent.oa&&H.userAgent.Xa("9")&&!H.userAgent.Xa("10")&&H.global.SVGElement&&b instanceof H.global.SVGElement)&&(c=b.parentElement))return c;c=b.parentNode;return H.a.bf(c)?c:null};H.a.contains=function(b,c){if(!b||!c)return!1;if(b.contains&&c.nodeType==H.a.ua.mb)return b==c||b.contains(c);if("undefined"!=typeof b.compareDocumentPosition)return b==c||!!(b.compareDocumentPosition(c)&16);for(;c&&b!=c;)c=c.parentNode;return c==b};
H.a.Sg=function(b,c){if(b==c)return 0;if(b.compareDocumentPosition)return b.compareDocumentPosition(c)&2?1:-1;if(H.userAgent.oa&&!H.userAgent.Kc(9)){if(b.nodeType==H.a.ua.Uc)return-1;if(c.nodeType==H.a.ua.Uc)return 1}if("sourceIndex"in b||b.parentNode&&"sourceIndex"in b.parentNode){var d=b.nodeType==H.a.ua.mb,e=c.nodeType==H.a.ua.mb;if(d&&e)return b.sourceIndex-c.sourceIndex;var f=b.parentNode,g=c.parentNode;return f==g?H.a.Ug(b,c):!d&&H.a.contains(f,c)?-1*H.a.Tg(b,c):!e&&H.a.contains(g,b)?H.a.Tg(c,
b):(d?b.sourceIndex:f.sourceIndex)-(e?c.sourceIndex:g.sourceIndex)}e=H.a.xb(b);d=e.createRange();d.selectNode(b);d.collapse(!0);b=e.createRange();b.selectNode(c);b.collapse(!0);return d.compareBoundaryPoints(H.global.Range.START_TO_END,b)};H.a.Tg=function(b,c){var d=b.parentNode;if(d==c)return-1;for(;c.parentNode!=d;)c=c.parentNode;return H.a.Ug(c,b)};H.a.Ug=function(b,c){for(;c=c.previousSibling;)if(c==b)return-1;return 1};
H.a.kh=function(b){var c,d=arguments.length;if(!d)return null;if(1==d)return arguments[0];var e=[],f=Infinity;for(c=0;c<d;c++){for(var g=[],h=arguments[c];h;)g.unshift(h),h=h.parentNode;e.push(g);f=Math.min(f,g.length)}g=null;for(c=0;c<f;c++){h=e[0][c];for(var k=1;k<d;k++)if(h!=e[k][c])return g;g=h}return g};H.a.qv=function(b){return 16==(b.ownerDocument.compareDocumentPosition(b)&16)};H.a.xb=function(b){return b.nodeType==H.a.ua.Uc?b:b.ownerDocument||b.document};
H.a.Ch=function(b){return b.contentDocument||b.contentWindow.document};H.a.Dh=function(b){try{return b.contentWindow||(b.contentDocument?H.a.dc(b.contentDocument):null)}catch(c){}return null};H.a.yf=function(b,c){if("textContent"in b)b.textContent=c;else if(b.nodeType==H.a.ua.$c)b.data=String(c);else if(b.firstChild&&b.firstChild.nodeType==H.a.ua.$c){for(;b.lastChild!=b.firstChild;)b.removeChild(b.lastChild);b.firstChild.data=String(c)}else H.a.tf(b),b.appendChild(H.a.xb(b).createTextNode(String(c)))};
H.a.Lh=function(b){if("outerHTML"in b)return b.outerHTML;var c=H.a.rb(H.a.xb(b),"DIV");c.appendChild(b.cloneNode(!0));return c.innerHTML};H.a.lh=function(b,c){var d=[];return H.a.Ie(b,c,d,!0)?d[0]:void 0};H.a.mh=function(b,c){var d=[];H.a.Ie(b,c,d,!1);return d};H.a.Ie=function(b,c,d,e){if(null!=b)for(b=b.firstChild;b;){if(c(b)&&(d.push(b),e)||H.a.Ie(b,c,d,e))return!0;b=b.nextSibling}return!1};
H.a.Yt=function(b,c){for(b=H.a.wh(b);0<b.length;){var d=b.pop();if(c(d))return d;for(d=d.lastElementChild;d;d=d.previousElementSibling)b.push(d)}return null};H.a.Zt=function(b,c){var d=[];for(b=H.a.wh(b);0<b.length;){var e=b.pop();c(e)&&d.push(e);for(e=e.lastElementChild;e;e=e.previousElementSibling)b.push(e)}return d};H.a.wh=function(b){if(b.nodeType==H.a.ua.Uc)return[b.documentElement];var c=[];for(b=b.lastElementChild;b;b=b.previousElementSibling)c.push(b);return c};
H.a.vg={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1};H.a.Yc={IMG:" ",BR:"\n"};H.a.cf=function(b){return H.a.$h(b)&&H.a.xi(b)};H.a.Yi=function(b,c){c?b.tabIndex=0:(b.tabIndex=-1,b.removeAttribute("tabIndex"))};H.a.ji=function(b){var c;return(c=H.a.vn(b)?!b.disabled&&(!H.a.$h(b)||H.a.xi(b)):H.a.cf(b))&&H.userAgent.oa?H.a.xm(b):c};H.a.$h=function(b){return H.userAgent.oa&&!H.userAgent.Xa("9")?(b=b.getAttributeNode("tabindex"),H.zb(b)&&b.specified):b.hasAttribute("tabindex")};
H.a.xi=function(b){b=b.tabIndex;return H.Bb(b)&&0<=b&&32768>b};H.a.vn=function(b){return"A"==b.tagName&&b.hasAttribute("href")||"INPUT"==b.tagName||"TEXTAREA"==b.tagName||"SELECT"==b.tagName||"BUTTON"==b.tagName};H.a.xm=function(b){b=!H.Wa(b.getBoundingClientRect)||H.userAgent.oa&&null==b.parentElement?{height:b.offsetHeight,width:b.offsetWidth}:b.getBoundingClientRect();return H.zb(b)&&0<b.height&&0<b.width};
H.a.ud=function(b){if(H.a.ha.Yf&&null!==b&&"innerText"in b)b=H.c.rl(b.innerText);else{var c=[];H.a.Ye(b,c,!0);b=c.join("")}b=b.replace(/ \xAD /g," ").replace(/\xAD/g,"");b=b.replace(/\u200B/g,"");H.a.ha.Yf||(b=b.replace(/ +/g," "));" "!=b&&(b=b.replace(/^\s*/,""));return b};H.a.Ku=function(b){var c=[];H.a.Ye(b,c,!1);return c.join("")};
H.a.Ye=function(b,c,d){if(!(b.nodeName in H.a.vg))if(b.nodeType==H.a.ua.$c)d?c.push(String(b.nodeValue).replace(/(\r\n|\r|\n)/g,"")):c.push(b.nodeValue);else if(b.nodeName in H.a.Yc)c.push(H.a.Yc[b.nodeName]);else for(b=b.firstChild;b;)H.a.Ye(b,c,d),b=b.nextSibling};H.a.Jh=function(b){return H.a.ud(b).length};H.a.Kh=function(b,c){c=c||H.a.xb(b).body;for(var d=[];b&&b!=c;){for(var e=b;e=e.previousSibling;)d.unshift(H.a.ud(e));b=b.parentNode}return H.c.trimLeft(d.join("")).replace(/ +/g," ").length};
H.a.Ih=function(b,c,d){b=[b];for(var e=0,f=null;0<b.length&&e<c;)if(f=b.pop(),!(f.nodeName in H.a.vg))if(f.nodeType==H.a.ua.$c){var g=f.nodeValue.replace(/(\r\n|\r|\n)/g,"").replace(/ +/g," ");e+=g.length}else if(f.nodeName in H.a.Yc)e+=H.a.Yc[f.nodeName].length;else for(g=f.childNodes.length-1;0<=g;g--)b.push(f.childNodes[g]);H.Da(d)&&(d.nw=f?f.nodeValue.length+c-e-1:0,d.node=f);return f};
H.a.ef=function(b){if(b&&typeof b.length==u){if(H.Da(b))return typeof b.item==t||typeof b.item==y;if(H.Wa(b))return typeof b.item==t}return!1};H.a.Me=function(b,c,d,e){if(!c&&!d)return null;var f=c?String(c).toUpperCase():null;return H.a.Le(b,function(g){return(!f||g.nodeName==f)&&(!d||H.L(g.className)&&H.g.contains(g.className.split(/\s+/),d))},!0,e)};H.a.sh=function(b,c,d){return H.a.Me(b,null,c,d)};
H.a.Le=function(b,c,d,e){b&&!d&&(b=b.parentNode);for(d=0;b&&(null==e||d<=e);){if(c(b))return b;b=b.parentNode;d++}return null};H.a.rh=function(b){try{var c=b&&b.activeElement;return c&&c.nodeName?c:null}catch(d){return null}};H.a.Ju=function(){var b=H.a.dc();return H.ca(b.devicePixelRatio)?b.devicePixelRatio:b.matchMedia?H.a.Ed(3)||H.a.Ed(2)||H.a.Ed(1.5)||H.a.Ed(1)||.75:1};
H.a.Ed=function(b){return H.a.dc().matchMedia("(min-resolution: "+b+"dppx),(min--moz-device-pixel-ratio: "+b+"),(min-resolution: "+96*b+"dpi)").matches?b:0};H.a.uh=function(b){return b.getContext("2d")};H.a.Vb=function(b){this.ka=b||H.global.document||document};F=H.a.Vb.prototype;F.Qe=H.a.Qe;F.Zl=D("ka");F.Re=function(b){return H.a.Ue(this.ka,b)};F.jm=function(b){return H.a.Rh(this.ka,b)};F.vj=H.a.Vb.prototype.Re;F.getElementsByTagName=function(b,c){return(c||this.ka).getElementsByTagName(String(b))};
F.Ve=function(b,c,d){return H.a.qd(this.ka,b,c,d)};F.cm=function(b,c,d){return H.a.Te(this.ka,b,c,d)};F.Ah=function(b,c){return H.a.Ah(b,c||this.ka)};F.Se=function(b,c){return H.a.Se(b,c||this.ka)};F.Qh=function(b,c){return H.a.Qh(b,c||this.ka)};F.wj=H.a.Vb.prototype.Ve;F.Wd=H.a.Wd;F.Wh=function(b){return H.a.Wh(b||this.dc())};F.$l=function(){return H.a.Oe(this.dc())};F.Ce=function(b,c,d){return H.a.Yg(this.ka,arguments)};F.xj=H.a.Vb.prototype.Ce;
F.createElement=function(b){return H.a.rb(this.ka,b)};F.createTextNode=function(b){return this.ka.createTextNode(String(b))};F.zl=function(b,c,d){return H.a.Zg(this.ka,b,c,!!d)};F.Ti=function(b){return H.a.Ui(this.ka,b)};F.Fm=function(){return H.a.Jc(this.ka)};F.dc=function(){return H.a.ec(this.ka)};F.am=function(){return H.a.Pe(this.ka)};F.yh=function(){return H.a.zh(this.ka)};F.rh=function(b){return H.a.rh(b||this.ka)};F.appendChild=H.a.appendChild;F.append=H.a.append;F.canHaveChildren=H.a.canHaveChildren;
F.tf=H.a.tf;F.ei=H.a.ei;F.di=H.a.di;F.ci=H.a.ci;F.removeNode=H.a.removeNode;F.Ri=H.a.Ri;F.oh=H.a.oh;F.vh=H.a.vh;F.Bh=H.a.Bh;F.Eh=H.a.Eh;F.Gh=H.a.Gh;F.Nh=H.a.Nh;F.Hh=H.a.Hh;F.Oh=H.a.Oh;F.df=H.a.df;F.bf=H.a.bf;F.zi=H.a.zi;F.Mh=H.a.Mh;F.contains=H.a.contains;F.Sg=H.a.Sg;F.kh=H.a.kh;F.xb=H.a.xb;F.Ch=H.a.Ch;F.Dh=H.a.Dh;F.yf=H.a.yf;F.Lh=H.a.Lh;F.lh=H.a.lh;F.mh=H.a.mh;F.cf=H.a.cf;F.Yi=H.a.Yi;F.ji=H.a.ji;F.ud=H.a.ud;F.Jh=H.a.Jh;F.Kh=H.a.Kh;F.Ih=H.a.Ih;F.ef=H.a.ef;F.Me=H.a.Me;F.sh=H.a.sh;F.Le=H.a.Le;
F.uh=H.a.uh;H.o={};H.o.va="StopIteration"in H.global?H.global.StopIteration:{message:"StopIteration",stack:""};H.o.Iterator=B();H.o.Iterator.prototype.next=function(){throw H.o.va;};H.o.Iterator.prototype.se=function(){return this};H.o.fa=function(b){if(b instanceof H.o.Iterator)return b;if(typeof b.se==t)return b.se(!1);if(H.ma(b)){var c=0,d=new H.o.Iterator;d.next=function(){for(;;){if(c>=b.length)throw H.o.va;if(c in b)return b[c++];c++}};return d}throw Error("Not implemented");};
H.o.forEach=function(b,c,d){if(H.ma(b))try{H.g.forEach(b,c,d)}catch(e){if(e!==H.o.va)throw e;}else{b=H.o.fa(b);try{for(;;)c.call(d,b.next(),void 0,b)}catch(e){if(e!==H.o.va)throw e;}}};H.o.filter=function(b,c,d){var e=H.o.fa(b);b=new H.o.Iterator;b.next=function(){for(;;){var f=e.next();if(c.call(d,f,void 0,e))return f}};return b};H.o.Xt=function(b,c,d){return H.o.filter(b,H.V.xn(c),d)};
H.o.Qd=function(b,c,d){var e=0,f=b,g=d||1;1<arguments.length&&(e=b,f=+c);if(0==g)throw Error("Range step argument must not be zero");var h=new H.o.Iterator;h.next=function(){if(0<g&&e>=f||0>g&&e<=f)throw H.o.va;var k=e;e+=g;return k};return h};H.o.join=function(b,c){return H.o.jb(b).join(c)};H.o.map=function(b,c,d){var e=H.o.fa(b);b=new H.o.Iterator;b.next=function(){var f=e.next();return c.call(d,f,void 0,e)};return b};
H.o.reduce=function(b,c,d,e){var f=d;H.o.forEach(b,function(g){f=c.call(e,f,g)});return f};H.o.some=function(b,c,d){b=H.o.fa(b);try{for(;;)if(c.call(d,b.next(),void 0,b))return!0}catch(e){if(e!==H.o.va)throw e;}return!1};H.o.every=function(b,c,d){b=H.o.fa(b);try{for(;;)if(!c.call(d,b.next(),void 0,b))return!1}catch(e){if(e!==H.o.va)throw e;}return!0};H.o.gt=function(b){return H.o.sl(arguments)};
H.o.sl=function(b){var c=H.o.fa(b);b=new H.o.Iterator;var d=null;b.next=function(){for(;;){if(null==d){var e=c.next();d=H.o.fa(e)}try{return d.next()}catch(f){if(f!==H.o.va)throw f;d=null}}};return b};H.o.Nt=function(b,c,d){var e=H.o.fa(b);b=new H.o.Iterator;var f=!0;b.next=function(){for(;;){var g=e.next();if(!f||!c.call(d,g,void 0,e))return f=!1,g}};return b};
H.o.ux=function(b,c,d){var e=H.o.fa(b);b=new H.o.Iterator;b.next=function(){var f=e.next();if(c.call(d,f,void 0,e))return f;throw H.o.va;};return b};H.o.jb=function(b){if(H.ma(b))return H.g.jb(b);b=H.o.fa(b);var c=[];H.o.forEach(b,function(d){c.push(d)});return c};H.o.Ob=function(b,c){b=H.o.To({},b,c);var d=H.g.eh;return H.o.every(b,function(e){return d(e[0],e[1])})};H.o.wn=function(b){try{H.o.fa(b).next()}catch(c){if(c!=H.o.va)throw c;}};
H.o.product=function(b){if(H.g.some(arguments,function(f){return!f.length})||!arguments.length)return new H.o.Iterator;var c=new H.o.Iterator,d=arguments,e=H.g.repeat(0,d.length);c.next=function(){if(e){for(var f=H.g.map(e,function(h,k){return d[k][h]}),g=e.length-1;0<=g;g--){if(e[g]<d[g].length-1){e[g]++;break}if(0==g){e=null;break}e[g]=0}return f}throw H.o.va;};return c};
H.o.Ht=function(b){var c=H.o.fa(b),d=[],e=0;b=new H.o.Iterator;var f=!1;b.next=function(){var g=null;if(!f)try{return g=c.next(),d.push(g),g}catch(h){if(h!=H.o.va||H.g.Ca(d))throw h;f=!0}g=d[e];e=(e+1)%d.length;return g};return b};H.o.count=function(b,c){var d=b||0,e=H.ca(c)?c:1;b=new H.o.Iterator;b.next=function(){var f=d;d+=e;return f};return b};H.o.repeat=function(b){var c=new H.o.Iterator;c.next=H.V.Vg(b);return c};
H.o.zs=function(b){var c=H.o.fa(b),d=0;b=new H.o.Iterator;b.next=function(){return d+=c.next()};return b};H.o.uj=function(b){var c=arguments,d=new H.o.Iterator;if(0<c.length){var e=H.g.map(c,H.o.fa);d.next=function(){return H.g.map(e,function(f){return f.next()})}}return d};
H.o.To=function(b,c){var d=H.g.slice(arguments,1),e=new H.o.Iterator;if(0<d.length){var f=H.g.map(d,H.o.fa);e.next=function(){var g=!1,h=H.g.map(f,function(k){try{var m=k.next();g=!0}catch(n){if(n!==H.o.va)throw n;m=b}return m});if(!g)throw H.o.va;return h}}return e};H.o.pt=function(b,c){var d=H.o.fa(c);return H.o.filter(b,function(){return!!d.next()})};H.o.ke=function(b,c){this.iterator=H.o.fa(b);this.Di=c||H.V.ai};H.yb(H.o.ke,H.o.Iterator);
H.o.ke.prototype.next=function(){for(;this.yc==this.hj;)this.kd=this.iterator.next(),this.yc=this.Di(this.kd);for(var b=this.hj=this.yc,c=this.hj,d=[];this.yc==c;){d.push(this.kd);try{this.kd=this.iterator.next()}catch(e){if(e!==H.o.va)throw e;break}this.yc=this.Di(this.kd)}return[b,d]};H.o.Ru=function(b,c){return new H.o.ke(b,c)};H.o.px=function(b,c,d){var e=H.o.fa(b);b=new H.o.Iterator;b.next=function(){var f=H.o.jb(e.next());return c.apply(d,H.g.concat(f,void 0,e))};return b};
H.o.tee=function(b,c){function d(){var g=e.next();H.g.forEach(f,function(h){h.push(g)})}var e=H.o.fa(b),f=H.g.map(H.g.Qd(H.Bb(c)?c:2),function(){return[]});return H.g.map(f,function(g){var h=new H.o.Iterator;h.next=function(){H.g.Ca(g)&&d();return g.shift()};return h})};H.o.Tt=function(b,c){return H.o.uj(H.o.count(c),b)};H.o.an=function(b,c){var d=H.o.fa(b);b=new H.o.Iterator;var e=c;b.next=function(){if(0<e--)return d.next();throw H.o.va;};return b};
H.o.vl=function(b,c){for(b=H.o.fa(b);0<c--;)H.o.wn(b);return b};H.o.slice=function(b,c,d){b=H.o.vl(b,c);H.Bb(d)&&(b=H.o.an(b,d-c));return b};H.o.wm=function(b){var c=[];H.g.Jn(b,c);return b.length!=c.length};H.o.An=function(b,c){b=H.o.jb(b);c=H.g.repeat(b,H.Bb(c)?c:b.length);c=H.o.product.apply(void 0,c);return H.o.filter(c,function(d){return!H.o.wm(d)})};
H.o.lt=function(b,c){function d(g){return e[g]}var e=H.o.jb(b);b=H.o.Qd(e.length);c=H.o.An(b,c);var f=H.o.filter(c,function(g){return H.g.wi(g)});c=new H.o.Iterator;c.next=function(){return H.g.map(f.next(),d)};return c};H.o.mt=function(b,c){function d(g){return e[g]}var e=H.o.jb(b);b=H.g.Qd(e.length);c=H.g.repeat(b,c);c=H.o.product.apply(void 0,c);var f=H.o.filter(c,function(g){return H.g.wi(g)});c=new H.o.Iterator;c.next=function(){return H.g.map(f.next(),d)};return c};H.Pd={};H.Pd.Fr=B();H.Thenable=B();H.Thenable.prototype.then=B();H.Thenable.hg="$goog_Thenable";H.Thenable.Cg=function(b){b.prototype[H.Thenable.hg]=!0};H.Thenable.ki=function(b){if(!b)return!1;try{return!!b[H.Thenable.hg]}catch(c){return!1}};H.Promise=function(b,c){this.qa=H.Promise.ba.$a;this.Ia=void 0;this.Zb=this.qb=this.ya=null;this.He=!1;0<H.Promise.Hb?this.Yd=0:0==H.Promise.Hb&&(this.wd=!1);H.Promise.eb&&(this.Cf=[],I(this,Error("created")),this.bh=0);if(b!=H.Rb)try{var d=this;b.call(c,function(e){J(d,H.Promise.ba.nb,e)},function(e){if(H.sa&&!(e instanceof H.Promise.Ub))try{if(e instanceof Error)throw e;throw Error("Promise rejected.");}catch(f){}J(d,H.Promise.ba.Ja,e)})}catch(e){J(this,H.Promise.ba.Ja,e)}};H.Promise.eb=!1;
H.Promise.Hb=0;H.Promise.ba={$a:0,Ij:1,nb:2,Ja:3};H.Promise.Zf=function(){this.next=this.context=this.hc=this.Oc=this.Jb=null;this.bd=!1};H.Promise.Zf.prototype.reset=function(){this.context=this.hc=this.Oc=this.Jb=null;this.bd=!1};H.Promise.ge=100;H.Promise.Ec=new H.async.Wc(function(){return new H.Promise.Zf},function(b){b.reset()},H.Promise.ge);H.Promise.th=function(b,c,d){var e=H.Promise.Ec.get();e.Oc=b;e.hc=c;e.context=d;return e};H.Promise.Rn=function(b){H.Promise.Ec.put(b)};
H.Promise.resolve=function(b){if(b instanceof H.Promise)return b;var c=new H.Promise(H.Rb);J(c,H.Promise.ba.nb,b);return c};H.Promise.reject=function(b){return new H.Promise(function(c,d){d(b)})};H.Promise.Rd=function(b,c,d){H.Promise.Ki(b,c,d,null)||H.async.X(H.Sb(c,b))};H.Promise.race=function(b){return new H.Promise(function(c,d){b.length||c(void 0);for(var e=0,f;e<b.length;e++)f=b[e],H.Promise.Rd(f,c,d)})};
H.Promise.all=function(b){return new H.Promise(function(c,d){var e=b.length,f=[];if(e)for(var g=function(n,r){e--;f[n]=r;0==e&&c(f)},h=function(n){d(n)},k=0,m;k<b.length;k++)m=b[k],H.Promise.Rd(m,H.Sb(g,k),h);else c(f)})};H.Promise.Cs=function(b){return new H.Promise(function(c){var d=b.length,e=[];if(d)for(var f=function(k,m,n){d--;e[k]=m?{Xl:!0,value:n}:{Xl:!1,reason:n};0==d&&c(e)},g=0,h;g<b.length;g++)h=b[g],H.Promise.Rd(h,H.Sb(f,g,!0),H.Sb(f,g,!1));else c(e)})};
H.Promise.cu=function(b){return new H.Promise(function(c,d){var e=b.length,f=[];if(e)for(var g=function(n){c(n)},h=function(n,r){e--;f[n]=r;0==e&&d(f)},k=0,m;k<b.length;k++)m=b[k],H.Promise.Rd(m,g,H.Sb(h,k));else c(void 0)})};H.Promise.Ix=function(){var b,c,d=new H.Promise(function(e,f){b=e;c=f});return new H.Promise.rk(d,b,c)};H.Promise.prototype.then=function(b,c,d){H.Promise.eb&&I(this,Error("then"));return ha(this,H.Wa(b)?b:null,H.Wa(c)?c:null,d)};H.Thenable.Cg(H.Promise);
H.Promise.prototype.cancel=function(b){this.qa==H.Promise.ba.$a&&H.async.X(function(){var c=new H.Promise.Ub(b);ia(this,c)},this)};function ia(b,c){if(b.qa==H.Promise.ba.$a)if(b.ya){var d=b.ya;if(d.qb){for(var e=0,f=null,g=null,h=d.qb;h&&(h.bd||(e++,h.Jb==b&&(f=h),!(f&&1<e)));h=h.next)f||(g=h);f&&(d.qa==H.Promise.ba.$a&&1==e?ia(d,c):(g?(e=g,e.next==d.Zb&&(d.Zb=e),e.next=e.next.next):ja(d),ka(d,f,H.Promise.ba.Ja,c)))}b.ya=null}else J(b,H.Promise.ba.Ja,c)}
function la(b,c){b.qb||b.qa!=H.Promise.ba.nb&&b.qa!=H.Promise.ba.Ja||ma(b);b.Zb?b.Zb.next=c:b.qb=c;b.Zb=c}function ha(b,c,d,e){var f=H.Promise.th(null,null,null);f.Jb=new H.Promise(function(g,h){f.Oc=c?function(k){try{var m=c.call(e,k);g(m)}catch(n){h(n)}}:g;f.hc=d?function(k){try{var m=d.call(e,k);!H.ca(m)&&k instanceof H.Promise.Ub?h(k):g(m)}catch(n){h(n)}}:h});f.Jb.ya=b;la(b,f);return f.Jb}H.Promise.prototype.Fo=function(b){this.qa=H.Promise.ba.$a;J(this,H.Promise.ba.nb,b)};
H.Promise.prototype.Go=function(b){this.qa=H.Promise.ba.$a;J(this,H.Promise.ba.Ja,b)};function J(b,c,d){b.qa==H.Promise.ba.$a&&(b===d&&(c=H.Promise.ba.Ja,d=new TypeError("Promise cannot resolve to itself")),b.qa=H.Promise.ba.Ij,H.Promise.Ki(d,b.Fo,b.Go,b)||(b.Ia=d,b.qa=c,b.ya=null,ma(b),c!=H.Promise.ba.Ja||d instanceof H.Promise.Ub||H.Promise.Ok(b,d)))}
H.Promise.Ki=function(b,c,d,e){if(b instanceof H.Promise)return H.Promise.eb&&I(b,Error("then")),la(b,H.Promise.th(c||H.Rb,d||null,e)),!0;if(H.Thenable.ki(b))return b.then(c,d,e),!0;if(H.Da(b))try{var f=b.then;if(H.Wa(f))return H.Promise.Do(b,f,c,d,e),!0}catch(g){return d.call(e,g),!0}return!1};H.Promise.Do=function(b,c,d,e,f){function g(m){k||(k=!0,e.call(f,m))}function h(m){k||(k=!0,d.call(f,m))}var k=!1;try{c.call(b,h,g)}catch(m){g(m)}};function ma(b){b.He||(b.He=!0,H.async.X(b.Pl,b))}
function ja(b){var c=null;b.qb&&(c=b.qb,b.qb=c.next,c.next=null);b.qb||(b.Zb=null);return c}H.Promise.prototype.Pl=function(){for(var b;b=ja(this);)H.Promise.eb&&this.bh++,ka(this,b,this.qa,this.Ia);this.He=!1};
function ka(b,c,d,e){if(d==H.Promise.ba.Ja&&c.hc&&!c.bd)if(0<H.Promise.Hb)for(;b&&b.Yd;b=b.ya)H.global.clearTimeout(b.Yd),b.Yd=0;else if(0==H.Promise.Hb)for(;b&&b.wd;b=b.ya)b.wd=!1;if(c.Jb)c.Jb.ya=null,H.Promise.fi(c,d,e);else try{c.bd?c.Oc.call(c.context):H.Promise.fi(c,d,e)}catch(f){H.Promise.xd.call(null,f)}H.Promise.Rn(c)}H.Promise.fi=function(b,c,d){c==H.Promise.ba.nb?b.Oc.call(b.context,d):b.hc&&b.hc.call(b.context,d)};
function I(b,c){if(H.Promise.eb&&H.L(c.stack)){var d=c.stack.split("\n",4)[3];c=c.message;c+=Array(11-c.length).join(" ");b.Cf.push(c+d)}}function na(b,c){if(H.Promise.eb&&c&&H.L(c.stack)&&b.Cf.length){for(var d=["Promise trace:"],e=b;e;e=e.ya){for(var f=b.bh;0<=f;f--)d.push(e.Cf[f]);d.push("Value: ["+(e.qa==H.Promise.ba.Ja?"REJECTED":"FULFILLED")+"] <"+String(e.Ia)+">")}c.stack+="\n\n"+d.join("\n")}}
H.Promise.Ok=function(b,c){0<H.Promise.Hb?b.Yd=H.global.setTimeout(function(){na(b,c);H.Promise.xd.call(null,c)},H.Promise.Hb):0==H.Promise.Hb&&(b.wd=!0,H.async.X(function(){b.wd&&(na(b,c),H.Promise.xd.call(null,c))}))};H.Promise.xd=H.async.jj;H.Promise.ex=function(b){H.Promise.xd=b};H.Promise.Ub=function(b){H.debug.Error.call(this,b)};H.yb(H.Promise.Ub,H.debug.Error);H.Promise.Ub.prototype.name="cancel";H.Promise.rk=function(b,c,d){this.Pd=b;this.resolve=c;this.reject=d};/*
 Portions of this code are from MochiKit, received by
 The Closure Authors under the MIT license. All other code is Copyright
 2005-2009 The Closure Authors. All Rights Reserved.
*/
H.async.I=function(b,c){this.Vd=[];this.Oi=b;this.fh=c||null;this.fc=this.$b=!1;this.Ia=void 0;this.zf=this.kl=this.xe=!1;this.Xd=0;this.ya=null;this.cd=0;H.async.I.eb&&(this.Be=null,Error.captureStackTrace&&(b={stack:""},Error.captureStackTrace(b,H.async.I),typeof b.stack==y&&(this.Be=b.stack.replace(/^[^\n]*\n/,""))))};H.async.I.Bk=!1;H.async.I.eb=!1;F=H.async.I.prototype;
F.cancel=function(b){if(this.$b)this.Ia instanceof H.async.I&&this.Ia.cancel();else{if(this.ya){var c=this.ya;delete this.ya;b?c.cancel(b):(c.cd--,0>=c.cd&&c.cancel())}this.Oi?this.Oi.call(this.fh,this):this.zf=!0;this.$b||this.tb(new H.async.I.Tb(this))}};F.Xg=function(b,c){this.xe=!1;K(this,b,c)};function K(b,c,d){b.$b=!0;b.Ia=d;b.fc=!c;oa(b)}function pa(b){if(b.$b){if(!b.zf)throw new H.async.I.Tc(b);b.zf=!1}}F.tc=function(b){pa(this);K(this,!0,b)};
F.tb=function(b){pa(this);qa(this,b);K(this,!1,b)};function qa(b,c){H.async.I.eb&&b.Be&&H.Da(c)&&c.stack&&/^[^\n]+(\n   [^\n]+)+/.test(c.stack)&&(c.stack=c.stack+"\nDEFERRED OPERATION:\n"+b.Be)}function L(b,c,d){return M(b,c,null,d)}function ra(b,c){M(b,null,c,void 0)}function M(b,c,d,e){b.Vd.push([c,d,e]);b.$b&&oa(b);return b}F.then=function(b,c,d){var e,f,g=new H.Promise(function(h,k){e=h;f=k});M(this,e,function(h){h instanceof H.async.I.Tb?g.cancel():f(h)});return g.then(b,c,d)};H.Thenable.Cg(H.async.I);
H.async.I.prototype.ml=function(){var b=new H.async.I;M(this,b.tc,b.tb,b);b.ya=this;this.cd++;return b};function sa(b){return H.g.some(b.Vd,function(c){return H.Wa(c[1])})}
function oa(b){b.Xd&&b.$b&&sa(b)&&(H.async.I.Lo(b.Xd),b.Xd=0);b.ya&&(b.ya.cd--,delete b.ya);for(var c=b.Ia,d=!1,e=!1;b.Vd.length&&!b.xe;){var f=b.Vd.shift(),g=f[0],h=f[1];f=f[2];if(g=b.fc?h:g)try{var k=g.call(f||b.fh,c);H.ca(k)&&(b.fc=b.fc&&(k==c||k instanceof Error),b.Ia=c=k);if(H.Thenable.ki(c)||typeof H.global.Promise===t&&c instanceof H.global.Promise)e=!0,b.xe=!0}catch(m){c=m,b.fc=!0,qa(b,c),sa(b)||(d=!0)}}b.Ia=c;e?(e=H.bind(b.Xg,b,!0),k=H.bind(b.Xg,b,!1),c instanceof H.async.I?(M(c,e,k),c.kl=
!0):c.then(e,k)):H.async.I.Bk&&c instanceof Error&&!(c instanceof H.async.I.Tb)&&(d=b.fc=!0);d&&(b.Xd=H.async.I.eo(c))}H.async.I.fj=function(b){var c=new H.async.I;c.tc(b);return c};H.async.I.lu=function(b){var c=new H.async.I;b.then(function(d){c.tc(d)},function(d){c.tb(d)});return c};H.async.I.xa=function(b){var c=new H.async.I;c.tb(b);return c};H.async.I.et=function(){var b=new H.async.I;b.cancel();return b};
H.async.I.Hx=function(b,c,d){return b instanceof H.async.I?L(b.ml(),c,d):L(H.async.I.fj(b),c,d)};H.async.I.Tc=function(){H.debug.Error.call(this)};H.yb(H.async.I.Tc,H.debug.Error);H.async.I.Tc.prototype.message="Deferred has already fired";H.async.I.Tc.prototype.name="AlreadyCalledError";H.async.I.Tb=function(){H.debug.Error.call(this)};H.yb(H.async.I.Tb,H.debug.Error);H.async.I.Tb.prototype.message="Deferred was canceled";H.async.I.Tb.prototype.name="CanceledError";
H.async.I.cg=function(b){this.Ic=H.global.setTimeout(H.bind(this.ij,this),0);this.Nl=b};H.async.I.cg.prototype.ij=function(){delete H.async.I.Cc[this.Ic];throw this.Nl;};H.async.I.Cc={};H.async.I.eo=function(b){b=new H.async.I.cg(b);H.async.I.Cc[b.Ic]=b;return b.Ic};H.async.I.Lo=function(b){var c=H.async.I.Cc[b];c&&(H.global.clearTimeout(c.Ic),delete H.async.I.Cc[b])};H.async.I.Ss=function(){var b=H.async.I.Cc,c;for(c in b){var d=b[c];H.global.clearTimeout(d.Ic);d.ij()}};H.N={};H.N.P={};H.N.P.ie="closure_verification";H.N.P.Tj=5E3;H.N.P.vf=[];H.N.P.Zn=function(b,c){function d(){var f=b.shift();f=H.N.P.Sd(f,c);b.length&&M(f,d,d,void 0);return f}if(!b.length)return H.async.I.fj(null);var e=H.N.P.vf.length;H.g.extend(H.N.P.vf,b);if(e)return H.N.P.Wi;b=H.N.P.vf;H.N.P.Wi=d();return H.N.P.Wi};
H.N.P.Sd=function(b,c){var d=c||{};c=d.document||document;var e=H.b.H.K(b),f=H.a.createElement(l),g={Xi:f,lj:void 0},h=new H.async.I(H.N.P.ql,g),k=null,m=H.zb(d.timeout)?d.timeout:H.N.P.Tj;0<m&&(k=window.setTimeout(function(){H.N.P.gd(f,!0);h.tb(new H.N.P.Error(H.N.P.Vc.TIMEOUT,"Timeout reached for loading script "+e))},m),g.lj=k);f.onload=f.onreadystatechange=function(){f.readyState&&"loaded"!=f.readyState&&"complete"!=f.readyState||(H.N.P.gd(f,d.it||!1,k),h.tc(null))};f.onerror=function(){H.N.P.gd(f,
!0,k);h.tb(new H.N.P.Error(H.N.P.Vc.fk,"Error while loading script "+e))};g=d.attributes||{};H.object.extend(g,{type:da,charset:"UTF-8"});H.a.Wd(f,g);H.a.O.mo(f,b);H.N.P.lm(c).appendChild(f);return h};
H.N.P.Bw=function(b,c,d){H.global[H.N.P.ie]||(H.global[H.N.P.ie]={});var e=H.global[H.N.P.ie],f=H.b.H.K(b);if(H.ca(e[c]))return H.async.I.xa(new H.N.P.Error(H.N.P.Vc.Mk,"Verification object "+c+" already defined."));b=H.N.P.Sd(b,d);var g=new H.async.I(H.bind(b.cancel,b));L(b,function(){var h=e[c];H.ca(h)?(g.tc(h),delete e[c]):g.tb(new H.N.P.Error(H.N.P.Vc.Lk,"Script "+f+" loaded, but verification object "+c+" was not defined."))});ra(b,function(h){H.ca(e[c])&&delete e[c];g.tb(h)});return g};
H.N.P.lm=function(b){var c=H.a.getElementsByTagName("HEAD",b);return!c||H.g.Ca(c)?b.documentElement:c[0]};H.N.P.ql=function(){if(this&&this.Xi){var b=this.Xi;b&&b.tagName==l&&H.N.P.gd(b,!0,this.lj)}};H.N.P.gd=function(b,c,d){H.zb(d)&&H.global.clearTimeout(d);b.onload=H.Rb;b.onerror=H.Rb;b.onreadystatechange=H.Rb;c&&window.setTimeout(function(){H.a.removeNode(b)},0)};H.N.P.Vc={fk:0,TIMEOUT:1,Lk:2,Mk:3};
H.N.P.Error=function(b,c){var d="Jsloader error (code #"+b+")";c&&(d+=": "+c);H.debug.Error.call(this,d);this.code=b};H.yb(H.N.P.Error,H.debug.Error);H.R={};H.R.Map=function(b,c){this.Ea={};this.$=[];this.Sc=this.Z=0;var d=arguments.length;if(1<d){if(d%2)throw Error(p);for(var e=0;e<d;e+=2)this.set(arguments[e],arguments[e+1])}else b&&this.addAll(b)};F=H.R.Map.prototype;F.ub=D("Z");F.ga=function(){N(this);for(var b=[],c=0;c<this.$.length;c++)b.push(this.Ea[this.$[c]]);return b};F.la=function(){N(this);return this.$.concat()};F.Lb=function(b){return H.R.Map.Pb(this.Ea,b)};
F.Mb=function(b){for(var c=0;c<this.$.length;c++){var d=this.$[c];if(H.R.Map.Pb(this.Ea,d)&&this.Ea[d]==b)return!0}return!1};F.Ob=function(b,c){if(this===b)return!0;if(this.Z!=b.ub())return!1;c=c||H.R.Map.Dl;N(this);for(var d,e=0;d=this.$[e];e++)if(!c(this.get(d),b.get(d)))return!1;return!0};H.R.Map.Dl=function(b,c){return b===c};F=H.R.Map.prototype;F.Ca=function(){return 0==this.Z};F.clear=function(){this.Ea={};this.Sc=this.Z=this.$.length=0};
F.remove=function(b){return H.R.Map.Pb(this.Ea,b)?(delete this.Ea[b],this.Z--,this.Sc++,this.$.length>2*this.Z&&N(this),!0):!1};function N(b){if(b.Z!=b.$.length){for(var c=0,d=0;c<b.$.length;){var e=b.$[c];H.R.Map.Pb(b.Ea,e)&&(b.$[d++]=e);c++}b.$.length=d}if(b.Z!=b.$.length){var f={};for(d=c=0;c<b.$.length;)e=b.$[c],H.R.Map.Pb(f,e)||(b.$[d++]=e,f[e]=1),c++;b.$.length=d}}F.get=function(b,c){return H.R.Map.Pb(this.Ea,b)?this.Ea[b]:c};
F.set=function(b,c){H.R.Map.Pb(this.Ea,b)||(this.Z++,this.$.push(b),this.Sc++);this.Ea[b]=c};F.addAll=function(b){if(b instanceof H.R.Map)for(var c=b.la(),d=0;d<c.length;d++)this.set(c[d],b.get(c[d]));else for(c in b)this.set(c,b[c])};F.forEach=function(b,c){for(var d=this.la(),e=0;e<d.length;e++){var f=d[e],g=this.get(f);b.call(c,g,f,this)}};F.clone=function(){return new H.R.Map(this)};F.Co=function(){for(var b=new H.R.Map,c=0;c<this.$.length;c++){var d=this.$[c];b.set(this.Ea[d],d)}return b};
F.Ao=function(){N(this);for(var b={},c=0;c<this.$.length;c++){var d=this.$[c];b[d]=this.Ea[d]}return b};F.se=function(b){N(this);var c=0,d=this.Sc,e=this,f=new H.o.Iterator;f.next=function(){if(d!=e.Sc)throw Error("The map has changed since the iterator was created");if(c>=e.$.length)throw H.o.va;var g=e.$[c++];return b?g:e.Ea[g]};return f};H.R.Map.Pb=function(b,c){return Object.prototype.hasOwnProperty.call(b,c)};H.R.ub=function(b){return b.ub&&typeof b.ub==t?b.ub():H.ma(b)||H.L(b)?b.length:H.object.ub(b)};H.R.ga=function(b){if(b.ga&&typeof b.ga==t)return b.ga();if(H.L(b))return b.split("");if(H.ma(b)){for(var c=[],d=b.length,e=0;e<d;e++)c.push(b[e]);return c}return H.object.ga(b)};H.R.la=function(b){if(b.la&&typeof b.la==t)return b.la();if(!b.ga||typeof b.ga!=t){if(H.ma(b)||H.L(b)){var c=[];b=b.length;for(var d=0;d<b;d++)c.push(d);return c}return H.object.la(b)}};
H.R.contains=function(b,c){return b.contains&&typeof b.contains==t?b.contains(c):b.Mb&&typeof b.Mb==t?b.Mb(c):H.ma(b)||H.L(b)?H.g.contains(b,c):H.object.Mb(b,c)};H.R.Ca=function(b){return b.Ca&&typeof b.Ca==t?b.Ca():H.ma(b)||H.L(b)?H.g.Ca(b):H.object.Ca(b)};H.R.clear=function(b){b.clear&&typeof b.clear==t?b.clear():H.ma(b)?H.g.clear(b):H.object.clear(b)};
H.R.forEach=function(b,c,d){if(b.forEach&&typeof b.forEach==t)b.forEach(c,d);else if(H.ma(b)||H.L(b))H.g.forEach(b,c,d);else for(var e=H.R.la(b),f=H.R.ga(b),g=f.length,h=0;h<g;h++)c.call(d,f[h],e&&e[h],b)};H.R.filter=function(b,c,d){if(typeof b.filter==t)return b.filter(c,d);if(H.ma(b)||H.L(b))return H.g.filter(b,c,d);var e=H.R.la(b),f=H.R.ga(b),g=f.length;if(e){var h={};for(var k=0;k<g;k++)c.call(d,f[k],e[k],b)&&(h[e[k]]=f[k])}else for(h=[],k=0;k<g;k++)c.call(d,f[k],void 0,b)&&h.push(f[k]);return h};
H.R.map=function(b,c,d){if(typeof b.map==t)return b.map(c,d);if(H.ma(b)||H.L(b))return H.g.map(b,c,d);var e=H.R.la(b),f=H.R.ga(b),g=f.length;if(e){var h={};for(var k=0;k<g;k++)h[e[k]]=c.call(d,f[k],e[k],b)}else for(h=[],k=0;k<g;k++)h[k]=c.call(d,f[k],void 0,b);return h};H.R.some=function(b,c,d){if(typeof b.some==t)return b.some(c,d);if(H.ma(b)||H.L(b))return H.g.some(b,c,d);for(var e=H.R.la(b),f=H.R.ga(b),g=f.length,h=0;h<g;h++)if(c.call(d,f[h],e&&e[h],b))return!0;return!1};
H.R.every=function(b,c,d){if(typeof b.every==t)return b.every(c,d);if(H.ma(b)||H.L(b))return H.g.every(b,c,d);for(var e=H.R.la(b),f=H.R.ga(b),g=f.length,h=0;h<g;h++)if(!c.call(d,f[h],e&&e[h],b))return!1;return!0};H.uri={};H.uri.l={};H.uri.l.qc={Kf:38,EQUAL:61,ck:35,mk:63};H.uri.l.ye=function(b,c,d,e,f,g,h){var k="";b&&(k+=b+":");d&&(k+="//",c&&(k+=c+"@"),k+=d,e&&(k+=":"+e));f&&(k+=f);g&&(k+="?"+g);h&&(k+="#"+h);return k};H.uri.l.ro=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;H.uri.l.U={Xb:1,qe:2,lb:3,ob:4,le:5,me:6,dg:7};H.uri.l.split=function(b){return b.match(H.uri.l.ro)};
H.uri.l.ld=function(b,c){return b?c?decodeURI(b):decodeURIComponent(b):b};H.uri.l.ac=function(b,c){return H.uri.l.split(c)[b]||null};H.uri.l.Gc=function(b){return H.uri.l.ac(H.uri.l.U.Xb,b)};H.uri.l.xu=function(b){b=H.uri.l.Gc(b);!b&&H.global.self&&H.global.self.location&&(b=H.global.self.location.protocol,b=b.substr(0,b.length-1));return b?b.toLowerCase():""};H.uri.l.qm=function(){return H.uri.l.ac(H.uri.l.U.qe,void 0)};H.uri.l.vd=function(){return H.uri.l.ld(H.uri.l.qm())};
H.uri.l.bm=function(){return H.uri.l.ac(H.uri.l.U.lb,void 0)};H.uri.l.pd=function(){return H.uri.l.ld(H.uri.l.bm(),!0)};H.uri.l.td=function(){return Number(H.uri.l.ac(H.uri.l.U.ob,void 0))||null};H.uri.l.im=function(){return H.uri.l.ac(H.uri.l.U.le,void 0)};H.uri.l.bc=function(){return H.uri.l.ld(H.uri.l.im(),!0)};H.uri.l.Xe=function(){return H.uri.l.ac(H.uri.l.U.me,void 0)};H.uri.l.em=function(){var b=(void 0).indexOf("#");return 0>b?null:(void 0).substr(b+1)};
H.uri.l.Rw=function(b,c){return H.uri.l.Kn(b)+(c?"#"+c:"")};H.uri.l.rd=function(){return H.uri.l.ld(H.uri.l.em())};H.uri.l.zu=function(b){b=H.uri.l.split(b);return H.uri.l.ye(b[H.uri.l.U.Xb],b[H.uri.l.U.qe],b[H.uri.l.U.lb],b[H.uri.l.U.ob])};H.uri.l.Eu=function(b){b=H.uri.l.split(b);return H.uri.l.ye(b[H.uri.l.U.Xb],null,b[H.uri.l.U.lb],b[H.uri.l.U.ob])};H.uri.l.Iu=function(b){b=H.uri.l.split(b);return H.uri.l.ye(null,null,null,null,b[H.uri.l.U.le],b[H.uri.l.U.me],b[H.uri.l.U.dg])};
H.uri.l.Kn=function(b){var c=b.indexOf("#");return 0>c?b:b.substr(0,c)};H.uri.l.zm=function(b,c){b=H.uri.l.split(b);c=H.uri.l.split(c);return b[H.uri.l.U.lb]==c[H.uri.l.U.lb]&&b[H.uri.l.U.Xb]==c[H.uri.l.U.Xb]&&b[H.uri.l.U.ob]==c[H.uri.l.U.ob]};H.uri.l.Ts=B();H.uri.l.yn=function(b,c){if(b){b=b.split("&");for(var d=0;d<b.length;d++){var e=b[d].indexOf("="),f=null;if(0<=e){var g=b[d].substring(0,e);f=b[d].substring(e+1)}else g=b[d];c(g,f?H.c.$d(f):"")}}};
H.uri.l.bj=function(b){var c=b.indexOf("#");0>c&&(c=b.length);var d=b.indexOf("?");if(0>d||d>c){d=c;var e=""}else e=b.substring(d+1,c);return[b.substr(0,d),e,b.substr(c)]};H.uri.l.Ci=function(b){return b[0]+(b[1]?"?"+b[1]:"")+b[2]};H.uri.l.Dg=function(b,c){return c?b?b+"&"+c:c:b};H.uri.l.ue=function(b,c){if(!c)return b;b=H.uri.l.bj(b);b[1]=H.uri.l.Dg(b[1],c);return H.uri.l.Ci(b)};
H.uri.l.te=function(b,c,d){if(H.isArray(c))for(var e=0;e<c.length;e++)H.uri.l.te(b,String(c[e]),d);else null!=c&&d.push(b+(""===c?"":"="+H.c.Rc(c)))};H.uri.l.Mg=function(b,c){var d=[];for(c=c||0;c<b.length;c+=2)H.uri.l.te(b[c],b[c+1],d);return d.join("&")};H.uri.l.Ng=function(b){var c=[],d;for(d in b)H.uri.l.te(d,b[d],c);return c.join("&")};H.uri.l.Gs=function(b,c){var d=2==arguments.length?H.uri.l.Mg(arguments[1],0):H.uri.l.Mg(arguments,1);return H.uri.l.ue(b,d)};
H.uri.l.Hs=function(b,c){c=H.uri.l.Ng(c);return H.uri.l.ue(b,c)};H.uri.l.Pk=function(b,c,d){d=H.zb(d)?"="+H.c.Rc(d):"";return H.uri.l.ue(b,c+d)};H.uri.l.od=function(b,c,d,e){for(var f=d.length;0<=(c=b.indexOf(d,c))&&c<e;){var g=b.charCodeAt(c-1);if(g==H.uri.l.qc.Kf||g==H.uri.l.qc.mk)if(g=b.charCodeAt(c+f),!g||g==H.uri.l.qc.EQUAL||g==H.uri.l.qc.Kf||g==H.uri.l.qc.ck)return c;c+=f+1}return-1};H.uri.l.yd=/#|$/;H.uri.l.Tu=function(b,c){return 0<=H.uri.l.od(b,0,c,b.search(H.uri.l.yd))};
H.uri.l.Gu=function(b,c){var d=b.search(H.uri.l.yd),e=H.uri.l.od(b,0,c,d);if(0>e)return null;var f=b.indexOf("&",e);if(0>f||f>d)f=d;e+=c.length+1;return H.c.$d(b.substr(e,f-e))};H.uri.l.Hu=function(b,c){for(var d=b.search(H.uri.l.yd),e=0,f,g=[];0<=(f=H.uri.l.od(b,e,c,d));){e=b.indexOf("&",f);if(0>e||e>d)e=d;f+=c.length+1;g.push(H.c.$d(b.substr(f,e-f)))}return g};H.uri.l.Bo=/[?&]($|#)/;
H.uri.l.Ln=function(b,c){for(var d=b.search(H.uri.l.yd),e=0,f,g=[];0<=(f=H.uri.l.od(b,e,c,d));)g.push(b.substring(e,f)),e=Math.min(b.indexOf("&",f)+1||d,d);g.push(b.substr(e));return g.join("").replace(H.uri.l.Bo,"$1")};H.uri.l.ko=function(b){var c=H.uri.l.ug.sg,d=H.c.Ph();return H.uri.l.Pk(H.uri.l.Ln(b,c),c,d)};
H.uri.l.$w=function(b,c){b=H.uri.l.bj(b);var d=b[1],e=[];d&&H.g.forEach(d.split("&"),function(f){var g=f.indexOf("=");c.hasOwnProperty(0<=g?f.substr(0,g):f)||e.push(f)});b[1]=H.uri.l.Dg(e.join("&"),H.uri.l.Ng(c));return H.uri.l.Ci(b)};H.uri.l.Is=function(b,c){H.c.endsWith(b,"/")&&(b=b.substr(0,b.length-1));H.c.startsWith(c,"/")&&(c=c.substr(1));return H.c.nl(b,"/",c)};H.uri.l.Qc=function(b){H.uri.l.split(b)};H.uri.l.ug={sg:"zx"};H.uri.l.pn=function(b){return H.uri.l.ko(b)};H.G=function(b,c){this.Ac=this.If=this.mc="";this.Hd=null;this.Ke=this.Gd="";this.Ma=this.Sm=!1;var d;b instanceof H.G?(this.Ma=H.ca(c)?c:b.Ma,O(this,b.Gc()),P(this,b.vd()),Q(this,b.pd()),R(this,b.td()),this.Qc(b.bc()),S(this,b.Xe().clone()),T(this,b.rd())):b&&(d=H.uri.l.split(String(b)))?(this.Ma=!!c,O(this,d[H.uri.l.U.Xb]||"",!0),P(this,d[H.uri.l.U.qe]||"",!0),Q(this,d[H.uri.l.U.lb]||"",!0),R(this,d[H.uri.l.U.ob]),this.Qc(d[H.uri.l.U.le]||"",!0),S(this,d[H.uri.l.U.me]||"",!0),T(this,d[H.uri.l.U.dg]||
"",!0)):(this.Ma=!!c,this.Oa=new H.G.bb(null,this.Ma))};H.G.nk=H.uri.l.ug.sg;F=H.G.prototype;
F.toString=function(){var b=[],c=this.Gc();c&&b.push(H.G.Bc(c,H.G.Pi,!0),":");var d=this.pd();if(d||"file"==c)b.push("//"),(c=this.vd())&&b.push(H.G.Bc(c,H.G.Pi,!0),"@"),b.push(H.G.Qi(H.c.Rc(d))),d=this.td(),null!=d&&b.push(":",String(d));if(d=this.bc())this.Ac&&"/"!=d.charAt(0)&&b.push("/"),b.push(H.G.Bc(d,"/"==d.charAt(0)?H.G.En:H.G.Hn,!0));(d=this.Oa.toString())&&b.push("?",d);(d=this.rd())&&b.push("#",H.G.Bc(d,H.G.Fn));return b.join("")};
F.resolve=function(b){var c=this.clone(),d=!!b.mc;d?O(c,b.Gc()):d=!!b.If;d?P(c,b.vd()):d=!!b.Ac;d?Q(c,b.pd()):d=null!=b.Hd;var e=b.bc();if(d)R(c,b.td());else if(d=!!b.Gd){if("/"!=e.charAt(0))if(this.Ac&&!this.Gd)e="/"+e;else{var f=c.bc().lastIndexOf("/");-1!=f&&(e=c.bc().substr(0,f+1)+e)}e=H.G.In(e)}d?c.Qc(e):d=""!==b.Oa.toString();d?S(c,b.Xe().clone()):d=!!b.Ke;d&&T(c,b.rd());return c};F.clone=function(){return new H.G(this)};F.Gc=D("mc");
function O(b,c,d){X(b);b.mc=d?H.G.zc(c,!0):c;b.mc&&(b.mc=b.mc.replace(/:$/,""))}F.vd=D("If");function P(b,c,d){X(b);b.If=d?H.G.zc(c):c}F.pd=D("Ac");function Q(b,c,d){X(b);b.Ac=d?H.G.zc(c,!0):c}F.td=D("Hd");function R(b,c){X(b);if(c){c=Number(c);if(isNaN(c)||0>c)throw Error("Bad port number "+c);b.Hd=c}else b.Hd=null}F.bc=D("Gd");F.Qc=function(b,c){X(this);this.Gd=c?H.G.zc(b,!0):b};function S(b,c,d){X(b);c instanceof H.G.bb?(b.Oa=c,b.Oa.wf(b.Ma)):(d||(c=H.G.Bc(c,H.G.Gn)),b.Oa=new H.G.bb(c,b.Ma))}
F.Xe=D("Oa");F.getQuery=function(){return this.Oa.toString()};F.rd=D("Ke");function T(b,c,d){X(b);b.Ke=d?H.G.zc(c):c}F.pn=function(){X(this);var b=H.G.nk,c=H.c.Ph();X(this);this.Oa.set(b,c);return this};F.removeParameter=function(b){X(this);this.Oa.remove(b);return this};function X(b){if(b.Sm)throw Error("Tried to modify a read-only Uri");}F.wf=function(b){this.Ma=b;this.Oa&&this.Oa.wf(b)};H.G.parse=function(b,c){return b instanceof H.G?b.clone():new H.G(b,c)};
H.G.create=function(b,c,d,e,f,g,h,k){k=new H.G(null,k);b&&O(k,b);c&&P(k,c);d&&Q(k,d);e&&R(k,e);f&&k.Qc(f);g&&S(k,g);h&&T(k,h);return k};H.G.resolve=function(b,c){b instanceof H.G||(b=H.G.parse(b));c instanceof H.G||(c=H.G.parse(c));return b.resolve(c)};
H.G.In=function(b){if(".."==b||"."==b)return"";if(H.c.contains(b,"./")||H.c.contains(b,"/.")){var c=H.c.startsWith(b,"/");b=b.split("/");for(var d=[],e=0;e<b.length;){var f=b[e++];"."==f?c&&e==b.length&&d.push(""):".."==f?((1<d.length||1==d.length&&""!=d[0])&&d.pop(),c&&e==b.length&&d.push("")):(d.push(f),c=!0)}return d.join("/")}return b};H.G.zc=function(b,c){return b?c?decodeURI(b.replace(/%25/g,"%2525")):decodeURIComponent(b):""};
H.G.Bc=function(b,c,d){return H.L(b)?(b=encodeURI(b).replace(c,H.G.Kl),d&&(b=H.G.Qi(b)),b):null};H.G.Kl=function(b){b=b.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)};H.G.Qi=function(b){return b.replace(/%25([0-9a-fA-F]{2})/g,"%$1")};H.G.Pi=/[#\/\?@]/g;H.G.Hn=/[#\?:]/g;H.G.En=/[#\?]/g;H.G.Gn=/[#\?@]/g;H.G.Fn=/#/g;H.G.zm=function(b,c){b=H.uri.l.split(b);c=H.uri.l.split(c);return b[H.uri.l.U.lb]==c[H.uri.l.U.lb]&&b[H.uri.l.U.ob]==c[H.uri.l.U.ob]};
H.G.bb=function(b,c){this.Z=this.da=null;this.Ka=b||null;this.Ma=!!c};function Y(b){b.da||(b.da=new H.R.Map,b.Z=0,b.Ka&&H.uri.l.yn(b.Ka,function(c,d){b.add(H.c.$d(c),d)}))}H.G.bb.wt=function(b,c,d){c=H.R.la(b);if("undefined"==typeof c)throw Error("Keys are undefined");d=new H.G.bb(null,d);b=H.R.ga(b);for(var e=0;e<c.length;e++){var f=c[e],g=b[e];H.isArray(g)?ta(d,f,g):d.add(f,g)}return d};
H.G.bb.vt=function(b,c,d,e){if(b.length!=c.length)throw Error("Mismatched lengths for keys/values");d=new H.G.bb(null,e);for(e=0;e<b.length;e++)d.add(b[e],c[e]);return d};F=H.G.bb.prototype;F.ub=function(){Y(this);return this.Z};F.add=function(b,c){Y(this);this.Ka=null;b=Z(this,b);var d=this.da.get(b);d||this.da.set(b,d=[]);d.push(c);this.Z+=1;return this};F.remove=function(b){Y(this);b=Z(this,b);return this.da.Lb(b)?(this.Ka=null,this.Z-=this.da.get(b).length,this.da.remove(b)):!1};
F.clear=function(){this.da=this.Ka=null;this.Z=0};F.Ca=function(){Y(this);return 0==this.Z};F.Lb=function(b){Y(this);b=Z(this,b);return this.da.Lb(b)};F.Mb=function(b){var c=this.ga();return H.g.contains(c,b)};F.forEach=function(b,c){Y(this);this.da.forEach(function(d,e){H.g.forEach(d,function(f){b.call(c,f,e,this)},this)},this)};F.la=function(){Y(this);for(var b=this.da.ga(),c=this.da.la(),d=[],e=0;e<c.length;e++)for(var f=b[e],g=0;g<f.length;g++)d.push(c[e]);return d};
F.ga=function(b){Y(this);var c=[];if(H.L(b))this.Lb(b)&&(c=H.g.concat(c,this.da.get(Z(this,b))));else{b=this.da.ga();for(var d=0;d<b.length;d++)c=H.g.concat(c,b[d])}return c};F.set=function(b,c){Y(this);this.Ka=null;b=Z(this,b);this.Lb(b)&&(this.Z-=this.da.get(b).length);this.da.set(b,[c]);this.Z+=1;return this};F.get=function(b,c){if(!b)return c;b=this.ga(b);return 0<b.length?String(b[0]):c};function ta(b,c,d){b.remove(c);0<d.length&&(b.Ka=null,b.da.set(Z(b,c),H.g.clone(d)),b.Z+=d.length)}
F.toString=function(){if(this.Ka)return this.Ka;if(!this.da)return"";for(var b=[],c=this.da.la(),d=0;d<c.length;d++){var e=c[d],f=H.c.Rc(e);e=this.ga(e);for(var g=0;g<e.length;g++){var h=f;""!==e[g]&&(h+="="+H.c.Rc(e[g]));b.push(h)}}return this.Ka=b.join("&")};F.clone=function(){var b=new H.G.bb;b.Ka=this.Ka;this.da&&(b.da=this.da.clone(),b.Z=this.Z);return b};function Z(b,c){c=String(c);b.Ma&&(c=c.toLowerCase());return c}
F.wf=function(b){b&&!this.Ma&&(Y(this),this.Ka=null,this.da.forEach(function(c,d){var e=d.toLowerCase();d!=e&&(this.remove(d),ta(this,e,c))},this));this.Ma=b};F.extend=function(b){for(var c=0;c<arguments.length;c++)H.R.forEach(arguments[c],function(d,e){this.add(e,d)},this)};var google={v:{}};google.v.w={};google.v.w.ja={};google.v.w.ja.Ai=function(){return new Promise(function(b){if("undefined"==typeof window||"complete"===document.readyState)b();else if(window.addEventListener)document.addEventListener("DOMContentLoaded",b,!0),window.addEventListener("load",b,!0);else if(window.attachEvent)window.attachEvent("onload",b);else{var c=window.onload;H.Wa(c)?window.onload=function(d){c(d);b()}:window.onload=b}})};H.Dc("google.charts.loader.Utils.isWindowLoaded",google.v.w.ja.Ai);
google.v.w.ja.hb={};google.v.w.ja.ww=function(){google.v.w.ja.hb={}};google.v.w.ja.Mu=function(b){return google.v.w.ja.hb[b]&&google.v.w.ja.hb[b].Pd};google.v.w.ja.Lu=function(b){return google.v.w.ja.hb[b]&&google.v.w.ja.hb[b].loaded};google.v.w.ja.ax=function(b,c){google.v.w.ja.hb[b]={Pd:c,loaded:!1}};google.v.w.ja.lo=function(b){google.v.w.ja.hb[b]||(google.v.w.ja.hb[b]={loaded:!1});google.v.w.ja.hb[b].loaded=!0};google.v.w.Qa={};google.v.w.Qa.kj=3E4;google.v.w.Qa.Tv=function(b,c){return{format:b,Qk:c}};google.v.w.Qa.om=function(b){return H.b.H.format(b.format,b.Qk)};google.v.w.Qa.load=function(b,c){var d=H.b.H.format(b,c),e=H.N.P.Sd(d,{timeout:google.v.w.Qa.kj,attributes:{async:!1,defer:!1}});return new Promise(function(f){google.v.w.ja.lo(d.toString());L(e,f)})};
google.v.w.Qa.Ov=function(b){b=H.g.map(b,google.v.w.Qa.om);if(H.g.Ca(b))return Promise.resolve();var c={timeout:google.v.w.Qa.kj,attributes:{async:!1,defer:!1}},d=[];!H.userAgent.oa||H.userAgent.Xa(11)?H.g.forEach(b,function(e){d.push(H.N.P.Sd(e,c))}):d.push(H.N.P.Zn(b,c));return Promise.all(H.g.map(d,function(e){return new Promise(function(f){return L(e,f)})}))};google.v.w.Bg={1:"1.0","1.0":"current","1.1":"upcoming",41:x,42:x,43:x,44:x,46:"46.1","46.1":"46.2",previous:"45.2",current:"46",upcoming:"46.2"};google.v.w.J={};google.v.w.J.Cm=function(){google.v.w.J.gf=null;google.v.w.J.jd=null;google.v.w.J.rj=null};H.wb(aa)?console.warn("Google Charts loader.js should only be loaded once."):google.v.w.J.Cm();google.v.w.J.qn=function(b){var c=b,d=b.match(/^testing-/);d&&(c=c.replace(/^testing-/,""));b=c;do{if(c===google.v.w.Bg[c])throw Error("Infinite loop in version mapping: "+c);var e=google.v.w.Bg[c];e&&(c=e)}while(e);d=(d?"testing-":"")+c;return{version:c==x?b:d,jn:d}};
google.v.w.J.hn=function(b){var c=google.v.w.J.qn(b),d=H.c.M.from("https://www.gstatic.com/charts/%{version}/loader.js");return google.v.w.Qa.load(d,{version:c.jn}).then(function(){var e=H.wb("google.charts.loader.VersionSpecific.load")||H.wb("google.charts.loader.publicLoad")||H.wb("google.charts.versionSpecific.load");if(!e)throw Error("Bad version: "+b);google.v.w.J.rj=function(f){f=e(c.version,f);if(null==f||null==f.then){var g=H.wb("google.charts.loader.publicSetOnLoadCallback")||H.wb("google.charts.versionSpecific.setOnLoadCallback");
f=new Promise(function(h){g(h)});f.then=g}return f}})};google.v.w.J.en=function(b,c){if(!google.v.w.J.gf){if(c.enableUrlSettings&&window.URLSearchParams)try{b=(new URLSearchParams(top.location.search)).get("charts-version")||b}catch(d){console.info("Failed to get charts-version from top URL",d)}google.v.w.J.gf=google.v.w.J.hn(b)}return google.v.w.J.jd=google.v.w.J.gf.then(function(){return google.v.w.J.rj(c)})};
google.v.w.J.jo=function(b){if(!google.v.w.J.jd)throw Error("Must call google.charts.load before google.charts.setOnLoadCallback");return b?google.v.w.J.jd.then(b):google.v.w.J.jd};google.v.load=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];d=0;"visualization"===c[d]&&d++;var e="current";H.L(c[d])&&(e=c[d],d++);var f={};H.Da(c[d])&&(f=c[d]);return google.v.w.J.en(e,f)};H.Dc(aa,google.v.load);google.v.$i=google.v.w.J.jo;H.Dc("google.charts.setOnLoadCallback",google.v.$i);
google.v.w.J.ik=H.c.M.from("https://maps.googleapis.com/maps/api/js?jsapiRedirect=true&key=%{key}&v=%{version}&libraries=%{libraries}");google.v.w.J.jk=H.c.M.from("https://maps-api-ssl.google.com/maps?jsapiRedirect=true&file=googleapi&key=%{key}&v=%{version}&libraries=%{libraries}");
google.v.w.J.fn=function(b,c,d){console.warn("Loading Maps API with the jsapi loader is deprecated.");d=d||{};b=google.v.w.J.hf(d.callback);google.v.w.Qa.load("2"===c?google.v.w.J.jk:google.v.w.J.ik,{key:d.key||d.client||"",version:c||"",libraries:d.libraries||""}).then(b)};google.v.w.J.ig=H.c.M.from("https://www.gstatic.com/inputtools/js/ita/inputtools_3.js");
google.v.w.J.dn=function(b,c,d){H.Da(d)&&d.packages?(H.isArray(d.packages)?d.packages:[d.packages]).includes("inputtools")?(console.warn("Loading Input Tools with the jsapi loader is deprecated.\nPlease load "+google.v.w.J.ig+" directly."),b=google.v.w.J.hf(d.callback),google.v.w.Qa.load(google.v.w.J.ig,{}).then(b)):console.error("Loading elements other than inputtools with the jsapi loader is unsupported."):console.error("google.load of elements was invoked without specifying packages")};
google.v.w.J.hf=function(b){return function(){if(H.L(b)&&""!==b)try{H.wb(b)()}catch(c){throw Error("Callback failed with: "+c);}}};google.v.w.J.Yh=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];switch(c[0]){case "maps":google.v.w.J.fn.apply(google.v.w.J,G.ve(c));return;case "elements":google.v.w.J.dn.apply(google.v.w.J,G.ve(c));return}if("visualization"!==c[0])throw Error('Module "'+c[0]+'" is not supported.');google.v.load.apply(google.v,G.ve(c))};
google.v.w.J.Cn=function(b){H.L(b)&&(b=google.v.w.J.hf(b),google.v.w.ja.Ai().then(b))};google.v.w.J.Bn=function(b){if(H.L(b))try{if(""!==b)for(var c=JSON.parse(b).modules,d=G.Dd(c),e=d.next();!e.done;e=d.next()){var f=e.value;google.v.w.J.Yh(f.name,f.version,f)}}catch(g){throw Error("Autoload failed with: "+g);}};google.v.w.J.Rl=function(){H.wb("google.load")||(H.Dc("google.load",google.v.w.J.Yh),H.Dc("google.setOnLoadCallback",google.v.$i))};
google.v.w.J.Dn=function(){google.v.w.J.Rl();var b=document.getElementsByTagName("script");b=b[b.length-1].getAttribute("src");b=(new H.G(b)).Oa.toString();b=new H.G.bb(b);google.v.w.J.Cn(b.get("callback"));google.v.w.J.Bn(b.get("autoload"))};google.v.w.J.Dn();}).call(this);

/*!
 * Chart.js v2.8.0
 * https://www.chartjs.org
 * (c) 2019 Chart.js Contributors
 * Released under the MIT License
 */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(function(){try{return require("moment")}catch(t){}}()):"function"==typeof define&&define.amd?define(["require"],function(t){return e(function(){try{return t("moment")}catch(t){}}())}):t.Chart=e(t.moment)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={rgb2hsl:i,rgb2hsv:n,rgb2hwb:a,rgb2cmyk:o,rgb2keyword:s,rgb2xyz:l,rgb2lab:d,rgb2lch:function(t){return x(d(t))},hsl2rgb:u,hsl2hsv:function(t){var e=t[0],i=t[1]/100,n=t[2]/100;if(0===n)return[0,0,0];return[e,100*(2*(i*=(n*=2)<=1?n:2-n)/(n+i)),100*((n+i)/2)]},hsl2hwb:function(t){return a(u(t))},hsl2cmyk:function(t){return o(u(t))},hsl2keyword:function(t){return s(u(t))},hsv2rgb:h,hsv2hsl:function(t){var e,i,n=t[0],a=t[1]/100,o=t[2]/100;return e=a*o,[n,100*(e=(e/=(i=(2-a)*o)<=1?i:2-i)||0),100*(i/=2)]},hsv2hwb:function(t){return a(h(t))},hsv2cmyk:function(t){return o(h(t))},hsv2keyword:function(t){return s(h(t))},hwb2rgb:c,hwb2hsl:function(t){return i(c(t))},hwb2hsv:function(t){return n(c(t))},hwb2cmyk:function(t){return o(c(t))},hwb2keyword:function(t){return s(c(t))},cmyk2rgb:f,cmyk2hsl:function(t){return i(f(t))},cmyk2hsv:function(t){return n(f(t))},cmyk2hwb:function(t){return a(f(t))},cmyk2keyword:function(t){return s(f(t))},keyword2rgb:w,keyword2hsl:function(t){return i(w(t))},keyword2hsv:function(t){return n(w(t))},keyword2hwb:function(t){return a(w(t))},keyword2cmyk:function(t){return o(w(t))},keyword2lab:function(t){return d(w(t))},keyword2xyz:function(t){return l(w(t))},xyz2rgb:p,xyz2lab:m,xyz2lch:function(t){return x(m(t))},lab2xyz:v,lab2rgb:y,lab2lch:x,lch2lab:k,lch2xyz:function(t){return v(k(t))},lch2rgb:function(t){return y(k(t))}};function i(t){var e,i,n=t[0]/255,a=t[1]/255,o=t[2]/255,r=Math.min(n,a,o),s=Math.max(n,a,o),l=s-r;return s==r?e=0:n==s?e=(a-o)/l:a==s?e=2+(o-n)/l:o==s&&(e=4+(n-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),i=(r+s)/2,[e,100*(s==r?0:i<=.5?l/(s+r):l/(2-s-r)),100*i]}function n(t){var e,i,n=t[0],a=t[1],o=t[2],r=Math.min(n,a,o),s=Math.max(n,a,o),l=s-r;return i=0==s?0:l/s*1e3/10,s==r?e=0:n==s?e=(a-o)/l:a==s?e=2+(o-n)/l:o==s&&(e=4+(n-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),[e,i,s/255*1e3/10]}function a(t){var e=t[0],n=t[1],a=t[2];return[i(t)[0],100*(1/255*Math.min(e,Math.min(n,a))),100*(a=1-1/255*Math.max(e,Math.max(n,a)))]}function o(t){var e,i=t[0]/255,n=t[1]/255,a=t[2]/255;return[100*((1-i-(e=Math.min(1-i,1-n,1-a)))/(1-e)||0),100*((1-n-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]}function s(t){return _[JSON.stringify(t)]}function l(t){var e=t[0]/255,i=t[1]/255,n=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]}function d(t){var e=l(t),i=e[0],n=e[1],a=e[2];return n/=100,a/=108.883,i=(i/=95.047)>.008856?Math.pow(i,1/3):7.787*i+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(i-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function u(t){var e,i,n,a,o,r=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[o=255*l,o,o];e=2*l-(i=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var d=0;d<3;d++)(n=r+1/3*-(d-1))<0&&n++,n>1&&n--,o=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,a[d]=255*o;return a}function h(t){var e=t[0]/60,i=t[1]/100,n=t[2]/100,a=Math.floor(e)%6,o=e-Math.floor(e),r=255*n*(1-i),s=255*n*(1-i*o),l=255*n*(1-i*(1-o));n*=255;switch(a){case 0:return[n,l,r];case 1:return[s,n,r];case 2:return[r,n,l];case 3:return[r,s,n];case 4:return[l,r,n];case 5:return[n,r,s]}}function c(t){var e,i,n,a,o=t[0]/360,s=t[1]/100,l=t[2]/100,d=s+l;switch(d>1&&(s/=d,l/=d),n=6*o-(e=Math.floor(6*o)),0!=(1&e)&&(n=1-n),a=s+n*((i=1-l)-s),e){default:case 6:case 0:r=i,g=a,b=s;break;case 1:r=a,g=i,b=s;break;case 2:r=s,g=i,b=a;break;case 3:r=s,g=a,b=i;break;case 4:r=a,g=s,b=i;break;case 5:r=i,g=s,b=a}return[255*r,255*g,255*b]}function f(t){var e=t[0]/100,i=t[1]/100,n=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a))]}function p(t){var e,i,n,a=t[0]/100,o=t[1]/100,r=t[2]/100;return i=-.9689*a+1.8758*o+.0415*r,n=.0557*a+-.204*o+1.057*r,e=(e=3.2406*a+-1.5372*o+-.4986*r)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(i=Math.min(Math.max(0,i),1)),255*(n=Math.min(Math.max(0,n),1))]}function m(t){var e=t[0],i=t[1],n=t[2];return i/=100,n/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(e-i),200*(i-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]}function v(t){var e,i,n,a,o=t[0],r=t[1],s=t[2];return o<=8?a=(i=100*o/903.3)/100*7.787+16/116:(i=100*Math.pow((o+16)/116,3),a=Math.pow(i/100,1/3)),[e=e/95.047<=.008856?e=95.047*(r/500+a-16/116)/7.787:95.047*Math.pow(r/500+a,3),i,n=n/108.883<=.008859?n=108.883*(a-s/200-16/116)/7.787:108.883*Math.pow(a-s/200,3)]}function x(t){var e,i=t[0],n=t[1],a=t[2];return(e=360*Math.atan2(a,n)/2/Math.PI)<0&&(e+=360),[i,Math.sqrt(n*n+a*a),e]}function y(t){return p(v(t))}function k(t){var e,i=t[0],n=t[1];return e=t[2]/360*2*Math.PI,[i,n*Math.cos(e),n*Math.sin(e)]}function w(t){return M[t]}var M={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},_={};for(var C in M)_[JSON.stringify(M[C])]=C;var S=function(){return new T};for(var P in e){S[P+"Raw"]=function(t){return function(i){return"number"==typeof i&&(i=Array.prototype.slice.call(arguments)),e[t](i)}}(P);var I=/(\w+)2(\w+)/.exec(P),A=I[1],D=I[2];(S[A]=S[A]||{})[D]=S[P]=function(t){return function(i){"number"==typeof i&&(i=Array.prototype.slice.call(arguments));var n=e[t](i);if("string"==typeof n||void 0===n)return n;for(var a=0;a<n.length;a++)n[a]=Math.round(n[a]);return n}}(P)}var T=function(){this.convs={}};T.prototype.routeSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i))},T.prototype.setValues=function(t,e){return this.space=t,this.convs={},this.convs[t]=e,this},T.prototype.getValues=function(t){var e=this.convs[t];if(!e){var i=this.space,n=this.convs[i];e=S[i][t](n),this.convs[t]=e}return e},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(t){T.prototype[t]=function(e){return this.routeSpace(t,arguments)}});var F=S,L={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},R={getRgba:O,getHsla:z,getRgb:function(t){var e=O(t);return e&&e.slice(0,3)},getHsl:function(t){var e=z(t);return e&&e.slice(0,3)},getHwb:B,getAlpha:function(t){var e=O(t);if(e)return e[3];if(e=z(t))return e[3];if(e=B(t))return e[3]},hexString:function(t,e){var e=void 0!==e&&3===t.length?e:t[3];return"#"+H(t[0])+H(t[1])+H(t[2])+(e>=0&&e<1?H(Math.round(255*e)):"")},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return N(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:N,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return W(t,e);var i=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+i+"%, "+n+"%, "+a+"%)"},percentaString:W,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return V(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:V,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return j[t.slice(0,3)]}};function O(t){if(t){var e=[0,0,0],i=1,n=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(n){a=(n=n[1])[3];for(var o=0;o<e.length;o++)e[o]=parseInt(n[o]+n[o],16);a&&(i=Math.round(parseInt(a+a,16)/255*100)/100)}else if(n=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){a=n[2],n=n[1];for(o=0;o<e.length;o++)e[o]=parseInt(n.slice(2*o,2*o+2),16);a&&(i=Math.round(parseInt(a,16)/255*100)/100)}else if(n=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<e.length;o++)e[o]=parseInt(n[o+1]);i=parseFloat(n[4])}else if(n=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<e.length;o++)e[o]=Math.round(2.55*parseFloat(n[o+1]));i=parseFloat(n[4])}else if(n=t.match(/(\w+)/)){if("transparent"==n[1])return[0,0,0,0];if(!(e=L[n[1]]))return}for(o=0;o<e.length;o++)e[o]=E(e[o],0,255);return i=i||0==i?E(i,0,1):1,e[3]=i,e}}function z(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var i=parseFloat(e[4]);return[E(parseInt(e[1]),0,360),E(parseFloat(e[2]),0,100),E(parseFloat(e[3]),0,100),E(isNaN(i)?1:i,0,1)]}}}function B(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var i=parseFloat(e[4]);return[E(parseInt(e[1]),0,360),E(parseFloat(e[2]),0,100),E(parseFloat(e[3]),0,100),E(isNaN(i)?1:i,0,1)]}}}function N(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function W(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function V(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function E(t,e,i){return Math.min(Math.max(e,t),i)}function H(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var j={};for(var q in L)j[L[q]]=q;var Y=function(t){return t instanceof Y?t:this instanceof Y?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=R.getRgba(t))?this.setValues("rgb",e):(e=R.getHsla(t))?this.setValues("hsl",e):(e=R.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new Y(t);var e};Y.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return R.hexString(this.values.rgb)},rgbString:function(){return R.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return R.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return R.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return R.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return R.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return R.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return R.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],i=0;i<t.length;i++){var n=t[i]/255;e[i]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,i=(e[0]+t)%360;return e[0]=i<0?360+i:i,this.setValues("hsl",e),this},mix:function(t,e){var i=t,n=void 0===e?.5:e,a=2*n-1,o=this.alpha()-i.alpha(),r=((a*o==-1?a:(a+o)/(1+a*o))+1)/2,s=1-r;return this.rgb(r*this.red()+s*i.red(),r*this.green()+s*i.green(),r*this.blue()+s*i.blue()).alpha(this.alpha()*n+i.alpha()*(1-n))},toJSON:function(){return this.rgb()},clone:function(){var t,e,i=new Y,n=this.values,a=i.values;for(var o in n)n.hasOwnProperty(o)&&(t=n[o],"[object Array]"===(e={}.toString.call(t))?a[o]=t.slice(0):"[object Number]"===e?a[o]=t:console.error("unexpected color value:",t));return i}},Y.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},Y.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},Y.prototype.getValues=function(t){for(var e=this.values,i={},n=0;n<t.length;n++)i[t.charAt(n)]=e[t][n];return 1!==e.alpha&&(i.a=e.alpha),i},Y.prototype.setValues=function(t,e){var i,n,a=this.values,o=this.spaces,r=this.maxes,s=1;if(this.valid=!0,"alpha"===t)s=e;else if(e.length)a[t]=e.slice(0,t.length),s=e[t.length];else if(void 0!==e[t.charAt(0)]){for(i=0;i<t.length;i++)a[t][i]=e[t.charAt(i)];s=e.a}else if(void 0!==e[o[t][0]]){var l=o[t];for(i=0;i<t.length;i++)a[t][i]=e[l[i]];s=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===s?a.alpha:s)),"alpha"===t)return!1;for(i=0;i<t.length;i++)n=Math.max(0,Math.min(r[t][i],a[t][i])),a[t][i]=Math.round(n);for(var d in o)d!==t&&(a[d]=F[t][d](a[t]));return!0},Y.prototype.setSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i),this)},Y.prototype.setChannel=function(t,e,i){var n=this.values[t];return void 0===i?n[e]:i===n[e]?this:(n[e]=i,this.setValues(t,n),this)},"undefined"!=typeof window&&(window.Color=Y);var U,X=Y,K={noop:function(){},uid:(U=0,function(){return U++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,i){return K.valueOrDefault(K.isArray(t)?t[e]:t,i)},callback:function(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)},each:function(t,e,i,n){var a,o,r;if(K.isArray(t))if(o=t.length,n)for(a=o-1;a>=0;a--)e.call(i,t[a],a);else for(a=0;a<o;a++)e.call(i,t[a],a);else if(K.isObject(t))for(o=(r=Object.keys(t)).length,a=0;a<o;a++)e.call(i,t[r[a]],r[a])},arrayEquals:function(t,e){var i,n,a,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(a=t[i],o=e[i],a instanceof Array&&o instanceof Array){if(!K.arrayEquals(a,o))return!1}else if(a!==o)return!1;return!0},clone:function(t){if(K.isArray(t))return t.map(K.clone);if(K.isObject(t)){for(var e={},i=Object.keys(t),n=i.length,a=0;a<n;++a)e[i[a]]=K.clone(t[i[a]]);return e}return t},_merger:function(t,e,i,n){var a=e[t],o=i[t];K.isObject(a)&&K.isObject(o)?K.merge(a,o,n):e[t]=K.clone(o)},_mergerIf:function(t,e,i){var n=e[t],a=i[t];K.isObject(n)&&K.isObject(a)?K.mergeIf(n,a):e.hasOwnProperty(t)||(e[t]=K.clone(a))},merge:function(t,e,i){var n,a,o,r,s,l=K.isArray(e)?e:[e],d=l.length;if(!K.isObject(t))return t;for(n=(i=i||{}).merger||K._merger,a=0;a<d;++a)if(e=l[a],K.isObject(e))for(s=0,r=(o=Object.keys(e)).length;s<r;++s)n(o[s],t,e,i);return t},mergeIf:function(t,e){return K.merge(t,e,{merger:K._mergerIf})},extend:function(t){for(var e=function(e,i){t[i]=e},i=1,n=arguments.length;i<n;++i)K.each(arguments[i],e);return t},inherits:function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=i};return n.prototype=e.prototype,i.prototype=new n,i.extend=K.inherits,t&&K.extend(i.prototype,t),i.__super__=e.prototype,i}},G=K;K.callCallback=K.callback,K.indexOf=function(t,e,i){return Array.prototype.indexOf.call(t,e,i)},K.getValueOrDefault=K.valueOrDefault,K.getValueAtIndexOrDefault=K.valueAtIndexOrDefault;var Z={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:2==(t/=.5)?1:(i||(i=.45),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),t<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-Z.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*Z.easeInBounce(2*t):.5*Z.easeOutBounce(2*t-1)+.5}},$={effects:Z};G.easingEffects=Z;var J=Math.PI,Q=J/180,tt=2*J,et=J/2,it=J/4,nt=2*J/3,at={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,i,n,a,o){if(o){var r=Math.min(o,a/2,n/2),s=e+r,l=i+r,d=e+n-r,u=i+a-r;t.moveTo(e,l),s<d&&l<u?(t.arc(s,l,r,-J,-et),t.arc(d,l,r,-et,0),t.arc(d,u,r,0,et),t.arc(s,u,r,et,J)):s<d?(t.moveTo(s,i),t.arc(d,l,r,-et,et),t.arc(s,l,r,et,J+et)):l<u?(t.arc(s,l,r,-J,0),t.arc(s,u,r,0,J)):t.arc(s,l,r,-J,J),t.closePath(),t.moveTo(e,i)}else t.rect(e,i,n,a)},drawPoint:function(t,e,i,n,a,o){var r,s,l,d,u,h=(o||0)*Q;if(!e||"object"!=typeof e||"[object HTMLImageElement]"!==(r=e.toString())&&"[object HTMLCanvasElement]"!==r){if(!(isNaN(i)||i<=0)){switch(t.beginPath(),e){default:t.arc(n,a,i,0,tt),t.closePath();break;case"triangle":t.moveTo(n+Math.sin(h)*i,a-Math.cos(h)*i),h+=nt,t.lineTo(n+Math.sin(h)*i,a-Math.cos(h)*i),h+=nt,t.lineTo(n+Math.sin(h)*i,a-Math.cos(h)*i),t.closePath();break;case"rectRounded":d=i-(u=.516*i),s=Math.cos(h+it)*d,l=Math.sin(h+it)*d,t.arc(n-s,a-l,u,h-J,h-et),t.arc(n+l,a-s,u,h-et,h),t.arc(n+s,a+l,u,h,h+et),t.arc(n-l,a+s,u,h+et,h+J),t.closePath();break;case"rect":if(!o){d=Math.SQRT1_2*i,t.rect(n-d,a-d,2*d,2*d);break}h+=it;case"rectRot":s=Math.cos(h)*i,l=Math.sin(h)*i,t.moveTo(n-s,a-l),t.lineTo(n+l,a-s),t.lineTo(n+s,a+l),t.lineTo(n-l,a+s),t.closePath();break;case"crossRot":h+=it;case"cross":s=Math.cos(h)*i,l=Math.sin(h)*i,t.moveTo(n-s,a-l),t.lineTo(n+s,a+l),t.moveTo(n+l,a-s),t.lineTo(n-l,a+s);break;case"star":s=Math.cos(h)*i,l=Math.sin(h)*i,t.moveTo(n-s,a-l),t.lineTo(n+s,a+l),t.moveTo(n+l,a-s),t.lineTo(n-l,a+s),h+=it,s=Math.cos(h)*i,l=Math.sin(h)*i,t.moveTo(n-s,a-l),t.lineTo(n+s,a+l),t.moveTo(n+l,a-s),t.lineTo(n-l,a+s);break;case"line":s=Math.cos(h)*i,l=Math.sin(h)*i,t.moveTo(n-s,a-l),t.lineTo(n+s,a+l);break;case"dash":t.moveTo(n,a),t.lineTo(n+Math.cos(h)*i,a+Math.sin(h)*i)}t.fill(),t.stroke()}}else t.drawImage(e,n-e.width/2,a-e.height/2,e.width,e.height)},_isPointInArea:function(t,e){return t.x>e.left-1e-6&&t.x<e.right+1e-6&&t.y>e.top-1e-6&&t.y<e.bottom+1e-6},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,i,n){var a=i.steppedLine;if(a){if("middle"===a){var o=(e.x+i.x)/2;t.lineTo(o,n?i.y:e.y),t.lineTo(o,n?e.y:i.y)}else"after"===a&&!n||"after"!==a&&n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}else i.tension?t.bezierCurveTo(n?e.controlPointPreviousX:e.controlPointNextX,n?e.controlPointPreviousY:e.controlPointNextY,n?i.controlPointNextX:i.controlPointPreviousX,n?i.controlPointNextY:i.controlPointPreviousY,i.x,i.y):t.lineTo(i.x,i.y)}},ot=at;G.clear=at.clear,G.drawRoundedRectangle=function(t){t.beginPath(),at.roundedRect.apply(at,arguments)};var rt={_set:function(t,e){return G.merge(this[t]||(this[t]={}),e)}};rt._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var st=rt,lt=G.valueOrDefault;var dt={toLineHeight:function(t,e){var i=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,i,n,a;return G.isObject(t)?(e=+t.top||0,i=+t.right||0,n=+t.bottom||0,a=+t.left||0):e=i=n=a=+t||0,{top:e,right:i,bottom:n,left:a,height:e+n,width:a+i}},_parseFont:function(t){var e=st.global,i=lt(t.fontSize,e.defaultFontSize),n={family:lt(t.fontFamily,e.defaultFontFamily),lineHeight:G.options.toLineHeight(lt(t.lineHeight,e.defaultLineHeight),i),size:i,style:lt(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return n.string=function(t){return!t||G.isNullOrUndef(t.size)||G.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(n),n},resolve:function(t,e,i){var n,a,o;for(n=0,a=t.length;n<a;++n)if(void 0!==(o=t[n])&&(void 0!==e&&"function"==typeof o&&(o=o(e)),void 0!==i&&G.isArray(o)&&(o=o[i]),void 0!==o))return o}},ut=G,ht=$,ct=ot,ft=dt;ut.easing=ht,ut.canvas=ct,ut.options=ft;var gt=function(t){ut.extend(this,t),this.initialize.apply(this,arguments)};ut.extend(gt.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=ut.clone(t._model)),t._start={},t},transition:function(t){var e=this,i=e._model,n=e._start,a=e._view;return i&&1!==t?(a||(a=e._view={}),n||(n=e._start={}),function(t,e,i,n){var a,o,r,s,l,d,u,h,c,f=Object.keys(i);for(a=0,o=f.length;a<o;++a)if(d=i[r=f[a]],e.hasOwnProperty(r)||(e[r]=d),(s=e[r])!==d&&"_"!==r[0]){if(t.hasOwnProperty(r)||(t[r]=s),(u=typeof d)==typeof(l=t[r]))if("string"===u){if((h=X(l)).valid&&(c=X(d)).valid){e[r]=c.mix(h,n).rgbString();continue}}else if(ut.isFinite(l)&&ut.isFinite(d)){e[r]=l+(d-l)*n;continue}e[r]=d}}(n,a,i,t),e):(e._view=i,e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return ut.isNumber(this._model.x)&&ut.isNumber(this._model.y)}}),gt.extend=ut.inherits;var pt=gt,mt=pt.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),vt=mt;Object.defineProperty(mt.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(mt.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),st._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:ut.noop,onComplete:ut.noop}});var bt={animations:[],request:null,addAnimation:function(t,e,i,n){var a,o,r=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=i,n||(t.animating=!0),a=0,o=r.length;a<o;++a)if(r[a].chart===t)return void(r[a]=e);r.push(e),1===r.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=ut.findIndex(this.animations,function(e){return e.chart===t});-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=ut.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){this.advance(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var t,e,i,n,a=this.animations,o=0;o<a.length;)e=(t=a[o]).chart,i=t.numSteps,n=Math.floor((Date.now()-t.startTime)/t.duration*i)+1,t.currentStep=Math.min(n,i),ut.callback(t.render,[e,t],e),ut.callback(t.onAnimationProgress,[t],e),t.currentStep>=i?(ut.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(o,1)):++o}},xt=ut.options.resolve,yt=["push","pop","shift","splice","unshift"];function kt(t,e){var i=t._chartjs;if(i){var n=i.listeners,a=n.indexOf(e);-1!==a&&n.splice(a,1),n.length>0||(yt.forEach(function(e){delete t[e]}),delete t._chartjs)}}var wt=function(t,e){this.initialize(t,e)};ut.extend(wt.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){this.chart=t,this.index=e,this.linkScales(),this.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),i=t.getDataset();null!==e.xAxisID&&e.xAxisID in t.chart.scales||(e.xAxisID=i.xAxisID||t.chart.options.scales.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in t.chart.scales||(e.yAxisID=i.yAxisID||t.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this.update(!0)},destroy:function(){this._data&&kt(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,i=this.getMeta(),n=this.getDataset().data||[],a=i.data;for(t=0,e=n.length;t<e;++t)a[t]=a[t]||this.createMetaData(t);i.dataset=i.dataset||this.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t,e,i=this,n=i.getDataset(),a=n.data||(n.data=[]);i._data!==a&&(i._data&&kt(i._data,i),a&&Object.isExtensible(a)&&(e=i,(t=a)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),yt.forEach(function(e){var i="onData"+e.charAt(0).toUpperCase()+e.slice(1),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),a=n.apply(this,e);return ut.each(t._chartjs.listeners,function(t){"function"==typeof t[i]&&t[i].apply(t,e)}),a}})}))),i._data=a),i.resyncElements()},update:ut.noop,transition:function(t){for(var e=this.getMeta(),i=e.data||[],n=i.length,a=0;a<n;++a)i[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],i=e.length,n=0;for(t.dataset&&t.dataset.draw();n<i;++n)e[n].draw()},removeHoverStyle:function(t){ut.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},a=t._model,o=ut.getHoverColor;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth},a.backgroundColor=xt([n.hoverBackgroundColor,e.hoverBackgroundColor,o(a.backgroundColor)],void 0,i),a.borderColor=xt([n.hoverBorderColor,e.hoverBorderColor,o(a.borderColor)],void 0,i),a.borderWidth=xt([n.hoverBorderWidth,e.hoverBorderWidth,a.borderWidth],void 0,i)},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,i=t.data.length,n=e.length;n<i?t.data.splice(n,i-n):n>i&&this.insertElements(i,n-i)},insertElements:function(t,e){for(var i=0;i<e;++i)this.addElementAndReset(t+i)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),wt.extend=ut.inherits;var Mt=wt;st._set("global",{elements:{arc:{backgroundColor:st.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var _t=pt.extend({inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var i=this._view;if(i){for(var n=ut.getAngleFromPoint(i,{x:t,y:e}),a=n.angle,o=n.distance,r=i.startAngle,s=i.endAngle;s<r;)s+=2*Math.PI;for(;a>s;)a-=2*Math.PI;for(;a<r;)a+=2*Math.PI;var l=a>=r&&a<=s,d=o>=i.innerRadius&&o<=i.outerRadius;return l&&d}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,i=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t,e=this._chart.ctx,i=this._view,n=i.startAngle,a=i.endAngle,o="inner"===i.borderAlign?.33:0;e.save(),e.beginPath(),e.arc(i.x,i.y,Math.max(i.outerRadius-o,0),n,a),e.arc(i.x,i.y,i.innerRadius,a,n,!0),e.closePath(),e.fillStyle=i.backgroundColor,e.fill(),i.borderWidth&&("inner"===i.borderAlign?(e.beginPath(),t=o/i.outerRadius,e.arc(i.x,i.y,i.outerRadius,n-t,a+t),i.innerRadius>o?(t=o/i.innerRadius,e.arc(i.x,i.y,i.innerRadius-o,a+t,n-t,!0)):e.arc(i.x,i.y,o,a+Math.PI/2,n-Math.PI/2),e.closePath(),e.clip(),e.beginPath(),e.arc(i.x,i.y,i.outerRadius,n,a),e.arc(i.x,i.y,i.innerRadius,a,n,!0),e.closePath(),e.lineWidth=2*i.borderWidth,e.lineJoin="round"):(e.lineWidth=i.borderWidth,e.lineJoin="bevel"),e.strokeStyle=i.borderColor,e.stroke()),e.restore()}}),Ct=ut.valueOrDefault,St=st.global.defaultColor;st._set("global",{elements:{line:{tension:.4,backgroundColor:St,borderWidth:3,borderColor:St,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var Pt=pt.extend({draw:function(){var t,e,i,n,a=this._view,o=this._chart.ctx,r=a.spanGaps,s=this._children.slice(),l=st.global,d=l.elements.line,u=-1;for(this._loop&&s.length&&s.push(s[0]),o.save(),o.lineCap=a.borderCapStyle||d.borderCapStyle,o.setLineDash&&o.setLineDash(a.borderDash||d.borderDash),o.lineDashOffset=Ct(a.borderDashOffset,d.borderDashOffset),o.lineJoin=a.borderJoinStyle||d.borderJoinStyle,o.lineWidth=Ct(a.borderWidth,d.borderWidth),o.strokeStyle=a.borderColor||l.defaultColor,o.beginPath(),u=-1,t=0;t<s.length;++t)e=s[t],i=ut.previousItem(s,t),n=e._view,0===t?n.skip||(o.moveTo(n.x,n.y),u=t):(i=-1===u?i:s[u],n.skip||(u!==t-1&&!r||-1===u?o.moveTo(n.x,n.y):ut.canvas.lineTo(o,i._view,e._view),u=t));o.stroke(),o.restore()}}),It=ut.valueOrDefault,At=st.global.defaultColor;function Dt(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}st._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:At,borderColor:At,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var Tt=pt.extend({inRange:function(t,e){var i=this._view;return!!i&&Math.pow(t-i.x,2)+Math.pow(e-i.y,2)<Math.pow(i.hitRadius+i.radius,2)},inLabelRange:Dt,inXRange:Dt,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,i=this._chart.ctx,n=e.pointStyle,a=e.rotation,o=e.radius,r=e.x,s=e.y,l=st.global,d=l.defaultColor;e.skip||(void 0===t||ut.canvas._isPointInArea(e,t))&&(i.strokeStyle=e.borderColor||d,i.lineWidth=It(e.borderWidth,l.elements.point.borderWidth),i.fillStyle=e.backgroundColor||d,ut.canvas.drawPoint(i,n,o,r,s,a))}}),Ft=st.global.defaultColor;function Lt(t){return t&&void 0!==t.width}function Rt(t){var e,i,n,a,o;return Lt(t)?(o=t.width/2,e=t.x-o,i=t.x+o,n=Math.min(t.y,t.base),a=Math.max(t.y,t.base)):(o=t.height/2,e=Math.min(t.x,t.base),i=Math.max(t.x,t.base),n=t.y-o,a=t.y+o),{left:e,top:n,right:i,bottom:a}}function Ot(t,e,i){return t===e?i:t===i?e:t}function zt(t,e,i){var n,a,o,r,s=t.borderWidth,l=function(t){var e=t.borderSkipped,i={};return e?(t.horizontal?t.base>t.x&&(e=Ot(e,"left","right")):t.base<t.y&&(e=Ot(e,"bottom","top")),i[e]=!0,i):i}(t);return ut.isObject(s)?(n=+s.top||0,a=+s.right||0,o=+s.bottom||0,r=+s.left||0):n=a=o=r=+s||0,{t:l.top||n<0?0:n>i?i:n,r:l.right||a<0?0:a>e?e:a,b:l.bottom||o<0?0:o>i?i:o,l:l.left||r<0?0:r>e?e:r}}function Bt(t,e,i){var n=null===e,a=null===i,o=!(!t||n&&a)&&Rt(t);return o&&(n||e>=o.left&&e<=o.right)&&(a||i>=o.top&&i<=o.bottom)}st._set("global",{elements:{rectangle:{backgroundColor:Ft,borderColor:Ft,borderSkipped:"bottom",borderWidth:0}}});var Nt=pt.extend({draw:function(){var t=this._chart.ctx,e=this._view,i=function(t){var e=Rt(t),i=e.right-e.left,n=e.bottom-e.top,a=zt(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n},inner:{x:e.left+a.l,y:e.top+a.t,w:i-a.l-a.r,h:n-a.t-a.b}}}(e),n=i.outer,a=i.inner;t.fillStyle=e.backgroundColor,t.fillRect(n.x,n.y,n.w,n.h),n.w===a.w&&n.h===a.h||(t.save(),t.beginPath(),t.rect(n.x,n.y,n.w,n.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return Bt(this._view,t,e)},inLabelRange:function(t,e){var i=this._view;return Lt(i)?Bt(i,t,null):Bt(i,null,e)},inXRange:function(t){return Bt(this._view,t,null)},inYRange:function(t){return Bt(this._view,null,t)},getCenterPoint:function(){var t,e,i=this._view;return Lt(i)?(t=i.x,e=(i.y+i.base)/2):(t=(i.x+i.base)/2,e=i.y),{x:t,y:e}},getArea:function(){var t=this._view;return Lt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),Wt={},Vt=_t,Et=Pt,Ht=Tt,jt=Nt;Wt.Arc=Vt,Wt.Line=Et,Wt.Point=Ht,Wt.Rectangle=jt;var qt=ut.options.resolve;st._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}});var Yt=Mt.extend({dataElementType:Wt.Rectangle,initialize:function(){var t;Mt.prototype.initialize.apply(this,arguments),(t=this.getMeta()).stack=this.getDataset().stack,t.bar=!0},update:function(t){var e,i,n=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,i=n.length;e<i;++e)this.updateElement(n[e],e,t)},updateElement:function(t,e,i){var n=this,a=n.getMeta(),o=n.getDataset(),r=n._resolveElementOptions(t,e);t._xScale=n.getScaleForId(a.xAxisID),t._yScale=n.getScaleForId(a.yAxisID),t._datasetIndex=n.index,t._index=e,t._model={backgroundColor:r.backgroundColor,borderColor:r.borderColor,borderSkipped:r.borderSkipped,borderWidth:r.borderWidth,datasetLabel:o.label,label:n.chart.data.labels[e]},n._updateElementGeometry(t,e,i),t.pivot()},_updateElementGeometry:function(t,e,i){var n=this,a=t._model,o=n._getValueScale(),r=o.getBasePixel(),s=o.isHorizontal(),l=n._ruler||n.getRuler(),d=n.calculateBarValuePixels(n.index,e),u=n.calculateBarIndexPixels(n.index,e,l);a.horizontal=s,a.base=i?r:d.base,a.x=s?i?r:d.head:u.center,a.y=s?u.center:i?r:d.head,a.height=s?u.size:void 0,a.width=s?void 0:u.size},_getStacks:function(t){var e,i,n=this.chart,a=this._getIndexScale().options.stacked,o=void 0===t?n.data.datasets.length:t+1,r=[];for(e=0;e<o;++e)(i=n.getDatasetMeta(e)).bar&&n.isDatasetVisible(e)&&(!1===a||!0===a&&-1===r.indexOf(i.stack)||void 0===a&&(void 0===i.stack||-1===r.indexOf(i.stack)))&&r.push(i.stack);return r},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var i=this._getStacks(t),n=void 0!==e?i.indexOf(e):-1;return-1===n?i.length-1:n},getRuler:function(){var t,e,i=this._getIndexScale(),n=this.getStackCount(),a=this.index,o=i.isHorizontal(),r=o?i.left:i.top,s=r+(o?i.width:i.height),l=[];for(t=0,e=this.getMeta().data.length;t<e;++t)l.push(i.getPixelForValue(null,t,a));return{min:ut.isNullOrUndef(i.options.barThickness)?function(t,e){var i,n,a,o,r=t.isHorizontal()?t.width:t.height,s=t.getTicks();for(a=1,o=e.length;a<o;++a)r=Math.min(r,Math.abs(e[a]-e[a-1]));for(a=0,o=s.length;a<o;++a)n=t.getPixelForTick(a),r=a>0?Math.min(r,n-i):r,i=n;return r}(i,l):-1,pixels:l,start:r,end:s,stackCount:n,scale:i}},calculateBarValuePixels:function(t,e){var i,n,a,o,r,s,l=this.chart,d=this.getMeta(),u=this._getValueScale(),h=u.isHorizontal(),c=l.data.datasets,f=+u.getRightValue(c[t].data[e]),g=u.options.minBarLength,p=u.options.stacked,m=d.stack,v=0;if(p||void 0===p&&void 0!==m)for(i=0;i<t;++i)(n=l.getDatasetMeta(i)).bar&&n.stack===m&&n.controller._getValueScaleId()===u.id&&l.isDatasetVisible(i)&&(a=+u.getRightValue(c[i].data[e]),(f<0&&a<0||f>=0&&a>0)&&(v+=a));return o=u.getPixelForValue(v),s=(r=u.getPixelForValue(v+f))-o,void 0!==g&&Math.abs(s)<g&&(s=g,r=f>=0&&!h||f<0&&h?o-g:o+g),{size:s,base:o,head:r,center:r+s/2}},calculateBarIndexPixels:function(t,e,i){var n=i.scale.options,a="flex"===n.barThickness?function(t,e,i){var n,a=e.pixels,o=a[t],r=t>0?a[t-1]:null,s=t<a.length-1?a[t+1]:null,l=i.categoryPercentage;return null===r&&(r=o-(null===s?e.end-e.start:s-o)),null===s&&(s=o+o-r),n=o-(o-Math.min(r,s))/2*l,{chunk:Math.abs(s-r)/2*l/e.stackCount,ratio:i.barPercentage,start:n}}(e,i,n):function(t,e,i){var n,a,o=i.barThickness,r=e.stackCount,s=e.pixels[t];return ut.isNullOrUndef(o)?(n=e.min*i.categoryPercentage,a=i.barPercentage):(n=o*r,a=1),{chunk:n/r,ratio:a,start:s-n/2}}(e,i,n),o=this.getStackIndex(t,this.getMeta().stack),r=a.start+a.chunk*o+a.chunk/2,s=Math.min(ut.valueOrDefault(n.maxBarThickness,1/0),a.chunk*a.ratio);return{base:r-s/2,head:r+s/2,center:r,size:s}},draw:function(){var t=this.chart,e=this._getValueScale(),i=this.getMeta().data,n=this.getDataset(),a=i.length,o=0;for(ut.canvas.clipArea(t.ctx,t.chartArea);o<a;++o)isNaN(e.getRightValue(n.data[o]))||i[o].draw();ut.canvas.unclipArea(t.ctx)},_resolveElementOptions:function(t,e){var i,n,a,o=this.chart,r=o.data.datasets[this.index],s=t.custom||{},l=o.options.elements.rectangle,d={},u={chart:o,dataIndex:e,dataset:r,datasetIndex:this.index},h=["backgroundColor","borderColor","borderSkipped","borderWidth"];for(i=0,n=h.length;i<n;++i)d[a=h[i]]=qt([s[a],r[a],l[a]],u,e);return d}}),Ut=ut.valueOrDefault,Xt=ut.options.resolve;st._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.datasets[t.datasetIndex].label||"",n=e.datasets[t.datasetIndex].data[t.index];return i+": ("+t.xLabel+", "+t.yLabel+", "+n.r+")"}}}});var Kt=Mt.extend({dataElementType:Wt.Point,update:function(t){var e=this,i=e.getMeta().data;ut.each(i,function(i,n){e.updateElement(i,n,t)})},updateElement:function(t,e,i){var n=this,a=n.getMeta(),o=t.custom||{},r=n.getScaleForId(a.xAxisID),s=n.getScaleForId(a.yAxisID),l=n._resolveElementOptions(t,e),d=n.getDataset().data[e],u=n.index,h=i?r.getPixelForDecimal(.5):r.getPixelForValue("object"==typeof d?d:NaN,e,u),c=i?s.getBasePixel():s.getPixelForValue(d,e,u);t._xScale=r,t._yScale=s,t._options=l,t._datasetIndex=u,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:i?0:l.radius,skip:o.skip||isNaN(h)||isNaN(c),x:h,y:c},t.pivot()},setHoverStyle:function(t){var e=t._model,i=t._options,n=ut.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Ut(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=Ut(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=Ut(i.hoverBorderWidth,i.borderWidth),e.radius=i.radius+i.hoverRadius},_resolveElementOptions:function(t,e){var i,n,a,o=this.chart,r=o.data.datasets[this.index],s=t.custom||{},l=o.options.elements.point,d=r.data[e],u={},h={chart:o,dataIndex:e,dataset:r,datasetIndex:this.index},c=["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"];for(i=0,n=c.length;i<n;++i)u[a=c[i]]=Xt([s[a],r[a],l[a]],h,e);return u.radius=Xt([s.radius,d?d.r:void 0,r.radius,l.radius],h,e),u}}),Gt=ut.options.resolve,Zt=ut.valueOrDefault;st._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var o=0;o<n[0].data.length;++o)e.push('<li><span style="background-color:'+n[0].backgroundColor[o]+'"></span>'),a[o]&&e.push(a[o]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(i,n){var a=t.getDatasetMeta(0),o=e.datasets[0],r=a.data[n],s=r&&r.custom||{},l=t.options.elements.arc;return{text:i,fillStyle:Gt([s.backgroundColor,o.backgroundColor,l.backgroundColor],void 0,n),strokeStyle:Gt([s.borderColor,o.borderColor,l.borderColor],void 0,n),lineWidth:Gt([s.borderWidth,o.borderWidth,l.borderWidth],void 0,n),hidden:isNaN(o.data[n])||a.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var i,n,a,o=e.index,r=this.chart;for(i=0,n=(r.data.datasets||[]).length;i<n;++i)(a=r.getDatasetMeta(i)).data[o]&&(a.data[o].hidden=!a.data[o].hidden);r.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.labels[t.index],n=": "+e.datasets[t.datasetIndex].data[t.index];return ut.isArray(i)?(i=i.slice())[0]+=n:i+=n,i}}}});var $t=Mt.extend({dataElementType:Wt.Arc,linkScales:ut.noop,getRingIndex:function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&++e;return e},update:function(t){var e,i,n=this,a=n.chart,o=a.chartArea,r=a.options,s=o.right-o.left,l=o.bottom-o.top,d=Math.min(s,l),u={x:0,y:0},h=n.getMeta(),c=h.data,f=r.cutoutPercentage,g=r.circumference,p=n._getRingWeight(n.index);if(g<2*Math.PI){var m=r.rotation%(2*Math.PI),v=(m+=2*Math.PI*(m>=Math.PI?-1:m<-Math.PI?1:0))+g,b={x:Math.cos(m),y:Math.sin(m)},x={x:Math.cos(v),y:Math.sin(v)},y=m<=0&&v>=0||m<=2*Math.PI&&2*Math.PI<=v,k=m<=.5*Math.PI&&.5*Math.PI<=v||m<=2.5*Math.PI&&2.5*Math.PI<=v,w=m<=-Math.PI&&-Math.PI<=v||m<=Math.PI&&Math.PI<=v,M=m<=.5*-Math.PI&&.5*-Math.PI<=v||m<=1.5*Math.PI&&1.5*Math.PI<=v,_=f/100,C={x:w?-1:Math.min(b.x*(b.x<0?1:_),x.x*(x.x<0?1:_)),y:M?-1:Math.min(b.y*(b.y<0?1:_),x.y*(x.y<0?1:_))},S={x:y?1:Math.max(b.x*(b.x>0?1:_),x.x*(x.x>0?1:_)),y:k?1:Math.max(b.y*(b.y>0?1:_),x.y*(x.y>0?1:_))},P={width:.5*(S.x-C.x),height:.5*(S.y-C.y)};d=Math.min(s/P.width,l/P.height),u={x:-.5*(S.x+C.x),y:-.5*(S.y+C.y)}}for(e=0,i=c.length;e<i;++e)c[e]._options=n._resolveElementOptions(c[e],e);for(a.borderWidth=n.getMaxBorderWidth(),a.outerRadius=Math.max((d-a.borderWidth)/2,0),a.innerRadius=Math.max(f?a.outerRadius/100*f:0,0),a.radiusLength=(a.outerRadius-a.innerRadius)/(n._getVisibleDatasetWeightTotal()||1),a.offsetX=u.x*a.outerRadius,a.offsetY=u.y*a.outerRadius,h.total=n.calculateTotal(),n.outerRadius=a.outerRadius-a.radiusLength*n._getRingWeightOffset(n.index),n.innerRadius=Math.max(n.outerRadius-a.radiusLength*p,0),e=0,i=c.length;e<i;++e)n.updateElement(c[e],e,t)},updateElement:function(t,e,i){var n=this,a=n.chart,o=a.chartArea,r=a.options,s=r.animation,l=(o.left+o.right)/2,d=(o.top+o.bottom)/2,u=r.rotation,h=r.rotation,c=n.getDataset(),f=i&&s.animateRotate?0:t.hidden?0:n.calculateCircumference(c.data[e])*(r.circumference/(2*Math.PI)),g=i&&s.animateScale?0:n.innerRadius,p=i&&s.animateScale?0:n.outerRadius,m=t._options||{};ut.extend(t,{_datasetIndex:n.index,_index:e,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:l+a.offsetX,y:d+a.offsetY,startAngle:u,endAngle:h,circumference:f,outerRadius:p,innerRadius:g,label:ut.valueAtIndexOrDefault(c.label,e,a.data.labels[e])}});var v=t._model;i&&s.animateRotate||(v.startAngle=0===e?r.rotation:n.getMeta().data[e-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),i=this.getMeta(),n=0;return ut.each(i.data,function(i,a){t=e.data[a],isNaN(t)||i.hidden||(n+=Math.abs(t))}),n},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,i,n,a,o,r,s,l,d=0,u=this.chart;if(!t)for(e=0,i=u.data.datasets.length;e<i;++e)if(u.isDatasetVisible(e)){t=(n=u.getDatasetMeta(e)).data,e!==this.index&&(o=n.controller);break}if(!t)return 0;for(e=0,i=t.length;e<i;++e)a=t[e],"inner"!==(r=o?o._resolveElementOptions(a,e):a._options).borderAlign&&(s=r.borderWidth,d=(l=r.hoverBorderWidth)>(d=s>d?s:d)?l:d);return d},setHoverStyle:function(t){var e=t._model,i=t._options,n=ut.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Zt(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=Zt(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=Zt(i.hoverBorderWidth,i.borderWidth)},_resolveElementOptions:function(t,e){var i,n,a,o=this.chart,r=this.getDataset(),s=t.custom||{},l=o.options.elements.arc,d={},u={chart:o,dataIndex:e,dataset:r,datasetIndex:this.index},h=["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"];for(i=0,n=h.length;i<n;++i)d[a=h[i]]=Gt([s[a],r[a],l[a]],u,e);return d},_getRingWeightOffset:function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e},_getRingWeight:function(t){return Math.max(Zt(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});st._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}});var Jt=Yt.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Qt=ut.valueOrDefault,te=ut.options.resolve,ee=ut.canvas._isPointInArea;function ie(t,e){return Qt(t.showLine,e.showLines)}st._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var ne=Mt.extend({datasetElementType:Wt.Line,dataElementType:Wt.Point,update:function(t){var e,i,n=this,a=n.getMeta(),o=a.dataset,r=a.data||[],s=n.getScaleForId(a.yAxisID),l=n.getDataset(),d=ie(l,n.chart.options);for(d&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),o._scale=s,o._datasetIndex=n.index,o._children=r,o._model=n._resolveLineOptions(o),o.pivot()),e=0,i=r.length;e<i;++e)n.updateElement(r[e],e,t);for(d&&0!==o._model.tension&&n.updateBezierControlPoints(),e=0,i=r.length;e<i;++e)r[e].pivot()},updateElement:function(t,e,i){var n,a,o=this,r=o.getMeta(),s=t.custom||{},l=o.getDataset(),d=o.index,u=l.data[e],h=o.getScaleForId(r.yAxisID),c=o.getScaleForId(r.xAxisID),f=r.dataset._model,g=o._resolvePointOptions(t,e);n=c.getPixelForValue("object"==typeof u?u:NaN,e,d),a=i?h.getBasePixel():o.calculatePointY(u,e,d),t._xScale=c,t._yScale=h,t._options=g,t._datasetIndex=d,t._index=e,t._model={x:n,y:a,skip:s.skip||isNaN(n)||isNaN(a),radius:g.radius,pointStyle:g.pointStyle,rotation:g.rotation,backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,tension:Qt(s.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:g.hitRadius}},_resolvePointOptions:function(t,e){var i,n,a,o=this.chart,r=o.data.datasets[this.index],s=t.custom||{},l=o.options.elements.point,d={},u={chart:o,dataIndex:e,dataset:r,datasetIndex:this.index},h={backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},c=Object.keys(h);for(i=0,n=c.length;i<n;++i)d[a=c[i]]=te([s[a],r[h[a]],r[a],l[a]],u,e);return d},_resolveLineOptions:function(t){var e,i,n,a=this.chart,o=a.data.datasets[this.index],r=t.custom||{},s=a.options,l=s.elements.line,d={},u=["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill","cubicInterpolationMode"];for(e=0,i=u.length;e<i;++e)d[n=u[e]]=te([r[n],o[n],l[n]]);return d.spanGaps=Qt(o.spanGaps,s.spanGaps),d.tension=Qt(o.lineTension,l.tension),d.steppedLine=te([r.steppedLine,o.steppedLine,l.stepped]),d},calculatePointY:function(t,e,i){var n,a,o,r=this.chart,s=this.getMeta(),l=this.getScaleForId(s.yAxisID),d=0,u=0;if(l.options.stacked){for(n=0;n<i;n++)if(a=r.data.datasets[n],"line"===(o=r.getDatasetMeta(n)).type&&o.yAxisID===l.id&&r.isDatasetVisible(n)){var h=Number(l.getRightValue(a.data[e]));h<0?u+=h||0:d+=h||0}var c=Number(l.getRightValue(t));return c<0?l.getPixelForValue(u+c):l.getPixelForValue(d+c)}return l.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,i,n,a=this.chart,o=this.getMeta(),r=o.dataset._model,s=a.chartArea,l=o.data||[];function d(t,e,i){return Math.max(Math.min(t,i),e)}if(r.spanGaps&&(l=l.filter(function(t){return!t._model.skip})),"monotone"===r.cubicInterpolationMode)ut.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)i=l[t]._model,n=ut.splineCurve(ut.previousItem(l,t)._model,i,ut.nextItem(l,t)._model,r.tension),i.controlPointPreviousX=n.previous.x,i.controlPointPreviousY=n.previous.y,i.controlPointNextX=n.next.x,i.controlPointNextY=n.next.y;if(a.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)i=l[t]._model,ee(i,s)&&(t>0&&ee(l[t-1]._model,s)&&(i.controlPointPreviousX=d(i.controlPointPreviousX,s.left,s.right),i.controlPointPreviousY=d(i.controlPointPreviousY,s.top,s.bottom)),t<l.length-1&&ee(l[t+1]._model,s)&&(i.controlPointNextX=d(i.controlPointNextX,s.left,s.right),i.controlPointNextY=d(i.controlPointNextY,s.top,s.bottom)))},draw:function(){var t,e=this.chart,i=this.getMeta(),n=i.data||[],a=e.chartArea,o=n.length,r=0;for(ie(this.getDataset(),e.options)&&(t=(i.dataset._model.borderWidth||0)/2,ut.canvas.clipArea(e.ctx,{left:a.left,right:a.right,top:a.top-t,bottom:a.bottom+t}),i.dataset.draw(),ut.canvas.unclipArea(e.ctx));r<o;++r)n[r].draw(a)},setHoverStyle:function(t){var e=t._model,i=t._options,n=ut.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Qt(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=Qt(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=Qt(i.hoverBorderWidth,i.borderWidth),e.radius=Qt(i.hoverRadius,i.radius)}}),ae=ut.options.resolve;st._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var o=0;o<n[0].data.length;++o)e.push('<li><span style="background-color:'+n[0].backgroundColor[o]+'"></span>'),a[o]&&e.push(a[o]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(i,n){var a=t.getDatasetMeta(0),o=e.datasets[0],r=a.data[n].custom||{},s=t.options.elements.arc;return{text:i,fillStyle:ae([r.backgroundColor,o.backgroundColor,s.backgroundColor],void 0,n),strokeStyle:ae([r.borderColor,o.borderColor,s.borderColor],void 0,n),lineWidth:ae([r.borderWidth,o.borderWidth,s.borderWidth],void 0,n),hidden:isNaN(o.data[n])||a.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var i,n,a,o=e.index,r=this.chart;for(i=0,n=(r.data.datasets||[]).length;i<n;++i)(a=r.getDatasetMeta(i)).data[o].hidden=!a.data[o].hidden;r.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var oe=Mt.extend({dataElementType:Wt.Arc,linkScales:ut.noop,update:function(t){var e,i,n,a=this,o=a.getDataset(),r=a.getMeta(),s=a.chart.options.startAngle||0,l=a._starts=[],d=a._angles=[],u=r.data;for(a._updateRadius(),r.count=a.countVisibleElements(),e=0,i=o.data.length;e<i;e++)l[e]=s,n=a._computeAngle(e),d[e]=n,s+=n;for(e=0,i=u.length;e<i;++e)u[e]._options=a._resolveElementOptions(u[e],e),a.updateElement(u[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,i=e.chartArea,n=e.options,a=Math.min(i.right-i.left,i.bottom-i.top);e.outerRadius=Math.max(a/2,0),e.innerRadius=Math.max(n.cutoutPercentage?e.outerRadius/100*n.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,i){var n=this,a=n.chart,o=n.getDataset(),r=a.options,s=r.animation,l=a.scale,d=a.data.labels,u=l.xCenter,h=l.yCenter,c=r.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(o.data[e]),g=n._starts[e],p=g+(t.hidden?0:n._angles[e]),m=s.animateScale?0:l.getDistanceFromCenterForValue(o.data[e]),v=t._options||{};ut.extend(t,{_datasetIndex:n.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:u,y:h,innerRadius:0,outerRadius:i?m:f,startAngle:i&&s.animateRotate?c:g,endAngle:i&&s.animateRotate?c:p,label:ut.valueAtIndexOrDefault(d,e,d[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),i=0;return ut.each(e.data,function(e,n){isNaN(t.data[n])||e.hidden||i++}),i},setHoverStyle:function(t){var e=t._model,i=t._options,n=ut.getHoverColor,a=ut.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=a(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=a(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=a(i.hoverBorderWidth,i.borderWidth)},_resolveElementOptions:function(t,e){var i,n,a,o=this.chart,r=this.getDataset(),s=t.custom||{},l=o.options.elements.arc,d={},u={chart:o,dataIndex:e,dataset:r,datasetIndex:this.index},h=["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"];for(i=0,n=h.length;i<n;++i)d[a=h[i]]=ae([s[a],r[a],l[a]],u,e);return d},_computeAngle:function(t){var e=this,i=this.getMeta().count,n=e.getDataset(),a=e.getMeta();if(isNaN(n.data[t])||a.data[t].hidden)return 0;var o={chart:e.chart,dataIndex:t,dataset:n,datasetIndex:e.index};return ae([e.chart.options.elements.arc.angle,2*Math.PI/i],o,t)}});st._set("pie",ut.clone(st.doughnut)),st._set("pie",{cutoutPercentage:0});var re=$t,se=ut.valueOrDefault,le=ut.options.resolve;st._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}});var de=Mt.extend({datasetElementType:Wt.Line,dataElementType:Wt.Point,linkScales:ut.noop,update:function(t){var e,i,n=this,a=n.getMeta(),o=a.dataset,r=a.data||[],s=n.chart.scale,l=n.getDataset();for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),o._scale=s,o._datasetIndex=n.index,o._children=r,o._loop=!0,o._model=n._resolveLineOptions(o),o.pivot(),e=0,i=r.length;e<i;++e)n.updateElement(r[e],e,t);for(n.updateBezierControlPoints(),e=0,i=r.length;e<i;++e)r[e].pivot()},updateElement:function(t,e,i){var n=this,a=t.custom||{},o=n.getDataset(),r=n.chart.scale,s=r.getPointPositionForValue(e,o.data[e]),l=n._resolvePointOptions(t,e),d=n.getMeta().dataset._model,u=i?r.xCenter:s.x,h=i?r.yCenter:s.y;t._scale=r,t._options=l,t._datasetIndex=n.index,t._index=e,t._model={x:u,y:h,skip:a.skip||isNaN(u)||isNaN(h),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:se(a.tension,d?d.tension:0),hitRadius:l.hitRadius}},_resolvePointOptions:function(t,e){var i,n,a,o=this.chart,r=o.data.datasets[this.index],s=t.custom||{},l=o.options.elements.point,d={},u={chart:o,dataIndex:e,dataset:r,datasetIndex:this.index},h={backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},c=Object.keys(h);for(i=0,n=c.length;i<n;++i)d[a=c[i]]=le([s[a],r[h[a]],r[a],l[a]],u,e);return d},_resolveLineOptions:function(t){var e,i,n,a=this.chart,o=a.data.datasets[this.index],r=t.custom||{},s=a.options.elements.line,l={},d=["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"];for(e=0,i=d.length;e<i;++e)l[n=d[e]]=le([r[n],o[n],s[n]]);return l.tension=se(o.lineTension,s.tension),l},updateBezierControlPoints:function(){var t,e,i,n,a=this.getMeta(),o=this.chart.chartArea,r=a.data||[];function s(t,e,i){return Math.max(Math.min(t,i),e)}for(t=0,e=r.length;t<e;++t)i=r[t]._model,n=ut.splineCurve(ut.previousItem(r,t,!0)._model,i,ut.nextItem(r,t,!0)._model,i.tension),i.controlPointPreviousX=s(n.previous.x,o.left,o.right),i.controlPointPreviousY=s(n.previous.y,o.top,o.bottom),i.controlPointNextX=s(n.next.x,o.left,o.right),i.controlPointNextY=s(n.next.y,o.top,o.bottom)},setHoverStyle:function(t){var e=t._model,i=t._options,n=ut.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=se(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=se(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=se(i.hoverBorderWidth,i.borderWidth),e.radius=se(i.hoverRadius,i.radius)}});st._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}});var ue={bar:Yt,bubble:Kt,doughnut:$t,horizontalBar:Jt,line:ne,polarArea:oe,pie:re,radar:de,scatter:ne};function he(t,e){return t.native?{x:t.x,y:t.y}:ut.getRelativePosition(t,e)}function ce(t,e){var i,n,a,o,r;for(n=0,o=t.data.datasets.length;n<o;++n)if(t.isDatasetVisible(n))for(a=0,r=(i=t.getDatasetMeta(n)).data.length;a<r;++a){var s=i.data[a];s._view.skip||e(s)}}function fe(t,e){var i=[];return ce(t,function(t){t.inRange(e.x,e.y)&&i.push(t)}),i}function ge(t,e,i,n){var a=Number.POSITIVE_INFINITY,o=[];return ce(t,function(t){if(!i||t.inRange(e.x,e.y)){var r=t.getCenterPoint(),s=n(e,r);s<a?(o=[t],a=s):s===a&&o.push(t)}}),o}function pe(t){var e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){var a=e?Math.abs(t.x-n.x):0,o=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}function me(t,e,i){var n=he(e,t);i.axis=i.axis||"x";var a=pe(i.axis),o=i.intersect?fe(t,n):ge(t,n,!1,a),r=[];return o.length?(t.data.datasets.forEach(function(e,i){if(t.isDatasetVisible(i)){var n=t.getDatasetMeta(i).data[o[0]._index];n&&!n._view.skip&&r.push(n)}}),r):[]}var ve={modes:{single:function(t,e){var i=he(e,t),n=[];return ce(t,function(t){if(t.inRange(i.x,i.y))return n.push(t),n}),n.slice(0,1)},label:me,index:me,dataset:function(t,e,i){var n=he(e,t);i.axis=i.axis||"xy";var a=pe(i.axis),o=i.intersect?fe(t,n):ge(t,n,!1,a);return o.length>0&&(o=t.getDatasetMeta(o[0]._datasetIndex).data),o},"x-axis":function(t,e){return me(t,e,{intersect:!1})},point:function(t,e){return fe(t,he(e,t))},nearest:function(t,e,i){var n=he(e,t);i.axis=i.axis||"xy";var a=pe(i.axis);return ge(t,n,i.intersect,a)},x:function(t,e,i){var n=he(e,t),a=[],o=!1;return ce(t,function(t){t.inXRange(n.x)&&a.push(t),t.inRange(n.x,n.y)&&(o=!0)}),i.intersect&&!o&&(a=[]),a},y:function(t,e,i){var n=he(e,t),a=[],o=!1;return ce(t,function(t){t.inYRange(n.y)&&a.push(t),t.inRange(n.x,n.y)&&(o=!0)}),i.intersect&&!o&&(a=[]),a}}};function be(t,e){return ut.where(t,function(t){return t.position===e})}function xe(t,e){t.forEach(function(t,e){return t._tmpIndex_=e,t}),t.sort(function(t,i){var n=e?i:t,a=e?t:i;return n.weight===a.weight?n._tmpIndex_-a._tmpIndex_:n.weight-a.weight}),t.forEach(function(t){delete t._tmpIndex_})}function ye(t,e){ut.each(t,function(t){e[t.position]+=t.isHorizontal()?t.height:t.width})}st._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var ke={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure:function(t,e,i){for(var n,a=["fullWidth","position","weight"],o=a.length,r=0;r<o;++r)n=a[r],i.hasOwnProperty(n)&&(e[n]=i[n])},update:function(t,e,i){if(t){var n=t.options.layout||{},a=ut.options.toPadding(n.padding),o=a.left,r=a.right,s=a.top,l=a.bottom,d=be(t.boxes,"left"),u=be(t.boxes,"right"),h=be(t.boxes,"top"),c=be(t.boxes,"bottom"),f=be(t.boxes,"chartArea");xe(d,!0),xe(u,!1),xe(h,!0),xe(c,!1);var g,p=d.concat(u),m=h.concat(c),v=p.concat(m),b=e-o-r,x=i-s-l,y=(e-b/2)/p.length,k=b,w=x,M={top:s,left:o,bottom:l,right:r},_=[];ut.each(v,function(t){var e,i=t.isHorizontal();i?(e=t.update(t.fullWidth?b:k,x/2),w-=e.height):(e=t.update(y,w),k-=e.width),_.push({horizontal:i,width:e.width,box:t})}),g=function(t){var e=0,i=0,n=0,a=0;return ut.each(t,function(t){if(t.getPadding){var o=t.getPadding();e=Math.max(e,o.top),i=Math.max(i,o.left),n=Math.max(n,o.bottom),a=Math.max(a,o.right)}}),{top:e,left:i,bottom:n,right:a}}(v),ut.each(p,T),ye(p,M),ut.each(m,T),ye(m,M),ut.each(p,function(t){var e=ut.findNextWhere(_,function(e){return e.box===t}),i={left:0,right:0,top:M.top,bottom:M.bottom};e&&t.update(e.width,w,i)}),ye(v,M={top:s,left:o,bottom:l,right:r});var C=Math.max(g.left-M.left,0);M.left+=C,M.right+=Math.max(g.right-M.right,0);var S=Math.max(g.top-M.top,0);M.top+=S,M.bottom+=Math.max(g.bottom-M.bottom,0);var P=i-M.top-M.bottom,I=e-M.left-M.right;I===k&&P===w||(ut.each(p,function(t){t.height=P}),ut.each(m,function(t){t.fullWidth||(t.width=I)}),w=P,k=I);var A=o+C,D=s+S;ut.each(d.concat(h),F),A+=k,D+=w,ut.each(u,F),ut.each(c,F),t.chartArea={left:M.left,top:M.top,right:M.left+k,bottom:M.top+w},ut.each(f,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(k,w)})}function T(t){var e=ut.findNextWhere(_,function(e){return e.box===t});if(e)if(e.horizontal){var i={left:Math.max(M.left,g.left),right:Math.max(M.right,g.right),top:0,bottom:0};t.update(t.fullWidth?b:k,x/2,i)}else t.update(e.width,w)}function F(t){t.isHorizontal()?(t.left=t.fullWidth?o:M.left,t.right=t.fullWidth?e-r:M.left+k,t.top=D,t.bottom=D+t.height,D=t.bottom):(t.left=A,t.right=A+t.width,t.top=M.top,t.bottom=M.top+w,A=t.right)}}};var we,Me=(we=Object.freeze({default:"@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&we.default||we,_e="$chartjs",Ce="chartjs-size-monitor",Se="chartjs-render-monitor",Pe="chartjs-render-animation",Ie=["animationstart","webkitAnimationStart"],Ae={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function De(t,e){var i=ut.getStyle(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?Number(n[1]):void 0}var Te=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function Fe(t,e,i){t.addEventListener(e,i,Te)}function Le(t,e,i){t.removeEventListener(e,i,Te)}function Re(t,e,i,n,a){return{type:t,chart:e,native:a||null,x:void 0!==i?i:null,y:void 0!==n?n:null}}function Oe(t){var e=document.createElement("div");return e.className=t||"",e}function ze(t,e,i){var n,a,o,r,s=t[_e]||(t[_e]={}),l=s.resizer=function(t){var e=Oe(Ce),i=Oe(Ce+"-expand"),n=Oe(Ce+"-shrink");i.appendChild(Oe()),n.appendChild(Oe()),e.appendChild(i),e.appendChild(n),e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,n.scrollLeft=1e6,n.scrollTop=1e6};var a=function(){e._reset(),t()};return Fe(i,"scroll",a.bind(i,"expand")),Fe(n,"scroll",a.bind(n,"shrink")),e}((n=function(){if(s.resizer){var n=i.options.maintainAspectRatio&&t.parentNode,a=n?n.clientWidth:0;e(Re("resize",i)),n&&n.clientWidth<a&&i.canvas&&e(Re("resize",i))}},o=!1,r=[],function(){r=Array.prototype.slice.call(arguments),a=a||this,o||(o=!0,ut.requestAnimFrame.call(window,function(){o=!1,n.apply(a,r)}))}));!function(t,e){var i=t[_e]||(t[_e]={}),n=i.renderProxy=function(t){t.animationName===Pe&&e()};ut.each(Ie,function(e){Fe(t,e,n)}),i.reflow=!!t.offsetParent,t.classList.add(Se)}(t,function(){if(s.resizer){var e=t.parentNode;e&&e!==l.parentNode&&e.insertBefore(l,e.firstChild),l._reset()}})}function Be(t){var e=t[_e]||{},i=e.resizer;delete e.resizer,function(t){var e=t[_e]||{},i=e.renderProxy;i&&(ut.each(Ie,function(e){Le(t,e,i)}),delete e.renderProxy),t.classList.remove(Se)}(t),i&&i.parentNode&&i.parentNode.removeChild(i)}var Ne={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(){var t,e,i;this._loaded||(this._loaded=!0,this.disableCSSInjection||(e=Me,i=(t=this)._style||document.createElement("style"),t._style||(t._style=i,e="/* Chart.js */\n"+e,i.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(i)),i.appendChild(document.createTextNode(e))))},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var i=t&&t.getContext&&t.getContext("2d");return this._ensureLoaded(),i&&i.canvas===t?(function(t,e){var i=t.style,n=t.getAttribute("height"),a=t.getAttribute("width");if(t[_e]={initial:{height:n,width:a,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",null===a||""===a){var o=De(t,"width");void 0!==o&&(t.width=o)}if(null===n||""===n)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var r=De(t,"height");void 0!==o&&(t.height=r)}}(t,e),i):null},releaseContext:function(t){var e=t.canvas;if(e[_e]){var i=e[_e].initial;["height","width"].forEach(function(t){var n=i[t];ut.isNullOrUndef(n)?e.removeAttribute(t):e.setAttribute(t,n)}),ut.each(i.style||{},function(t,i){e.style[i]=t}),e.width=e.width,delete e[_e]}},addEventListener:function(t,e,i){var n=t.canvas;if("resize"!==e){var a=i[_e]||(i[_e]={});Fe(n,e,(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){i(function(t,e){var i=Ae[t.type]||t.type,n=ut.getRelativePosition(t,e);return Re(i,e,n.x,n.y,t)}(e,t))})}else ze(n,i,t)},removeEventListener:function(t,e,i){var n=t.canvas;if("resize"!==e){var a=((i[_e]||{}).proxies||{})[t.id+"_"+e];a&&Le(n,e,a)}else Be(n)}};ut.addEvent=Fe,ut.removeEvent=Le;var We=Ne._enabled?Ne:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}},Ve=ut.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},We);st._set("global",{plugins:{}});var Ee={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach(function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,i){var n,a,o,r,s,l=this.descriptors(t),d=l.length;for(n=0;n<d;++n)if("function"==typeof(s=(o=(a=l[n]).plugin)[e])&&((r=[t].concat(i||[])).push(a.options),!1===s.apply(o,r)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var i=[],n=[],a=t&&t.config||{},o=a.options&&a.options.plugins||{};return this._plugins.concat(a.plugins||[]).forEach(function(t){if(-1===i.indexOf(t)){var e=t.id,a=o[e];!1!==a&&(!0===a&&(a=ut.clone(st.global.plugins[e])),i.push(t),n.push({plugin:t,options:a||{}}))}}),e.descriptors=n,e.id=this._cacheId,n},_invalidate:function(t){delete t.$plugins}},He={constructors:{},defaults:{},registerScaleType:function(t,e,i){this.constructors[t]=e,this.defaults[t]=ut.clone(i)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?ut.merge({},[st.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=ut.extend(this.defaults[t],e))},addScalesToLayout:function(t){ut.each(t.scales,function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,ke.addBox(t,e)})}},je=ut.valueOrDefault;st._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:ut.noop,title:function(t,e){var i="",n=e.labels,a=n?n.length:0;if(t.length>0){var o=t[0];o.label?i=o.label:o.xLabel?i=o.xLabel:a>0&&o.index<a&&(i=n[o.index])}return i},afterTitle:ut.noop,beforeBody:ut.noop,beforeLabel:ut.noop,label:function(t,e){var i=e.datasets[t.datasetIndex].label||"";return i&&(i+=": "),ut.isNullOrUndef(t.value)?i+=t.yLabel:i+=t.value,i},labelColor:function(t,e){var i=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:i.borderColor,backgroundColor:i.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:ut.noop,afterBody:ut.noop,beforeFooter:ut.noop,footer:ut.noop,afterFooter:ut.noop}}});var qe={average:function(t){if(!t.length)return!1;var e,i,n=0,a=0,o=0;for(e=0,i=t.length;e<i;++e){var r=t[e];if(r&&r.hasValue()){var s=r.tooltipPosition();n+=s.x,a+=s.y,++o}}return{x:n/o,y:a/o}},nearest:function(t,e){var i,n,a,o=e.x,r=e.y,s=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){var l=t[i];if(l&&l.hasValue()){var d=l.getCenterPoint(),u=ut.distanceBetweenPoints(e,d);u<s&&(s=u,a=l)}}if(a){var h=a.tooltipPosition();o=h.x,r=h.y}return{x:o,y:r}}};function Ye(t,e){return e&&(ut.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ue(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Xe(t){var e=st.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,bodyFontColor:t.bodyFontColor,_bodyFontFamily:je(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:je(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:je(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:je(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:je(t.titleFontStyle,e.defaultFontStyle),titleFontSize:je(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:je(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:je(t.footerFontStyle,e.defaultFontStyle),footerFontSize:je(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Ke(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function Ge(t){return Ye([],Ue(t))}var Ze=pt.extend({initialize:function(){this._model=Xe(this._options),this._lastActive=[]},getTitle:function(){var t=this._options.callbacks,e=t.beforeTitle.apply(this,arguments),i=t.title.apply(this,arguments),n=t.afterTitle.apply(this,arguments),a=[];return a=Ye(a,Ue(e)),a=Ye(a,Ue(i)),a=Ye(a,Ue(n))},getBeforeBody:function(){return Ge(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var i=this,n=i._options.callbacks,a=[];return ut.each(t,function(t){var o={before:[],lines:[],after:[]};Ye(o.before,Ue(n.beforeLabel.call(i,t,e))),Ye(o.lines,n.label.call(i,t,e)),Ye(o.after,Ue(n.afterLabel.call(i,t,e))),a.push(o)}),a},getAfterBody:function(){return Ge(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this._options.callbacks,e=t.beforeFooter.apply(this,arguments),i=t.footer.apply(this,arguments),n=t.afterFooter.apply(this,arguments),a=[];return a=Ye(a,Ue(e)),a=Ye(a,Ue(i)),a=Ye(a,Ue(n))},update:function(t){var e,i,n,a,o,r,s,l,d,u,h=this,c=h._options,f=h._model,g=h._model=Xe(c),p=h._active,m=h._data,v={xAlign:f.xAlign,yAlign:f.yAlign},b={x:f.x,y:f.y},x={width:f.width,height:f.height},y={x:f.caretX,y:f.caretY};if(p.length){g.opacity=1;var k=[],w=[];y=qe[c.position].call(h,p,h._eventPosition);var M=[];for(e=0,i=p.length;e<i;++e)M.push((n=p[e],a=void 0,o=void 0,r=void 0,s=void 0,l=void 0,d=void 0,u=void 0,a=n._xScale,o=n._yScale||n._scale,r=n._index,s=n._datasetIndex,l=n._chart.getDatasetMeta(s).controller,d=l._getIndexScale(),u=l._getValueScale(),{xLabel:a?a.getLabelForIndex(r,s):"",yLabel:o?o.getLabelForIndex(r,s):"",label:d?""+d.getLabelForIndex(r,s):"",value:u?""+u.getLabelForIndex(r,s):"",index:r,datasetIndex:s,x:n._model.x,y:n._model.y}));c.filter&&(M=M.filter(function(t){return c.filter(t,m)})),c.itemSort&&(M=M.sort(function(t,e){return c.itemSort(t,e,m)})),ut.each(M,function(t){k.push(c.callbacks.labelColor.call(h,t,h._chart)),w.push(c.callbacks.labelTextColor.call(h,t,h._chart))}),g.title=h.getTitle(M,m),g.beforeBody=h.getBeforeBody(M,m),g.body=h.getBody(M,m),g.afterBody=h.getAfterBody(M,m),g.footer=h.getFooter(M,m),g.x=y.x,g.y=y.y,g.caretPadding=c.caretPadding,g.labelColors=k,g.labelTextColors=w,g.dataPoints=M,x=function(t,e){var i=t._chart.ctx,n=2*e.yPadding,a=0,o=e.body,r=o.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);r+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,l=e.footer.length,d=e.titleFontSize,u=e.bodyFontSize,h=e.footerFontSize;n+=s*d,n+=s?(s-1)*e.titleSpacing:0,n+=s?e.titleMarginBottom:0,n+=r*u,n+=r?(r-1)*e.bodySpacing:0,n+=l?e.footerMarginTop:0,n+=l*h,n+=l?(l-1)*e.footerSpacing:0;var c=0,f=function(t){a=Math.max(a,i.measureText(t).width+c)};return i.font=ut.fontString(d,e._titleFontStyle,e._titleFontFamily),ut.each(e.title,f),i.font=ut.fontString(u,e._bodyFontStyle,e._bodyFontFamily),ut.each(e.beforeBody.concat(e.afterBody),f),c=e.displayColors?u+2:0,ut.each(o,function(t){ut.each(t.before,f),ut.each(t.lines,f),ut.each(t.after,f)}),c=0,i.font=ut.fontString(h,e._footerFontStyle,e._footerFontFamily),ut.each(e.footer,f),{width:a+=2*e.xPadding,height:n}}(this,g),b=function(t,e,i,n){var a=t.x,o=t.y,r=t.caretSize,s=t.caretPadding,l=t.cornerRadius,d=i.xAlign,u=i.yAlign,h=r+s,c=l+s;return"right"===d?a-=e.width:"center"===d&&((a-=e.width/2)+e.width>n.width&&(a=n.width-e.width),a<0&&(a=0)),"top"===u?o+=h:o-="bottom"===u?e.height+h:e.height/2,"center"===u?"left"===d?a+=h:"right"===d&&(a-=h):"left"===d?a-=c:"right"===d&&(a+=c),{x:a,y:o}}(g,x,v=function(t,e){var i,n,a,o,r,s=t._model,l=t._chart,d=t._chart.chartArea,u="center",h="center";s.y<e.height?h="top":s.y>l.height-e.height&&(h="bottom");var c=(d.left+d.right)/2,f=(d.top+d.bottom)/2;"center"===h?(i=function(t){return t<=c},n=function(t){return t>c}):(i=function(t){return t<=e.width/2},n=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},o=function(t){return t-e.width-s.caretSize-s.caretPadding<0},r=function(t){return t<=f?"top":"bottom"},i(s.x)?(u="left",a(s.x)&&(u="center",h=r(s.y))):n(s.x)&&(u="right",o(s.x)&&(u="center",h=r(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:u,yAlign:g.yAlign?g.yAlign:h}}(this,x),h._chart)}else g.opacity=0;return g.xAlign=v.xAlign,g.yAlign=v.yAlign,g.x=b.x,g.y=b.y,g.width=x.width,g.height=x.height,g.caretX=y.x,g.caretY=y.y,h._model=g,t&&c.custom&&c.custom.call(h,g),h},drawCaret:function(t,e){var i=this._chart.ctx,n=this._view,a=this.getCaretPosition(t,e,n);i.lineTo(a.x1,a.y1),i.lineTo(a.x2,a.y2),i.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,i){var n,a,o,r,s,l,d=i.caretSize,u=i.cornerRadius,h=i.xAlign,c=i.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if("center"===c)s=g+m/2,"left"===h?(a=(n=f)-d,o=n,r=s+d,l=s-d):(a=(n=f+p)+d,o=n,r=s-d,l=s+d);else if("left"===h?(n=(a=f+u+d)-d,o=a+d):"right"===h?(n=(a=f+p-u-d)-d,o=a+d):(n=(a=i.caretX)-d,o=a+d),"top"===c)s=(r=g)-d,l=r;else{s=(r=g+m)+d,l=r;var v=o;o=n,n=v}return{x1:n,x2:a,x3:o,y1:r,y2:s,y3:l}},drawTitle:function(t,e,i){var n=e.title;if(n.length){t.x=Ke(e,e._titleAlign),i.textAlign=e._titleAlign,i.textBaseline="top";var a,o,r=e.titleFontSize,s=e.titleSpacing;for(i.fillStyle=e.titleFontColor,i.font=ut.fontString(r,e._titleFontStyle,e._titleFontFamily),a=0,o=n.length;a<o;++a)i.fillText(n[a],t.x,t.y),t.y+=r+s,a+1===n.length&&(t.y+=e.titleMarginBottom-s)}},drawBody:function(t,e,i){var n,a=e.bodyFontSize,o=e.bodySpacing,r=e._bodyAlign,s=e.body,l=e.displayColors,d=e.labelColors,u=0,h=l?Ke(e,"left"):0;i.textAlign=r,i.textBaseline="top",i.font=ut.fontString(a,e._bodyFontStyle,e._bodyFontFamily),t.x=Ke(e,r);var c=function(e){i.fillText(e,t.x+u,t.y),t.y+=a+o};i.fillStyle=e.bodyFontColor,ut.each(e.beforeBody,c),u=l&&"right"!==r?"center"===r?a/2+1:a+2:0,ut.each(s,function(o,r){n=e.labelTextColors[r],i.fillStyle=n,ut.each(o.before,c),ut.each(o.lines,function(o){l&&(i.fillStyle=e.legendColorBackground,i.fillRect(h,t.y,a,a),i.lineWidth=1,i.strokeStyle=d[r].borderColor,i.strokeRect(h,t.y,a,a),i.fillStyle=d[r].backgroundColor,i.fillRect(h+1,t.y+1,a-2,a-2),i.fillStyle=n),c(o)}),ut.each(o.after,c)}),u=0,ut.each(e.afterBody,c),t.y-=o},drawFooter:function(t,e,i){var n=e.footer;n.length&&(t.x=Ke(e,e._footerAlign),t.y+=e.footerMarginTop,i.textAlign=e._footerAlign,i.textBaseline="top",i.fillStyle=e.footerFontColor,i.font=ut.fontString(e.footerFontSize,e._footerFontStyle,e._footerFontFamily),ut.each(n,function(n){i.fillText(n,t.x,t.y),t.y+=e.footerFontSize+e.footerSpacing}))},drawBackground:function(t,e,i,n){i.fillStyle=e.backgroundColor,i.strokeStyle=e.borderColor,i.lineWidth=e.borderWidth;var a=e.xAlign,o=e.yAlign,r=t.x,s=t.y,l=n.width,d=n.height,u=e.cornerRadius;i.beginPath(),i.moveTo(r+u,s),"top"===o&&this.drawCaret(t,n),i.lineTo(r+l-u,s),i.quadraticCurveTo(r+l,s,r+l,s+u),"center"===o&&"right"===a&&this.drawCaret(t,n),i.lineTo(r+l,s+d-u),i.quadraticCurveTo(r+l,s+d,r+l-u,s+d),"bottom"===o&&this.drawCaret(t,n),i.lineTo(r+u,s+d),i.quadraticCurveTo(r,s+d,r,s+d-u),"center"===o&&"left"===a&&this.drawCaret(t,n),i.lineTo(r,s+u),i.quadraticCurveTo(r,s,r+u,s),i.closePath(),i.fill(),e.borderWidth>0&&i.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i={width:e.width,height:e.height},n={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&o&&(t.save(),t.globalAlpha=a,this.drawBackground(n,e,t,i),n.y+=e.yPadding,this.drawTitle(n,e,t),this.drawBody(n,e,t),this.drawFooter(n,e,t),t.restore())}},handleEvent:function(t){var e,i=this,n=i._options;return i._lastActive=i._lastActive||[],"mouseout"===t.type?i._active=[]:i._active=i._chart.getElementsAtEventForMode(t,n.mode,n),(e=!ut.arrayEquals(i._active,i._lastActive))&&(i._lastActive=i._active,(n.enabled||n.custom)&&(i._eventPosition={x:t.x,y:t.y},i.update(!0),i.pivot())),e}}),$e=qe,Je=Ze;Je.positioners=$e;var Qe=ut.valueOrDefault;function ti(){return ut.merge({},[].slice.call(arguments),{merger:function(t,e,i,n){if("xAxes"===t||"yAxes"===t){var a,o,r,s=i[t].length;for(e[t]||(e[t]=[]),a=0;a<s;++a)r=i[t][a],o=Qe(r.type,"xAxes"===t?"category":"linear"),a>=e[t].length&&e[t].push({}),!e[t][a].type||r.type&&r.type!==e[t][a].type?ut.merge(e[t][a],[He.getScaleDefaults(o),r]):ut.merge(e[t][a],r)}else ut._merger(t,e,i,n)}})}function ei(){return ut.merge({},[].slice.call(arguments),{merger:function(t,e,i,n){var a=e[t]||{},o=i[t];"scales"===t?e[t]=ti(a,o):"scale"===t?e[t]=ut.merge(a,[He.getScaleDefaults(o.type),o]):ut._merger(t,e,i,n)}})}function ii(t){return"top"===t||"bottom"===t}st._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var ni=function(t,e){return this.construct(t,e),this};ut.extend(ni.prototype,{construct:function(t,e){var i=this;e=function(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=ei(st.global,st[t.type],t.options||{}),t}(e);var n=Ve.acquireContext(t,e),a=n&&n.canvas,o=a&&a.height,r=a&&a.width;i.id=ut.uid(),i.ctx=n,i.canvas=a,i.config=e,i.width=r,i.height=o,i.aspectRatio=o?r/o:null,i.options=e.options,i._bufferedRender=!1,i.chart=i,i.controller=i,ni.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),n&&a?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Ee.notify(t,"beforeInit"),ut.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),Ee.notify(t,"afterInit"),t},clear:function(){return ut.canvas.clear(this),this},stop:function(){return bt.cancelAnimation(this),this},resize:function(t){var e=this,i=e.options,n=e.canvas,a=i.maintainAspectRatio&&e.aspectRatio||null,o=Math.max(0,Math.floor(ut.getMaximumWidth(n))),r=Math.max(0,Math.floor(a?o/a:ut.getMaximumHeight(n)));if((e.width!==o||e.height!==r)&&(n.width=e.width=o,n.height=e.height=r,n.style.width=o+"px",n.style.height=r+"px",ut.retinaScale(e,i.devicePixelRatio),!t)){var s={width:o,height:r};Ee.notify(e,"resize",[s]),i.onResize&&i.onResize(e,s),e.stop(),e.update({duration:i.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;ut.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),ut.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),i&&(i.id=i.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,i=t.scales||{},n=[],a=Object.keys(i).reduce(function(t,e){return t[e]=!1,t},{});e.scales&&(n=n.concat((e.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(e.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),e.scale&&n.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),ut.each(n,function(e){var n=e.options,o=n.id,r=Qe(n.type,e.dtype);ii(n.position)!==ii(e.dposition)&&(n.position=e.dposition),a[o]=!0;var s=null;if(o in i&&i[o].type===r)(s=i[o]).options=n,s.ctx=t.ctx,s.chart=t;else{var l=He.getScaleConstructor(r);if(!l)return;s=new l({id:o,type:r,options:n,ctx:t.ctx,chart:t}),i[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)}),ut.each(a,function(t,e){t||delete i[e]}),t.scales=i,He.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t=this,e=[];return ut.each(t.data.datasets,function(i,n){var a=t.getDatasetMeta(n),o=i.type||t.config.type;if(a.type&&a.type!==o&&(t.destroyDatasetMeta(n),a=t.getDatasetMeta(n)),a.type=o,a.controller)a.controller.updateIndex(n),a.controller.linkScales();else{var r=ue[a.type];if(void 0===r)throw new Error('"'+a.type+'" is not a chart type.');a.controller=new r(t,n),e.push(a.controller)}},t),e},resetElements:function(){var t=this;ut.each(t.data.datasets,function(e,i){t.getDatasetMeta(i).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,i,n=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),i=(e=n).options,ut.each(e.scales,function(t){ke.removeBox(e,t)}),i=ei(st.global,st[e.config.type],i),e.options=e.config.options=i,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=i.tooltips,e.tooltip.initialize(),Ee._invalidate(n),!1!==Ee.notify(n,"beforeUpdate")){n.tooltip._data=n.data;var a=n.buildOrUpdateControllers();ut.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.buildOrUpdateElements()},n),n.updateLayout(),n.options.animation&&n.options.animation.duration&&ut.each(a,function(t){t.reset()}),n.updateDatasets(),n.tooltip.initialize(),n.lastActive=[],Ee.notify(n,"afterUpdate"),n._bufferedRender?n._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:n.render(t)}},updateLayout:function(){!1!==Ee.notify(this,"beforeLayout")&&(ke.update(this,this.width,this.height),Ee.notify(this,"afterScaleUpdate"),Ee.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==Ee.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);Ee.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),i={meta:e,index:t};!1!==Ee.notify(this,"beforeDatasetUpdate",[i])&&(e.controller.update(),Ee.notify(this,"afterDatasetUpdate",[i]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var i=e.options.animation,n=Qe(t.duration,i&&i.duration),a=t.lazy;if(!1!==Ee.notify(e,"beforeRender")){var o=function(t){Ee.notify(e,"afterRender"),ut.callback(i&&i.onComplete,[t],e)};if(i&&n){var r=new vt({numSteps:n/16.66,easing:t.easing||i.easing,render:function(t,e){var i=ut.easing.effects[e.easing],n=e.currentStep,a=n/e.numSteps;t.draw(i(a),a,n)},onAnimationProgress:i.onProgress,onAnimationComplete:o});bt.addAnimation(e,r,n,a)}else e.draw(),o(new vt({numSteps:0,chart:e}));return e}},draw:function(t){var e=this;e.clear(),ut.isNullOrUndef(t)&&(t=1),e.transition(t),e.width<=0||e.height<=0||!1!==Ee.notify(e,"beforeDraw",[t])&&(ut.each(e.boxes,function(t){t.draw(e.chartArea)},e),e.drawDatasets(t),e._drawTooltip(t),Ee.notify(e,"afterDraw",[t]))},transition:function(t){for(var e=0,i=(this.data.datasets||[]).length;e<i;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},drawDatasets:function(t){var e=this;if(!1!==Ee.notify(e,"beforeDatasetsDraw",[t])){for(var i=(e.data.datasets||[]).length-1;i>=0;--i)e.isDatasetVisible(i)&&e.drawDataset(i,t);Ee.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var i=this.getDatasetMeta(t),n={meta:i,index:t,easingValue:e};!1!==Ee.notify(this,"beforeDatasetDraw",[n])&&(i.controller.draw(e),Ee.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,i={tooltip:e,easingValue:t};!1!==Ee.notify(this,"beforeTooltipDraw",[i])&&(e.draw(),Ee.notify(this,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return ve.modes.single(this,t)},getElementsAtEvent:function(t){return ve.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return ve.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,i){var n=ve.modes[e];return"function"==typeof n?n(this,t,i):[]},getDatasetAtEvent:function(t){return ve.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var i=e._meta[this.id];return i||(i=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;e<i;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,i=this.data.datasets[t],n=i._meta&&i._meta[e];n&&(n.controller.destroy(),delete i._meta[e])},destroy:function(){var t,e,i=this,n=i.canvas;for(i.stop(),t=0,e=i.data.datasets.length;t<e;++t)i.destroyDatasetMeta(t);n&&(i.unbindEvents(),ut.canvas.clear(i),Ve.releaseContext(i.ctx),i.canvas=null,i.ctx=null),Ee.notify(i,"destroy"),delete ni.instances[i.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new Je({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var t=this,e=t._listeners={},i=function(){t.eventHandler.apply(t,arguments)};ut.each(t.options.events,function(n){Ve.addEventListener(t,n,i),e[n]=i}),t.options.responsive&&(i=function(){t.resize()},Ve.addEventListener(t,"resize",i),e.resize=i)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,ut.each(e,function(e,i){Ve.removeEventListener(t,i,e)}))},updateHoverStyle:function(t,e,i){var n,a,o,r=i?"setHoverStyle":"removeHoverStyle";for(a=0,o=t.length;a<o;++a)(n=t[a])&&this.getDatasetMeta(n._datasetIndex).controller[r](n)},eventHandler:function(t){var e=this,i=e.tooltip;if(!1!==Ee.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var n=e.handleEvent(t);i&&(n=i._start?i.handleEvent(t):n|i.handleEvent(t)),Ee.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):n&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,i=this,n=i.options||{},a=n.hover;return i.lastActive=i.lastActive||[],"mouseout"===t.type?i.active=[]:i.active=i.getElementsAtEventForMode(t,a.mode,a),ut.callback(n.onHover||n.hover.onHover,[t.native,i.active],i),"mouseup"!==t.type&&"click"!==t.type||n.onClick&&n.onClick.call(i,t.native,i.active),i.lastActive.length&&i.updateHoverStyle(i.lastActive,a.mode,!1),i.active.length&&a.mode&&i.updateHoverStyle(i.active,a.mode,!0),e=!ut.arrayEquals(i.active,i.lastActive),i.lastActive=i.active,e}}),ni.instances={};var ai=ni;ni.Controller=ni,ni.types={},ut.configMerge=ei,ut.scaleMerge=ti;function oi(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function ri(t){this.options=t||{}}ut.extend(ri.prototype,{formats:oi,parse:oi,format:oi,add:oi,diff:oi,startOf:oi,endOf:oi,_create:function(t){return t}}),ri.override=function(t){ut.extend(ri.prototype,t)};var si={_date:ri},li={formatters:{values:function(t){return ut.isArray(t)?t:""+t},linear:function(t,e,i){var n=i.length>3?i[2]-i[1]:i[1]-i[0];Math.abs(n)>1&&t!==Math.floor(t)&&(n=t-Math.floor(t));var a=ut.log10(Math.abs(n)),o="";if(0!==t)if(Math.max(Math.abs(i[0]),Math.abs(i[i.length-1]))<1e-4){var r=ut.log10(Math.abs(t));o=t.toExponential(Math.floor(r)-Math.floor(a))}else{var s=-1*Math.floor(a);s=Math.max(Math.min(s,20),0),o=t.toFixed(s)}else o="0";return o},logarithmic:function(t,e,i){var n=t/Math.pow(10,Math.floor(ut.log10(t)));return 0===t?"0":1===n||2===n||5===n||0===e||e===i.length-1?t.toExponential():""}}},di=ut.valueOrDefault,ui=ut.valueAtIndexOrDefault;function hi(t){var e,i,n=[];for(e=0,i=t.length;e<i;++e)n.push(t[e].label);return n}function ci(t,e,i){return ut.isArray(e)?ut.longestText(t,i,e):t.measureText(e).width}st._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:li.formatters.values,minor:{},major:{}}});var fi=pt.extend({getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},mergeTicksOptions:function(){var t=this.options.ticks;for(var e in!1===t.minor&&(t.minor={display:!1}),!1===t.major&&(t.major={display:!1}),t)"major"!==e&&"minor"!==e&&(void 0===t.minor[e]&&(t.minor[e]=t[e]),void 0===t.major[e]&&(t.major[e]=t[e]))},beforeUpdate:function(){ut.callback(this.options.beforeUpdate,[this])},update:function(t,e,i){var n,a,o,r,s,l,d=this;for(d.beforeUpdate(),d.maxWidth=t,d.maxHeight=e,d.margins=ut.extend({left:0,right:0,top:0,bottom:0},i),d._maxLabelLines=0,d.longestLabelWidth=0,d.longestTextCache=d.longestTextCache||{},d.beforeSetDimensions(),d.setDimensions(),d.afterSetDimensions(),d.beforeDataLimits(),d.determineDataLimits(),d.afterDataLimits(),d.beforeBuildTicks(),s=d.buildTicks()||[],s=d.afterBuildTicks(s)||s,d.beforeTickToLabelConversion(),o=d.convertTicksToLabels(s)||d.ticks,d.afterTickToLabelConversion(),d.ticks=o,n=0,a=o.length;n<a;++n)r=o[n],(l=s[n])?l.label=r:s.push(l={label:r,major:!1});return d._ticks=s,d.beforeCalculateTickRotation(),d.calculateTickRotation(),d.afterCalculateTickRotation(),d.beforeFit(),d.fit(),d.afterFit(),d.afterUpdate(),d.minSize},afterUpdate:function(){ut.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){ut.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){ut.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){ut.callback(this.options.beforeDataLimits,[this])},determineDataLimits:ut.noop,afterDataLimits:function(){ut.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){ut.callback(this.options.beforeBuildTicks,[this])},buildTicks:ut.noop,afterBuildTicks:function(t){var e=this;return ut.isArray(t)&&t.length?ut.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=ut.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){ut.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){ut.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){ut.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t=this,e=t.ctx,i=t.options.ticks,n=hi(t._ticks),a=ut.options._parseFont(i);e.font=a.string;var o=i.minRotation||0;if(n.length&&t.options.display&&t.isHorizontal())for(var r,s=ut.longestText(e,a.string,n,t.longestTextCache),l=s,d=t.getPixelForTick(1)-t.getPixelForTick(0)-6;l>d&&o<i.maxRotation;){var u=ut.toRadians(o);if(r=Math.cos(u),Math.sin(u)*s>t.maxHeight){o--;break}o++,l=r*s}t.labelRotation=o},afterCalculateTickRotation:function(){ut.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){ut.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},i=hi(t._ticks),n=t.options,a=n.ticks,o=n.scaleLabel,r=n.gridLines,s=t._isVisible(),l=n.position,d=t.isHorizontal(),u=ut.options._parseFont,h=u(a),c=n.gridLines.tickMarkLength;if(e.width=d?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:s&&r.drawTicks?c:0,e.height=d?s&&r.drawTicks?c:0:t.maxHeight,o.display&&s){var f=u(o),g=ut.options.toPadding(o.padding),p=f.lineHeight+g.height;d?e.height+=p:e.width+=p}if(a.display&&s){var m=ut.longestText(t.ctx,h.string,i,t.longestTextCache),v=ut.numberOfLabelLines(i),b=.5*h.size,x=t.options.ticks.padding;if(t._maxLabelLines=v,t.longestLabelWidth=m,d){var y=ut.toRadians(t.labelRotation),k=Math.cos(y),w=Math.sin(y)*m+h.lineHeight*v+b;e.height=Math.min(t.maxHeight,e.height+w+x),t.ctx.font=h.string;var M,_,C=ci(t.ctx,i[0],h.string),S=ci(t.ctx,i[i.length-1],h.string),P=t.getPixelForTick(0)-t.left,I=t.right-t.getPixelForTick(i.length-1);0!==t.labelRotation?(M="bottom"===l?k*C:k*b,_="bottom"===l?k*b:k*S):(M=C/2,_=S/2),t.paddingLeft=Math.max(M-P,0)+3,t.paddingRight=Math.max(_-I,0)+3}else a.mirror?m=0:m+=x+b,e.width=Math.min(t.maxWidth,e.width+m),t.paddingTop=h.size/2,t.paddingBottom=h.size/2}t.handleMargins(),t.width=e.width,t.height=e.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){ut.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(ut.isNullOrUndef(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},getLabelForIndex:ut.noop,getPixelForValue:ut.noop,getValueForPixel:ut.noop,getPixelForTick:function(t){var e=this,i=e.options.offset;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(i?0:1),1),a=n*t+e.paddingLeft;i&&(a+=n/2);var o=e.left+a;return o+=e.isFullWidth()?e.margins.left:0}var r=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(r/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,n=e.left+i;return n+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,i,n=this,a=n.isHorizontal(),o=n.options.ticks.minor,r=t.length,s=!1,l=o.maxTicksLimit,d=n._tickSize()*(r-1),u=a?n.width-(n.paddingLeft+n.paddingRight):n.height-(n.paddingTop+n.PaddingBottom),h=[];for(d>u&&(s=1+Math.floor(d/u)),r>l&&(s=Math.max(s,1+Math.floor(r/l))),e=0;e<r;e++)i=t[e],s>1&&e%s>0&&delete i.label,h.push(i);return h},_tickSize:function(){var t=this,e=t.isHorizontal(),i=t.options.ticks.minor,n=ut.toRadians(t.labelRotation),a=Math.abs(Math.cos(n)),o=Math.abs(Math.sin(n)),r=i.autoSkipPadding||0,s=t.longestLabelWidth+r||0,l=ut.options._parseFont(i),d=t._maxLabelLines*l.lineHeight+r||0;return e?d*a>s*o?s/a:d/o:d*o<s*a?d/a:s/o},_isVisible:function(){var t,e,i,n=this.chart,a=this.options.display;if("auto"!==a)return!!a;for(t=0,e=n.data.datasets.length;t<e;++t)if(n.isDatasetVisible(t)&&((i=n.getDatasetMeta(t)).xAxisID===this.id||i.yAxisID===this.id))return!0;return!1},draw:function(t){var e=this,i=e.options;if(e._isVisible()){var n,a,o,r=e.chart,s=e.ctx,l=st.global.defaultFontColor,d=i.ticks.minor,u=i.ticks.major||d,h=i.gridLines,c=i.scaleLabel,f=i.position,g=0!==e.labelRotation,p=d.mirror,m=e.isHorizontal(),v=ut.options._parseFont,b=d.display&&d.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),x=di(d.fontColor,l),y=v(d),k=y.lineHeight,w=di(u.fontColor,l),M=v(u),_=d.padding,C=d.labelOffset,S=h.drawTicks?h.tickMarkLength:0,P=di(c.fontColor,l),I=v(c),A=ut.options.toPadding(c.padding),D=ut.toRadians(e.labelRotation),T=[],F=h.drawBorder?ui(h.lineWidth,0,0):0,L=ut._alignPixel;"top"===f?(n=L(r,e.bottom,F),a=e.bottom-S,o=n-F/2):"bottom"===f?(n=L(r,e.top,F),a=n+F/2,o=e.top+S):"left"===f?(n=L(r,e.right,F),a=e.right-S,o=n-F/2):(n=L(r,e.left,F),a=n+F/2,o=e.left+S);if(ut.each(b,function(n,s){if(!ut.isNullOrUndef(n.label)){var l,d,u,c,v,b,x,y,w,M,P,I,A,R,O,z,B=n.label;s===e.zeroLineIndex&&i.offset===h.offsetGridLines?(l=h.zeroLineWidth,d=h.zeroLineColor,u=h.zeroLineBorderDash||[],c=h.zeroLineBorderDashOffset||0):(l=ui(h.lineWidth,s),d=ui(h.color,s),u=h.borderDash||[],c=h.borderDashOffset||0);var N=ut.isArray(B)?B.length:1,W=function(t,e,i){var n=t.getPixelForTick(e);return i&&(1===t.getTicks().length?n-=t.isHorizontal()?Math.max(n-t.left,t.right-n):Math.max(n-t.top,t.bottom-n):n-=0===e?(t.getPixelForTick(1)-n)/2:(n-t.getPixelForTick(e-1))/2),n}(e,s,h.offsetGridLines);if(m){var V=S+_;W<e.left-1e-7&&(d="rgba(0,0,0,0)"),v=x=w=P=L(r,W,l),b=a,y=o,A=e.getPixelForTick(s)+C,"top"===f?(M=L(r,t.top,F)+F/2,I=t.bottom,O=((g?1:.5)-N)*k,z=g?"left":"center",R=e.bottom-V):(M=t.top,I=L(r,t.bottom,F)-F/2,O=(g?0:.5)*k,z=g?"right":"center",R=e.top+V)}else{var E=(p?0:S)+_;W<e.top-1e-7&&(d="rgba(0,0,0,0)"),v=a,x=o,b=y=M=I=L(r,W,l),R=e.getPixelForTick(s)+C,O=(1-N)*k/2,"left"===f?(w=L(r,t.left,F)+F/2,P=t.right,z=p?"left":"right",A=e.right-E):(w=t.left,P=L(r,t.right,F)-F/2,z=p?"right":"left",A=e.left+E)}T.push({tx1:v,ty1:b,tx2:x,ty2:y,x1:w,y1:M,x2:P,y2:I,labelX:A,labelY:R,glWidth:l,glColor:d,glBorderDash:u,glBorderDashOffset:c,rotation:-1*D,label:B,major:n.major,textOffset:O,textAlign:z})}}),ut.each(T,function(t){var e=t.glWidth,i=t.glColor;if(h.display&&e&&i&&(s.save(),s.lineWidth=e,s.strokeStyle=i,s.setLineDash&&(s.setLineDash(t.glBorderDash),s.lineDashOffset=t.glBorderDashOffset),s.beginPath(),h.drawTicks&&(s.moveTo(t.tx1,t.ty1),s.lineTo(t.tx2,t.ty2)),h.drawOnChartArea&&(s.moveTo(t.x1,t.y1),s.lineTo(t.x2,t.y2)),s.stroke(),s.restore()),d.display){s.save(),s.translate(t.labelX,t.labelY),s.rotate(t.rotation),s.font=t.major?M.string:y.string,s.fillStyle=t.major?w:x,s.textBaseline="middle",s.textAlign=t.textAlign;var n=t.label,a=t.textOffset;if(ut.isArray(n))for(var o=0;o<n.length;++o)s.fillText(""+n[o],0,a),a+=k;else s.fillText(n,0,a);s.restore()}}),c.display){var R,O,z=0,B=I.lineHeight/2;if(m)R=e.left+(e.right-e.left)/2,O="bottom"===f?e.bottom-B-A.bottom:e.top+B+A.top;else{var N="left"===f;R=N?e.left+B+A.top:e.right-B-A.top,O=e.top+(e.bottom-e.top)/2,z=N?-.5*Math.PI:.5*Math.PI}s.save(),s.translate(R,O),s.rotate(z),s.textAlign="center",s.textBaseline="middle",s.fillStyle=P,s.font=I.string,s.fillText(c.labelString,0,0),s.restore()}if(F){var W,V,E,H,j=F,q=ui(h.lineWidth,b.length-1,0);m?(W=L(r,e.left,j)-j/2,V=L(r,e.right,q)+q/2,E=H=n):(E=L(r,e.top,j)-j/2,H=L(r,e.bottom,q)+q/2,W=V=n),s.lineWidth=F,s.strokeStyle=ui(h.color,0),s.beginPath(),s.moveTo(W,E),s.lineTo(V,H),s.stroke()}}}}),gi=fi.extend({getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t,e=this,i=e.getLabels();e.minIndex=0,e.maxIndex=i.length-1,void 0!==e.options.ticks.min&&(t=i.indexOf(e.options.ticks.min),e.minIndex=-1!==t?t:e.minIndex),void 0!==e.options.ticks.max&&(t=i.indexOf(e.options.ticks.max),e.maxIndex=-1!==t?t:e.maxIndex),e.min=i[e.minIndex],e.max=i[e.maxIndex]},buildTicks:function(){var t=this,e=t.getLabels();t.ticks=0===t.minIndex&&t.maxIndex===e.length-1?e:e.slice(t.minIndex,t.maxIndex+1)},getLabelForIndex:function(t,e){var i=this,n=i.chart;return n.getDatasetMeta(e).controller._getValueScaleId()===i.id?i.getRightValue(n.data.datasets[e].data[t]):i.ticks[t-i.minIndex]},getPixelForValue:function(t,e){var i,n=this,a=n.options.offset,o=Math.max(n.maxIndex+1-n.minIndex-(a?0:1),1);if(null!=t&&(i=n.isHorizontal()?t.x:t.y),void 0!==i||void 0!==t&&isNaN(e)){t=i||t;var r=n.getLabels().indexOf(t);e=-1!==r?r:e}if(n.isHorizontal()){var s=n.width/o,l=s*(e-n.minIndex);return a&&(l+=s/2),n.left+l}var d=n.height/o,u=d*(e-n.minIndex);return a&&(u+=d/2),n.top+u},getPixelForTick:function(t){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null)},getValueForPixel:function(t){var e=this,i=e.options.offset,n=Math.max(e._ticks.length-(i?0:1),1),a=e.isHorizontal(),o=(a?e.width:e.height)/n;return t-=a?e.left:e.top,i&&(t-=o/2),(t<=0?0:Math.round(t/o))+e.minIndex},getBasePixel:function(){return this.bottom}}),pi={position:"bottom"};gi._defaults=pi;var mi=ut.noop,vi=ut.isNullOrUndef;var bi=fi.extend({getRightValue:function(t){return"string"==typeof t?+t:fi.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var i=ut.sign(t.min),n=ut.sign(t.max);i<0&&n<0?t.max=0:i>0&&n>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,o=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),a!==o&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,i=e.stepSize,n=e.maxTicksLimit;return i?t=Math.ceil(this.max/i)-Math.floor(this.min/i)+1:(t=this._computeTickLimit(),n=n||11),n&&(t=Math.min(n,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:mi,buildTicks:function(){var t=this,e=t.options.ticks,i=t.getTickLimit(),n={maxTicks:i=Math.max(2,i),min:e.min,max:e.max,precision:e.precision,stepSize:ut.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var i,n,a,o,r=[],s=t.stepSize,l=s||1,d=t.maxTicks-1,u=t.min,h=t.max,c=t.precision,f=e.min,g=e.max,p=ut.niceNum((g-f)/d/l)*l;if(p<1e-14&&vi(u)&&vi(h))return[f,g];(o=Math.ceil(g/p)-Math.floor(f/p))>d&&(p=ut.niceNum(o*p/d/l)*l),s||vi(c)?i=Math.pow(10,ut._decimalPlaces(p)):(i=Math.pow(10,c),p=Math.ceil(p*i)/i),n=Math.floor(f/p)*p,a=Math.ceil(g/p)*p,s&&(!vi(u)&&ut.almostWhole(u/p,p/1e3)&&(n=u),!vi(h)&&ut.almostWhole(h/p,p/1e3)&&(a=h)),o=(a-n)/p,o=ut.almostEquals(o,Math.round(o),p/1e3)?Math.round(o):Math.ceil(o),n=Math.round(n*i)/i,a=Math.round(a*i)/i,r.push(vi(u)?n:u);for(var m=1;m<o;++m)r.push(Math.round((n+m*p)*i)/i);return r.push(vi(h)?a:h),r}(n,t);t.handleDirectionalChanges(),t.max=ut.max(a),t.min=ut.min(a),e.reverse?(a.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),fi.prototype.convertTicksToLabels.call(t)}}),xi={position:"left",ticks:{callback:li.formatters.linear}},yi=bi.extend({determineDataLimits:function(){var t=this,e=t.options,i=t.chart,n=i.data.datasets,a=t.isHorizontal();function o(e){return a?e.xAxisID===t.id:e.yAxisID===t.id}t.min=null,t.max=null;var r=e.stacked;if(void 0===r&&ut.each(n,function(t,e){if(!r){var n=i.getDatasetMeta(e);i.isDatasetVisible(e)&&o(n)&&void 0!==n.stack&&(r=!0)}}),e.stacked||r){var s={};ut.each(n,function(n,a){var r=i.getDatasetMeta(a),l=[r.type,void 0===e.stacked&&void 0===r.stack?a:"",r.stack].join(".");void 0===s[l]&&(s[l]={positiveValues:[],negativeValues:[]});var d=s[l].positiveValues,u=s[l].negativeValues;i.isDatasetVisible(a)&&o(r)&&ut.each(n.data,function(i,n){var a=+t.getRightValue(i);isNaN(a)||r.data[n].hidden||(d[n]=d[n]||0,u[n]=u[n]||0,e.relativePoints?d[n]=100:a<0?u[n]+=a:d[n]+=a)})}),ut.each(s,function(e){var i=e.positiveValues.concat(e.negativeValues),n=ut.min(i),a=ut.max(i);t.min=null===t.min?n:Math.min(t.min,n),t.max=null===t.max?a:Math.max(t.max,a)})}else ut.each(n,function(e,n){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&o(a)&&ut.each(e.data,function(e,i){var n=+t.getRightValue(e);isNaN(n)||a.data[i].hidden||(null===t.min?t.min=n:n<t.min&&(t.min=n),null===t.max?t.max=n:n>t.max&&(t.max=n))})});t.min=isFinite(t.min)&&!isNaN(t.min)?t.min:0,t.max=isFinite(t.max)&&!isNaN(t.max)?t.max:1,this.handleTickRangeOptions()},_computeTickLimit:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=ut.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this,i=e.start,n=+e.getRightValue(t),a=e.end-i;return e.isHorizontal()?e.left+e.width/a*(n-i):e.bottom-e.height/a*(n-i)},getValueForPixel:function(t){var e=this,i=e.isHorizontal(),n=i?e.width:e.height,a=(i?t-e.left:e.bottom-t)/n;return e.start+(e.end-e.start)*a},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}}),ki=xi;yi._defaults=ki;var wi=ut.valueOrDefault;var Mi={position:"left",ticks:{callback:li.formatters.logarithmic}};function _i(t,e){return ut.isFinite(t)&&t>=0?t:e}var Ci=fi.extend({determineDataLimits:function(){var t=this,e=t.options,i=t.chart,n=i.data.datasets,a=t.isHorizontal();function o(e){return a?e.xAxisID===t.id:e.yAxisID===t.id}t.min=null,t.max=null,t.minNotZero=null;var r=e.stacked;if(void 0===r&&ut.each(n,function(t,e){if(!r){var n=i.getDatasetMeta(e);i.isDatasetVisible(e)&&o(n)&&void 0!==n.stack&&(r=!0)}}),e.stacked||r){var s={};ut.each(n,function(n,a){var r=i.getDatasetMeta(a),l=[r.type,void 0===e.stacked&&void 0===r.stack?a:"",r.stack].join(".");i.isDatasetVisible(a)&&o(r)&&(void 0===s[l]&&(s[l]=[]),ut.each(n.data,function(e,i){var n=s[l],a=+t.getRightValue(e);isNaN(a)||r.data[i].hidden||a<0||(n[i]=n[i]||0,n[i]+=a)}))}),ut.each(s,function(e){if(e.length>0){var i=ut.min(e),n=ut.max(e);t.min=null===t.min?i:Math.min(t.min,i),t.max=null===t.max?n:Math.max(t.max,n)}})}else ut.each(n,function(e,n){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&o(a)&&ut.each(e.data,function(e,i){var n=+t.getRightValue(e);isNaN(n)||a.data[i].hidden||n<0||(null===t.min?t.min=n:n<t.min&&(t.min=n),null===t.max?t.max=n:n>t.max&&(t.max=n),0!==n&&(null===t.minNotZero||n<t.minNotZero)&&(t.minNotZero=n))})});this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=_i(e.min,t.min),t.max=_i(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(ut.log10(t.min))-1),t.max=Math.pow(10,Math.floor(ut.log10(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(ut.log10(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(ut.log10(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(ut.log10(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,i=!t.isHorizontal(),n={min:_i(e.min),max:_i(e.max)},a=t.ticks=function(t,e){var i,n,a=[],o=wi(t.min,Math.pow(10,Math.floor(ut.log10(e.min)))),r=Math.floor(ut.log10(e.max)),s=Math.ceil(e.max/Math.pow(10,r));0===o?(i=Math.floor(ut.log10(e.minNotZero)),n=Math.floor(e.minNotZero/Math.pow(10,i)),a.push(o),o=n*Math.pow(10,i)):(i=Math.floor(ut.log10(o)),n=Math.floor(o/Math.pow(10,i)));var l=i<0?Math.pow(10,Math.abs(i)):1;do{a.push(o),10==++n&&(n=1,l=++i>=0?1:l),o=Math.round(n*Math.pow(10,i)*l)/l}while(i<r||i===r&&n<s);var d=wi(t.max,o);return a.push(d),a}(n,t);t.max=ut.max(a),t.min=ut.min(a),e.reverse?(i=!i,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),i&&a.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),fi.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){return this.getPixelForValue(this.tickValues[t])},_getFirstTickValue:function(t){var e=Math.floor(ut.log10(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},getPixelForValue:function(t){var e,i,n,a,o,r=this,s=r.options.ticks,l=s.reverse,d=ut.log10,u=r._getFirstTickValue(r.minNotZero),h=0;return t=+r.getRightValue(t),l?(n=r.end,a=r.start,o=-1):(n=r.start,a=r.end,o=1),r.isHorizontal()?(e=r.width,i=l?r.right:r.left):(e=r.height,o*=-1,i=l?r.top:r.bottom),t!==n&&(0===n&&(e-=h=wi(s.fontSize,st.global.defaultFontSize),n=u),0!==t&&(h+=e/(d(a)-d(n))*(d(t)-d(n))),i+=o*h),i},getValueForPixel:function(t){var e,i,n,a,o=this,r=o.options.ticks,s=r.reverse,l=ut.log10,d=o._getFirstTickValue(o.minNotZero);if(s?(i=o.end,n=o.start):(i=o.start,n=o.end),o.isHorizontal()?(e=o.width,a=s?o.right-t:t-o.left):(e=o.height,a=s?t-o.top:o.bottom-t),a!==i){if(0===i){var u=wi(r.fontSize,st.global.defaultFontSize);a-=u,e-=u,i=d}a*=l(n)-l(i),a/=e,a=Math.pow(10,l(i)+a)}return a}}),Si=Mi;Ci._defaults=Si;var Pi=ut.valueOrDefault,Ii=ut.valueAtIndexOrDefault,Ai=ut.options.resolve,Di={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:li.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Ti(t){var e=t.options;return e.angleLines.display||e.pointLabels.display?t.chart.data.labels.length:0}function Fi(t){var e=t.ticks;return e.display&&t.display?Pi(e.fontSize,st.global.defaultFontSize)+2*e.backdropPaddingY:0}function Li(t,e,i,n,a){return t===n||t===a?{start:e-i/2,end:e+i/2}:t<n||t>a?{start:e-i,end:e}:{start:e,end:e+i}}function Ri(t){return 0===t||180===t?"center":t<180?"left":"right"}function Oi(t,e,i,n){var a,o,r=i.y+n/2;if(ut.isArray(e))for(a=0,o=e.length;a<o;++a)t.fillText(e[a],i.x,r),r+=n;else t.fillText(e,i.x,r)}function zi(t,e,i){90===t||270===t?i.y-=e.h/2:(t>270||t<90)&&(i.y-=e.h)}function Bi(t){return ut.isNumber(t)?t:0}var Ni=bi.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Fi(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;ut.each(e.data.datasets,function(a,o){if(e.isDatasetVisible(o)){var r=e.getDatasetMeta(o);ut.each(a.data,function(e,a){var o=+t.getRightValue(e);isNaN(o)||r.data[a].hidden||(i=Math.min(o,i),n=Math.max(o,n))})}}),t.min=i===Number.POSITIVE_INFINITY?0:i,t.max=n===Number.NEGATIVE_INFINITY?0:n,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Fi(this.options))},convertTicksToLabels:function(){var t=this;bi.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map(t.options.pointLabels.callback,t)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,i,n,a=ut.options._parseFont(t.options.pointLabels),o={l:0,r:t.width,t:0,b:t.height-t.paddingTop},r={};t.ctx.font=a.string,t._pointLabelSizes=[];var s,l,d,u=Ti(t);for(e=0;e<u;e++){n=t.getPointPosition(e,t.drawingArea+5),s=t.ctx,l=a.lineHeight,d=t.pointLabels[e]||"",i=ut.isArray(d)?{w:ut.longestText(s,s.font,d),h:d.length*l}:{w:s.measureText(d).width,h:l},t._pointLabelSizes[e]=i;var h=t.getIndexAngle(e),c=ut.toDegrees(h)%360,f=Li(c,n.x,i.w,0,180),g=Li(c,n.y,i.h,90,270);f.start<o.l&&(o.l=f.start,r.l=h),f.end>o.r&&(o.r=f.end,r.r=h),g.start<o.t&&(o.t=g.start,r.t=h),g.end>o.b&&(o.b=g.end,r.b=h)}t.setReductions(t.drawingArea,o,r)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,i){var n=this,a=e.l/Math.sin(i.l),o=Math.max(e.r-n.width,0)/Math.sin(i.r),r=-e.t/Math.cos(i.t),s=-Math.max(e.b-(n.height-n.paddingTop),0)/Math.cos(i.b);a=Bi(a),o=Bi(o),r=Bi(r),s=Bi(s),n.drawingArea=Math.min(Math.floor(t-(a+o)/2),Math.floor(t-(r+s)/2)),n.setCenterPoint(a,o,r,s)},setCenterPoint:function(t,e,i,n){var a=this,o=a.width-e-a.drawingArea,r=t+a.drawingArea,s=i+a.drawingArea,l=a.height-a.paddingTop-n-a.drawingArea;a.xCenter=Math.floor((r+o)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(t){return t*(2*Math.PI/Ti(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var i=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*i:(t-e.min)*i},getPointPosition:function(t,e){var i=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this.min,e=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0)},draw:function(){var t=this,e=t.options,i=e.gridLines,n=e.ticks;if(e.display){var a=t.ctx,o=this.getIndexAngle(0),r=ut.options._parseFont(n);(e.angleLines.display||e.pointLabels.display)&&function(t){var e=t.ctx,i=t.options,n=i.angleLines,a=i.gridLines,o=i.pointLabels,r=Pi(n.lineWidth,a.lineWidth),s=Pi(n.color,a.color),l=Fi(i);e.save(),e.lineWidth=r,e.strokeStyle=s,e.setLineDash&&(e.setLineDash(Ai([n.borderDash,a.borderDash,[]])),e.lineDashOffset=Ai([n.borderDashOffset,a.borderDashOffset,0]));var d=t.getDistanceFromCenterForValue(i.ticks.reverse?t.min:t.max),u=ut.options._parseFont(o);e.font=u.string,e.textBaseline="middle";for(var h=Ti(t)-1;h>=0;h--){if(n.display&&r&&s){var c=t.getPointPosition(h,d);e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(c.x,c.y),e.stroke()}if(o.display){var f=0===h?l/2:0,g=t.getPointPosition(h,d+f+5),p=Ii(o.fontColor,h,st.global.defaultFontColor);e.fillStyle=p;var m=t.getIndexAngle(h),v=ut.toDegrees(m);e.textAlign=Ri(v),zi(v,t._pointLabelSizes[h],g),Oi(e,t.pointLabels[h]||"",g,u.lineHeight)}}e.restore()}(t),ut.each(t.ticks,function(e,s){if(s>0||n.reverse){var l=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]);if(i.display&&0!==s&&function(t,e,i,n){var a,o=t.ctx,r=e.circular,s=Ti(t),l=Ii(e.color,n-1),d=Ii(e.lineWidth,n-1);if((r||s)&&l&&d){if(o.save(),o.strokeStyle=l,o.lineWidth=d,o.setLineDash&&(o.setLineDash(e.borderDash||[]),o.lineDashOffset=e.borderDashOffset||0),o.beginPath(),r)o.arc(t.xCenter,t.yCenter,i,0,2*Math.PI);else{a=t.getPointPosition(0,i),o.moveTo(a.x,a.y);for(var u=1;u<s;u++)a=t.getPointPosition(u,i),o.lineTo(a.x,a.y)}o.closePath(),o.stroke(),o.restore()}}(t,i,l,s),n.display){var d=Pi(n.fontColor,st.global.defaultFontColor);if(a.font=r.string,a.save(),a.translate(t.xCenter,t.yCenter),a.rotate(o),n.showLabelBackdrop){var u=a.measureText(e).width;a.fillStyle=n.backdropColor,a.fillRect(-u/2-n.backdropPaddingX,-l-r.size/2-n.backdropPaddingY,u+2*n.backdropPaddingX,r.size+2*n.backdropPaddingY)}a.textAlign="center",a.textBaseline="middle",a.fillStyle=d,a.fillText(e,0,-l),a.restore()}}})}}}),Wi=Di;Ni._defaults=Wi;var Vi=ut.valueOrDefault,Ei=Number.MIN_SAFE_INTEGER||-9007199254740991,Hi=Number.MAX_SAFE_INTEGER||9007199254740991,ji={millisecond:{common:!0,size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{common:!0,size:1e3,steps:[1,2,5,10,15,30]},minute:{common:!0,size:6e4,steps:[1,2,5,10,15,30]},hour:{common:!0,size:36e5,steps:[1,2,3,6,12]},day:{common:!0,size:864e5,steps:[1,2,5]},week:{common:!1,size:6048e5,steps:[1,2,3,4]},month:{common:!0,size:2628e6,steps:[1,2,3]},quarter:{common:!1,size:7884e6,steps:[1,2,3,4]},year:{common:!0,size:3154e7}},qi=Object.keys(ji);function Yi(t,e){return t-e}function Ui(t){var e,i,n,a={},o=[];for(e=0,i=t.length;e<i;++e)a[n=t[e]]||(a[n]=!0,o.push(n));return o}function Xi(t,e,i,n){var a=function(t,e,i){for(var n,a,o,r=0,s=t.length-1;r>=0&&r<=s;){if(a=t[(n=r+s>>1)-1]||null,o=t[n],!a)return{lo:null,hi:o};if(o[e]<i)r=n+1;else{if(!(a[e]>i))return{lo:a,hi:o};s=n-1}}return{lo:o,hi:null}}(t,e,i),o=a.lo?a.hi?a.lo:t[t.length-2]:t[0],r=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=r[e]-o[e],l=s?(i-o[e])/s:0,d=(r[n]-o[n])*l;return o[n]+d}function Ki(t,e){var i=t._adapter,n=t.options.time,a=n.parser,o=a||n.format,r=e;return"function"==typeof a&&(r=a(r)),ut.isFinite(r)||(r="string"==typeof o?i.parse(r,o):i.parse(r)),null!==r?+r:(a||"function"!=typeof o||(r=o(e),ut.isFinite(r)||(r=i.parse(r))),r)}function Gi(t,e){if(ut.isNullOrUndef(e))return null;var i=t.options.time,n=Ki(t,t.getRightValue(e));return null===n?n:(i.round&&(n=+t._adapter.startOf(n,i.round)),n)}function Zi(t){for(var e=qi.indexOf(t)+1,i=qi.length;e<i;++e)if(ji[qi[e]].common)return qi[e]}function $i(t,e,i,n){var a,o=t._adapter,r=t.options,s=r.time,l=s.unit||function(t,e,i,n){var a,o,r,s=qi.length;for(a=qi.indexOf(t);a<s-1;++a)if(r=(o=ji[qi[a]]).steps?o.steps[o.steps.length-1]:Hi,o.common&&Math.ceil((i-e)/(r*o.size))<=n)return qi[a];return qi[s-1]}(s.minUnit,e,i,n),d=Zi(l),u=Vi(s.stepSize,s.unitStepSize),h="week"===l&&s.isoWeekday,c=r.ticks.major.enabled,f=ji[l],g=e,p=i,m=[];for(u||(u=function(t,e,i,n){var a,o,r,s=e-t,l=ji[i],d=l.size,u=l.steps;if(!u)return Math.ceil(s/(n*d));for(a=0,o=u.length;a<o&&(r=u[a],!(Math.ceil(s/(d*r))<=n));++a);return r}(e,i,l,n)),h&&(g=+o.startOf(g,"isoWeek",h),p=+o.startOf(p,"isoWeek",h)),g=+o.startOf(g,h?"day":l),(p=+o.startOf(p,h?"day":l))<i&&(p=+o.add(p,1,l)),a=g,c&&d&&!h&&!s.round&&(a=+o.startOf(a,d),a=+o.add(a,~~((g-a)/(f.size*u))*u,l));a<p;a=+o.add(a,u,l))m.push(+a);return m.push(+a),m}var Ji=fi.extend({initialize:function(){this.mergeTicksOptions(),fi.prototype.initialize.call(this)},update:function(){var t=this.options,e=t.time||(t.time={}),i=this._adapter=new si._date(t.adapters.date);return e.format&&console.warn("options.time.format is deprecated and replaced by options.time.parser."),ut.mergeIf(e.displayFormats,i.formats()),fi.prototype.update.apply(this,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),fi.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,i,n,a,o,r=this,s=r.chart,l=r._adapter,d=r.options.time,u=d.unit||"day",h=Hi,c=Ei,f=[],g=[],p=[],m=s.data.labels||[];for(t=0,i=m.length;t<i;++t)p.push(Gi(r,m[t]));for(t=0,i=(s.data.datasets||[]).length;t<i;++t)if(s.isDatasetVisible(t))if(a=s.data.datasets[t].data,ut.isObject(a[0]))for(g[t]=[],e=0,n=a.length;e<n;++e)o=Gi(r,a[e]),f.push(o),g[t][e]=o;else{for(e=0,n=p.length;e<n;++e)f.push(p[e]);g[t]=p.slice(0)}else g[t]=[];p.length&&(p=Ui(p).sort(Yi),h=Math.min(h,p[0]),c=Math.max(c,p[p.length-1])),f.length&&(f=Ui(f).sort(Yi),h=Math.min(h,f[0]),c=Math.max(c,f[f.length-1])),h=Gi(r,d.min)||h,c=Gi(r,d.max)||c,h=h===Hi?+l.startOf(Date.now(),u):h,c=c===Ei?+l.endOf(Date.now(),u)+1:c,r.min=Math.min(h,c),r.max=Math.max(h+1,c),r._horizontal=r.isHorizontal(),r._table=[],r._timestamps={data:f,datasets:g,labels:p}},buildTicks:function(){var t,e,i,n=this,a=n.min,o=n.max,r=n.options,s=r.time,l=[],d=[];switch(r.ticks.source){case"data":l=n._timestamps.data;break;case"labels":l=n._timestamps.labels;break;case"auto":default:l=$i(n,a,o,n.getLabelCapacity(a))}for("ticks"===r.bounds&&l.length&&(a=l[0],o=l[l.length-1]),a=Gi(n,s.min)||a,o=Gi(n,s.max)||o,t=0,e=l.length;t<e;++t)(i=l[t])>=a&&i<=o&&d.push(i);return n.min=a,n.max=o,n._unit=s.unit||function(t,e,i,n,a){var o,r;for(o=qi.length-1;o>=qi.indexOf(i);o--)if(r=qi[o],ji[r].common&&t._adapter.diff(a,n,r)>=e.length)return r;return qi[i?qi.indexOf(i):0]}(n,d,s.minUnit,n.min,n.max),n._majorUnit=Zi(n._unit),n._table=function(t,e,i,n){if("linear"===n||!t.length)return[{time:e,pos:0},{time:i,pos:1}];var a,o,r,s,l,d=[],u=[e];for(a=0,o=t.length;a<o;++a)(s=t[a])>e&&s<i&&u.push(s);for(u.push(i),a=0,o=u.length;a<o;++a)l=u[a+1],r=u[a-1],s=u[a],void 0!==r&&void 0!==l&&Math.round((l+r)/2)===s||d.push({time:s,pos:a/(o-1)});return d}(n._timestamps.data,a,o,r.distribution),n._offsets=function(t,e,i,n,a){var o,r,s=0,l=0;return a.offset&&e.length&&(a.time.min||(o=Xi(t,"time",e[0],"pos"),s=1===e.length?1-o:(Xi(t,"time",e[1],"pos")-o)/2),a.time.max||(r=Xi(t,"time",e[e.length-1],"pos"),l=1===e.length?r:(r-Xi(t,"time",e[e.length-2],"pos"))/2)),{start:s,end:l}}(n._table,d,0,0,r),r.ticks.reverse&&d.reverse(),function(t,e,i){var n,a,o,r,s=[];for(n=0,a=e.length;n<a;++n)o=e[n],r=!!i&&o===+t._adapter.startOf(o,i),s.push({value:o,major:r});return s}(n,d,n._majorUnit)},getLabelForIndex:function(t,e){var i=this,n=i._adapter,a=i.chart.data,o=i.options.time,r=a.labels&&t<a.labels.length?a.labels[t]:"",s=a.datasets[e].data[t];return ut.isObject(s)&&(r=i.getRightValue(s)),o.tooltipFormat?n.format(Ki(i,r),o.tooltipFormat):"string"==typeof r?r:n.format(Ki(i,r),o.displayFormats.datetime)},tickFormatFunction:function(t,e,i,n){var a=this._adapter,o=this.options,r=o.time.displayFormats,s=r[this._unit],l=this._majorUnit,d=r[l],u=+a.startOf(t,l),h=o.ticks.major,c=h.enabled&&l&&d&&t===u,f=a.format(t,n||(c?d:s)),g=c?h:o.ticks.minor,p=Vi(g.callback,g.userCallback);return p?p(f,e,i):f},convertTicksToLabels:function(t){var e,i,n=[];for(e=0,i=t.length;e<i;++e)n.push(this.tickFormatFunction(t[e].value,e,t));return n},getPixelForOffset:function(t){var e=this,i=e.options.ticks.reverse,n=e._horizontal?e.width:e.height,a=e._horizontal?i?e.right:e.left:i?e.bottom:e.top,o=Xi(e._table,"time",t,"pos"),r=n*(e._offsets.start+o)/(e._offsets.start+1+e._offsets.end);return i?a-r:a+r},getPixelForValue:function(t,e,i){var n=null;if(void 0!==e&&void 0!==i&&(n=this._timestamps.datasets[i][e]),null===n&&(n=Gi(this,t)),null!==n)return this.getPixelForOffset(n)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this,i=e._horizontal?e.width:e.height,n=e._horizontal?e.left:e.top,a=(i?(t-n)/i:0)*(e._offsets.start+1+e._offsets.start)-e._offsets.end,o=Xi(e._table,"pos",a,"time");return e._adapter._create(o)},getLabelWidth:function(t){var e=this.options.ticks,i=this.ctx.measureText(t).width,n=ut.toRadians(e.maxRotation),a=Math.cos(n),o=Math.sin(n);return i*a+Vi(e.fontSize,st.global.defaultFontSize)*o},getLabelCapacity:function(t){var e=this,i=e.options.time.displayFormats.millisecond,n=e.tickFormatFunction(t,0,[],i),a=e.getLabelWidth(n),o=e.isHorizontal()?e.width:e.height,r=Math.floor(o/a);return r>0?r:1}}),Qi={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};Ji._defaults=Qi;var tn={category:gi,linear:yi,logarithmic:Ci,radialLinear:Ni,time:Ji},en={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};si._date.override("function"==typeof t?{_id:"moment",formats:function(){return en},parse:function(e,i){return"string"==typeof e&&"string"==typeof i?e=t(e,i):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,i){return t(e).format(i)},add:function(e,i,n){return t(e).add(i,n).valueOf()},diff:function(e,i,n){return t.duration(t(e).diff(t(i))).as(n)},startOf:function(e,i,n){return e=t(e),"isoWeek"===i?e.isoWeekday(n).valueOf():e.startOf(i).valueOf()},endOf:function(e,i){return t(e).endOf(i).valueOf()},_create:function(e){return t(e)}}:{}),st._set("global",{plugins:{filler:{propagate:!0}}});var nn={dataset:function(t){var e=t.fill,i=t.chart,n=i.getDatasetMeta(e),a=n&&i.isDatasetVisible(e)&&n.dataset._children||[],o=a.length||0;return o?function(t,e){return e<o&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,i=e?e.x:null,n=e?e.y:null;return function(t){return{x:null===i?t.x:i,y:null===n?t.y:n}}}};function an(t,e,i){var n,a=t._model||{},o=a.fill;if(void 0===o&&(o=!!a.backgroundColor),!1===o||null===o)return!1;if(!0===o)return"origin";if(n=parseFloat(o,10),isFinite(n)&&Math.floor(n)===n)return"-"!==o[0]&&"+"!==o[0]||(n=e+n),!(n===e||n<0||n>=i)&&n;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function on(t){var e,i=t.el._model||{},n=t.el._scale||{},a=t.fill,o=null;if(isFinite(a))return null;if("start"===a?o=void 0===i.scaleBottom?n.bottom:i.scaleBottom:"end"===a?o=void 0===i.scaleTop?n.top:i.scaleTop:void 0!==i.scaleZero?o=i.scaleZero:n.getBasePosition?o=n.getBasePosition():n.getBasePixel&&(o=n.getBasePixel()),null!=o){if(void 0!==o.x&&void 0!==o.y)return o;if(ut.isFinite(o))return{x:(e=n.isHorizontal())?o:null,y:e?null:o}}return null}function rn(t,e,i){var n,a=t[e].fill,o=[e];if(!i)return a;for(;!1!==a&&-1===o.indexOf(a);){if(!isFinite(a))return a;if(!(n=t[a]))return!1;if(n.visible)return a;o.push(a),a=n.fill}return!1}function sn(t){var e=t.fill,i="dataset";return!1===e?null:(isFinite(e)||(i="boundary"),nn[i](t))}function ln(t){return t&&!t.skip}function dn(t,e,i,n,a){var o;if(n&&a){for(t.moveTo(e[0].x,e[0].y),o=1;o<n;++o)ut.canvas.lineTo(t,e[o-1],e[o]);for(t.lineTo(i[a-1].x,i[a-1].y),o=a-1;o>0;--o)ut.canvas.lineTo(t,i[o],i[o-1],!0)}}var un={id:"filler",afterDatasetsUpdate:function(t,e){var i,n,a,o,r=(t.data.datasets||[]).length,s=e.propagate,l=[];for(n=0;n<r;++n)o=null,(a=(i=t.getDatasetMeta(n)).dataset)&&a._model&&a instanceof Wt.Line&&(o={visible:t.isDatasetVisible(n),fill:an(a,n,r),chart:t,el:a}),i.$filler=o,l.push(o);for(n=0;n<r;++n)(o=l[n])&&(o.fill=rn(l,n,s),o.boundary=on(o),o.mapper=sn(o))},beforeDatasetDraw:function(t,e){var i=e.meta.$filler;if(i){var n=t.ctx,a=i.el,o=a._view,r=a._children||[],s=i.mapper,l=o.backgroundColor||st.global.defaultColor;s&&l&&r.length&&(ut.canvas.clipArea(n,t.chartArea),function(t,e,i,n,a,o){var r,s,l,d,u,h,c,f=e.length,g=n.spanGaps,p=[],m=[],v=0,b=0;for(t.beginPath(),r=0,s=f+!!o;r<s;++r)u=i(d=e[l=r%f]._view,l,n),h=ln(d),c=ln(u),h&&c?(v=p.push(d),b=m.push(u)):v&&b&&(g?(h&&p.push(d),c&&m.push(u)):(dn(t,p,m,v,b),v=b=0,p=[],m=[]));dn(t,p,m,v,b),t.closePath(),t.fillStyle=a,t.fill()}(n,r,s,o,l,a._loop),ut.canvas.unclipArea(n))}}},hn=ut.noop,cn=ut.valueOrDefault;function fn(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}st._set("global",{legend:{display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,a=n.getDatasetMeta(i);a.hidden=null===a.hidden?!n.data.datasets[i].hidden:null,n.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data;return ut.isArray(e.datasets)?e.datasets.map(function(e,i){return{text:e.label,fillStyle:ut.isArray(e.backgroundColor)?e.backgroundColor[0]:e.backgroundColor,hidden:!t.isDatasetVisible(i),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,datasetIndex:i}},this):[]}}},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');for(var i=0;i<t.data.datasets.length;i++)e.push('<li><span style="background-color:'+t.data.datasets[i].backgroundColor+'"></span>'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("</li>");return e.push("</ul>"),e.join("")}});var gn=pt.extend({initialize:function(t){ut.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:hn,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:hn,beforeSetDimensions:hn,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:hn,beforeBuildLabels:hn,buildLabels:function(){var t=this,e=t.options.labels||{},i=ut.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(i=i.filter(function(i){return e.filter(i,t.chart.data)})),t.options.reverse&&i.reverse(),t.legendItems=i},afterBuildLabels:hn,beforeFit:hn,fit:function(){var t=this,e=t.options,i=e.labels,n=e.display,a=t.ctx,o=ut.options._parseFont(i),r=o.size,s=t.legendHitBoxes=[],l=t.minSize,d=t.isHorizontal();if(d?(l.width=t.maxWidth,l.height=n?10:0):(l.width=n?10:0,l.height=t.maxHeight),n)if(a.font=o.string,d){var u=t.lineWidths=[0],h=0;a.textAlign="left",a.textBaseline="top",ut.each(t.legendItems,function(t,e){var n=fn(i,r)+r/2+a.measureText(t.text).width;(0===e||u[u.length-1]+n+i.padding>l.width)&&(h+=r+i.padding,u[u.length-(e>0?0:1)]=i.padding),s[e]={left:0,top:0,width:n,height:r},u[u.length-1]+=n+i.padding}),l.height+=h}else{var c=i.padding,f=t.columnWidths=[],g=i.padding,p=0,m=0,v=r+c;ut.each(t.legendItems,function(t,e){var n=fn(i,r)+r/2+a.measureText(t.text).width;e>0&&m+v>l.height-c&&(g+=p+i.padding,f.push(p),p=0,m=0),p=Math.max(p,n),m+=v,s[e]={left:0,top:0,width:n,height:r}}),g+=p,f.push(p),l.width+=g}t.width=l.width,t.height=l.height},afterFit:hn,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,i=e.labels,n=st.global,a=n.defaultColor,o=n.elements.line,r=t.width,s=t.lineWidths;if(e.display){var l,d=t.ctx,u=cn(i.fontColor,n.defaultFontColor),h=ut.options._parseFont(i),c=h.size;d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=u,d.fillStyle=u,d.font=h.string;var f=fn(i,c),g=t.legendHitBoxes,p=t.isHorizontal();l=p?{x:t.left+(r-s[0])/2+i.padding,y:t.top+i.padding,line:0}:{x:t.left+i.padding,y:t.top+i.padding,line:0};var m=c+i.padding;ut.each(t.legendItems,function(n,u){var h=d.measureText(n.text).width,v=f+c/2+h,b=l.x,x=l.y;p?u>0&&b+v+i.padding>t.left+t.minSize.width&&(x=l.y+=m,l.line++,b=l.x=t.left+(r-s[l.line])/2+i.padding):u>0&&x+m>t.top+t.minSize.height&&(b=l.x=b+t.columnWidths[l.line]+i.padding,x=l.y=t.top+i.padding,l.line++),function(t,i,n){if(!(isNaN(f)||f<=0)){d.save();var r=cn(n.lineWidth,o.borderWidth);if(d.fillStyle=cn(n.fillStyle,a),d.lineCap=cn(n.lineCap,o.borderCapStyle),d.lineDashOffset=cn(n.lineDashOffset,o.borderDashOffset),d.lineJoin=cn(n.lineJoin,o.borderJoinStyle),d.lineWidth=r,d.strokeStyle=cn(n.strokeStyle,a),d.setLineDash&&d.setLineDash(cn(n.lineDash,o.borderDash)),e.labels&&e.labels.usePointStyle){var s=f*Math.SQRT2/2,l=t+f/2,u=i+c/2;ut.canvas.drawPoint(d,n.pointStyle,s,l,u)}else 0!==r&&d.strokeRect(t,i,f,c),d.fillRect(t,i,f,c);d.restore()}}(b,x,n),g[u].left=b,g[u].top=x,function(t,e,i,n){var a=c/2,o=f+a+t,r=e+a;d.fillText(i.text,o,r),i.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(o,r),d.lineTo(o+n,r),d.stroke())}(b,x,n,h),p?l.x+=v+i.padding:l.y+=m})}},_getLegendItemAt:function(t,e){var i,n,a,o=this;if(t>=o.left&&t<=o.right&&e>=o.top&&e<=o.bottom)for(a=o.legendHitBoxes,i=0;i<a.length;++i)if(t>=(n=a[i]).left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return o.legendItems[i];return null},handleEvent:function(t){var e,i=this,n=i.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!n.onHover&&!n.onLeave)return}else{if("click"!==a)return;if(!n.onClick)return}e=i._getLegendItemAt(t.x,t.y),"click"===a?e&&n.onClick&&n.onClick.call(i,t.native,e):(n.onLeave&&e!==i._hoveredItem&&(i._hoveredItem&&n.onLeave.call(i,t.native,i._hoveredItem),i._hoveredItem=e),n.onHover&&e&&n.onHover.call(i,t.native,e))}});function pn(t,e){var i=new gn({ctx:t.ctx,options:e,chart:t});ke.configure(t,i,e),ke.addBox(t,i),t.legend=i}var mn={id:"legend",_element:gn,beforeInit:function(t){var e=t.options.legend;e&&pn(t,e)},beforeUpdate:function(t){var e=t.options.legend,i=t.legend;e?(ut.mergeIf(e,st.global.legend),i?(ke.configure(t,i,e),i.options=e):pn(t,e)):i&&(ke.removeBox(t,i),delete t.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}},vn=ut.noop;st._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var bn=pt.extend({initialize:function(t){ut.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:vn,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:vn,beforeSetDimensions:vn,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:vn,beforeBuildLabels:vn,buildLabels:vn,afterBuildLabels:vn,beforeFit:vn,fit:function(){var t=this,e=t.options,i=e.display,n=t.minSize,a=ut.isArray(e.text)?e.text.length:1,o=ut.options._parseFont(e),r=i?a*o.lineHeight+2*e.padding:0;t.isHorizontal()?(n.width=t.maxWidth,n.height=r):(n.width=r,n.height=t.maxHeight),t.width=n.width,t.height=n.height},afterFit:vn,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,i=t.options;if(i.display){var n,a,o,r=ut.options._parseFont(i),s=r.lineHeight,l=s/2+i.padding,d=0,u=t.top,h=t.left,c=t.bottom,f=t.right;e.fillStyle=ut.valueOrDefault(i.fontColor,st.global.defaultFontColor),e.font=r.string,t.isHorizontal()?(a=h+(f-h)/2,o=u+l,n=f-h):(a="left"===i.position?h+l:f-l,o=u+(c-u)/2,n=c-u,d=Math.PI*("left"===i.position?-.5:.5)),e.save(),e.translate(a,o),e.rotate(d),e.textAlign="center",e.textBaseline="middle";var g=i.text;if(ut.isArray(g))for(var p=0,m=0;m<g.length;++m)e.fillText(g[m],0,p,n),p+=s;else e.fillText(g,0,0,n);e.restore()}}});function xn(t,e){var i=new bn({ctx:t.ctx,options:e,chart:t});ke.configure(t,i,e),ke.addBox(t,i),t.titleBlock=i}var yn={},kn=un,wn=mn,Mn={id:"title",_element:bn,beforeInit:function(t){var e=t.options.title;e&&xn(t,e)},beforeUpdate:function(t){var e=t.options.title,i=t.titleBlock;e?(ut.mergeIf(e,st.global.title),i?(ke.configure(t,i,e),i.options=e):xn(t,e)):i&&(ke.removeBox(t,i),delete t.titleBlock)}};for(var _n in yn.filler=kn,yn.legend=wn,yn.title=Mn,ai.helpers=ut,function(){function t(t,e,i){var n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}function e(t){return null!=t&&"none"!==t}function i(i,n,a){var o=document.defaultView,r=ut._getParentNode(i),s=o.getComputedStyle(i)[n],l=o.getComputedStyle(r)[n],d=e(s),u=e(l),h=Number.POSITIVE_INFINITY;return d||u?Math.min(d?t(s,i,a):h,u?t(l,r,a):h):"none"}ut.where=function(t,e){if(ut.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return ut.each(t,function(t){e(t)&&i.push(t)}),i},ut.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=void 0===i?t:i;for(var n=0,a=t.length;n<a;++n)if(e.call(i,t[n],n,t))return n;return-1},ut.findNextWhere=function(t,e,i){ut.isNullOrUndef(i)&&(i=-1);for(var n=i+1;n<t.length;n++){var a=t[n];if(e(a))return a}},ut.findPreviousWhere=function(t,e,i){ut.isNullOrUndef(i)&&(i=t.length);for(var n=i-1;n>=0;n--){var a=t[n];if(e(a))return a}},ut.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},ut.almostEquals=function(t,e,i){return Math.abs(t-e)<i},ut.almostWhole=function(t,e){var i=Math.round(t);return i-e<t&&i+e>t},ut.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},ut.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},ut.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},ut.log10=Math.log10?function(t){return Math.log10(t)}:function(t){var e=Math.log(t)*Math.LOG10E,i=Math.round(e);return t===Math.pow(10,i)?i:e},ut.toRadians=function(t){return t*(Math.PI/180)},ut.toDegrees=function(t){return t*(180/Math.PI)},ut._decimalPlaces=function(t){if(ut.isFinite(t)){for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}},ut.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,a=Math.sqrt(i*i+n*n),o=Math.atan2(n,i);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:a}},ut.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},ut.aliasPixel=function(t){return t%2==0?0:.5},ut._alignPixel=function(t,e,i){var n=t.currentDevicePixelRatio,a=i/2;return Math.round((e-a)*n)/n+a},ut.splineCurve=function(t,e,i,n){var a=t.skip?e:t,o=e,r=i.skip?e:i,s=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),l=Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)),d=s/(s+l),u=l/(s+l),h=n*(d=isNaN(d)?0:d),c=n*(u=isNaN(u)?0:u);return{previous:{x:o.x-h*(r.x-a.x),y:o.y-h*(r.y-a.y)},next:{x:o.x+c*(r.x-a.x),y:o.y+c*(r.y-a.y)}}},ut.EPSILON=Number.EPSILON||1e-14,ut.splineCurveMonotone=function(t){var e,i,n,a,o,r,s,l,d,u=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),h=u.length;for(e=0;e<h;++e)if(!(n=u[e]).model.skip){if(i=e>0?u[e-1]:null,(a=e<h-1?u[e+1]:null)&&!a.model.skip){var c=a.model.x-n.model.x;n.deltaK=0!==c?(a.model.y-n.model.y)/c:0}!i||i.model.skip?n.mK=n.deltaK:!a||a.model.skip?n.mK=i.deltaK:this.sign(i.deltaK)!==this.sign(n.deltaK)?n.mK=0:n.mK=(i.deltaK+n.deltaK)/2}for(e=0;e<h-1;++e)n=u[e],a=u[e+1],n.model.skip||a.model.skip||(ut.almostEquals(n.deltaK,0,this.EPSILON)?n.mK=a.mK=0:(o=n.mK/n.deltaK,r=a.mK/n.deltaK,(l=Math.pow(o,2)+Math.pow(r,2))<=9||(s=3/Math.sqrt(l),n.mK=o*s*n.deltaK,a.mK=r*s*n.deltaK)));for(e=0;e<h;++e)(n=u[e]).model.skip||(i=e>0?u[e-1]:null,a=e<h-1?u[e+1]:null,i&&!i.model.skip&&(d=(n.model.x-i.model.x)/3,n.model.controlPointPreviousX=n.model.x-d,n.model.controlPointPreviousY=n.model.y-d*n.mK),a&&!a.model.skip&&(d=(a.model.x-n.model.x)/3,n.model.controlPointNextX=n.model.x+d,n.model.controlPointNextY=n.model.y+d*n.mK))},ut.nextItem=function(t,e,i){return i?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},ut.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},ut.niceNum=function(t,e){var i=Math.floor(ut.log10(t)),n=t/Math.pow(10,i);return(e?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,i)},ut.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},ut.getRelativePosition=function(t,e){var i,n,a=t.originalEvent||t,o=t.target||t.srcElement,r=o.getBoundingClientRect(),s=a.touches;s&&s.length>0?(i=s[0].clientX,n=s[0].clientY):(i=a.clientX,n=a.clientY);var l=parseFloat(ut.getStyle(o,"padding-left")),d=parseFloat(ut.getStyle(o,"padding-top")),u=parseFloat(ut.getStyle(o,"padding-right")),h=parseFloat(ut.getStyle(o,"padding-bottom")),c=r.right-r.left-l-u,f=r.bottom-r.top-d-h;return{x:i=Math.round((i-r.left-l)/c*o.width/e.currentDevicePixelRatio),y:n=Math.round((n-r.top-d)/f*o.height/e.currentDevicePixelRatio)}},ut.getConstraintWidth=function(t){return i(t,"max-width","clientWidth")},ut.getConstraintHeight=function(t){return i(t,"max-height","clientHeight")},ut._calculatePadding=function(t,e,i){return(e=ut.getStyle(t,e)).indexOf("%")>-1?i*parseInt(e,10)/100:parseInt(e,10)},ut._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},ut.getMaximumWidth=function(t){var e=ut._getParentNode(t);if(!e)return t.clientWidth;var i=e.clientWidth,n=i-ut._calculatePadding(e,"padding-left",i)-ut._calculatePadding(e,"padding-right",i),a=ut.getConstraintWidth(t);return isNaN(a)?n:Math.min(n,a)},ut.getMaximumHeight=function(t){var e=ut._getParentNode(t);if(!e)return t.clientHeight;var i=e.clientHeight,n=i-ut._calculatePadding(e,"padding-top",i)-ut._calculatePadding(e,"padding-bottom",i),a=ut.getConstraintHeight(t);return isNaN(a)?n:Math.min(n,a)},ut.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},ut.retinaScale=function(t,e){var i=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==i){var n=t.canvas,a=t.height,o=t.width;n.height=a*i,n.width=o*i,t.ctx.scale(i,i),n.style.height||n.style.width||(n.style.height=a+"px",n.style.width=o+"px")}},ut.fontString=function(t,e,i){return e+" "+t+"px "+i},ut.longestText=function(t,e,i,n){var a=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(a=n.data={},o=n.garbageCollect=[],n.font=e),t.font=e;var r=0;ut.each(i,function(e){null!=e&&!0!==ut.isArray(e)?r=ut.measureText(t,a,o,r,e):ut.isArray(e)&&ut.each(e,function(e){null==e||ut.isArray(e)||(r=ut.measureText(t,a,o,r,e))})});var s=o.length/2;if(s>i.length){for(var l=0;l<s;l++)delete a[o[l]];o.splice(0,s)}return r},ut.measureText=function(t,e,i,n,a){var o=e[a];return o||(o=e[a]=t.measureText(a).width,i.push(a)),o>n&&(n=o),n},ut.numberOfLabelLines=function(t){var e=1;return ut.each(t,function(t){ut.isArray(t)&&t.length>e&&(e=t.length)}),e},ut.color=X?function(t){return t instanceof CanvasGradient&&(t=st.global.defaultColor),X(t)}:function(t){return console.error("Color.js not found!"),t},ut.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:ut.color(t).saturate(.5).darken(.1).rgbString()}}(),ai._adapters=si,ai.Animation=vt,ai.animationService=bt,ai.controllers=ue,ai.DatasetController=Mt,ai.defaults=st,ai.Element=pt,ai.elements=Wt,ai.Interaction=ve,ai.layouts=ke,ai.platform=Ve,ai.plugins=Ee,ai.Scale=fi,ai.scaleService=He,ai.Ticks=li,ai.Tooltip=Je,ai.helpers.each(tn,function(t,e){ai.scaleService.registerScaleType(e,t,t._defaults)}),yn)yn.hasOwnProperty(_n)&&ai.plugins.register(yn[_n]);ai.platform.initialize();var Cn=ai;return"undefined"!=typeof window&&(window.Chart=ai),ai.Chart=ai,ai.Legend=yn.legend._element,ai.Title=yn.title._element,ai.pluginService=ai.plugins,ai.PluginBase=ai.Element.extend({}),ai.canvasHelpers=ai.helpers.canvas,ai.layoutService=ai.layouts,ai.LinearScaleBase=bi,ai.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(t){ai[t]=function(e,i){return new ai(e,ai.helpers.merge(i||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}}),Cn});

jQuery(function($) {$( document ).on( 's123.page.ready', function( event ) {chartsModuleInitialize_Layout1('page_ready');});});function charts_hexToRgbA(hex,opacity){var c;if(/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)){c= hex.substring(1).split('');if(c.length== 3){c= [c[0], c[0], c[1], c[1], c[2], c[2]];}
c= '0x'+c.join('');return 'rgba('+[(c>>16)&255, (c>>8)&255, c&255].join(',')+','+opacity+')';}
return hex;}
function chartsModuleInitialize_Layout1( callEvent ) {$('.s123-module-charts.layout-1').each( function() {var $this = $(this);$this.off('module_layout_categories.shown').on('module_layout_categories.shown', function( event, catID ) {var $category = $(this).find('.charts-category[data-categories-filter="'+catID+'"]');$category.find('.chart-display').each( function( event ) {var $chart_display = $(this);var $chart_sectionsSettings = $chart_display.find('.chart_sectionsSettings');if ( $chart_sectionsSettings.data('chart-init') && callEvent != 'colorChange' ) return;var labels = $chart_display.find('.chart_labels');var labels = tryParseJSON($(labels).val());var data = tryParseJSON($chart_sectionsSettings.val());var this_canvas = $chart_display.find('#canvas-'+$chart_sectionsSettings.data('category')+'-'+$chart_sectionsSettings.data('key'));initChart(this_canvas,data,labels,$this.hasClass("bg-primary"),$this);$chart_sectionsSettings.data('chart-init',true);});});var categories = new ModuleLayoutCategories({$items :  $this.find('.charts-category'),$categoriesContainer : $this.find('.categories-panel'),$filterButton : $this.find('.items-responsive-filter'),$categories : $this.find('.items-categories-container li')});});}
function initChart( this_canvas, data, labels, mainPage, $section ) {var chart_data = [];var chart_color = [];var labels_color = '';$.each(data, function( index, data ) {chart_color.push(data['color']);chart_data.push(data['data']);});var dataset = {data: chart_data,backgroundColor: chart_color,}
if ( IsHomepage() ) {labels_color = mainPage ?getComputedStyle(document.documentElement).getPropertyValue('--modules_color_text') :getComputedStyle(document.documentElement).getPropertyValue('--modules_color_text_second');} else {labels_color = getComputedStyle(document.documentElement).getPropertyValue('--inside_modules_color_text');}
if ( $section.hasClass('bg-primary-black') ) {labels_color = '#fff';} else if ( $section.hasClass('bg-primary-white') ) {labels_color = '#000';} else if ( $section.hasClass('bg-primary-gray') ) {labels_color = '#444950';} else if ( $section.hasClass('background-primary-color') ) {labels_color = getComputedStyle(document.documentElement).getPropertyValue('modules_color_second_section_btn_text');}
if ( $section.hasClass('section-static-text-color') ) {labels_color = getComputedStyle($section.get(0)).getPropertyValue('--section-title-color');}
var position = 'top';if ( this_canvas.data('chart-type') == 'line' ) {dataset = {data: chart_data,pointBackgroundColor: chart_color,fill: false,borderColor: charts_hexToRgbA(labels_color,0.4)}}
if ( this_canvas.data('chart-type') == 'line' || this_canvas.data('chart-type') == 'bar' ) position = '';let scales = {yAxes: [{ticks: {fontColor: labels_color,},gridLines: {color: charts_hexToRgbA(labels_color,0.4),}}],xAxes: [{ticks: {fontColor: labels_color,},gridLines: {color: charts_hexToRgbA(labels_color,0.4),}}]};if ( this_canvas.data('chart-type') == 'pie' || this_canvas.data('chart-type') == 'doughnut' ) {scales = '';}
var config = {type: this_canvas.data('chart-type'),data: {labels: labels,datasets: [dataset],},options: {responsive: true,legend: {labels: {fontColor: labels_color},position: position,},scales: scales,animation: {animateScale: true,animateRotate: true,},},};var ctx = this_canvas[0].getContext('2d');new Chart(ctx,config);}
jQuery(function($) {headersModuleInitialize_Layout();});function headersModuleInitialize_Layout() {$( document ).on( "s123.page.ready", function( event ) {var $sections = $('section.s123-module-headers:is(.layout-6,.layout-7,.layout-8,.layout-9,.layout-18,.layout-20,.layout-22,.layout-23,.layout-24,.layout-25,.layout-26,.layout-27,.layout-29,.layout-30,.layout-35,.layout-39,.layout-40,.mobile-layout-1,.mobile-layout-3,.mobile-layout-7,.mobile-layout-8,.mobile-layout-11');$sections.each(function( index ) {var $s = $(this);var $carousel = $s.find('[data-ride="carousel"]');var sliderSpeed = $s.data('slider-speed');if ( sliderSpeed == '' || parseInt(sliderSpeed) < 1 || parseInt(sliderSpeed) > 21 ) {sliderSpeed = 5000;} else {sliderSpeed = parseInt(sliderSpeed) * 1000;}
$s.find('.header1, .header2').each(function( index ) {var $this = $(this);if ( $this.data('line-height') && $this.data('line-height').length > 0 ) {$this.get(0).style.setProperty('--header_line_height',$this.data('line-height'));$this.css('line-height',$this.data('line-height'));}});if( $s.hasClass('layout-20') ) {var $firstImage = $s.find('.headers-image').first();if ( $firstImage.length > 0 ) {if ( $firstImage.data('bg') !== undefined ) {var img = new Image();img.src = $firstImage.data('bg');img.onload = function() {var aspectRatio = this.width / this.height;$s.find('.headers-image').css('aspect-ratio',String(aspectRatio));if( $s.find('.headers-container').hasClass('circle-under-image') && aspectRatio < 1 ) {$s.addClass('corner-circle');}};} else {$firstImage.closest('.headers-img-wrap').addClass('circle-fixed-width');}}}
if( $s.hasClass('layout-22') || $s.hasClass('layout-29') || $s.hasClass('mobile-layout-7') ) {var $headersDescription = $s.find('.headers-description');var $headersimage = $s.find('.headers-image');if ( $headersimage.length == 0 ) {$headersimage = $s.find('.headers-bg-video');}
if ( $headersimage.length > 0 && $headersDescription.length > 0 ) {if ( ($headersDescription.get(0).offsetHeight - 60) > $headersimage.get(0).offsetHeight ) {$s.get(0).style.setProperty('--headers-description-height',$headersDescription.get(0).offsetHeight+'px');}}}
$carousel.carousel({interval: sliderSpeed});if( $s.hasClass('layout-26') && $s.attr('data-version') !== undefined && $s.attr('data-version') == '2' ) {if ( IsWizard() ) {$(document).on('site123.colorPicker.change',function( event ) {updateBackgroundColor();});}
updateBackgroundColor();}
function updateBackgroundColor() {var boxColorClass = $s.data('box-color');var color = $s.hasClass('bg-primary') ?getComputedStyle(document.documentElement).getPropertyValue('--modules_color_box') :getComputedStyle(document.documentElement).getPropertyValue('--modules_color_second_box');switch (boxColorClass) {case 'bg-primary-gray':color = '#ebedf0';break;case 'bg-primary-white':color = '#ffffff';break;case 'bg-primary-black':color = '#000000';break;case 'background-primary-color btn-primary-text-color':color = $s.hasClass('bg-primary') ?getComputedStyle(document.documentElement).getPropertyValue('--modules_color_section_main') :getComputedStyle(document.documentElement).getPropertyValue('--modules_color_second_section_main');break;}
$s.find('.headers-img-wrap').get(0).style.setProperty('--layout26OpacityColor',hexToRGB(color));}
function hexToRGB(hex) {var r = parseInt(hex.slice(1, 3), 16),g = parseInt(hex.slice(3, 5), 16),b = parseInt(hex.slice(5, 7), 16);return r + ", " + g + ", " + b;}
if( $s.data('image-width') == 2 ) {var sectionHeight = $s.height();$s.find('.headers-container').css('min-height',sectionHeight+'px');if( $s.hasClass('layout-22') ) {$s.find('.headers-image').css('min-height',sectionHeight+'px');}
$s.data('image-width',0);}});var $sections = $('section.s123-module-headers');$sections.each(function( index ) {var $s = $(this);$s.find('.custom-header-font').each(function( index ) {var $this = $(this);var customFont = $this.data('custom-font');if ( customFont.length > 0 ) {$this.css('font-family',customFont);}});$s.find('.header1, .header2').each(function( index ) {var $this = $(this);if( $s.hasClass('layout-7') || $s.hasClass('layout-9') || $s.hasClass('layout-22') || $s.hasClass('layout-23') || $s.hasClass('layout-24') || $s.hasClass('layout-26') || $s.hasClass('layout-27') || $s.hasClass('layout-29') || $s.hasClass('layout-33') || $s.hasClass('mobile-layout-1') || $s.hasClass('mobile-layout-7') ) {fitHeaderTextToParentContainer($this);}});$s.find('.h-s-form').each(function( index ) {let $this = $(this);hotelBookingWidgetInit($this);$this.off('submit').on('submit', function(event) {event.preventDefault();window.location.href = '/'+ $this.find('[data-id="page"] option').val() + '?' + $this.serialize();});});function fitHeaderTextToParentContainer( $textEl ) {if ( $textEl.length == 0 ) return;fontSize = parseFloat($textEl.css('font-size'));if ( !$.isNumeric(fontSize) ) return;var $parentContainer = $textEl.closest('.headers-text-resize-container');if ( $parentContainer.length > 0 && $parentContainer.width() < $textEl.width() ) {$textEl.css('visibility','hidden');var parentContainerWidth = $parentContainer.width();if ( $textEl.closest('section').hasClass('layout-9') || $textEl.closest('section').hasClass('layout-27') || $textEl.closest('section').hasClass('mobile-layout-1') ) {parentContainerWidth = parentContainerWidth + 5;}
if ( $textEl.closest('section').hasClass('layout-23') ) {parentContainerWidth = $parentContainer.innerWidth();}
var index = 0;while ( parentContainerWidth < $textEl.width() && index < 99 ) {index++;fontSize--;$textEl.get(0).style.setProperty('--header-font-size',fontSize);}
$textEl.css('visibility','unset');}}});S123_ActionButtons.init();});}
jQuery(function($) {HeadersModuleInitialize_Layout5();});function HeadersModuleInitialize_Layout5() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-headers.layout-5');$section.each(function( index ) {var $sectionThis = $(this);var $flickityContainer = $sectionThis.find('.carousel');var originalFirstImageSize = {};if ( $flickityContainer.length === 0 ) return;$flickityContainer.flickity({imagesLoaded: true,lazyLoad: 2,pageDots: false,wrapAround: true,percentPosition: false});});});}
jQuery(function($) {HeadersModuleInitialize_Layout30();});function HeadersModuleInitialize_Layout30() {$( document ).on( 's123.page.ready', function( event ) {var $section = $('section.s123-module-headers.layout-30, section.s123-module-headers.mobile-layout-11');$section.each(function( index ) {var $sectionThis = $(this);$sectionThis.find('.contactUsForm').each( function( index ) {var $form = $(this);var customFormMultiSteps = new CustomFormMultiSteps();customFormMultiSteps.init({$form: $form,$nextButton: $form.find('.next-form-btn'),$submitButton: $form.find('.submit-form-btn'),$previousButton: $form.find('.previous-form-btn'),totalSteps: $form.find('.custom-form-steps').data('total-steps')});var forms_GoogleRecaptcha = new Forms_GoogleRecaptcha();forms_GoogleRecaptcha.init($form);$form.validate({errorElement: 'div',errorClass: 'help-block',focusInvalid: true,ignore: ':hidden:not(.custom-form-step:visible input[name^="datePicker-"])',highlight: function (e) {$(e).closest('.form-group').removeClass('has-info').addClass('has-error');},success: function (e) {$(e).closest('.form-group').removeClass('has-error');$(e).remove();},errorPlacement: function (error, element) {if( element.is('input[type=checkbox]') || element.is('input[type=radio]') ) {var controls = element.closest('div[class*="col-"]');if( controls.find(':checkbox,:radio').length > 0 ) element.closest('.form-group').append(error);else error.insertAfter(element.nextAll('.lbl:eq(0)').eq(0));}
else if( element.is('.select2') ) {error.insertAfter(element.siblings('[class*="select2-container"]:eq(0)'));}
else if( element.is('.chosen-select') ) {error.insertAfter(element.siblings('[class*="chosen-container"]:eq(0)'));}
else {error.appendTo(element.closest('.form-group'));}},submitHandler: function( form ) {var $form = $(form);var clickAction = $form.data('click-action');$form.append($('<div class="conv-code-container"></div>'));var $convCodeContainer = $form.find('.conv-code-container');var thankYouMessage = translations.ThankYouAfterSubmmit;if ( $form.data('thanks-msg') ) {thankYouMessage = $form.data('thanks-msg');}
$form.find('button:submit').prop('disabled', true);S123.ButtonLoading.start($form.find('button:submit'));var url = "/versions/2/include/contactO.php";if ( $form.hasClass('custom-form') || $form.hasClass('horizontal-custom-form') ) {if ( !CustomForm_IsLastStep( $form ) ) {$form.find('.next-form-btn:visible').trigger('click');S123.ButtonLoading.stop($form.find('button:submit'));$form.find('button:submit').prop('disabled', false);return false;}
if ( !CustomForm_IsFillOutAtLeastOneField($form) ) {bootbox.alert(translations.fillOutAtLeastOneField);S123.ButtonLoading.stop($form.find('button:submit'));$form.find('button:submit').prop('disabled', false);return false;}
url = "/versions/2/include/customFormO.php";}
if ( forms_GoogleRecaptcha.isActive && !forms_GoogleRecaptcha.isGotToken ) {forms_GoogleRecaptcha.getToken();return false;}
$.ajax({type: "POST",url: url,data: $form.serialize(),success: function( data ) {var dataObj = jQuery.parseJSON(data);$form.trigger("reset");if ( clickAction == 'thankYouMessage' || clickAction == '' ) {bootbox.alert({title: translations.sent,message: thankYouMessage+'<iframe src="/versions/2/include/contactSentO.php?w='+$('#w').val()+'&websiteID='+dataObj.websiteID+'&moduleID='+dataObj.moduleID+'" style="width:100%;height:30px;" frameborder="0"></iframe>',className: 'contactUsConfirm',buttons: {ok: {label: translations.Ok}},backdrop: true});} else {if ( dataObj.conv_code.length > 0 ) {var $convCode = $('<div>' + dataObj.conv_code + '</div>');$convCodeContainer.html($convCode.text());}
if( top.$('#websitePreviewIframe').length ) {bootbox.alert({title: translations.previewExternalLinkTitle,message: translations.previewExternalLinkMsg.replace('{{externalLink}}','<b>'+dataObj.action.url+'</b>'),className: 'externalAlert'});} else {window.open(dataObj.action.url,'_self');}}
customFormMultiSteps.reset();forms_GoogleRecaptcha.reset();S123.ButtonLoading.stop($form.find('button:submit'));$form.find('button:submit').prop('disabled', false);WizardNotificationUpdate();}});return false;}});$form.find('.f-b-date-timePicker').each( function() {var $option = $(this);var $datePicker = $option.find('.fake-input.date-time-picker');var $hiddenInput = $option.find('[data-id="'+$datePicker.data('related-id')+'"]');var $datePickerIcon = $option.find('.f-b-date-timePicker-icon');var formBuilderCalendar = new calendar_handler();$datePicker.data('date-format',$form.data('date-format'));formBuilderCalendar.init({$fakeInput: $datePicker,$hiddenInput: $hiddenInput,$fakeInputIcon: $datePickerIcon,type: 'datePicker',title: translations.chooseDate,calendarSettings: {format: $datePicker.data('date-format'),weekStart: 0,todayBtn: "linked",clearBtn: false,language: languageCode,todayHighlight: true},onSubmit: function( selectedDate ) {$datePicker.html(selectedDate);$hiddenInput.val(selectedDate);}});});CustomForm_DisableTwoColumns($form);});});});}
