/*! For license information please see 9.js.LICENSE.txt */ (self.webpackChunkFBPublication=self.webpackChunkFBPublication||[]).push([[9],{2029:function(t,e){var o,n=function(){this._tweens={},this._tweensAddedDuringUpdate={}};n.prototype={getAll:function(){return Object.keys(this._tweens).map((function(t){return this._tweens[t]}).bind(this))},removeAll:function(){this._tweens={}},add:function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},remove:function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},update:function(t,e){var o=Object.keys(this._tweens);if(0===o.length)return!1;for(t=void 0!==t?t:i.now();o.length>0;){this._tweensAddedDuringUpdate={};for(var n=0;n1?1:o,n=this._easingFunction(o),this._valuesEnd)if(void 0!==this._valuesStart[e]){var r=this._valuesStart[e]||0,i=this._valuesEnd[e];i instanceof Array?this._object[e]=this._interpolationFunction(i,n):("string"==typeof i&&(i="+"===i.charAt(0)||"-"===i.charAt(0)?r+parseFloat(i):parseFloat(i)),"number"==typeof i&&(this._object[e]=r+(i-r)*n))}if(null!==this._onUpdateCallback&&this._onUpdateCallback(this._object,o),1===o){if(this._repeat>0){for(e in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat){if("string"==typeof this._valuesEnd[e]&&(this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(this._valuesEnd[e])),this._yoyo){var s=this._valuesStartRepeat[e];this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=s}this._valuesStart[e]=this._valuesStartRepeat[e]}return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,null!==this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}null!==this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var a=0,l=this._chainedTweens.length;a1?s(t[o],t[o-1],o-n):s(t[r],t[r+1>o?o:r+1],n-r)},Bezier:function(t,e){for(var o=0,n=t.length-1,r=Math.pow,s=i.Interpolation.Utils.Bernstein,a=0;a<=n;a++)o+=r(1-e,n-a)*r(e,a)*t[a]*s(n,a);return o},CatmullRom:function(t,e){var o=t.length-1,n=o*e,r=Math.floor(n),s=i.Interpolation.Utils.CatmullRom;return t[0]===t[o]?(e<0&&(r=Math.floor(n=o*(1+e))),s(t[(r-1+o)%o],t[r],t[(r+1)%o],t[(r+2)%o],n-r)):e<0?t[0]-(s(t[0],t[0],t[1],t[1],-n)-t[0]):e>1?t[o]-(s(t[o],t[o],t[o-1],t[o-1],n-o)-t[o]):s(t[r?r-1:0],t[r],t[o1;o--)e*=o;return r[t]=e,e}),CatmullRom:function(t,e,o,n,r){var i=.5*(o-t),s=.5*(n-e),a=r*r;return(2*e-2*o+i+s)*(r*a)+(-3*e+3*o-2*i-s)*a+i*r+e}}},void 0===(o=(function(){return i}).apply(e,[]))||(t.exports=o)},8333:function(t,e,o){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:{},e=t.id,o=t.url,n=e||o;if(!n)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(h(n))return"https://vimeo.com/".concat(n);if(c(n))return n.replace("http:","https:");if(e)throw new TypeError("“".concat(e,"” is not a valid video id."));throw new TypeError("“".concat(n,"” is not a vimeo.com url."))}var p=void 0!==Array.prototype.indexOf,f="undefined"!=typeof window&&void 0!==window.postMessage;if(!(s||p&&f))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==o.g?o.g:"undefined"!=typeof self?self:{};function g(t,e){return t(e={exports:{}},e.exports),e.exports}!function(t){if(!t.WeakMap){var e=Object.prototype.hasOwnProperty,o=function(t,e,o){Object.defineProperty?Object.defineProperty(t,e,{configurable:!0,writable:!0,value:o}):t[e]=o};t.WeakMap=function(){function t(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(o(this,"_id",i("_WeakMap")),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function r(t,o){if(!n(t)||!e.call(t,"_id"))throw new TypeError(o+" method called on incompatible receiver "+typeof t)}function i(t){return t+"_"+s()+"."+s()}function s(){return Math.random().toString().substring(2)}return o(t.prototype,"delete",(function(t){if(r(this,"delete"),!n(t))return!1;var e=t[this._id];return!(!e||e[0]!==t)&&(delete t[this._id],!0)})),o(t.prototype,"get",(function(t){if(r(this,"get"),n(t)){var e=t[this._id];return e&&e[0]===t?e[1]:void 0}})),o(t.prototype,"has",(function(t){if(r(this,"has"),!n(t))return!1;var e=t[this._id];return!(!e||e[0]!==t)})),o(t.prototype,"set",(function(t,e){if(r(this,"set"),!n(t))throw new TypeError("Invalid value used as weak map key");var i=t[this._id];return i&&i[0]===t?(i[1]=e,this):(o(t,this._id,[t,e]),this)})),o(t,"_polyfill",!0),t}()}function n(t){return Object(t)===t}}("undefined"!=typeof self?self:"undefined"!=typeof window?window:d);var y=g((function(t){var e,o,n;n=function(){var t,e,o,n=Object.prototype.toString,r="undefined"!=typeof setImmediate?function(t){return setImmediate(t)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(t,e,o,n){return Object.defineProperty(t,e,{value:o,writable:!0,configurable:!1!==n})}}catch(y){t=function(t,e,o){return t[e]=o,t}}function i(t,n){o.add(t,n),e||(e=r(o.drain))}function s(t){var e,o=typeof t;return null==t||"object"!=o&&"function"!=o||(e=t.then),"function"==typeof e&&e}function a(){for(var t=0;t0&&i(a,o))}catch(y){c.call(new p(o),y)}}}function c(t){var e=this;e.triggered||(e.triggered=!0,e.def&&(e=e.def),e.msg=t,e.state=2,e.chain.length>0&&i(a,e))}function u(t,e,o,n){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return T.reduce((function(e,o){var n=t.getAttribute("data-vimeo-".concat(o));return(n||""===n)&&(e[o]=""===n?1:n),e}),e)}function E(t,e){var o=t.html;if(!e)throw new TypeError("An element must be provided");if(null!==e.getAttribute("data-vimeo-initialized"))return e.querySelector("iframe");var n=document.createElement("div");return n.innerHTML=o,e.appendChild(n.firstChild),e.setAttribute("data-vimeo-initialized","true"),e.querySelector("iframe")}function P(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;return new Promise((function(n,r){if(!c(t))throw new TypeError("“".concat(t,"” is not a vimeo.com url."));var i="https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(t));for(var s in e)e.hasOwnProperty(s)&&(i+="&".concat(s,"=").concat(encodeURIComponent(e[s])));var a="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;a.open("GET",i,!0),a.onload=function(){if(404!==a.status)if(403!==a.status)try{var e=JSON.parse(a.responseText);if(403===e.domain_status_code)return E(e,o),void r(new Error("“".concat(t,"” is not embeddable.")));n(e)}catch(i){r(i)}else r(new Error("“".concat(t,"” is not embeddable.")));else r(new Error("“".concat(t,"” was not found.")))},a.onerror=function(){var t=a.status?" (".concat(a.status,")"):"";r(new Error("There was an error fetching the embed code from Vimeo".concat(t,".")))},a.send()}))}function x(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=[].slice.call(t.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),o=function(t){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(t))};e.forEach((function(t){try{if(null!==t.getAttribute("data-vimeo-defer"))return;var e=S(t);P(u(e),e,t).then((function(e){return E(e,t)})).catch(o)}catch(n){o(n)}}))}function M(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;if(!window.VimeoPlayerResizeEmbeds_){window.VimeoPlayerResizeEmbeds_=!0;var e=function(e){if(c(e.origin)&&e.data&&"spacechange"===e.data.event)for(var o=t.querySelectorAll("iframe"),n=0;n=8&&r<10&&(n=JSON.stringify(n)),t.element.contentWindow.postMessage(n,t.origin)}}function B(t,e){var o,n=[];if((e=I(e)).event){if("error"===e.event)b(t,e.data.method).forEach((function(o){var n=new Error(e.data.message);n.name=e.data.name,o.reject(n),w(t,e.data.method,o)}));n=b(t,"event:".concat(e.event)),o=e.data}else if(e.method){var r=k(t,e.method);r&&(n.push(r),o=e.value)}n.forEach((function(e){try{if("function"==typeof e)return void e.call(t,o);e.resolve(o)}catch(n){}}))}function _(){var t=function(){for(var t,e=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],o=0,n=e.length,r={};o1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,t),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]),"undefined"!=typeof document&&"string"==typeof e&&(e=document.getElementById(e)),!l(e))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"!==e.nodeName){var i=e.querySelector("iframe");i&&(e=i)}if("IFRAME"===e.nodeName&&!c(e.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");if(O.has(e))return O.get(e);this._window=e.ownerDocument.defaultView,this.element=e,this.origin="*";var s=new y((function(t,n){if(o._onMessage=function(e){if(c(e.origin)&&o.element.contentWindow===e.source){"*"===o.origin&&(o.origin=e.origin);var r=I(e.data);if(r&&"error"===r.event&&r.data&&"ready"===r.data.method){var i=new Error(r.data.message);return i.name=r.data.name,void n(i)}var s=r&&"ready"===r.event,a=r&&"ping"===r.method;if(s||a)return o.element.setAttribute("data-ready","true"),void t();B(o,r)}},o._window.addEventListener("message",o._onMessage),"IFRAME"!==o.element.nodeName){var i=S(e,r);P(u(i),i,e).then((function(t){var n=E(t,e);return o.element=n,o._originalElement=e,A(e,n),O.set(o.element,o),t})).catch(n)}}));if(D.set(this,s),O.set(this.element,this),"IFRAME"===this.element.nodeName&&C(this,"ping"),Y.isEnabled){var a=function(){return Y.exit()};this.fullscreenchangeHandler=function(){Y.isFullscreen?v(o,"event:exitFullscreen",a):w(o,"event:exitFullscreen",a),o.ready().then((function(){C(o,"fullscreenchange",Y.isFullscreen)}))},Y.on("fullscreenchange",this.fullscreenchangeHandler)}return this}return i(t,[{key:"callMethod",value:function(t){var e=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new y((function(n,r){return e.ready().then((function(){v(e,t,{resolve:n,reject:r}),C(e,t,o)})).catch(r)}))}},{key:"get",value:function(t){var e=this;return new y((function(o,n){return t=a(t,"get"),e.ready().then((function(){v(e,t,{resolve:o,reject:n}),C(e,t)})).catch(n)}))}},{key:"set",value:function(t,e){var o=this;return new y((function(n,r){if(t=a(t,"set"),null==e)throw new TypeError("There must be a value to set.");return o.ready().then((function(){v(o,t,{resolve:n,reject:r}),C(o,t,e)})).catch(r)}))}},{key:"on",value:function(t,e){if(!t)throw new TypeError("You must pass an event name.");if(!e)throw new TypeError("You must pass a callback function.");if("function"!=typeof e)throw new TypeError("The callback must be a function.");0===b(this,"event:".concat(t)).length&&this.callMethod("addEventListener",t).catch((function(){})),v(this,"event:".concat(t),e)}},{key:"off",value:function(t,e){if(!t)throw new TypeError("You must pass an event name.");if(e&&"function"!=typeof e)throw new TypeError("The callback must be a function.");w(this,"event:".concat(t),e)&&this.callMethod("removeEventListener",t).catch((function(t){}))}},{key:"loadVideo",value:function(t){return this.callMethod("loadVideo",t)}},{key:"ready",value:function(){var t=D.get(this)||new y((function(t,e){e(new Error("Unknown player. Probably unloaded."))}));return y.resolve(t)}},{key:"addCuePoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.callMethod("addCuePoint",{time:t,data:e})}},{key:"removeCuePoint",value:function(t){return this.callMethod("removeCuePoint",t)}},{key:"enableTextTrack",value:function(t,e){if(!t)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:t,kind:e})}},{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:"requestFullscreen",value:function(){return Y.isEnabled?Y.request(this.element):this.callMethod("requestFullscreen")}},{key:"exitFullscreen",value:function(){return Y.isEnabled?Y.exit():this.callMethod("exitFullscreen")}},{key:"getFullscreen",value:function(){return Y.isEnabled?y.resolve(Y.isFullscreen):this.get("fullscreen")}},{key:"requestPictureInPicture",value:function(){return this.callMethod("requestPictureInPicture")}},{key:"exitPictureInPicture",value:function(){return this.callMethod("exitPictureInPicture")}},{key:"getPictureInPicture",value:function(){return this.get("pictureInPicture")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var t=this;return new y((function(e){if(D.delete(t),O.delete(t.element),t._originalElement&&(O.delete(t._originalElement),t._originalElement.removeAttribute("data-vimeo-initialized")),t.element&&"IFRAME"===t.element.nodeName&&t.element.parentNode&&(t.element.parentNode.parentNode&&t._originalElement&&t._originalElement!==t.element.parentNode?t.element.parentNode.parentNode.removeChild(t.element.parentNode):t.element.parentNode.removeChild(t.element)),t.element&&"DIV"===t.element.nodeName&&t.element.parentNode){t.element.removeAttribute("data-vimeo-initialized");var o=t.element.querySelector("iframe");o&&o.parentNode&&(o.parentNode.parentNode&&t._originalElement&&t._originalElement!==o.parentNode?o.parentNode.parentNode.removeChild(o.parentNode):o.parentNode.removeChild(o))}t._window.removeEventListener("message",t._onMessage),Y.isEnabled&&Y.off("fullscreenchange",t.fullscreenchangeHandler),e()}))}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(t){return this.set("autopause",t)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getCameraProps",value:function(){return this.get("cameraProps")}},{key:"setCameraProps",value:function(t){return this.set("cameraProps",t)}},{key:"getChapters",value:function(){return this.get("chapters")}},{key:"getCurrentChapter",value:function(){return this.get("currentChapter")}},{key:"getColor",value:function(){return this.get("color")}},{key:"setColor",value:function(t){return this.set("color",t)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(t){return this.set("currentTime",t)}},{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(t){return this.set("loop",t)}},{key:"setMuted",value:function(t){return this.set("muted",t)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(t){return this.set("playbackRate",t)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getQualities",value:function(){return this.get("qualities")}},{key:"getQuality",value:function(){return this.get("quality")}},{key:"setQuality",value:function(t){return this.set("quality",t)}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{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(t){return this.set("volume",t)}}]),t}();s||(Y=_(),x(),M()),e.Z=H},5109:function(t,e,o){"use strict";o.d(e,{ZP:function(){return Qt}});var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},n(t,e)};function r(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}var i=function(){return i=Object.assign||function(t){for(var e,o=1,n=arguments.length;o0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]0,y=function(){if("string"==typeof f){var t=/os (\d\d?_\d(_\d)?)/.exec(f);if(!t)return!1;var e=t[1].split("_").map((function(t){return parseInt(t,10)}));return!!(13===e[0]&&e[1]>=4)}return!1}(),m=!1;if(p){var v="test-passive";try{var b={};Object.defineProperty(b,"passive",{get:function(){m=!0}}),window.addEventListener(v,(function(){}),b)}catch($e){}}function w(){return window.performance&&window.performance.now&&window.performance.timing?window.performance.now()+window.performance.timing.navigationStart:+new Date}var k=function(t,e){for(var o in e)t[o]=e[o];return t};function A(t){return null==t}function T(t,e){return Math.sqrt(t*t+e*e)}function S(t,e,o){return to?o:t}function E(t,e){if(t.findIndex)return t.findIndex(e);var o=-1;return t.some((function(t,n,r){var i=e(t,n,r);if(i)return o=n,i})),o}var P=p&&document.createElement("div").style,x=function(){if(!p)return!1;for(var t=0,e=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}];tdocument.documentElement.clientWidth-l||a>document.documentElement.clientHeight-l||s0?-1:o<0?1:0},i=r(e.x,t.x),s=r(e.y,t.y),a=o.x-n.x,l=o.y-n.y;return i*a<=0&&s*l<=0},wt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.startProbe=function(t,e){var o=this,n=t,r=function(){var i=o.translater.getComputedPosition();bt(t,e,i,n)&&o.hooks.trigger(o.hooks.eventTypes.move,i),o.pending||(o.callStopWhenPending?o.callStopWhenPending=!1:o.hooks.trigger(o.hooks.eventTypes.end,i)),n=i,o.pending&&(o.timer=it(r))};this.callStopWhenPending&&this.setCallStop(!1),st(this.timer),r()},e.prototype.transitionTime=function(t){void 0===t&&(t=0),this.style[Q.transitionDuration]=t+"ms",this.hooks.trigger(this.hooks.eventTypes.time,t)},e.prototype.transitionTimingFunction=function(t){this.style[Q.transitionTimingFunction]=t,this.hooks.trigger(this.hooks.eventTypes.timeFunction,t)},e.prototype.transitionProperty=function(){this.style[Q.transitionProperty]=Q.transform},e.prototype.move=function(t,e,o,n){this.setPending(o>0),this.transitionTimingFunction(n),this.transitionProperty(),this.transitionTime(o),this.translate(e);var r=3===this.options.probeType;o&&r&&this.startProbe(t,e),o||(this._reflow=this.content.offsetHeight,r&&this.hooks.trigger(this.hooks.eventTypes.move,e),this.hooks.trigger(this.hooks.eventTypes.end,e))},e.prototype.doStop=function(){var t=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),t){this.setPending(!1),st(this.timer);var e=this.translater.getComputedPosition(),o=e.x,n=e.y;this.transitionTime(),this.translate({x:o,y:n}),this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,{x:o,y:n})}return t},e.prototype.stop=function(){this.doStop()&&this.hooks.trigger(this.hooks.eventTypes.callStop)},e}(vt),kt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.move=function(t,e,o,n){if(!o)return this.translate(e),3===this.options.probeType&&this.hooks.trigger(this.hooks.eventTypes.move,e),void this.hooks.trigger(this.hooks.eventTypes.end,e);this.animate(t,e,o,n)},e.prototype.animate=function(t,e,o,n){var r=this,i=w(),s=i+o,a=3===this.options.probeType,l=function(){var h=w();if(h>=s)return r.translate(e),a&&r.hooks.trigger(r.hooks.eventTypes.move,e),void r.hooks.trigger(r.hooks.eventTypes.end,e);var c=n(h=(h-i)/o),u={};Object.keys(e).forEach((function(o){var n=t[o],r=e[o];u[o]=(r-n)*c+n})),r.translate(u),a&&r.hooks.trigger(r.hooks.eventTypes.move,u),r.pending&&(r.timer=it(l)),r.pending||(r.callStopWhenPending?r.callStopWhenPending=!1:r.hooks.trigger(r.hooks.eventTypes.end,e))};this.setPending(!0),this.callStopWhenPending&&this.setCallStop(!1),st(this.timer),l()},e.prototype.doStop=function(){var t=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),t){this.setPending(!1),st(this.timer);var e=this.translater.getComputedPosition();this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,e)}return t},e.prototype.stop=function(){this.doStop()&&this.hooks.trigger(this.hooks.eventTypes.callStop)},e}(vt);function At(t,e,o){var n=o.useTransition,r={};return Object.defineProperty(r,"probeType",{enumerable:!0,configurable:!1,get:function(){return o.probeType}}),n?new wt(t,e,r):new kt(t,e,r)}var Tt,St,Et,Pt,xt=function(){function t(t,e,o){this.wrapper=t,this.options=o,this.hooks=new pt(["beforeComputeBoundary","computeBoundary","momentum","end","ignoreHasScroll"]),this.refresh(e)}return t.prototype.start=function(){this.dist=0,this.setMovingDirection(0),this.setDirection(0)},t.prototype.move=function(t){return t=this.hasScroll?t:0,this.setMovingDirection(t),this.performDampingAlgorithm(t,this.options.outOfBoundaryDampingFactor)},t.prototype.setMovingDirection=function(t){this.movingDirection=t>0?-1:t<0?1:0},t.prototype.setDirection=function(t){this.direction=t>0?-1:t<0?1:0},t.prototype.performDampingAlgorithm=function(t,e){var o=this.currentPos+t;return(o>this.minScrollPos||othis.minScrollPos&&this.options.bounces[0]||othis.minScrollPos?this.minScrollPos:this.maxScrollPos),o},t.prototype.end=function(t){var e={duration:0},o=Math.abs(this.currentPos-this.startPos);if(this.options.momentum&&tthis.options.momentumLimitDistance){var n=-1===this.direction&&this.options.bounces[0]||1===this.direction&&this.options.bounces[1]?this.wrapperSize:0;e=this.hasScroll?this.momentum(this.currentPos,this.startPos,t,this.maxScrollPos,this.minScrollPos,n,this.options):{destination:this.currentPos,duration:0}}else this.hooks.trigger(this.hooks.eventTypes.end,e);return e},t.prototype.momentum=function(t,e,o,n,r,i,s){void 0===s&&(s=this.options);var a=t-e,l=Math.abs(a)/o,h=s.deceleration,c=s.swipeBounceTime,u=s.swipeTime,p={destination:t+l*l/h*(a<0?-1:1),duration:Math.min(u,2*l/h),rate:15};return this.hooks.trigger(this.hooks.eventTypes.momentum,p,a),p.destinationr&&(p.destination=i?Math.min(r+i/4,r+i/p.rate*l):r,p.duration=c),p.destination=Math.round(p.destination),p},t.prototype.updateDirection=function(){var t=this.currentPos-this.absStartPos;this.setDirection(t)},t.prototype.refresh=function(t){var e=this.options.rect,o=e.size,n=e.position,r="static"===window.getComputedStyle(this.wrapper,null).position,i=N(this.wrapper);this.wrapperSize=this.wrapper["width"===o?"clientWidth":"clientHeight"],this.setContent(t);var s=N(this.content);this.contentSize=s[o],this.relativeOffset=s[n],r&&(this.relativeOffset-=i[n]),this.computeBoundary(),this.setDirection(0)},t.prototype.setContent=function(t){t!==this.content&&(this.content=t,this.resetState())},t.prototype.resetState=function(){this.currentPos=0,this.startPos=0,this.dist=0,this.setDirection(0),this.setMovingDirection(0),this.resetStartPos()},t.prototype.computeBoundary=function(){this.hooks.trigger(this.hooks.eventTypes.beforeComputeBoundary);var t={minScrollPos:0,maxScrollPos:this.wrapperSize-this.contentSize};t.maxScrollPos<0&&(t.maxScrollPos-=this.relativeOffset,0===this.options.specifiedIndexAsContent&&(t.minScrollPos=-this.relativeOffset)),this.hooks.trigger(this.hooks.eventTypes.computeBoundary,t),this.minScrollPos=t.minScrollPos,this.maxScrollPos=t.maxScrollPos,this.hasScroll=this.options.scrollable&&this.maxScrollPosthis.minScrollPos?t=this.minScrollPos:te+this.directionLockThreshold?this.directionLocked="horizontal":e>=t+this.directionLockThreshold?this.directionLocked="vertical":this.directionLocked="none")},t.prototype.handleEventPassthrough=function(t){var e=It[this.directionLocked];if(e){if(this.eventPassthrough===e.yes)return Mt.yes(t);if(this.eventPassthrough===e.no)return Mt.no(t)}return!1},t}(),Bt=function(t,e,o){return 2===o?[e,-t]:3===o?[-t,-e]:4===o?[-e,t]:[t,e]},_t=function(){function t(t,e,o,n,r){this.hooks=new pt(["start","beforeMove","scrollStart","scroll","beforeEnd","end","scrollEnd","contentNotMoved","detectMovingDirection","coordinateTransformation"]),this.scrollBehaviorX=t,this.scrollBehaviorY=e,this.actionsHandler=o,this.animater=n,this.options=r,this.directionLockAction=new Ct(r.directionLockThreshold,r.freeScroll,r.eventPassthrough),this.enabled=!0,this.bindActionsHandler()}return t.prototype.bindActionsHandler=function(){var t=this;this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.start,(function(e){return!t.enabled||t.handleStart(e)})),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.move,(function(e){var o=e.deltaX,n=e.deltaY,r=e.e;if(!t.enabled)return!0;var i=Bt(o,n,t.options.quadrant),s={deltaX:i[0],deltaY:i[1]};return t.hooks.trigger(t.hooks.eventTypes.coordinateTransformation,s),t.handleMove(s.deltaX,s.deltaY,r)})),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.end,(function(e){return!t.enabled||t.handleEnd(e)})),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.click,(function(e){t.enabled&&!e._constructed&&t.handleClick(e)}))},t.prototype.handleStart=function(t){var e=w();this.fingerMoved=!1,this.contentMoved=!1,this.startTime=e,this.directionLockAction.reset(),this.scrollBehaviorX.start(),this.scrollBehaviorY.start(),this.animater.doStop(),this.scrollBehaviorX.resetStartPos(),this.scrollBehaviorY.resetStartPos(),this.hooks.trigger(this.hooks.eventTypes.start,t)},t.prototype.handleMove=function(t,e,o){if(!this.hooks.trigger(this.hooks.eventTypes.beforeMove,o)){var n=this.scrollBehaviorX.getAbsDist(t),r=this.scrollBehaviorY.getAbsDist(e),i=w();if(this.checkMomentum(n,r,i))return!0;if(this.directionLockAction.checkMovingDirection(n,r,o))return this.actionsHandler.setInitiated(),!0;var s=this.directionLockAction.adjustDelta(t,e),a=this.scrollBehaviorX.getCurrentPos(),l=this.scrollBehaviorX.move(s.deltaX),h=this.scrollBehaviorY.getCurrentPos(),c=this.scrollBehaviorY.move(s.deltaY);if(!this.hooks.trigger(this.hooks.eventTypes.detectMovingDirection)){this.fingerMoved||(this.fingerMoved=!0);var u=l!==a||c!==h;this.contentMoved||u||this.hooks.trigger(this.hooks.eventTypes.contentNotMoved),!this.contentMoved&&u&&(this.contentMoved=!0,this.hooks.trigger(this.hooks.eventTypes.scrollStart)),this.contentMoved&&u&&(this.animater.translate({x:l,y:c}),this.dispatchScroll(i))}}},t.prototype.dispatchScroll=function(t){t-this.startTime>this.options.momentumLimitTime&&(this.startTime=t,this.scrollBehaviorX.updateStartPos(),this.scrollBehaviorY.updateStartPos(),1===this.options.probeType&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())),this.options.probeType>1&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())},t.prototype.checkMomentum=function(t,e,o){return o-this.endTime>this.options.momentumLimitTime&&e0?Math.ceil(e):Math.floor(e),o=o>0?Math.ceil(o):Math.floor(o),{x:e=S(e,i,r),y:o=S(o,l,a)}},t.prototype.handleClick=function(t){R(t.target,this.options.preventDefaultException)||(_(t),t.stopPropagation())},t.prototype.getCurrentPos=function(){return{x:this.scrollBehaviorX.getCurrentPos(),y:this.scrollBehaviorY.getCurrentPos()}},t.prototype.refresh=function(){this.endTime=0},t.prototype.destroy=function(){this.hooks.destroy()},t}();function Ot(t){return["click","bindToWrapper","disableMouse","disableTouch","preventDefault","stopPropagation","tagException","preventDefaultException","autoEndDistance"].reduce((function(e,o){return e[o]=t[o],e}),{})}function Dt(t,e,o,n){var r=["momentum","momentumLimitTime","momentumLimitDistance","deceleration","swipeBounceTime","swipeTime","outOfBoundaryDampingFactor","specifiedIndexAsContent"].reduce((function(e,o){return e[o]=t[o],e}),{});return r.scrollable=!!t[e],r.bounces=o,r.rect=n,r}function Yt(t,e,o){o.forEach((function(o){var n,r;"string"==typeof o?n=r=o:(n=o.source,r=o.target),t.on(n,(function(){for(var t=[],o=0;o1&&tn||e>n))return!0},t.prototype.momentum=function(t,e){var o={time:0,easing:et.swiper,newX:t.x,newY:t.y},n=this.scrollBehaviorX.end(e),r=this.scrollBehaviorY.end(e);if(o.newX=A(n.destination)?o.newX:n.destination,o.newY=A(r.destination)?o.newY:r.destination,o.time=Math.max(n.duration,r.duration),this.hooks.trigger(this.hooks.eventTypes.momentum,o,this),o.newX!==t.x||o.newY!==t.y)return(o.newX>this.scrollBehaviorX.minScrollPos||o.newXthis.scrollBehaviorY.minScrollPos||o.newYMath.abs(n)&&(n=r),r=0),this.scroll.hasHorizontalScroll||(n=0),{x:n,y:r,directionX:n>0?-1:n<0?1:0,directionY:r>0?-1:r<0?1:0}},t.prototype.beforeHandler=function(t){var e=this.scroll.options,o=e.preventDefault,n=e.stopPropagation,r=e.preventDefaultException;o&&!R(t.target,r)&&_(t),n&&t.stopPropagation()},t.prototype.getEaseTime=function(){var t=100,e=this.mouseWheelOpt.easeTime;return ee.minScrollPos||e.currentPoso.minScrollPos||o.currentPos0&&(e.maxScrollPos=-1),e.minScrollPos=t.currentMinScrollY})),this.hasMouseWheelPlugin()&&(this.registerHooks(this.scroll,this.scroll.eventTypes.alterOptions,(function(t){var e=300,o=350;t.discreteTime=e,t.easeTime=o})),this.registerHooks(this.scroll,this.scroll.eventTypes.mousewheelEnd,(function(){e.hooks.trigger(e.hooks.eventTypes.end)})))},t.prototype.registerHooks=function(t,e,o){t.on(e,o,this),this.hooksFn.push([t,e,o])},t.prototype.hasMouseWheelPlugin=function(){return!!this.scroll.eventTypes.alterOptions},t.prototype.watch=function(){var t=this.scroll.scroller;this.watching=!0,this.registerHooks(t.hooks,t.hooks.eventTypes.end,this.checkPullDown),this.registerHooks(this.scroll,this.scroll.eventTypes.scrollStart,this.resetStateBeforeScrollStart),this.registerHooks(this.scroll,this.scroll.eventTypes.scroll,this.checkLocationOfThresholdBoundary),this.hasMouseWheelPlugin()&&this.registerHooks(this.scroll,this.scroll.eventTypes.mousewheelStart,this.resetStateBeforeScrollStart)},t.prototype.resetStateBeforeScrollStart=function(){this.isFetchingStatus()||(this.setPulling(1),this.setThresholdBoundary(0))},t.prototype.checkLocationOfThresholdBoundary=function(){if(1===this.pulling){var t=this.scroll,e=1!==this.thresholdBoundary&&this.locateInsideThresholdBoundary(),o=2!==this.thresholdBoundary&&!this.locateInsideThresholdBoundary();e&&(this.setThresholdBoundary(1),t.trigger(Wt)),o&&(this.setThresholdBoundary(2),t.trigger(Gt))}},t.prototype.locateInsideThresholdBoundary=function(){return this.scroll.y<=this.options.threshold},t.prototype.unwatch=function(){var t=this.scroll,e=t.scroller;this.watching=!1,e.hooks.off(e.hooks.eventTypes.end,this.checkPullDown),t.off(t.eventTypes.scrollStart,this.resetStateBeforeScrollStart),t.off(t.eventTypes.scroll,this.checkLocationOfThresholdBoundary),this.hasMouseWheelPlugin()&&t.off(t.eventTypes.mousewheelStart,this.resetStateBeforeScrollStart)},t.prototype.checkPullDown=function(){var t=this.options,e=t.threshold,o=t.stop;return!(this.scroll.y0&&(t.maxScrollPos=-1)}))},t.prototype.registerHooks=function(t,e,o){t.on(e,o,this),this.hooksFn.push([t,e,o])},t.prototype.watch=function(){this.watching||(this.watching=!0,this.registerHooks(this.scroll,this.scroll.eventTypes.scroll,this.checkPullUp))},t.prototype.unwatch=function(){this.watching=!1,this.scroll.off(this.scroll.eventTypes.scroll,this.checkPullUp)},t.prototype.checkPullUp=function(t){var e=this,o=this.options.threshold;1===this.scroll.movingDirectionY&&t.y<=this.scroll.maxScrollY+o&&(this.pulling=!0,this.scroll.once(this.scroll.eventTypes.scrollEnd,(function(){e.pulling=!1})),this.unwatch(),this.scroll.trigger(Jt))},t.prototype.finishPullUp=function(){var t=this;this.scroll.scroller.scrollBehaviorY.setMovingDirection(0),this.pulling?this.scroll.once(this.scroll.eventTypes.scrollEnd,(function(){t.watch()})):this.watch()},t.prototype.openPullUp=function(t){void 0===t&&(t={}),this.handleOptions(t),this.watch()},t.prototype.closePullUp=function(){this.unwatch()},t.prototype.autoPullUpLoad=function(){var t=this.options.threshold,e=this.scroll.scroller.scrollBehaviorY;if(!this.pulling&&this.watching){var o=-1,n=e.maxScrollPos+t+o;this.scroll.scroller.scrollBehaviorY.setMovingDirection(o),this.scroll.scrollTo(this.scroll.x,n,this.scroll.options.bounceTime)}},t.pluginName="pullUpLoad",t}(),te=function(){function t(t,e){this.indicator=t,this.options=e,this.hooks=new pt(["touchStart","touchMove","touchEnd"]),this.registerEvents()}return t.prototype.registerEvents=function(){var t=this.options,e=t.disableMouse,o=t.disableTouch,n=[],r=[],i=[];e||(n.push({name:"mousedown",handler:this.start.bind(this)}),r.push({name:"mousemove",handler:this.move.bind(this)}),i.push({name:"mouseup",handler:this.end.bind(this)})),o||(n.push({name:"touchstart",handler:this.start.bind(this)}),r.push({name:"touchmove",handler:this.move.bind(this)}),i.push({name:"touchend",handler:this.end.bind(this)},{name:"touchcancel",handler:this.end.bind(this)})),this.startEventRegister=new ft(this.indicator.indicatorEl,n),this.moveEventRegister=new ft(window,r),this.endEventRegister=new ft(window,i)},t.prototype.BScrollIsDisabled=function(){return!this.indicator.scroll.enabled},t.prototype.start=function(t){if(!this.BScrollIsDisabled()){var e=t.touches?t.touches[0]:t;_(t),t.stopPropagation(),this.initiated=!0,this.lastPoint=e[this.indicator.keysMap.point],this.hooks.trigger(this.hooks.eventTypes.touchStart)}},t.prototype.move=function(t){if(this.initiated){var e=(t.touches?t.touches[0]:t)[this.indicator.keysMap.point];_(t),t.stopPropagation();var o=e-this.lastPoint;this.lastPoint=e,this.hooks.trigger(this.hooks.eventTypes.touchMove,o)}},t.prototype.end=function(t){this.initiated&&(this.initiated=!1,_(t),t.stopPropagation(),this.hooks.trigger(this.hooks.eventTypes.touchEnd))},t.prototype.destroy=function(){this.startEventRegister.destroy(),this.moveEventRegister.destroy(),this.endEventRegister.destroy()},t}(),ee=function(){function t(t,e){this.scroll=t,this.options=e,this.hooksFn=[],this.wrapper=e.wrapper,this.direction=e.direction,this.indicatorEl=this.wrapper.children[0],this.keysMap=this.getKeysMap(),this.handleFade(),this.handleHooks()}return t.prototype.handleFade=function(){this.options.fade&&(this.wrapper.style.opacity="0")},t.prototype.handleHooks=function(){var t=this,e=this.options,o=e.fade,n=e.interactive,r=e.scrollbarTrackClickable,i=this.scroll,s=i.hooks,a=i.scroller.translater.hooks,l=i.scroller.animater.hooks;if(this.registerHooks(s,s.eventTypes.refresh,this.refresh),this.registerHooks(a,a.eventTypes.translate,(function(e){var o=t.keysMap.hasScroll;t.scroll[o]&&t.updatePosition(e)})),this.registerHooks(l,l.eventTypes.time,this.transitionTime),this.registerHooks(l,l.eventTypes.timeFunction,this.transitionTimingFunction),o&&(this.registerHooks(i,i.eventTypes.scrollEnd,(function(){t.fade()})),this.registerHooks(i,i.eventTypes.scrollStart,(function(){t.fade(!0)})),i.eventTypes.mousewheelStart&&i.eventTypes.mousewheelEnd&&(this.registerHooks(i,i.eventTypes.mousewheelStart,(function(){t.fade(!0)})),this.registerHooks(i,i.eventTypes.mousewheelMove,(function(){t.fade(!0)})),this.registerHooks(i,i.eventTypes.mousewheelEnd,(function(){t.fade()})))),n){var h=this.scroll.options,c=h.disableMouse,u=h.disableTouch;this.eventHandler=new te(this,{disableMouse:c,disableTouch:u});var p=this.eventHandler.hooks;this.registerHooks(p,p.eventTypes.touchStart,this.startHandler),this.registerHooks(p,p.eventTypes.touchMove,this.moveHandler),this.registerHooks(p,p.eventTypes.touchEnd,this.endHandler)}r&&this.bindClick()},t.prototype.registerHooks=function(t,e,o){t.on(e,o,this),this.hooksFn.push([t,e,o])},t.prototype.bindClick=function(){var t=this.wrapper;this.clickEventRegister=new ft(t,[{name:"click",handler:this.handleClick.bind(this)}])},t.prototype.handleClick=function(t){var e=this.calculateclickOffsetPos(t),o=this.scroll,n=o.x,r=o.y;n="horizontal"===this.direction?e:n,r="vertical"===this.direction?e:r,this.scroll.scrollTo(n,r,this.options.scrollbarTrackOffsetTime)},t.prototype.calculateclickOffsetPos=function(t){var e=this.keysMap,o=e.point,n=e.domRect,r=this.options.scrollbarTrackOffsetType,i=t[o]-this.wrapperRect[n],s=is?h=s+i-(o=Math.max(i-3*(h-s),l)):o=i,{pos:h,size:o}},t.prototype.refreshStyle=function(t,e){var o=this.keysMap,n=o.translateProperty,r=o.size,i=this.scroll.options.translateZ;this.indicatorEl.style[r]=t+"px",this.indicatorEl.style[Q.transform]=n+"("+e+"px)"+i},t.prototype.startHandler=function(){this.moved=!1,this.startTime=w(),this.transitionTime(),this.scroll.scroller.hooks.trigger(this.scroll.scroller.hooks.eventTypes.beforeScrollStart)},t.prototype.moveHandler=function(t){if(this.moved||this.indicatorNotMoved(t)||(this.moved=!0,this.scroll.scroller.hooks.trigger(this.scroll.scroller.hooks.eventTypes.scrollStart)),this.moved){var e=this.newPos(this.currentPos,t,this.scrollInfo);this.syncBScroll(e)}},t.prototype.endHandler=function(){if(this.moved){var t=this.scroll,e=t.x,o=t.y;this.scroll.scroller.hooks.trigger(this.scroll.scroller.hooks.eventTypes.scrollEnd,{x:e,y:o})}},t.prototype.indicatorNotMoved=function(t){var e=this.currentPos,o=this.scrollInfo,n=o.maxScrollPos;return e===o.minScrollPos&&t<=0||e===n&&t>=0},t.prototype.syncBScroll=function(t){var e=w(),o=this.scroll,n=o.x,r=o.y,i=o.options,s=o.scroller,a=o.maxScrollY,l=o.minScrollY,h=o.maxScrollX,c=o.minScrollX,u=i.probeType,p=i.momentumLimitTime,f={x:n,y:r};"vertical"===this.direction?f.y=S(t,a,l):f.x=S(t,h,c),s.translater.translate(f),e-this.startTime>p&&(this.startTime=e,1===u&&s.hooks.trigger(s.hooks.eventTypes.scroll,f)),u>1&&s.hooks.trigger(s.hooks.eventTypes.scroll,f)},t.prototype.newPos=function(t,e,o){var n=o.maxScrollPos,r=o.sizeRatio,i=t+e;return i=S(i,o.minScrollPos,n),Math.round(i/r)},t.prototype.destroy=function(){var t=this.options,e=t.interactive,o=t.scrollbarTrackClickable,n=t.isCustom;e&&this.eventHandler.destroy(),o&&this.clickEventRegister.destroy(),n||this.wrapper.parentNode.removeChild(this.wrapper),this.hooksFn.forEach((function(t){var e=t[0],o=t[1],n=t[2];e.off(o,n)})),this.hooksFn.length=0},t}(),oe=function(){function t(t){this.scroll=t,this.handleOptions(),this.createIndicators(),this.handleHooks()}return t.prototype.handleHooks=function(){var t=this,e=this.scroll;e.hooks.on(e.hooks.eventTypes.destroy,(function(){for(var e=0,o=t.indicators;e=this.pages[o][0].cx);o++);for(r=this.pages[o]?this.pages[o].length:0;n=this.pages[0][n].cy);n++);return{pageX:o,pageY:n}},t.prototype.buildPagesMatrix=function(t,e){var o,n,r,i,s=[],a=0,l=0,h=this.scroll.scroller.scrollBehaviorX.maxScrollPos,c=this.scroll.scroller.scrollBehaviorY.maxScrollPos;for(n=Math.round(t/2),r=Math.round(e/2);a>-this.scrollerWidth;){for(s[l]=[],i=0,o=0;o>-this.scrollerHeight;)s[l][i]={x:Math.max(a,h),y:Math.max(o,c),width:t,height:e,cx:a-n,cy:o-r},o-=e,i++;a-=t,l++}return s},t}(),se=function(){function t(t,e){this.scroll=t,this.slideOptions=e,this.slideX=!1,this.slideY=!1,this.currentPage=k({},ne)}return t.prototype.refresh=function(){this.pagesMatrix=new ie(this.scroll),this.checkSlideLoop(),this.currentPage=this.getAdjustedCurrentPage()},t.prototype.getAdjustedCurrentPage=function(){var t=this.currentPage,e=t.pageX,o=t.pageY;e=Math.min(e,this.pagesMatrix.pageLengthOfX-1),o=Math.min(o,this.pagesMatrix.pageLengthOfY-1),this.loopX&&(e=Math.min(e,this.pagesMatrix.pageLengthOfX-2)),this.loopY&&(o=Math.min(o,this.pagesMatrix.pageLengthOfY-2));var n=this.pagesMatrix.getPageStats(e,o);return{pageX:e,pageY:o,x:n.x,y:n.y}},t.prototype.setCurrentPage=function(t){this.currentPage=t},t.prototype.getInternalPage=function(t,e){t>=this.pagesMatrix.pageLengthOfX?t=this.pagesMatrix.pageLengthOfX-1:t<0&&(t=0),e>=this.pagesMatrix.pageLengthOfY?e=this.pagesMatrix.pageLengthOfY-1:e<0&&(e=0);var o=this.pagesMatrix.getPageStats(t,e);return{pageX:t,pageY:e,x:o.x,y:o.y}},t.prototype.getInitialPage=function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var o=this.slideOptions,n=o.startPageXIndex,r=o.startPageYIndex,i=this.loopX?1:0,s=this.loopY?1:0,a=t?i:this.currentPage.pageX,l=t?s:this.currentPage.pageY;e?(a=this.loopX?n+1:n,l=this.loopY?r+1:r):(a=t?i:this.currentPage.pageX,l=t?s:this.currentPage.pageY);var h=this.pagesMatrix.getPageStats(a,l);return{pageX:a,pageY:l,x:h.x,y:h.y}},t.prototype.getExposedPage=function(t){var e=k({},t);return this.loopX&&(e.pageX=this.fixedPage(e.pageX,this.pagesMatrix.pageLengthOfX-2)),this.loopY&&(e.pageY=this.fixedPage(e.pageY,this.pagesMatrix.pageLengthOfY-2)),e},t.prototype.getExposedPageByPageIndex=function(t,e){var o={pageX:t,pageY:e};this.loopX&&(o.pageX=t+1),this.loopY&&(o.pageY=e+1);var n=this.pagesMatrix.getPageStats(o.pageX,o.pageY);return{x:n.x,y:n.y,pageX:t,pageY:e}},t.prototype.getWillChangedPage=function(t){return t=k({},t),this.loopX&&(t.pageX=this.fixedPage(t.pageX,this.pagesMatrix.pageLengthOfX-2),t.x=this.pagesMatrix.getPageStats(t.pageX+1,0).x),this.loopY&&(t.pageY=this.fixedPage(t.pageY,this.pagesMatrix.pageLengthOfY-2),t.y=this.pagesMatrix.getPageStats(0,t.pageY+1).y),t},t.prototype.fixedPage=function(t,e){for(var o=[],n=0;n1?this.slideX=!0:this.slideX=!1,this.pagesMatrix.pages[0]&&this.pagesMatrix.pageLengthOfY>1?this.slideY=!0:this.slideY=!1,this.loopX=this.wannaLoop&&this.slideX,this.loopY=this.wannaLoop&&this.slideY,this.slideX&&this.slideY&&c("slide does not support two direction at the same time.")},t}(),ae="plugins.slide",le=[{key:"next",name:"next"},{key:"prev",name:"prev"},{key:"goToPage",name:"goToPage"},{key:"getCurrentPage",name:"getCurrentPage"},{key:"startPlay",name:"startPlay"},{key:"pausePlay",name:"pausePlay"}].map((function(t){return{key:t.key,sourceKey:ae+"."+t.name}})),he=function(t,e){return t.pageX===e.pageX&&t.pageY===e.pageY},ce=function(){function t(t){this.scroll=t,this.cachedClonedPageDOM=[],this.resetLooping=!1,this.autoplayTimer=0,this.satisfyInitialization()&&this.init()}return t.prototype.satisfyInitialization=function(){return!(this.scroll.scroller.content.children.length<=0)||(c("slide need at least one slide page to be initialised.please check your DOM layout."),!1)},t.prototype.init=function(){this.willChangeToPage=k({},ne),this.handleBScroll(),this.handleOptions(),this.handleHooks(),this.createPages()},t.prototype.createPages=function(){this.pages=new se(this.scroll,this.options)},t.prototype.handleBScroll=function(){this.scroll.registerType(["slideWillChange","slidePageChanged"]),this.scroll.proxy(le)},t.prototype.handleOptions=function(){var t=!0===this.scroll.options.slide?{}:this.scroll.options.slide,e={loop:!0,threshold:.1,speed:400,easing:et.bounce,listenFlick:!0,autoplay:!0,interval:3e3,startPageXIndex:0,startPageYIndex:0};this.options=k(e,t)},t.prototype.handleLoop=function(t){var e=this.options.loop,o=this.scroll.scroller.content,n=o.children.length;e&&(o!==t?(this.resetLoopChangedStatus(),this.removeClonedSlidePage(t),n>1&&this.cloneFirstAndLastSlidePage(o)):3===n&&this.initialised?(this.removeClonedSlidePage(o),this.moreToOnePageInLoop=!0,this.oneToMorePagesInLoop=!1):n>1?(this.initialised&&0===this.cachedClonedPageDOM.length?(this.oneToMorePagesInLoop=!0,this.moreToOnePageInLoop=!1):(this.removeClonedSlidePage(o),this.resetLoopChangedStatus()),this.cloneFirstAndLastSlidePage(o)):this.resetLoopChangedStatus())},t.prototype.resetLoopChangedStatus=function(){this.moreToOnePageInLoop=!1,this.oneToMorePagesInLoop=!1},t.prototype.handleHooks=function(){var t=this,e=this.scroll.hooks,o=this.scroll.scroller.hooks,n=this.options.listenFlick;this.prevContent=this.scroll.scroller.content,this.hooksFn=[],this.registerHooks(this.scroll,this.scroll.eventTypes.beforeScrollStart,this.pausePlay),this.registerHooks(this.scroll,this.scroll.eventTypes.scrollEnd,this.modifyCurrentPage),this.registerHooks(this.scroll,this.scroll.eventTypes.scrollEnd,this.startPlay),this.scroll.eventTypes.mousewheelMove&&(this.registerHooks(this.scroll,this.scroll.eventTypes.mousewheelMove,(function(){return!0})),this.registerHooks(this.scroll,this.scroll.eventTypes.mousewheelEnd,(function(e){1!==e.directionX&&1!==e.directionY||t.next(),-1!==e.directionX&&-1!==e.directionY||t.prev()}))),this.registerHooks(e,e.eventTypes.refresh,this.refreshHandler),this.registerHooks(e,e.eventTypes.destroy,this.destroy),this.registerHooks(o,o.eventTypes.beforeRefresh,(function(){t.handleLoop(t.prevContent),t.setSlideInlineStyle()})),this.registerHooks(o,o.eventTypes.momentum,this.modifyScrollMetaHandler),this.registerHooks(o,o.eventTypes.scroll,this.scrollHandler),this.registerHooks(o,o.eventTypes.checkClick,this.startPlay),n&&this.registerHooks(o,o.eventTypes.flick,this.flickHandler)},t.prototype.startPlay=function(){var t=this,e=this.options,o=e.interval;e.autoplay&&(clearTimeout(this.autoplayTimer),this.autoplayTimer=window.setTimeout((function(){t.next()}),o))},t.prototype.pausePlay=function(){this.options.autoplay&&clearTimeout(this.autoplayTimer)},t.prototype.setSlideInlineStyle=function(){var t=[{direction:"scrollX",sizeType:"offsetWidth",styleType:"width"},{direction:"scrollY",sizeType:"offsetHeight",styleType:"height"}],e=this.scroll.scroller,o=e.content,n=e.wrapper,r=this.scroll.options;t.forEach((function(t){var e=t.direction,i=t.sizeType,s=t.styleType;if(r[e]){for(var a=n[i],l=o.children,h=l.length,c=0;c0?i.contentSize/t.items.length:0,e.maxScrollPos=-t.itemHeight*(t.items.length-1),e.minScrollPos=0})),i.hooks.on(i.hooks.eventTypes.momentum,(function(e){e.rate=de.rate,e.destination=t.findNearestValidWheel(e.destination).y})),i.hooks.on(i.hooks.eventTypes.end,(function(e){var o=t.findNearestValidWheel(i.currentPos);e.destination=o.y,e.duration=t.options.adjustTime})),s.hooks.on(s.hooks.eventTypes.time,(function(e){t.transitionDuration(e)})),s.hooks.on(s.hooks.eventTypes.timeFunction,(function(e){t.timeFunction(e)})),s.hooks.on(s.hooks.eventTypes.callStop,(function(){var e=t.findNearestValidWheel(t.scroll.y).index;t.isAdjustingPosition=!0,t.wheelTo(e,0)})),s.translater.hooks.on(s.translater.hooks.eventTypes.translate,(function(e){t.rotateX(e.y)}))},t.prototype.refreshBoundary=function(){var t=this.scroll.scroller,e=t.scrollBehaviorX,o=t.scrollBehaviorY,n=t.content;e.refresh(n),o.refresh(n)},t.prototype.setSelectedIndex=function(t,e){void 0===e&&(e=!1);var o=this.selectedIndex;this.selectedIndex=t,o===t||e||this.scroll.trigger(fe,t)},t.prototype.getSelectedIndex=function(){return this.selectedIndex},t.prototype.wheelTo=function(t,e,o){void 0===t&&(t=0),void 0===e&&(e=0);var n=-t*this.itemHeight;this.scroll.scrollTo(0,n,e,o)},t.prototype.restorePosition=function(){if(this.scroll.pending){var t=this.getSelectedIndex();this.scroll.scroller.animater.clearTimer(),this.wheelTo(t,0)}},t.prototype.transitionDuration=function(t){for(var e=0;e0?0:t=0&&J(n[e],r);)e--;if(e<0)for(e=o;e<=n.length-1&&J(n[e],r);)e++;return e===n.length&&(e=o),{index:this.wheelItemsAllDisabled?-1:e,y:-e*this.itemHeight}},t.prototype.checkWheelAllDisabled=function(){var t=this.options.wheelDisabledItemClass,e=this.items;this.wheelItemsAllDisabled=!0;for(var o=0;o0){var t,e=w(),n=e+o,i=function(){var s=w();if(s>=n)return r.scroll.trigger(r.scroll.eventTypes.zooming,{scale:h}),void st(t);var a=et.bounce.fn((s-e)/o)*(h-l)+l;r.scroll.trigger(r.scroll.eventTypes.zooming,{scale:a}),t=it(i)};i()}}else r.scroll.trigger(r.scroll.eventTypes.zooming,{scale:h})}(),this.fingersOperation(2),this._zoomTo(h,l,e,o,n)},t.prototype._zoomTo=function(t,e,o,n,r){void 0===r&&(r=!1);var i=t/o.baseScale;this.setScale(t);var s=this.scroll.scroller,a=s.scrollBehaviorX,l=s.scrollBehaviorY;this.resetBoundaries([a,l]);var h=this.getNewPos(o.x,i,a,!0,r),c=this.getNewPos(o.y,i,l,!0,r);a.currentPos===Math.round(h)&&l.currentPos===Math.round(c)&&t===e||s.scrollTo(h,c,n,et.bounce,{start:{scale:e},end:{scale:t}})},t.prototype.resolveOrigin=function(t,e){var o=this.scroll.scroller,n=o.scrollBehaviorX,r=o.scrollBehaviorY,i={left:function(){return 0},top:function(){return 0},right:function(){return n.contentSize},bottom:function(){return r.contentSize},center:function(t){return(0===t?n.contentSize:r.contentSize)/2}};return{originX:"number"==typeof t?t:i[t](0),originY:"number"==typeof e?e:i[e](1)}},t.prototype.zoomStart=function(t){var e=t.touches[0],o=t.touches[1];this.startDistance=this.getFingerDistance(t),this.startScale=this.scale;var n=D(this.wrapper),r=n.left,i=n.top;this.origin={x:Math.abs(e.pageX+o.pageX)/2+r-this.scroll.x,y:Math.abs(e.pageY+o.pageY)/2+i-this.scroll.y,baseScale:this.startScale},this.scroll.trigger(this.scroll.eventTypes.beforeZoomStart)},t.prototype.zoom=function(t){var e=this.getFingerDistance(t);if(this.zoomed||!(Math.abs(e-this.startDistance)n&&(t=2*n*Math.pow(.5,n/t)),t},t.prototype.setScale=function(t){this.scale=t},t.prototype.resetBoundaries=function(t){t.forEach((function(t){return t.computeBoundary()}))},t.prototype.getNewPos=function(t,e,o,n,r){void 0===r&&(r=!1);var i=t-t*e+(r?o.currentPos:o.startPos);return n&&(i=S(i,o.maxScrollPos,o.minScrollPos)),i>0?Math.floor(i):Math.ceil(i)},t.prototype.registerHooks=function(t,e,o){t.on(e,o,this),this.hooksFn.push([t,e,o])},t.prototype.destroy=function(){this.hooksFn.forEach((function(t){var e=t[0],o=t[1],n=t[2];e.off(o,n)})),this.hooksFn.length=0},t.pluginName="zoom",t}(),ke=function(){function t(t){this.ancestors=[],this.descendants=[],this.hooksManager=[],this.analyzed=!1,this.selfScroll=t}return t.create=function(e){return new t(e)},t.prototype.hasAncestors=function(t){var e=E(this.ancestors,(function(e){return e[0]===t}));return e>-1},t.prototype.hasDescendants=function(t){var e=E(this.descendants,(function(e){return e[0]===t}));return e>-1},t.prototype.addAncestor=function(t,e){var o=this.ancestors;o.push([t,e]),o.sort((function(t,e){return t[1]-e[1]}))},t.prototype.addDescendant=function(t,e){var o=this.descendants;o.push([t,e]),o.sort((function(t,e){return t[1]-e[1]}))},t.prototype.removeAncestor=function(t){var e=this.ancestors;if(e.length){var o=E(this.ancestors,(function(e){return e[0]===t}));if(o>-1)return e.splice(o,1)}},t.prototype.removeDescendant=function(t){var e=this.descendants;if(e.length){var o=E(this.descendants,(function(e){return e[0]===t}));if(o>-1)return e.splice(o,1)}},t.prototype.registerHooks=function(t,e,o){t.on(e,o),this.hooksManager.push([t,e,o])},t.prototype.setAnalyzed=function(t){void 0===t&&(t=!1),this.analyzed=t},t.prototype.purge=function(){var t=this;this.ancestors.forEach((function(e){e[0].removeDescendant(t)})),this.descendants.forEach((function(e){e[0].removeAncestor(t)})),this.hooksManager.forEach((function(t){var e=t[0],o=t[1],n=t[2];e.off(o,n)})),this.hooksManager=[]},t}(),Ae="plugins.nestedScroll",Te=[{key:"purgeNestedScroll",name:"purgeNestedScroll"}].map((function(t){return{key:t.key,sourceKey:Ae+"."+t.name}})),Se="INTERNAL_NESTED_SCROLL",Ee=function(t){t.forEach((function(t){t.pending&&(t.stop(),t.resetPosition())}))},Pe=function(t){t.forEach((function(t){t.enable()}))},xe=function(t,e){t.forEach((function(t){t.hasHorizontalScroll!==e.hasHorizontalScroll&&t.hasVerticalScroll!==e.hasVerticalScroll||t.disable()}))},Me=function(t){t.forEach((function(t){var e=t.scroller,o=e.actions,n=e.scrollBehaviorX,r=e.scrollBehaviorY;o.fingerMoved=!0,o.contentMoved=!1,o.directionLockAction.reset(),n.start(),r.start(),n.resetStartPos(),r.resetStartPos(),o.startTime=+new Date}))},Ie=function(t){var e=t.hasHorizontalScroll,o=t.hasVerticalScroll,n=t.x,r=t.y,i=t.minScrollX,s=t.maxScrollX,a=t.minScrollY,l=t.maxScrollY,h=t.movingDirectionX,c=t.movingDirectionY,u=!1;return o?u=r>=a&&-1===c||r<=l&&1===c:e&&(u=n>=i&&-1===h||n<=s&&1===h),u},Ce=function(t){var e=t.hasHorizontalScroll,o=t.hasVerticalScroll,n=t.x,r=t.y,i=t.minScrollX,s=t.maxScrollX,a=t.minScrollY,l=t.maxScrollY,h=!1;return o?h=r>a||ri||n-1&&(e[n].purge(),e.splice(n,1));var r=E(o,(function(e){return e[0]===t.hooks}));if(r>-1){var i=o[r],s=i[0],a=i[1],l=i[2];s.off(a,l),o.splice(r,1)}},t.prototype.addBScroll=function(t){this.store.push(ke.create(t))},t.prototype.buildBScrollGraph=function(){for(var t,e,o,n,r=this.store,i=this.store.length,s=0;s0)e=1;else{if(!(t<0))return this.lastDirection;e=0}return this.lastDirection=e,e},t.prototype.calculateIndex=function(t,e,o){if(e<=0)return t;for(var n=t,r=o[n]&&-1!==o[n].pos?o[n].pos:0,i=0;nthis.list.length&&(e=t-this.list.length,this.addEmptyData(e)),[2,this.checkToFetch(t)]}))}))},t.prototype.add=function(t){for(var e=0;e=t.length&&(e=t.length-1),o>t.length&&(o=t.length),this.collectUnusedDom(t,e,o),this.createDom(t,e,o),this.cacheHeight(t,e,o);var n=this.positionDom(t,e,o);return{start:e,startPos:n.startPos,startDelta:n.startDelta,end:o,endPos:n.endPos}},t.prototype.collectUnusedDom=function(t,e,o){for(var n=0;ne;)n-=t[a-1].height,a--;return{start:n,delta:s-n}},t.prototype.removeTombstone=function(){for(var t=this.content.querySelectorAll(".tombstone"),e=t.length-1;e>=0;e--)this.content.removeChild(t[e])},t.prototype.setContent=function(t){t!==this.content&&(this.content=t)},t.prototype.destroy=function(){this.removeTombstone(),this.timers.forEach((function(t){clearTimeout(t)}))},t.prototype.resetState=function(){this.destroy(),this.timers=[],this.unusedDom=[]},t}(),je=-2e3,Ne=function(){function t(t){this.scroll=t,this.start=0,this.end=0,this.init()}return t.prototype.init=function(){var t=this;this.handleOptions();var e=this.options,o=e.fetch,n=e.render,r=e.createTombstone;this.tombstone=new Le(r),this.indexCalculator=new He(this.scroll.scroller.scrollBehaviorY.wrapperSize,this.tombstone.height),this.domManager=new Qe(this.scroll.scroller.content,n,this.tombstone),this.dataManager=new Fe([],o,this.onFetchFinish.bind(this)),this.scroll.on(this.scroll.eventTypes.destroy,this.destroy,this),this.scroll.on(this.scroll.eventTypes.scroll,this.update,this),this.scroll.on(this.scroll.eventTypes.contentChanged,(function(e){t.domManager.setContent(e),t.indexCalculator.resetState(),t.domManager.resetState(),t.dataManager.resetState(),t.update({y:0})}));var i=this.scroll.scroller.scrollBehaviorY;i.hooks.on(i.hooks.eventTypes.computeBoundary,this.modifyBoundary,this),this.update({y:0})},t.prototype.modifyBoundary=function(t){t.maxScrollPos=je},t.prototype.handleOptions=function(){var t=this.scroll.options.infinity;t&&("function"!=typeof t.fetch&&c("Infinity plugin need fetch Function to new data."),"function"!=typeof t.render&&c("Infinity plugin need render Function to render each item."),"function"!=typeof t.render&&c("Infinity plugin need createTombstone Function to create tombstone."),this.options=t),this.scroll.options.probeType=3},t.prototype.update=function(t){var e=Math.round(-t.y),o=this.indexCalculator.calculate(e,this.dataManager.getList()),n=o.start,r=o.end;this.start=n,this.end=r,this.dataManager.update(r),this.updateDom(this.dataManager.getList())},t.prototype.onFetchFinish=function(t,e){var o=this.updateDom(t).end;return e||(this.domManager.removeTombstone(),this.scroll.scroller.animater.stop(),this.scroll.resetPosition()),o},t.prototype.updateDom=function(t){var e=this.domManager.update(t,this.start,this.end),o=e.end,n=e.startPos,r=e.endPos,i=e.startDelta;return i&&(this.scroll.minScrollY=i),r>this.scroll.maxScrollY&&(this.scroll.maxScrollY=-(r-this.scroll.scroller.scrollBehaviorY.wrapperSize)),{end:o,startPos:n,endPos:r}},t.prototype.destroy=function(){for(var t=this.scroll.scroller,e=t.content,o=t.scrollBehaviorY;e.firstChild;)e.removeChild(e.firstChild);this.domManager.destroy(),this.scroll.off("scroll",this.update),this.scroll.off("destroy",this.destroy),o.hooks.off(o.hooks.eventTypes.computeBoundary)},t.pluginName="infinity",t}(),Re="plugins.movable",Ue=[{key:"putAt",name:"putAt"}].map((function(t){return{key:t.key,sourceKey:Re+"."+t.name}})),qe=function(){function t(t){this.scroll=t,this.handleBScroll(),this.handleHooks()}return t.prototype.handleBScroll=function(){this.scroll.proxy(Ue)},t.prototype.handleHooks=function(){var t=this;this.hooksFn=[];var e=this.scroll.scroller,o=e.scrollBehaviorX,n=e.scrollBehaviorY,r=function(t,e){t.maxScrollPos>0&&(t.minScrollPos=e.wrapperSize-e.contentSize,t.maxScrollPos=0)};this.registerHooks(o.hooks,o.hooks.eventTypes.ignoreHasScroll,(function(){return!0})),this.registerHooks(o.hooks,o.hooks.eventTypes.computeBoundary,(function(t){r(t,o)})),this.registerHooks(n.hooks,n.hooks.eventTypes.ignoreHasScroll,(function(){return!0})),this.registerHooks(n.hooks,n.hooks.eventTypes.computeBoundary,(function(t){r(t,n)})),this.registerHooks(this.scroll.hooks,this.scroll.hooks.eventTypes.destroy,(function(){t.destroy()}))},t.prototype.putAt=function(t,e,o,n){void 0===o&&(o=this.scroll.options.bounceTime),void 0===n&&(n=et.bounce);var r=this.resolvePostion(t,e);this.scroll.scrollTo(r.x,r.y,o,n)},t.prototype.resolvePostion=function(t,e){var o=this.scroll.scroller,n=o.scrollBehaviorX,r=o.scrollBehaviorY,i={left:function(){return 0},top:function(){return 0},right:function(){return n.minScrollPos},bottom:function(){return r.minScrollPos},center:function(t){return(0===t?n.minScrollPos:r.minScrollPos)/2}};return{x:"number"==typeof t?t:i[t](0),y:"number"==typeof e?e:i[e](1)}},t.prototype.destroy=function(){this.hooksFn.forEach((function(t){var e=t[0],o=t[1],n=t[2];e.off(o,n)})),this.hooksFn.length=0},t.prototype.registerHooks=function(t,e,o){t.on(e,o,this),this.hooksFn.push([t,e,o])},t.pluginName="movable",t.applyOrder="pre",t}(),We=function(t){return"img"===t.tagName.toLowerCase()},Ge=function(){function t(t){this.scroll=t,this.refreshTimer=0,this.init()}return t.prototype.init=function(){this.handleOptions(this.scroll.options.observeImage),this.bindEventsToWrapper()},t.prototype.handleOptions=function(t){void 0===t&&(t={}),t=!0===t?{}:t;var e={debounceTime:100};this.options=k(e,t)},t.prototype.bindEventsToWrapper=function(){var t=this.scroll.scroller.wrapper;this.imageLoadEventRegister=new ft(t,[{name:"load",handler:this.load.bind(this),capture:!0}]),this.imageErrorEventRegister=new ft(t,[{name:"error",handler:this.load.bind(this),capture:!0}])},t.prototype.load=function(t){var e=this,o=t.target,n=this.options.debounceTime;o&&We(o)&&(0===n?this.scroll.refresh():(clearTimeout(this.refreshTimer),this.refreshTimer=window.setTimeout((function(){e.scroll.refresh()}),this.options.debounceTime)))},t.pluginName="observeImage",t}(),Ve=function(t){var e={ratioX:0,ratioY:0};return t?("number"==typeof t?e.ratioX=e.ratioY=t:"object"==typeof t&&t&&(e.ratioX=t.x||0,e.ratioY=t.y||0),e):e},Ke=function(t){_(t),t.stopPropagation()},Ze=function(){function t(t,e){this.scroll=t,this.options=e,this.currentPos={x:0,y:0},this.hooksFn=[],this.handleDOM(),this.handleHooks(),this.handleInteractive()}return t.prototype.handleDOM=function(){var t=this.options,e=t.relationElement,o=t.relationElementHandleElementIndex,n=void 0===o?0:o;this.wrapper=e,this.indicatorEl=this.wrapper.children[n]},t.prototype.handleHooks=function(){var t=this,e=this.scroll,o=e.hooks,n=e.scroller.translater.hooks,r=e.scroller.animater.hooks;this.registerHooks(o,o.eventTypes.refresh,this.refresh),this.registerHooks(n,n.eventTypes.translate,(function(e){t.updatePosition(e)})),this.registerHooks(r,r.eventTypes.time,this.transitionTime),this.registerHooks(r,r.eventTypes.timeFunction,this.transitionTimingFunction)},t.prototype.transitionTime=function(t){void 0===t&&(t=0),this.indicatorEl.style[Q.transitionDuration]=t+"ms"},t.prototype.transitionTimingFunction=function(t){this.indicatorEl.style[Q.transitionTimingFunction]=t},t.prototype.handleInteractive=function(){!1!==this.options.interactive&&this.registerEvents()},t.prototype.registerHooks=function(t,e,o){t.on(e,o,this),this.hooksFn.push([t,e,o])},t.prototype.registerEvents=function(){var t=this.scroll.options,e=t.disableMouse,o=t.disableTouch,n=[],r=[],i=[];e||(n.push({name:"mousedown",handler:this.start.bind(this)}),r.push({name:"mousemove",handler:this.move.bind(this)}),i.push({name:"mouseup",handler:this.end.bind(this)})),o||(n.push({name:"touchstart",handler:this.start.bind(this)}),r.push({name:"touchmove",handler:this.move.bind(this)}),i.push({name:"touchend",handler:this.end.bind(this)},{name:"touchcancel",handler:this.end.bind(this)})),this.startEventRegister=new ft(this.indicatorEl,n),this.moveEventRegister=new ft(window,r),this.endEventRegister=new ft(window,i)},t.prototype.refresh=function(){var t=this.scroll,e=t.x,o=t.y,n=t.hasHorizontalScroll,r=t.hasVerticalScroll,i=t.maxScrollX,s=t.maxScrollY,a=Ve(this.options.ratio),l=a.ratioX,h=a.ratioY,c=tt(this.wrapper),u=c.width,p=c.height,f=N(this.indicatorEl),d=f.width,g=f.height;n&&(this.maxScrollX=u-d,this.translateXSign=this.maxScrollX>0?-1:1,this.minScrollX=0,this.ratioX=l||Math.abs(this.maxScrollX/i)),r&&(this.maxScrollY=p-g,this.translateYSign=this.maxScrollY>0?-1:1,this.minScrollY=0,this.ratioY=h||Math.abs(this.maxScrollY/s)),this.updatePosition({x:e,y:o})},t.prototype.start=function(t){if(!this.BScrollIsDisabled()){var e=t.touches?t.touches[0]:t;Ke(t),this.initiated=!0,this.moved=!1,this.lastPointX=e.pageX,this.lastPointY=e.pageY,this.startTime=w(),this.scroll.scroller.hooks.trigger(this.scroll.scroller.hooks.eventTypes.beforeScrollStart)}},t.prototype.BScrollIsDisabled=function(){return!this.scroll.enabled},t.prototype.move=function(t){if(this.initiated){var e=t.touches?t.touches[0]:t,o=e.pageX,n=e.pageY;Ke(t);var r=o-this.lastPointX,i=n-this.lastPointY;if(this.lastPointX=o,this.lastPointY=n,this.moved||this.indicatorNotMoved(r,i)||(this.moved=!0,this.scroll.scroller.hooks.trigger(this.scroll.scroller.hooks.eventTypes.scrollStart)),this.moved){var s=this.getBScrollPosByRatio(this.currentPos,r,i);this.syncBScroll(s)}}},t.prototype.end=function(t){if(this.initiated&&(this.initiated=!1,Ke(t),this.moved)){var e=this.scroll,o=e.x,n=e.y;this.scroll.scroller.hooks.trigger(this.scroll.scroller.hooks.eventTypes.scrollEnd,{x:o,y:n})}},t.prototype.getBScrollPosByRatio=function(t,e,o){var n=t.x,r=t.y,i=this.scroll,s=i.hasHorizontalScroll,a=i.hasVerticalScroll,l=i.minScrollX,h=i.maxScrollX,c=i.minScrollY,u=i.maxScrollY,p=this.scroll,f=p.x,d=p.y;if(s){var g=S(n+e,Math.min(this.minScrollX,this.maxScrollX),Math.max(this.minScrollX,this.maxScrollX));f=S(Math.round(g/this.ratioX*this.translateXSign),h,l)}if(a){var y=S(r+o,Math.min(this.minScrollY,this.maxScrollY),Math.max(this.minScrollY,this.maxScrollY));d=S(Math.round(y/this.ratioY*this.translateYSign),u,c)}return{x:f,y:d}},t.prototype.indicatorNotMoved=function(t,e){var o=this.currentPos,n=o.x,r=o.y,i=n===this.minScrollX&&t<=0||n===this.maxScrollX&&t>=0,s=r===this.minScrollY&&e<=0||r===this.maxScrollY&&e>=0;return i&&s},t.prototype.syncBScroll=function(t){var e=w(),o=this.scroll,n=o.options,r=o.scroller,i=n.probeType,s=n.momentumLimitTime;r.translater.translate(t),e-this.startTime>s&&(this.startTime=e,1===i&&r.hooks.trigger(r.hooks.eventTypes.scroll,t)),i>1&&r.hooks.trigger(r.hooks.eventTypes.scroll,t)},t.prototype.updatePosition=function(t){var e=this.getIndicatorPosByRatio(t);this.applyTransformProperty(e),this.currentPos=i({},e)},t.prototype.applyTransformProperty=function(t){var e=this.scroll.options.translateZ,o=["translateX("+t.x+"px)","translateY("+t.y+"px)",""+e];this.indicatorEl.style[Q.transform]=o.join(" ")},t.prototype.getIndicatorPosByRatio=function(t){var e=t.x,o=t.y,n=this.scroll,r=n.hasHorizontalScroll,s=n.hasVerticalScroll,a=i({},this.currentPos);if(r){var l=Math.round(this.ratioX*e*this.translateXSign);a.x=S(l,Math.min(this.minScrollX,this.maxScrollX),Math.max(this.minScrollX,this.maxScrollX))}if(s){var h=Math.round(this.ratioY*o*this.translateYSign);a.y=S(h,Math.min(this.minScrollY,this.maxScrollY),Math.max(this.minScrollY,this.maxScrollY))}return a},t.prototype.destroy=function(){!1!==this.options.interactive&&(this.startEventRegister.destroy(),this.moveEventRegister.destroy(),this.endEventRegister.destroy()),this.hooksFn.forEach((function(t){var e=t[0],o=t[1],n=t[2];e.off(o,n)})),this.hooksFn.length=0},t}(),Je=function(){function t(t){this.scroll=t,this.options=[],this.indicators=[],this.handleOptions(),this.handleHooks()}return t.prototype.handleOptions=function(){var t=this.scroll.options.indicators;u(Array.isArray(t),"'indicators' must be an array.");for(var e=0,o=t;e0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var o=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=o+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=r()(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=r()(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":i(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}(),h=l,c=o(1),u=o.n(c),p=o(2),f=o.n(p),d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g=function(){function t(t,e){for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===d(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=f()(t,"click",(function(t){return e.onClick(t)}))}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new h({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return w("action",t)}},{key:"defaultTarget",value:function(t){var e=w("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return w("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,o=!!document.queryCommandSupported;return e.forEach((function(t){o=o&&!!document.queryCommandSupported(t)})),o}}]),e}(u.a);function w(t,e){var o="data-clipboard-"+t;if(e.hasAttribute(o))return e.getAttribute(o)}e.default=b}]).default},t.exports=e()},6767:function(t,e,o){const n=o(3746),r=o(978),i=["keyword","gray","hex"],s={};for(const g of Object.keys(r))s[[...r[g].labels].sort().join("")]=g;const a={};function l(t,e){if(!(this instanceof l))return new l(t,e);if(e&&e in i&&(e=null),e&&!(e in r))throw new Error("Unknown model: "+e);let o,h;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof l)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=n.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,h=r[this.model].channels,this.color=e.value.slice(0,h),this.valpha="number"==typeof e.value[h]?e.value[h]:1}else if(t.length>0){this.model=e||"rgb",h=r[this.model].channels;const o=Array.prototype.slice.call(t,0,h);this.color=d(o,h),this.valpha="number"==typeof t[h]?t[h]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const n=e.sort().join("");if(!(n in s))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=s[n];const{labels:i}=r[this.model],a=[];for(o=0;o(t%360+360)%360)),saturationl:u("hsl",1,p(100)),lightness:u("hsl",2,p(100)),saturationv:u("hsv",1,p(100)),value:u("hsv",2,p(100)),chroma:u("hcg",1,p(100)),gray:u("hcg",2,p(100)),white:u("hwb",1,p(100)),wblack:u("hwb",2,p(100)),cyan:u("cmyk",0,p(100)),magenta:u("cmyk",1,p(100)),yellow:u("cmyk",2,p(100)),black:u("cmyk",3,p(100)),x:u("xyz",0,p(95.047)),y:u("xyz",1,p(100)),z:u("xyz",2,p(108.833)),l:u("lab",0,p(100)),a:u("lab",1),b:u("lab",2),keyword(t){return void 0!==t?new l(t):r[this.model].keyword(this.color)},hex(t){return void 0!==t?new l(t):n.to.hex(this.rgb().round().color)},hexa(t){if(void 0!==t)return new l(t);const e=this.rgb().round().color;let o=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===o.length&&(o="0"+o),n.to.hex(e)+o},rgbNumber(){const t=this.rgb().color;return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},luminosity(){const t=this.rgb().color,e=[];for(const[o,n]of t.entries()){const t=n/255;e[o]=t<=.04045?t/12.92:((t+.055)/1.055)**2.4}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){const e=this.luminosity(),o=t.luminosity();return e>o?(e+.05)/(o+.05):(o+.05)/(e+.05)},level(t){const e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){const t=this.rgb().color;return(2126*t[0]+7152*t[1]+722*t[2])/1e4<128},isLight(){return!this.isDark()},negate(){const t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){const e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){const e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){const e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){const e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){const t=this.rgb().color,e=.3*t[0]+.59*t[1]+.11*t[2];return l.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){const e=this.hsl();let o=e.color[0];return o=(o+t)%360,o=o<0?360+o:o,e.color[0]=o,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);const o=t.rgb(),n=this.rgb(),r=void 0===e?.5:e,i=2*r-1,s=o.alpha()-n.alpha(),a=((i*s==-1?i:(i+s)/(1+i*s))+1)/2,h=1-a;return l.rgb(a*o.red()+h*n.red(),a*o.green()+h*n.green(),a*o.blue()+h*n.blue(),o.alpha()*r+n.alpha()*(1-r))}};for(const g of Object.keys(r)){if(i.includes(g))continue;const{channels:t}=r[g];l.prototype[g]=function(...t){return this.model===g?new l(this):t.length>0?new l(t,g):new l([...f(r[this.model][g].raw(this.color)),this.valpha],g)},l[g]=function(...e){let o=e[0];return"number"==typeof o&&(o=d(e,t)),new l(o,g)}}function h(t,e){return Number(t.toFixed(e))}function c(t){return function(e){return h(e,t)}}function u(t,e,o){t=Array.isArray(t)?t:[t];for(const n of t)(a[n]||(a[n]=[]))[e]=o;return t=t[0],function(n){let r;return void 0!==n?(o&&(n=o(n)),r=this[t](),r.color[e]=n,r):(r=this[t]().color[e],o&&(r=o(r)),r)}}function p(t){return function(e){return Math.max(0,Math.min(t,e))}}function f(t){return Array.isArray(t)?t:[t]}function d(t,e){for(let o=0;o1&&(r-=1)),[360*r,100*i,100*h]},i.rgb.hwb=function(t){const e=t[0],o=t[1];let n=t[2];const r=i.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(o,n));return n=1-1/255*Math.max(e,Math.max(o,n)),[r,100*s,100*n]},i.rgb.cmyk=function(t){const e=t[0]/255,o=t[1]/255,n=t[2]/255,r=Math.min(1-e,1-o,1-n);return[100*((1-e-r)/(1-r)||0),100*((1-o-r)/(1-r)||0),100*((1-n-r)/(1-r)||0),100*r]},i.rgb.keyword=function(t){const e=r[t];if(e)return e;let o,i=1/0;for(const r of Object.keys(n)){const e=s(t,n[r]);e.04045?((e+.055)/1.055)**2.4:e/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*e+.3576*o+.1805*n),100*(.2126*e+.7152*o+.0722*n),100*(.0193*e+.1192*o+.9505*n)]},i.rgb.lab=function(t){const e=i.rgb.xyz(t);let o=e[0],n=e[1],r=e[2];o/=95.047,n/=100,r/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(o-n),200*(n-r)]},i.hsl.rgb=function(t){const e=t[0]/360,o=t[1]/100,n=t[2]/100;let r,i,s;if(0===o)return s=255*n,[s,s,s];r=n<.5?n*(1+o):n+o-n*o;const a=2*n-r,l=[0,0,0];for(let h=0;h<3;h++)i=e+1/3*-(h-1),i<0&&i++,i>1&&i--,s=6*i<1?a+6*(r-a)*i:2*i<1?r:3*i<2?a+(r-a)*(2/3-i)*6:a,l[h]=255*s;return l},i.hsl.hsv=function(t){const e=t[0];let o=t[1]/100,n=t[2]/100,r=o;const i=Math.max(n,.01);n*=2,o*=n<=1?n:2-n,r*=i<=1?i:2-i;return[e,100*(0===n?2*r/(i+r):2*o/(n+o)),100*((n+o)/2)]},i.hsv.rgb=function(t){const e=t[0]/60,o=t[1]/100;let n=t[2]/100;const r=Math.floor(e)%6,i=e-Math.floor(e),s=255*n*(1-o),a=255*n*(1-o*i),l=255*n*(1-o*(1-i));switch(n*=255,r){case 0:return[n,l,s];case 1:return[a,n,s];case 2:return[s,n,l];case 3:return[s,a,n];case 4:return[l,s,n];case 5:return[n,s,a]}},i.hsv.hsl=function(t){const e=t[0],o=t[1]/100,n=t[2]/100,r=Math.max(n,.01);let i,s;s=(2-o)*n;const a=(2-o)*r;return i=o*r,i/=a<=1?a:2-a,i=i||0,s/=2,[e,100*i,100*s]},i.hwb.rgb=function(t){const e=t[0]/360;let o=t[1]/100,n=t[2]/100;const r=o+n;let i;r>1&&(o/=r,n/=r);const s=Math.floor(6*e),a=1-n;i=6*e-s,0!=(1&s)&&(i=1-i);const l=o+i*(a-o);let h,c,u;switch(s){default:case 6:case 0:h=a,c=l,u=o;break;case 1:h=l,c=a,u=o;break;case 2:h=o,c=a,u=l;break;case 3:h=o,c=l,u=a;break;case 4:h=l,c=o,u=a;break;case 5:h=a,c=o,u=l}return[255*h,255*c,255*u]},i.cmyk.rgb=function(t){const e=t[0]/100,o=t[1]/100,n=t[2]/100,r=t[3]/100;return[255*(1-Math.min(1,e*(1-r)+r)),255*(1-Math.min(1,o*(1-r)+r)),255*(1-Math.min(1,n*(1-r)+r))]},i.xyz.rgb=function(t){const e=t[0]/100,o=t[1]/100,n=t[2]/100;let r,i,s;return r=3.2406*e+-1.5372*o+-.4986*n,i=-.9689*e+1.8758*o+.0415*n,s=.0557*e+-.204*o+1.057*n,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,r=Math.min(Math.max(0,r),1),i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),[255*r,255*i,255*s]},i.xyz.lab=function(t){let e=t[0],o=t[1],n=t[2];e/=95.047,o/=100,n/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*o-16,500*(e-o),200*(o-n)]},i.lab.xyz=function(t){let e,o,n;o=(t[0]+16)/116,e=t[1]/500+o,n=o-t[2]/200;const r=o**3,i=e**3,s=n**3;return o=r>.008856?r:(o-16/116)/7.787,e=i>.008856?i:(e-16/116)/7.787,n=s>.008856?s:(n-16/116)/7.787,e*=95.047,o*=100,n*=108.883,[e,o,n]},i.lab.lch=function(t){const e=t[0],o=t[1],n=t[2];let r;r=360*Math.atan2(n,o)/2/Math.PI,r<0&&(r+=360);return[e,Math.sqrt(o*o+n*n),r]},i.lch.lab=function(t){const e=t[0],o=t[1],n=t[2]/360*2*Math.PI;return[e,o*Math.cos(n),o*Math.sin(n)]},i.rgb.ansi16=function(t,e=null){const[o,n,r]=t;let s=null===e?i.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),0===s)return 30;let a=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(o/255));return 2===s&&(a+=60),a},i.hsv.ansi16=function(t){return i.rgb.ansi16(i.hsv.rgb(t),t[2])},i.rgb.ansi256=function(t){const e=t[0],o=t[1],n=t[2];if(e===o&&o===n)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;return 16+36*Math.round(e/255*5)+6*Math.round(o/255*5)+Math.round(n/255*5)},i.ansi16.rgb=function(t){let e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const o=.5*(1+~~(t>50));return[(1&e)*o*255,(e>>1&1)*o*255,(e>>2&1)*o*255]},i.ansi256.rgb=function(t){if(t>=232){const e=10*(t-232)+8;return[e,e,e]}let e;t-=16;return[Math.floor(t/36)/5*255,Math.floor((e=t%36)/6)/5*255,e%6/5*255]},i.rgb.hex=function(t){const e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},i.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let o=e[0];3===e[0].length&&(o=o.split("").map((t=>t+t)).join(""));const n=parseInt(o,16);return[n>>16&255,n>>8&255,255&n]},i.rgb.hcg=function(t){const e=t[0]/255,o=t[1]/255,n=t[2]/255,r=Math.max(Math.max(e,o),n),i=Math.min(Math.min(e,o),n),s=r-i;let a,l;return a=s<1?i/(1-s):0,l=s<=0?0:r===e?(o-n)/s%6:r===o?2+(n-e)/s:4+(e-o)/s,l/=6,l%=1,[360*l,100*s,100*a]},i.hsl.hcg=function(t){const e=t[1]/100,o=t[2]/100,n=o<.5?2*e*o:2*e*(1-o);let r=0;return n<1&&(r=(o-.5*n)/(1-n)),[t[0],100*n,100*r]},i.hsv.hcg=function(t){const e=t[1]/100,o=t[2]/100,n=e*o;let r=0;return n<1&&(r=(o-n)/(1-n)),[t[0],100*n,100*r]},i.hcg.rgb=function(t){const e=t[0]/360,o=t[1]/100,n=t[2]/100;if(0===o)return[255*n,255*n,255*n];const r=[0,0,0],i=e%1*6,s=i%1,a=1-s;let l=0;switch(Math.floor(i)){case 0:r[0]=1,r[1]=s,r[2]=0;break;case 1:r[0]=a,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=s;break;case 3:r[0]=0,r[1]=a,r[2]=1;break;case 4:r[0]=s,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=a}return l=(1-o)*n,[255*(o*r[0]+l),255*(o*r[1]+l),255*(o*r[2]+l)]},i.hcg.hsv=function(t){const e=t[1]/100,o=e+t[2]/100*(1-e);let n=0;return o>0&&(n=e/o),[t[0],100*n,100*o]},i.hcg.hsl=function(t){const e=t[1]/100,o=t[2]/100*(1-e)+.5*e;let n=0;return o>0&&o<.5?n=e/(2*o):o>=.5&&o<1&&(n=e/(2*(1-o))),[t[0],100*n,100*o]},i.hcg.hwb=function(t){const e=t[1]/100,o=e+t[2]/100*(1-e);return[t[0],100*(o-e),100*(1-o)]},i.hwb.hcg=function(t){const e=t[1]/100,o=1-t[2]/100,n=o-e;let r=0;return n<1&&(r=(o-n)/(1-n)),[t[0],100*n,100*r]},i.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},i.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},i.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},i.gray.hsl=function(t){return[0,0,t[0]]},i.gray.hsv=i.gray.hsl,i.gray.hwb=function(t){return[0,100,t[0]]},i.gray.cmyk=function(t){return[0,0,0,t[0]]},i.gray.lab=function(t){return[t[0],0,0]},i.gray.hex=function(t){const e=255&Math.round(t[0]/100*255),o=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(o.length)+o},i.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}},978:function(t,e,o){const n=o(2956),r=o(7774),i={};function s(t){const e=function(...e){const o=e[0];return null==o?o:(o.length>1&&(e=o),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}function a(t){const e=function(...e){const o=e[0];if(null==o)return o;o.length>1&&(e=o);const n=t(e);if("object"==typeof n)for(let t=n.length,r=0;r{i[t]={},Object.defineProperty(i[t],"channels",{value:n[t].channels}),Object.defineProperty(i[t],"labels",{value:n[t].labels});const e=r(t);Object.keys(e).forEach((o=>{const n=e[o];i[t][o]=a(n),i[t][o].raw=s(n)}))})),t.exports=i},7774:function(t,e,o){const n=o(2956);function r(){const t={},e=Object.keys(n);for(let o=e.length,n=0;n=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},l.to.keyword=function(t){return s[t.slice(0,3)]}},1227:function(t,e,o){function n(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function r(t){var o=this.useColors;if(t[0]=(o?"%c":"")+this.namespace+(o?" %c":" ")+t[0]+(o?"%c ":" ")+"+"+e.humanize(this.diff),o){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(r++,"%c"===t&&(i=r))})),t.splice(i,0,n)}}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(o){}}function a(){var t;try{t=e.storage.debug}catch(o){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t}function l(){try{return window.localStorage}catch(t){}}(e=t.exports=o(1658)).log=i,e.formatArgs=r,e.save=s,e.load=a,e.useColors=n,e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:l(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},e.enable(a())},1658:function(t,e,o){var n;function r(t){var o,n=0;for(o in t)n=(n<<5)-n+t.charCodeAt(o),n|=0;return e.colors[Math.abs(n)%e.colors.length]}function i(t){function o(){if(o.enabled){var t=o,r=+new Date,i=r-(n||r);t.diff=i,t.prev=n,t.curr=r,n=r;for(var s=new Array(arguments.length),a=0;a100)){var s=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(s){var a=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*i;case"days":case"day":case"d":return a*r;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*o;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}function a(t){return t>=r?Math.round(t/r)+"d":t>=n?Math.round(t/n)+"h":t>=o?Math.round(t/o)+"m":t>=e?Math.round(t/e)+"s":t+"ms"}function l(t){return h(t,r,"day")||h(t,n,"hour")||h(t,o,"minute")||h(t,e,"second")||t+" ms"}function h(t,e,o){if(!(t0)return s(t);if("number"===o&&!1===isNaN(t))return e.long?l(t):a(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},6373:function(t){var e;e=function(){return function(){function t(e,o,n){function r(s,a){if(!o[s]){if(!e[s]){if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var h=o[s]={exports:{}};e[s][0].call(h.exports,(function(t){return r(e[s][1][t]||t)}),h,h.exports,t,e,o,n)}return o[s].exports}for(var i=void 0,s=0;s=0,wasm:e.indexOf("wasm")>=0};r.call(this,o),this.features={js:o.js,wasm:o.wasm&&this.has_wasm()},this.use(i),this.use(s)}n(a,r),a.prototype.resizeAndUnsharp=function(t,e){var o=this.resize(t,e);return t.unsharpAmount&&this.unsharp_mask(o,t.toWidth,t.toHeight,t.unsharpAmount,t.unsharpRadius,t.unsharpThreshold),o},e.exports=a},{"./mm_resize":4,inherits:15,multimath:16,"multimath/lib/unsharp_mask":19}],2:[function(t,e,o){"use strict";function n(t){return t<0?0:t>255?255:t}function r(t,e,o,r,i,s){var a,l,h,c,u,p,f,d,g,y,m,v=0,b=0;for(g=0;g0;f--)c=c+(m=s[u++])*t[d+3]|0,h=h+m*t[d+2]|0,l=l+m*t[d+1]|0,a=a+m*t[d]|0,d=d+4|0;e[b+3]=n(c+8192>>14),e[b+2]=n(h+8192>>14),e[b+1]=n(l+8192>>14),e[b]=n(a+8192>>14),b=b+4*r|0}b=4*(g+1)|0,v=(g+1)*o*4|0}}function i(t,e,o,r,i,s){var a,l,h,c,u,p,f,d,g,y,m,v=0,b=0;for(g=0;g0;f--)c=c+(m=s[u++])*t[d+3]|0,h=h+m*t[d+2]|0,l=l+m*t[d+1]|0,a=a+m*t[d]|0,d=d+4|0;e[b+3]=n(c+8192>>14),e[b+2]=n(h+8192>>14),e[b+1]=n(l+8192>>14),e[b]=n(a+8192>>14),b=b+4*r|0}b=4*(g+1)|0,v=(g+1)*o*4|0}}e.exports={convolveHorizontally:r,convolveVertically:i}},{}],3:[function(t,e,o){"use strict";e.exports="AGFzbQEAAAABFAJgBn9/f39/fwBgB39/f39/f38AAg8BA2VudgZtZW1vcnkCAAEDAwIAAQQEAXAAAAcZAghjb252b2x2ZQAACmNvbnZvbHZlSFYAAQkBAArmAwLBAwEQfwJAIANFDQAgBEUNACAFQQRqIRVBACEMQQAhDQNAIA0hDkEAIRFBACEHA0AgB0ECaiESAn8gBSAHQQF0IgdqIgZBAmouAQAiEwRAQQAhCEEAIBNrIRQgFSAHaiEPIAAgDCAGLgEAakECdGohEEEAIQlBACEKQQAhCwNAIBAoAgAiB0EYdiAPLgEAIgZsIAtqIQsgB0H/AXEgBmwgCGohCCAHQRB2Qf8BcSAGbCAKaiEKIAdBCHZB/wFxIAZsIAlqIQkgD0ECaiEPIBBBBGohECAUQQFqIhQNAAsgEiATagwBC0EAIQtBACEKQQAhCUEAIQggEgshByABIA5BAnRqIApBgMAAakEOdSIGQf8BIAZB/wFIG0EQdEGAgPwHcUEAIAZBAEobIAtBgMAAakEOdSIGQf8BIAZB/wFIG0EYdEEAIAZBAEobciAJQYDAAGpBDnUiBkH/ASAGQf8BSBtBCHRBgP4DcUEAIAZBAEobciAIQYDAAGpBDnUiBkH/ASAGQf8BSBtB/wFxQQAgBkEAShtyNgIAIA4gA2ohDiARQQFqIhEgBEcNAAsgDCACaiEMIA1BAWoiDSADRw0ACwsLIQACQEEAIAIgAyAEIAUgABAAIAJBACAEIAUgBiABEAALCw=="},{}],4:[function(t,e,o){"use strict";e.exports={name:"resize",fn:t("./resize"),wasm_fn:t("./resize_wasm"),wasm_src:t("./convolve_wasm_base64")}},{"./convolve_wasm_base64":3,"./resize":5,"./resize_wasm":8}],5:[function(t,e,o){"use strict";var n=t("./resize_filter_gen"),r=t("./convolve").convolveHorizontally,i=t("./convolve").convolveVertically;function s(t,e,o){for(var n=3,r=e*o*4|0;n>1]+=i(1-v),w=0;w0&&0===f[k];)k--;if(A=h+w,T=k-w+1,I[C++]=A,I[C++]=T,B)for(y=w;y<=k;y++)I[C++]=f[y];else I.set(f.subarray(w,k+1),C),C+=T}else I[C++]=0,I[C++]=0}return I}},{"./resize_filter_info":7}],7:[function(t,e,o){"use strict";e.exports=[{win:.5,filter:function(t){return t>=-.5&&t<.5?1:0}},{win:1,filter:function(t){if(t<=-1||t>=1)return 0;if(t>-1.1920929e-7&&t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*(.54+.46*Math.cos(e/1))}},{win:2,filter:function(t){if(t<=-2||t>=2)return 0;if(t>-1.1920929e-7&&t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*Math.sin(e/2)/(e/2)}},{win:3,filter:function(t){if(t<=-3||t>=3)return 0;if(t>-1.1920929e-7&&t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*Math.sin(e/3)/(e/3)}}]},{}],8:[function(t,e,o){"use strict";var n=t("./resize_filter_gen");function r(t,e,o){for(var n=3,r=e*o*4|0;n>8&255}}e.exports=function(t){var e=t.src,o=t.width,i=t.height,s=t.toWidth,l=t.toHeight,h=t.scaleX||t.toWidth/t.width,c=t.scaleY||t.toHeight/t.height,u=t.offsetX||0,p=t.offsetY||0,f=t.dest||new Uint8Array(s*l*4),d=void 0===t.quality?3:t.quality,g=t.alpha||!1,y=n(d,o,s,h,u),m=n(d,i,l,c,p),v=0,b=this.__align(v+Math.max(e.byteLength,f.byteLength)),w=this.__align(b+i*s*4),k=this.__align(w+y.byteLength),A=k+m.byteLength,T=this.__instance("resize",A),S=new Uint8Array(this.__memory.buffer),E=new Uint32Array(this.__memory.buffer),P=new Uint32Array(e.buffer);return E.set(P),a(y,S,w),a(m,S,k),(T.exports.convolveHV||T.exports._convolveHV)(w,k,b,o,i,s,l),new Uint32Array(f.buffer).set(new Uint32Array(this.__memory.buffer,0,l*s)),g||r(f,s,l),f}},{"./resize_filter_gen":6}],9:[function(t,e,o){"use strict";var n=100;function r(t,e){this.create=t,this.available=[],this.acquired={},this.lastId=1,this.timeoutId=0,this.idle=e||2e3}r.prototype.acquire=function(){var t,e=this;return 0!==this.available.length?t=this.available.pop():((t=this.create()).id=this.lastId++,t.release=function(){return e.release(t)}),this.acquired[t.id]=t,t},r.prototype.release=function(t){var e=this;delete this.acquired[t.id],t.lastUsed=Date.now(),this.available.push(t),0===this.timeoutId&&(this.timeoutId=setTimeout((function(){return e.gc()}),n))},r.prototype.gc=function(){var t=this,e=Date.now();this.available=this.available.filter((function(o){return!(e-o.lastUsed>t.idle&&(o.destroy(),1))})),0!==this.available.length?this.timeoutId=setTimeout((function(){return t.gc()}),n):this.timeoutId=0},e.exports=r},{}],10:[function(t,e,o){"use strict";var n=2;e.exports=function(t,e,o,r,i,s){var a=o/t,l=r/e,h=(2*s+n+1)/i;if(h>.5)return[[o,r]];var c=Math.ceil(Math.log(Math.min(a,l))/Math.log(h));if(c<=1)return[[o,r]];for(var u=[],p=0;p=t.toWidth&&(a=t.toWidth-e),(o=s-t.destTileBorder)<0&&(o=0),o+(l=s+p+t.destTileBorder-o)>=t.toHeight&&(l=t.toHeight-o),f={toX:e,toY:o,toWidth:a,toHeight:l,toInnerX:n,toInnerY:s,toInnerWidth:u,toInnerHeight:p,offsetX:e/h-r(e/h),offsetY:o/c-r(o/c),scaleX:h,scaleY:c,x:r(e/h),y:r(o/c),width:i(a/h),height:i(l/c)},d.push(f);return d}},{}],12:[function(t,e,o){"use strict";function n(t){return Object.prototype.toString.call(t)}e.exports.isCanvas=function(t){var e=n(t);return"[object HTMLCanvasElement]"===e||"[object OffscreenCanvas]"===e||"[object Canvas]"===e},e.exports.isImage=function(t){return"[object HTMLImageElement]"===n(t)},e.exports.limiter=function(t){var e=0,o=[];function n(){e=0;g--)l=a*y+s*m+h*v+c*b,c=h,h=l,s=a,a=t[u],e[p]=o[f]+h,u--,f--,p-=i}}function u(t,e,o,n){if(n){var r=new Uint16Array(t.length),i=new Float32Array(Math.max(e,o)),s=h(n);c(t,r,i,s,e,o,n),c(r,t,i,s,o,e,n)}}e.exports=u},{}],15:[function(t,e,o){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var o=function(){};o.prototype=e.prototype,t.prototype=new o,t.prototype.constructor=t}}},{}],16:[function(t,e,o){"use strict";var n=t("object-assign"),r=t("./lib/base64decode"),i=t("./lib/wa_detect"),s={js:!0,wasm:!0};function a(t){if(!(this instanceof a))return new a(t);var e=n({},s,t||{});if(this.options=e,this.__cache={},this.__init_promise=null,this.__modules=e.modules||{},this.__memory=null,this.__wasm={},this.__isLE=1===new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0],!this.options.js&&!this.options.wasm)throw new Error('mathlib: at least "js" or "wasm" should be enabled')}a.prototype.has_wasm=i,a.prototype.use=function(t){return this.__modules[t.name]=t,this.options.wasm&&this.has_wasm()&&t.wasm_fn?this[t.name]=t.wasm_fn:this[t.name]=t.fn,this},a.prototype.init=function(){if(this.__init_promise)return this.__init_promise;if(!this.options.js&&this.options.wasm&&!this.has_wasm())return Promise.reject(new Error('mathlib: only "wasm" was enabled, but it\'s not supported'));var t=this;return this.__init_promise=Promise.all(Object.keys(t.__modules).map((function(e){var o=t.__modules[e];return t.options.wasm&&t.has_wasm()&&o.wasm_fn?t.__wasm[e]?null:WebAssembly.compile(t.__base64decode(o.wasm_src)).then((function(o){t.__wasm[e]=o})):null}))).then((function(){return t})),this.__init_promise},a.prototype.__base64decode=r,a.prototype.__reallocate=function(t){if(!this.__memory)return this.__memory=new WebAssembly.Memory({initial:Math.ceil(t/65536)}),this.__memory;var e=this.__memory.buffer.byteLength;return e>2),i=0,s=0,a=0;a>16&255,r[s++]=i>>8&255,r[s++]=255&i),i=i<<6|n.indexOf(e.charAt(a));var l=o%4*6;return 0===l?(r[s++]=i>>16&255,r[s++]=i>>8&255,r[s++]=255&i):18===l?(r[s++]=i>>10&255,r[s++]=i>>2&255):12===l&&(r[s++]=i>>4&255),r}},{}],18:[function(t,e,o){"use strict";e.exports=function(t,e,o){for(var n,r,i,s,a,l=e*o,h=new Uint16Array(l),c=0;c=r&&n>=i?n:r>=i&&r>=n?r:i,s=n<=r&&n<=i?n:r<=i&&r<=n?r:i,h[c]=257*(a+s)>>1;return h}},{}],19:[function(t,e,o){"use strict";e.exports={name:"unsharp_mask",fn:t("./unsharp_mask"),wasm_fn:t("./unsharp_mask_wasm"),wasm_src:t("./unsharp_mask_wasm_base64")}},{"./unsharp_mask":20,"./unsharp_mask_wasm":21,"./unsharp_mask_wasm_base64":22}],20:[function(t,e,o){"use strict";var n=t("glur/mono16"),r=t("./hsl_l16");e.exports=function(t,e,o,i,s,a){var l,h,c,u,p,f,d,g,y,m,v,b,w;if(!(0===i||s<.5)){s>2&&(s=2);var k=r(t,e,o),A=new Uint16Array(k);n(A,e,o,s);for(var T=i/100*4096+.5|0,S=257*a|0,E=e*o,P=0;P=S&&(l=t[w=4*P],h=t[w+1],c=t[w+2],f=257*((g=l>=h&&l>=c?l:h>=l&&h>=c?h:c)+(d=l<=h&&l<=c?l:h<=l&&h<=c?h:c))>>1,d===g?u=p=0:(p=f<=32767?4095*(g-d)/(g+d)|0:4095*(g-d)/(510-g-d)|0,u=l===g?65535*(h-c)/(6*(g-d))|0:h===g?21845+(65535*(c-l)/(6*(g-d))|0):43690+(65535*(l-h)/(6*(g-d))|0)),(f+=T*b+2048>>12)>65535?f=65535:f<0&&(f=0),0===p?l=h=c=f>>8:(y=2*f-(m=f<=32767?f*(4096+p)+2048>>12:f+((65535-f)*p+2048>>12))>>8,m>>=8,l=(v=u+21845&65535)>=43690?y:v>=32767?y+(6*(m-y)*(43690-v)+32768>>16):v>=10922?m:y+(6*(m-y)*v+32768>>16),h=(v=65535&u)>=43690?y:v>=32767?y+(6*(m-y)*(43690-v)+32768>>16):v>=10922?m:y+(6*(m-y)*v+32768>>16),c=(v=u-21845&65535)>=43690?y:v>=32767?y+(6*(m-y)*(43690-v)+32768>>16):v>=10922?m:y+(6*(m-y)*v+32768>>16)),t[w]=l,t[w+1]=h,t[w+2]=c)}}},{"./hsl_l16":18,"glur/mono16":14}],21:[function(t,e,o){"use strict";e.exports=function(t,e,o,n,r,i){if(!(0===n||r<.5)){r>2&&(r=2);var s=e*o,a=4*s,l=2*s,h=2*s,c=4*Math.max(e,o),u=32,p=0,f=a,d=f+l,g=d+h,y=g+h,m=y+c,v=this.__instance("unsharp_mask",a+l+2*h+c+u,{exp:Math.exp}),b=new Uint32Array(t.buffer);new Uint32Array(this.__memory.buffer).set(b);var w=v.exports.hsl_l16||v.exports._hsl_l16;w(p,f,e,o),(w=v.exports.blurMono16||v.exports._blurMono16)(f,d,g,y,m,e,o,r),(w=v.exports.unsharp||v.exports._unsharp)(p,p,f,d,e,o,n,i),b.set(new Uint32Array(this.__memory.buffer,0,s))}}},{}],22:[function(t,e,o){"use strict";e.exports="AGFzbQEAAAABMQZgAXwBfGACfX8AYAZ/f39/f38AYAh/f39/f39/fQBgBH9/f38AYAh/f39/f39/fwACGQIDZW52A2V4cAAAA2VudgZtZW1vcnkCAAEDBgUBAgMEBQQEAXAAAAdMBRZfX2J1aWxkX2dhdXNzaWFuX2NvZWZzAAEOX19nYXVzczE2X2xpbmUAAgpibHVyTW9ubzE2AAMHaHNsX2wxNgAEB3Vuc2hhcnAABQkBAAqJEAXZAQEGfAJAIAFE24a6Q4Ia+z8gALujIgOaEAAiBCAEoCIGtjgCECABIANEAAAAAAAAAMCiEAAiBbaMOAIUIAFEAAAAAAAA8D8gBKEiAiACoiAEIAMgA6CiRAAAAAAAAPA/oCAFoaMiArY4AgAgASAEIANEAAAAAAAA8L+gIAKioiIHtjgCBCABIAQgA0QAAAAAAADwP6AgAqKiIgO2OAIIIAEgBSACoiIEtow4AgwgASACIAegIAVEAAAAAAAA8D8gBqGgIgKjtjgCGCABIAMgBKEgAqO2OAIcCwu3AwMDfwR9CHwCQCADKgIUIQkgAyoCECEKIAMqAgwhCyADKgIIIQwCQCAEQX9qIgdBAEgiCA0AIAIgAC8BALgiDSADKgIYu6IiDiAJuyIQoiAOIAq7IhGiIA0gAyoCBLsiEqIgAyoCALsiEyANoqCgoCIPtjgCACACQQRqIQIgAEECaiEAIAdFDQAgBCEGA0AgAiAOIBCiIA8iDiARoiANIBKiIBMgAC8BALgiDaKgoKAiD7Y4AgAgAkEEaiECIABBAmohACAGQX9qIgZBAUoNAAsLAkAgCA0AIAEgByAFbEEBdGogAEF+ai8BACIIuCINIAu7IhGiIA0gDLsiEqKgIA0gAyoCHLuiIg4gCrsiE6KgIA4gCbsiFKKgIg8gAkF8aioCALugqzsBACAHRQ0AIAJBeGohAiAAQXxqIQBBACAFQQF0ayEHIAEgBSAEQQF0QXxqbGohBgNAIAghAyAALwEAIQggBiANIBGiIAO4Ig0gEqKgIA8iECAToqAgDiAUoqAiDyACKgIAu6CrOwEAIAYgB2ohBiAAQX5qIQAgAkF8aiECIBAhDiAEQX9qIgRBAUoNAAsLCwvfAgIDfwZ8AkAgB0MAAAAAWw0AIARE24a6Q4Ia+z8gB0MAAAA/l7ujIgyaEAAiDSANoCIPtjgCECAEIAxEAAAAAAAAAMCiEAAiDraMOAIUIAREAAAAAAAA8D8gDaEiCyALoiANIAwgDKCiRAAAAAAAAPA/oCAOoaMiC7Y4AgAgBCANIAxEAAAAAAAA8L+gIAuioiIQtjgCBCAEIA0gDEQAAAAAAADwP6AgC6KiIgy2OAIIIAQgDiALoiINtow4AgwgBCALIBCgIA5EAAAAAAAA8D8gD6GgIgujtjgCGCAEIAwgDaEgC6O2OAIcIAYEQCAFQQF0IQogBiEJIAIhCANAIAAgCCADIAQgBSAGEAIgACAKaiEAIAhBAmohCCAJQX9qIgkNAAsLIAVFDQAgBkEBdCEIIAUhAANAIAIgASADIAQgBiAFEAIgAiAIaiECIAFBAmohASAAQX9qIgANAAsLC7wBAQV/IAMgAmwiAwRAQQAgA2shBgNAIAAoAgAiBEEIdiIHQf8BcSECAn8gBEH/AXEiAyAEQRB2IgRB/wFxIgVPBEAgAyIIIAMgAk8NARoLIAQgBCAHIAIgA0kbIAIgBUkbQf8BcQshCAJAIAMgAk0EQCADIAVNDQELIAQgByAEIAMgAk8bIAIgBUsbQf8BcSEDCyAAQQRqIQAgASADIAhqQYECbEEBdjsBACABQQJqIQEgBkEBaiIGDQALCwvTBgEKfwJAIAazQwAAgEWUQwAAyEKVu0QAAAAAAADgP6CqIQ0gBSAEbCILBEAgB0GBAmwhDgNAQQAgAi8BACADLwEAayIGQQF0IgdrIAcgBkEASBsgDk8EQCAAQQJqLQAAIQUCfyAALQAAIgYgAEEBai0AACIESSIJRQRAIAYiCCAGIAVPDQEaCyAFIAUgBCAEIAVJGyAGIARLGwshCAJ/IAYgBE0EQCAGIgogBiAFTQ0BGgsgBSAFIAQgBCAFSxsgCRsLIgogCGoiD0GBAmwiEEEBdiERQQAhDAJ/QQAiCSAIIApGDQAaIAggCmsiCUH/H2wgD0H+AyAIayAKayAQQYCABEkbbSEMIAYgCEYEQCAEIAVrQf//A2wgCUEGbG0MAQsgBSAGayAGIARrIAQgCEYiBhtB//8DbCAJQQZsbUHVqgFBqtUCIAYbagshCSARIAcgDWxBgBBqQQx1aiIGQQAgBkEAShsiBkH//wMgBkH//wNIGyEGAkACfwJAIAxB//8DcSIFBEAgBkH//wFKDQEgBUGAIGogBmxBgBBqQQx2DAILIAZBCHYiBiEFIAYhBAwCCyAFIAZB//8Dc2xBgBBqQQx2IAZqCyIFQQh2IQcgBkEBdCAFa0EIdiIGIQQCQCAJQdWqAWpB//8DcSIFQanVAksNACAFQf//AU8EQEGq1QIgBWsgByAGa2xBBmxBgIACakEQdiAGaiEEDAELIAchBCAFQanVAEsNACAFIAcgBmtsQQZsQYCAAmpBEHYgBmohBAsCfyAGIgUgCUH//wNxIghBqdUCSw0AGkGq1QIgCGsgByAGa2xBBmxBgIACakEQdiAGaiAIQf//AU8NABogByIFIAhBqdUASw0AGiAIIAcgBmtsQQZsQYCAAmpBEHYgBmoLIQUgCUGr1QJqQf//A3EiCEGp1QJLDQAgCEH//wFPBEBBqtUCIAhrIAcgBmtsQQZsQYCAAmpBEHYgBmohBgwBCyAIQanVAEsEQCAHIQYMAQsgCCAHIAZrbEEGbEGAgAJqQRB2IAZqIQYLIAEgBDoAACABQQFqIAU6AAAgAUECaiAGOgAACyADQQJqIQMgAkECaiECIABBBGohACABQQRqIQEgC0F/aiILDQALCwsL"},{}],23:[function(t,e,o){"use strict";var n;e.exports=function(){if(void 0!==n)return n;if(n=!1,"undefined"==typeof WebAssembly)return n;try{var t=new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,127,1,127,3,2,1,0,5,3,1,0,1,7,8,1,4,116,101,115,116,0,0,10,16,1,14,0,32,0,65,1,54,2,0,32,0,40,2,0,11]),e=new WebAssembly.Module(t);return 0!==new WebAssembly.Instance(e,{}).exports.test(4)&&(n=!0),n}catch(o){}return n}},{}],24:[function(t,e,o){"use strict";var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function s(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function a(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},o=0;o<10;o++)e["_"+String.fromCharCode(o)]=o;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(r){return!1}}e.exports=a()?Object.assign:function(t,e){for(var o,a,l=s(t),h=1;ht.length)&&(e=t.length);for(var o=0,n=new Array(e);o=0)}catch(P){}var b=1;"undefined"!=typeof navigator&&(b=Math.min(navigator.hardwareConcurrency||1,4));var w,k,A={tile:1024,concurrency:b,features:["js","wasm","ww"],idle:2e3},T={quality:3,alpha:!1,unsharpAmount:0,unsharpRadius:0,unsharpThreshold:0};function S(){return{value:c(d),destroy:function(){if(this.value.terminate(),"undefined"!=typeof window){var t=window.URL||window.webkitURL||window.mozURL||window.msURL;t&&t.revokeObjectURL&&this.value.objectURL&&t.revokeObjectURL(this.value.objectURL)}}}}function E(t){if(!(this instanceof E))return new E(t);this.options=h({},A,t||{});var e="lk_".concat(this.options.concurrency);this.__limit=m[e]||f.limiter(this.options.concurrency),m[e]||(m[e]=this.__limit),this.features={js:!1,wasm:!1,cib:!1,ww:!1},this.__workersPool=null,this.__requested_features=[],this.__mathlib=null}E.prototype.init=function(){var e=this;if(this.__initPromise)return this.__initPromise;if(!1!==w&&!0!==w&&(w=!1,"undefined"!=typeof ImageData&&"undefined"!=typeof Uint8ClampedArray))try{new ImageData(new Uint8ClampedArray(400),10,10),w=!0}catch(s){}!1!==k&&!0!==k&&(k=!1,"undefined"!=typeof ImageBitmap&&(ImageBitmap.prototype&&ImageBitmap.prototype.close?k=!0:this.debug("ImageBitmap does not support .close(), disabled")));var o=this.options.features.slice();if(o.indexOf("all")>=0&&(o=["cib","wasm","js","ww"]),this.__requested_features=o,this.__mathlib=new u(o),o.indexOf("ww")>=0&&"undefined"!=typeof window&&"Worker"in window)try{t("webworkify")((function(){})).terminate(),this.features.ww=!0;var n="wp_".concat(JSON.stringify(this.options));m[n]?this.__workersPool=m[n]:(this.__workersPool=new p(S,this.options.idle),m[n]=this.__workersPool)}catch(s){}var r,i=this.__mathlib.init().then((function(t){h(e.features,t.features)}));return r=k?f.cib_support().then((function(t){e.features.cib&&o.indexOf("cib")<0?e.debug("createImageBitmap() resize supported, but disabled by config"):o.indexOf("cib")>=0&&(e.features.cib=t)})):Promise.resolve(!1),this.__initPromise=Promise.all([i,r]).then((function(){return e})),this.__initPromise},E.prototype.resize=function(t,e,o){var r=this;this.debug("Start resize...");var i=h({},T);if(isNaN(o)?o&&(i=h(i,o)):i=h(i,{quality:o}),i.toWidth=e.width,i.toHeight=e.height,i.width=t.naturalWidth||t.width,i.height=t.naturalHeight||t.height,0===e.width||0===e.height)return Promise.reject(new Error("Invalid output size: ".concat(e.width,"x").concat(e.height)));i.unsharpRadius>2&&(i.unsharpRadius=2);var s=!1,a=null;i.cancelToken&&(a=i.cancelToken.then((function(t){throw s=!0,t}),(function(t){throw s=!0,t})));var l=3,c=Math.ceil(Math.max(l,2.5*i.unsharpRadius|0));return this.init().then((function(){if(s)return a;if(r.features.cib){var o=e.getContext("2d",{alpha:Boolean(i.alpha)});return r.debug("Resize via createImageBitmap()"),createImageBitmap(t,{resizeWidth:i.toWidth,resizeHeight:i.toHeight,resizeQuality:f.cib_quality_name(i.quality)}).then((function(t){if(s)return a;if(!i.unsharpAmount)return o.drawImage(t,0,0),t.close(),o=null,r.debug("Finished!"),e;r.debug("Unsharp result");var n=document.createElement("canvas");n.width=i.toWidth,n.height=i.toHeight;var l=n.getContext("2d",{alpha:Boolean(i.alpha)});l.drawImage(t,0,0),t.close();var h=l.getImageData(0,0,i.toWidth,i.toHeight);return r.__mathlib.unsharp_mask(h.data,i.toWidth,i.toHeight,i.unsharpAmount,i.unsharpRadius,i.unsharpThreshold),o.putImageData(h,0,0),h=l=n=o=null,r.debug("Finished!"),e}))}var l={},u=function(t){return Promise.resolve().then((function(){return r.features.ww?new Promise((function(e,o){var n=r.__workersPool.acquire();a&&a.catch((function(t){return o(t)})),n.value.onmessage=function(t){n.release(),t.data.err?o(t.data.err):e(t.data.result)},n.value.postMessage({opts:t,features:r.__requested_features,preload:{wasm_nodule:r.__mathlib.__}},[t.src.buffer])})):r.__mathlib.resizeAndUnsharp(t,l)}))},p=function(t,e,o){var n,i,l,h=function(e){return r.__limit((function(){if(s)return a;var h;if(f.isCanvas(t))r.debug("Get tile pixel data"),h=n.getImageData(e.x,e.y,e.width,e.height);else{r.debug("Draw tile imageBitmap/image to temporary canvas");var c=document.createElement("canvas");c.width=e.width,c.height=e.height;var p=c.getContext("2d",{alpha:Boolean(o.alpha)});p.globalCompositeOperation="copy",p.drawImage(i||t,e.x,e.y,e.width,e.height,0,0,e.width,e.height),r.debug("Get tile pixel data"),h=p.getImageData(0,0,e.width,e.height),p=c=null}var d={src:h.data,width:e.width,height:e.height,toWidth:e.toWidth,toHeight:e.toHeight,scaleX:e.scaleX,scaleY:e.scaleY,offsetX:e.offsetX,offsetY:e.offsetY,quality:o.quality,alpha:o.alpha,unsharpAmount:o.unsharpAmount,unsharpRadius:o.unsharpRadius,unsharpThreshold:o.unsharpThreshold};return r.debug("Invoke resize math"),Promise.resolve().then((function(){return u(d)})).then((function(t){if(s)return a;var o;if(h=null,r.debug("Convert raw rgba tile result to ImageData"),w)o=new ImageData(new Uint8ClampedArray(t),e.toWidth,e.toHeight);else if((o=l.createImageData(e.toWidth,e.toHeight)).data.set)o.data.set(t);else for(var n=o.data.length-1;n>=0;n--)o.data[n]=t[n];return r.debug("Draw tile"),v?l.putImageData(o,e.toX,e.toY,e.toInnerX-e.toX,e.toInnerY-e.toY,e.toInnerWidth+1e-5,e.toInnerHeight+1e-5):l.putImageData(o,e.toX,e.toY,e.toInnerX-e.toX,e.toInnerY-e.toY,e.toInnerWidth,e.toInnerHeight),null}))}))};return Promise.resolve().then((function(){if(l=e.getContext("2d",{alpha:Boolean(o.alpha)}),f.isCanvas(t))return n=t.getContext("2d",{alpha:Boolean(o.alpha)}),null;if(f.isImage(t))return k?(r.debug("Decode image via createImageBitmap"),createImageBitmap(t).then((function(t){i=t})).catch((function(t){return null}))):null;throw new Error('".from" should be image or canvas')})).then((function(){if(s)return a;r.debug("Calculate tiles");var t=y({width:o.width,height:o.height,srcTileSize:r.options.tile,toWidth:o.toWidth,toHeight:o.toHeight,destTileBorder:c}).map((function(t){return h(t)}));function n(){i&&(i.close(),i=null)}return r.debug("Process tiles"),Promise.all(t).then((function(){return r.debug("Finished!"),n(),e}),(function(t){throw n(),t}))}))},d=function t(e,o,r,i){if(s)return a;var l,c=n(e.shift(),2),u=c[0],f=c[1],d=0===e.length;return i=h({},i,{toWidth:u,toHeight:f,quality:d?i.quality:Math.min(1,i.quality)}),d||((l=document.createElement("canvas")).width=u,l.height=f),p(o,d?r:l,i).then((function(){return d?r:(i.width=u,i.height=f,t(e,l,r,i))}))};return d(g(i.width,i.height,i.toWidth,i.toHeight,r.options.tile,c),t,e,i)}))},E.prototype.resizeBuffer=function(t){var e=this,o=h({},T,t);return this.init().then((function(){return e.__mathlib.resizeAndUnsharp(o)}))},E.prototype.toBlob=function(t,e,o){return e=e||"image/png",new Promise((function(n){if(t.toBlob)t.toBlob((function(t){return n(t)}),e,o);else if(t.convertToBlob)n(t.convertToBlob({type:e,quality:o}));else{for(var r=atob(t.toDataURL(e,o).split(",")[1]),i=r.length,s=new Uint8Array(i),a=0;a=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}},3988:function(t){"use strict";var e;e=function(){var t={},e={};return t.on=function(t,o){var n={name:t,handler:o};return e[t]=e[t]||[],e[t].unshift(n),n},t.off=function(t){var o=e[t.name].indexOf(t);-1!==o&&e[t.name].splice(o,1)},t.trigger=function(t,o){var n,r=e[t];if(r)for(n=r.length;n--;)r[n].handler(o)},t},t.exports=e},1900:function(t,e,o){"use strict";function n(t,e,o,n,r,i,s,a){var l,h="function"==typeof t?t.options:t;if(e&&(h.render=e,h.staticRenderFns=o,h._compiled=!0),n&&(h.functional=!0),i&&(h._scopeId="data-v-"+i),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},h._ssrRegister=l):r&&(l=a?function(){r.call(this,(h.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(h.functional){h._injectStyles=l;var c=h.render;h.render=function(t,e){return l.call(e),c(t,e)}}else{var u=h.beforeCreate;h.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:h}}o.d(e,{Z:function(){return n}})},6006:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(o(2275));function r(t){return t&&t.__esModule?t:{default:t}}e.default={pauseVideo:{acceptableStates:[n.default.ENDED,n.default.PAUSED],stateChangeRequired:!1},playVideo:{acceptableStates:[n.default.ENDED,n.default.PLAYING],stateChangeRequired:!1},seekTo:{acceptableStates:[n.default.ENDED,n.default.PLAYING,n.default.PAUSED],stateChangeRequired:!0,timeout:3e3}},t.exports=e.default},9125:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a(o(1227)),r=a(o(8255)),i=a(o(5279)),s=a(o(6006));function a(t){return t&&t.__esModule?t:{default:t}}var l=(0,n.default)("youtube-player"),h={proxyEvents:function(t){var e={},o=function(o){var n="on"+o.slice(0,1).toUpperCase()+o.slice(1);e[n]=function(e){l('event "%s"',n,e),t.trigger(o,e)}},n=!0,r=!1,s=void 0;try{for(var a,h=i.default[Symbol.iterator]();!(n=(a=h.next()).done);n=!0){o(a.value)}}catch(c){r=!0,s=c}finally{try{!n&&h.return&&h.return()}finally{if(r)throw s}}return e},promisifyPlayer:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o={},n=function(n){e&&s.default[n]?o[n]=function(){for(var e=arguments.length,o=Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=(0,r.default)();if(l||(l=(0,i.default)(a)),e.events)throw new Error("Event handlers cannot be overwritten.");if("string"==typeof t&&!document.getElementById(t))throw new Error('Element "'+t+'" does not exist.');e.events=s.default.proxyEvents(a);var h=new Promise((function(o){"object"===(void 0===t?"undefined":n(t))&&t.playVideo instanceof Function?o(t):l.then((function(n){var r=new n.Player(t,e);return a.on("ready",(function(){o(r)})),null}))})),c=s.default.promisifyPlayer(h,o);return c.on=a.on,c.off=a.off,c},t.exports=e.default},5900:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(o(9090));function r(t){return t&&t.__esModule?t:{default:t}}e.default=function(t){return new Promise((function(e){if(window.YT&&window.YT.Player&&window.YT.Player instanceof Function)e(window.YT);else{var o="http:"===window.location.protocol?"http:":"https:";(0,n.default)(o+"//www.youtube.com/iframe_api",(function(e){e&&t.trigger("error",e)}));var r=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){r&&r(),e(window.YT)}}}))},t.exports=e.default}}]);