@internetarchive/bookreader 5.0.0-79 → 5.0.0-79-alpha2
Sign up to get free protection for your applications and to get access to all the features.
package/BookReader/BookReader.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
/*! For license information please see BookReader.js.LICENSE.txt */
|
2
|
-
!function(){var t,e={9860:function(t,e,n){"use strict";n.d(e,{RS:function(){return h},Tm:function(){return p},_z:function(){return f}}),n(278),n(228),n(6203),n(4338),n(2826),n(752),n(6265),n(9373),n(9903),n(9749),n(6544),n(9288),n(3964),n(4254),n(1694),n(8373),n(6793),n(7629),n(7509),n(8052),n(7522),n(4284),n(3374),n(9730),n(7049),n(4043);var r=n(5311);function i(t){return i="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},i(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||a(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(){u=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),s=new R(r||[]);return o(a,"_invoke",{value:T(t,n,s)}),a}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",v="suspendedYield",g="executing",m="completed",y={};function b(){}function w(){}function x(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,k=S&&S(S(A([])));k&&k!==n&&r.call(k,s)&&(_=k);var P=x.prototype=b.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,a,s,u){var c=d(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,s,u)}),(function(t){n("throw",t,s,u)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return a=a?a.then(i,i):i()}})}function T(e,n,r){var i=p;return function(o,a){if(i===g)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=g;var c=d(e,n,r);if("normal"===c.type){if(i=r.done?m:v,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function C(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=d(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[s];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(i(e)+" is not iterable")}return w.prototype=x,o(P,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},E(O.prototype),f(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(h(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(P),f(P,l,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=A,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;M(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:A(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function c(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==i(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===i(o)?o:String(o)),r)}var o}var f=function(){function t(e,n){var i=n.isProtected,o=n.imageCache,a=n.loadingImage;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.page=e,this.imageCache=o,this.loadingImage=a,this.$container=r("<div />",{class:"BRpagecontainer ".concat(e?"pagediv".concat(e.index):"BRemptypage"),css:{position:"absolute"}}).attr("data-side",null==e?void 0:e.pageSide),i&&(this.$container.append(r('<div class="BRscreen" />')),this.$container.addClass("protected")),this.$img=null}var e,n;return e=t,n=[{key:"update",value:function(t){var e,n,i=t.dimensions,o=void 0===i?null:i,a=t.reduce,s=void 0===a?null:a;if(o&&this.$container.css(o),null!=s&&this.page){var l=this.imageCache.imageLoaded(this.page.index,s),f=!l&&this.imageCache.getBestLoadedReduce(this.page.index,s),h=this.imageCache.image(this.page.index,s);if((null===(e=this.$img)||void 0===e?void 0:e[0].src)==h[0].src)return this;null===(n=this.$img)||void 0===n||n.remove(),this.$img=h.prependTo(this.$container);var d=[];return l||(this.$container.addClass("BRpageloading"),d.push('url("'.concat(this.loadingImage,'") center/20px no-repeat'))),f&&d.push('url("'.concat(this.page.getURI(f,0),'") center/100% 100% no-repeat')),l||this.$img.css("background",d.join(",")).one("loadend",function(){var t,e=(t=u().mark((function t(e){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r(e.target).css({background:""}),r(e.target).parent().removeClass("BRpageloading");case 2:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){c(o,r,i,a,s,"next",t)}function s(t){c(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()),this}}}],n&&l(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function h(t,e){var n=document.createElement("div");return n.style.width="".concat(t.width,"px"),n.style.height="".concat(t.height,"px"),n.setAttribute("class","BRPageLayer ".concat(e)),n}function d(t){var e=t.l,n=t.r,r=t.b,i=t.t,o=document.createElementNS("http://www.w3.org/2000/svg","rect");return o.setAttribute("x",e.toString()),o.setAttribute("y",i.toString()),o.setAttribute("width",(n-e).toString()),o.setAttribute("height",(r-i).toString()),o.setAttribute("rx","4"),o.setAttribute("ry","4"),o}function p(t,e,n,i){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,u=i.querySelector(".".concat(t)),c=u||function(t,e){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");return n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("viewBox","0 0 ".concat(t.width," ").concat(t.height)),n.setAttribute("class","BRPageLayer ".concat(e)),n.setAttribute("preserveAspectRatio","none"),n}(n,t);if(!u){var l=i.querySelector(".BRpageimage");l?r(c).insertAfter(l):r(c).prependTo(i)}var f,h=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=a(t))){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}(e.entries());try{for(h.s();!(f=h.n()).done;){var p=o(f.value,2),v=p[0],g=d(p[1]);s&&g.setAttribute("class",s[v]),c.appendChild(g)}}catch(t){h.e(t)}finally{h.f()}}},5685:function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(){i=function(){return e};var t,e={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var i=e&&e.prototype instanceof b?e:b,o=Object.create(i.prototype),s=new R(r||[]);return a(o,"_invoke",{value:T(t,n,s)}),o}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",v="suspendedYield",g="executing",m="completed",y={};function b(){}function w(){}function x(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,k=S&&S(S(A([])));k&&k!==n&&o.call(k,u)&&(_=k);var P=x.prototype=b.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,a,s,u){var c=d(t[i],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,s,u)}),(function(t){n("throw",t,s,u)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,n,r){var i=p;return function(o,a){if(i===g)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=g;var c=d(e,n,r);if("normal"===c.type){if(i=r.done?m:v,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function C(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=d(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i<e.length;)if(o.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(r(e)+" is not iterable")}return w.prototype=x,a(P,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},E(O.prototype),f(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(h(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=A,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;M(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:A(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function o(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var a=t.apply(e,n);function s(t){o(a,r,i,s,u,"next",t)}function u(t){o(a,r,i,s,u,"throw",t)}s(void 0)}))}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t){t.bind("mousedown",(function(){return!1})),t[0].onselectstart=function(){return!1}}function c(t,e,n){return Math.min(Math.max(t,e),n)}function l(t,e){return t/e*100+"%"}function f(t,e){return!e.includes(t)}function h(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t.activeElement;return e&&null!=n&&n.shadowRoot?h(n.shadowRoot,!0):n}function d(){var t=h(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document);return"INPUT"==(null==t?void 0:t.tagName)||"TEXTAREA"==(null==t?void 0:t.tagName)}function p(t){var e=t.contentWindow||t.contentDocument;return e.document||e}function v(t){return t.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<").replace(/"/g,""")}function g(t){return decodeURIComponent(t).replace(/\+/g," ")}function m(t){return encodeURIComponent(t).replace(/%20/g,"+")}function y(t,e,n){var r;return function(){var i=this,o=arguments,a=n&&!r;clearTimeout(r),r=setTimeout((function(){r=null,n||t.apply(i,o)}),e),a&&t.apply(i,o)}}function b(t,e,n){var r,i;return e||(e=250),n&&(r=+new Date),function(){var n=this,o=+new Date,a=arguments;r&&o<r+e?(clearTimeout(i),i=setTimeout((function(){r=o,t.apply(n,a)}),e)):(r=o,t.apply(n,a))}}function w(t){if("function"==typeof t.CustomEvent)return!1;t.CustomEvent=x}function x(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.bubbles,r=void 0!==n&&n,i=e.cancelable,o=void 0!==i&&i,a=e.detail,s=void 0===a?null:a,u=document.createEvent("CustomEvent");return u.initCustomEvent(t,r,o,s),u}function _(){var t=document.createElement("div");t.style.width="1in",document.body.appendChild(t);var e=t.offsetWidth;document.body.removeChild(t);var n=1.25*e;return 0==n?100:n}function S(t){return t.reduce((function(t,e){return t+e}),0)}function k(t){var e,n=[],r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;n.push(i)}}catch(t){r.e(t)}finally{r.f()}return n}function P(t,e){return t.length==e.length&&t.every((function(t,n){return t==e[n]}))}function E(t,e){return t&&e&&!P(t,e)}function O(t){return T.apply(this,arguments)}function T(){return(T=a(i().mark((function t(e){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){return setTimeout(t,e)})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function C(t){return j.apply(this,arguments)}function j(){return j=a(i().mark((function t(e){var n,r,o,a,s,u,c,l,f,h,d,p=arguments;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=(n=p.length>1&&void 0!==p[1]?p[1]:{}).step,o=void 0===r?50:r,a=n.timeout,s=void 0===a?500:a,u=n.until,c=void 0===u?function(t){return Boolean(t)}:u,l=n._sleep,f=void 0===l?O:l,h=Date.now();case 2:if(!(Date.now()-h<s)){t.next=10;break}if(d=e(),!c(d)){t.next=6;break}return t.abrupt("return",d);case 6:return t.next=8,f(o);case 8:t.next=2;break;case 10:case"end":return t.stop()}}),t)}))),j.apply(this,arguments)}function M(t,e){return new Promise((function(n){t.addEventListener(e,(function r(i){t.removeEventListener(e,r),n(i)}))}))}function R(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}n.r(e),n.d(e,{PolyfilledCustomEvent:function(){return x},arrChanged:function(){return E},arrEquals:function(){return P},calcScreenDPI:function(){return _},clamp:function(){return c},cssPercentage:function(){return l},debounce:function(){return y},decodeURIComponentPlus:function(){return g},disableSelect:function(){return u},encodeURIComponentPlus:function(){return m},escapeHTML:function(){return v},escapeRegExp:function(){return R},genToArray:function(){return k},getActiveElement:function(){return h},getIFrameDocument:function(){return p},isInputActive:function(){return d},notInArray:function(){return f},poll:function(){return C},polyfillCustomEvent:function(){return w},promisifyEvent:function(){return M},sleep:function(){return O},sum:function(){return S},throttle:function(){return b}}),n(6801),n(3843),n(4043),n(7267),n(278),n(228),n(3964),n(9730),n(2826),n(4284),n(7049),n(1694),n(9749),n(6544),n(4254),n(752),n(6265),n(8373),n(6793),n(7629),n(7509),n(8052),n(7522),n(3374)},7775:function(t,e,n){"use strict";function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:navigator.vendor;return/chrome/i.test(t)&&/google inc/i.test(e)}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/firefox/i.test(t)}function o(){return"ongesturestart"in window&&navigator.maxTouchPoints>0}function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/SamsungBrowser/i.test(t)}n.d(e,{Tv:function(){return a},gn:function(){return o},i7:function(){return r},vU:function(){return i}}),n(4043)},8496:function(t){t.exports=function(){var t={};Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(t){return!(!t||!t.Window)&&t instanceof t.Window};var e={};Object.defineProperty(e,"__esModule",{value:!0}),e.getWindow=function(e){return(0,t.default)(e)?e:(e.ownerDocument||e).defaultView||r.window},e.init=i,e.window=e.realWindow=void 0;var n=void 0;e.realWindow=n;var r=void 0;function i(t){e.realWindow=n=t;var i=t.document.createTextNode("");i.ownerDocument!==t.document&&"function"==typeof t.wrap&&t.wrap(i)===i&&(t=t.wrap(t)),e.window=r=t}e.window=r,"undefined"!=typeof window&&window&&i(window);var o={};function a(t){return a="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},a(t)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var s=function(t){return!!t&&"object"===a(t)},u=function(t){return"function"==typeof t},c={window:function(n){return n===e.window||(0,t.default)(n)},docFrag:function(t){return s(t)&&11===t.nodeType},object:s,func:u,number:function(t){return"number"==typeof t},bool:function(t){return"boolean"==typeof t},string:function(t){return"string"==typeof t},element:function(t){if(!t||"object"!==a(t))return!1;var n=e.getWindow(t)||e.window;return/object|function/.test("undefined"==typeof Element?"undefined":a(Element))?t instanceof Element||t instanceof n.Element:1===t.nodeType&&"string"==typeof t.nodeName},plainObject:function(t){return s(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return s(t)&&void 0!==t.length&&u(t.splice)}};o.default=c;var l={};function f(t){var e=t.interaction;if("drag"===e.prepared.name){var n=e.prepared.axis;"x"===n?(e.coords.cur.page.y=e.coords.start.page.y,e.coords.cur.client.y=e.coords.start.client.y,e.coords.velocity.client.y=0,e.coords.velocity.page.y=0):"y"===n&&(e.coords.cur.page.x=e.coords.start.page.x,e.coords.cur.client.x=e.coords.start.client.x,e.coords.velocity.client.x=0,e.coords.velocity.page.x=0)}}function h(t){var e=t.iEvent,n=t.interaction;if("drag"===n.prepared.name){var r=n.prepared.axis;if("x"===r||"y"===r){var i="x"===r?"y":"x";e.page[i]=n.coords.start.page[i],e.client[i]=n.coords.start.client[i],e.delta[i]=0}}}Object.defineProperty(l,"__esModule",{value:!0}),l.default=void 0;var d={id:"actions/drag",install:function(t){var e=t.actions,n=t.Interactable,r=t.defaults;n.prototype.draggable=d.draggable,e.map.drag=d,e.methodDict.drag="draggable",r.actions.drag=d.defaults},listeners:{"interactions:before-action-move":f,"interactions:action-resume":f,"interactions:action-move":h,"auto-start:check":function(t){var e=t.interaction,n=t.interactable,r=t.buttons,i=n.options.drag;if(i&&i.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||0!=(r&n.options.drag.mouseButtons)))return t.action={name:"drag",axis:"start"===i.lockAxis?i.startAxis:i.lockAxis},!1}},draggable:function(t){return o.default.object(t)?(this.options.drag.enabled=!1!==t.enabled,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):o.default.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:f,move:h,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"}},p=d;l.default=p;var v={};Object.defineProperty(v,"__esModule",{value:!0}),v.default=void 0;var g={init:function(t){var e=t;g.document=e.document,g.DocumentFragment=e.DocumentFragment||m,g.SVGElement=e.SVGElement||m,g.SVGSVGElement=e.SVGSVGElement||m,g.SVGElementInstance=e.SVGElementInstance||m,g.Element=e.Element||m,g.HTMLElement=e.HTMLElement||g.Element,g.Event=e.Event,g.Touch=e.Touch||m,g.PointerEvent=e.PointerEvent||e.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function m(){}var y=g;v.default=y;var b={};Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var w={init:function(t){var e=v.default.Element,n=t.navigator||{};w.supportsTouch="ontouchstart"in t||o.default.func(t.DocumentTouch)&&v.default.document instanceof t.DocumentTouch,w.supportsPointerEvent=!1!==n.pointerEnabled&&!!v.default.PointerEvent,w.isIOS=/iP(hone|od|ad)/.test(n.platform),w.isIOS7=/iP(hone|od|ad)/.test(n.platform)&&/OS 7[^\d]/.test(n.appVersion),w.isIe9=/MSIE 9/.test(n.userAgent),w.isOperaMobile="Opera"===n.appName&&w.supportsTouch&&/Presto/.test(n.userAgent),w.prefixedMatchesSelector="matches"in e.prototype?"matches":"webkitMatchesSelector"in e.prototype?"webkitMatchesSelector":"mozMatchesSelector"in e.prototype?"mozMatchesSelector":"oMatchesSelector"in e.prototype?"oMatchesSelector":"msMatchesSelector",w.pEventTypes=w.supportsPointerEvent?v.default.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,w.wheelEvent=v.default.document&&"onmousewheel"in v.default.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},x=w;b.default=x;var _={};function S(t){var e=t.parentNode;if(o.default.docFrag(e)){for(;(e=e.host)&&o.default.docFrag(e););return e}return e}function k(t,n){return e.window!==e.realWindow&&(n=n.replace(/\/deep\//g," ")),t[b.default.prefixedMatchesSelector](n)}Object.defineProperty(_,"__esModule",{value:!0}),_.closest=function(t,e){for(;o.default.element(t);){if(k(t,e))return t;t=S(t)}return null},_.getActualElement=function(t){return t.correspondingUseElement||t},_.getElementClientRect=T,_.getElementRect=function(t){var n=T(t);if(!b.default.isIOS7&&n){var r=O(e.getWindow(t));n.left+=r.x,n.right+=r.x,n.top+=r.y,n.bottom+=r.y}return n},_.getPath=function(t){for(var e=[];t;)e.push(t),t=S(t);return e},_.getScrollXY=O,_.indexOfDeepestElement=function(t){for(var n,r=[],i=0;i<t.length;i++){var o=t[i],a=t[n];if(o&&i!==n)if(a){var s=P(o),u=P(a);if(s!==o.ownerDocument)if(u!==o.ownerDocument)if(s!==u){r=r.length?r:E(a);var c=void 0;if(a instanceof v.default.HTMLElement&&o instanceof v.default.SVGElement&&!(o instanceof v.default.SVGSVGElement)){if(o===u)continue;c=o.ownerSVGElement}else c=o;for(var l=E(c,a.ownerDocument),f=0;l[f]&&l[f]===r[f];)f++;var h=[l[f-1],l[f],r[f]];if(h[0])for(var d=h[0].lastChild;d;){if(d===h[1]){n=i,r=l;break}if(d===h[2])break;d=d.previousSibling}}else p=o,g=a,(parseInt(e.getWindow(p).getComputedStyle(p).zIndex,10)||0)>=(parseInt(e.getWindow(g).getComputedStyle(g).zIndex,10)||0)&&(n=i);else n=i}else n=i}var p,g;return n},_.matchesSelector=k,_.matchesUpTo=function(t,e,n){for(;o.default.element(t);){if(k(t,e))return!0;if((t=S(t))===n)return k(t,e)}return!1},_.nodeContains=function(t,e){if(t.contains)return t.contains(e);for(;e;){if(e===t)return!0;e=e.parentNode}return!1},_.parentNode=S,_.trySelector=function(t){return!!o.default.string(t)&&(v.default.document.querySelector(t),!0)};var P=function(t){return t.parentNode||t.host};function E(t,e){for(var n,r=[],i=t;(n=P(i))&&i!==e&&n!==i.ownerDocument;)r.unshift(i),i=n;return r}function O(t){return{x:(t=t||e.window).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop}}function T(t){var e=t instanceof v.default.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return e&&{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top}}var C={};Object.defineProperty(C,"__esModule",{value:!0}),C.default=function(t,e){for(var n in e)t[n]=e[n];return t};var j={};function M(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function R(t,e,n){return"parent"===t?(0,_.parentNode)(n):"self"===t?e.getRect(n):(0,_.closest)(n,t)}Object.defineProperty(j,"__esModule",{value:!0}),j.addEdges=function(t,e,n){t.left&&(e.left+=n.x),t.right&&(e.right+=n.x),t.top&&(e.top+=n.y),t.bottom&&(e.bottom+=n.y),e.width=e.right-e.left,e.height=e.bottom-e.top},j.getStringOptionResult=R,j.rectToXY=function(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}},j.resolveRectLike=function(t,e,n,r){var i,a=t;return o.default.string(a)?a=R(a,e,n):o.default.func(a)&&(a=a.apply(void 0,function(t){if(Array.isArray(t))return M(t)}(i=r)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(i)||function(t,e){if(t){if("string"==typeof t)return M(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(t,e):void 0}}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),o.default.element(a)&&(a=(0,_.getElementRect)(a)),a},j.tlbrToXywh=function(t){return!t||"x"in t&&"y"in t||((t=(0,C.default)({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t},j.xywhToTlbr=function(t){return!t||"left"in t&&"top"in t||((t=(0,C.default)({},t)).left=t.x||0,t.top=t.y||0,t.right=t.right||t.left+t.width,t.bottom=t.bottom||t.top+t.height),t};var A={};Object.defineProperty(A,"__esModule",{value:!0}),A.default=function(t,e,n){var r=t.options[n],i=r&&r.origin||t.options.origin,o=(0,j.resolveRectLike)(i,t,e,[t&&e]);return(0,j.rectToXY)(o)||{x:0,y:0}};var I={};function L(t){return t.trim().split(/ +/)}Object.defineProperty(I,"__esModule",{value:!0}),I.default=function t(e,n,r){if(r=r||{},o.default.string(e)&&-1!==e.search(" ")&&(e=L(e)),o.default.array(e))return e.reduce((function(e,i){return(0,C.default)(e,t(i,n,r))}),r);if(o.default.object(e)&&(n=e,e=""),o.default.func(n))r[e]=r[e]||[],r[e].push(n);else if(o.default.array(n))for(var i=0;i<n.length;i++){var a;a=n[i],t(e,a,r)}else if(o.default.object(n))for(var s in n){var u=L(s).map((function(t){return"".concat(e).concat(t)}));t(u,n[s],r)}return r};var D={};Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0,D.default=function(t,e){return Math.sqrt(t*t+e*e)};var $={};Object.defineProperty($,"__esModule",{value:!0}),$.default=function(t,e){t.__set||(t.__set={});var n=function(n){"function"!=typeof t[n]&&"__set"!==n&&Object.defineProperty(t,n,{get:function(){return n in t.__set?t.__set[n]:t.__set[n]=e[n]},set:function(e){t.__set[n]=e},configurable:!0})};for(var r in e)n(r);return t};var N={};function F(t){return t instanceof v.default.Event||t instanceof v.default.Touch}function B(t,e,n){return t=t||"page",(n=n||{}).x=e[t+"X"],n.y=e[t+"Y"],n}function U(t,e){return e=e||{x:0,y:0},b.default.isOperaMobile&&F(t)?(B("screen",t,e),e.x+=window.scrollX,e.y+=window.scrollY):B("page",t,e),e}function z(t,e){return e=e||{},b.default.isOperaMobile&&F(t)?B("screen",t,e):B("client",t,e),e}function W(t){var e=[];return o.default.array(t)?(e[0]=t[0],e[1]=t[1]):"touchend"===t.type?1===t.touches.length?(e[0]=t.touches[0],e[1]=t.changedTouches[0]):0===t.touches.length&&(e[0]=t.changedTouches[0],e[1]=t.changedTouches[1]):(e[0]=t.touches[0],e[1]=t.touches[1]),e}function H(t){for(var e={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},n=0;n<t.length;n++){var r=t[n];for(var i in e)e[i]+=r[i]}for(var o in e)e[o]/=t.length;return e}Object.defineProperty(N,"__esModule",{value:!0}),N.coordsToEvent=function(t){return{coords:t,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}},N.copyCoords=function(t,e){t.page=t.page||{},t.page.x=e.page.x,t.page.y=e.page.y,t.client=t.client||{},t.client.x=e.client.x,t.client.y=e.client.y,t.timeStamp=e.timeStamp},N.getClientXY=z,N.getEventTargets=function(t){var e=o.default.func(t.composedPath)?t.composedPath():t.path;return[_.getActualElement(e?e[0]:t.target),_.getActualElement(t.currentTarget)]},N.getPageXY=U,N.getPointerId=function(t){return o.default.number(t.pointerId)?t.pointerId:t.identifier},N.getPointerType=function(t){return o.default.string(t.pointerType)?t.pointerType:o.default.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof v.default.Touch?"touch":"mouse"},N.getTouchPair=W,N.getXY=B,N.isNativePointer=F,N.newCoords=function(){return{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},N.pointerAverage=H,Object.defineProperty(N,"pointerExtend",{enumerable:!0,get:function(){return $.default}}),N.setCoordDeltas=function(t,e,n){t.page.x=n.page.x-e.page.x,t.page.y=n.page.y-e.page.y,t.client.x=n.client.x-e.client.x,t.client.y=n.client.y-e.client.y,t.timeStamp=n.timeStamp-e.timeStamp},N.setCoordVelocity=function(t,e){var n=Math.max(e.timeStamp/1e3,.001);t.page.x=e.page.x/n,t.page.y=e.page.y/n,t.client.x=e.client.x/n,t.client.y=e.client.y/n,t.timeStamp=n},N.setCoords=function(t,e,n){var r=e.length>1?H(e):e[0];U(r,t.page),z(r,t.client),t.timeStamp=n},N.setZeroCoords=function(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0},N.touchAngle=function(t,e){var n=e+"X",r=e+"Y",i=W(t),o=i[1][n]-i[0][n],a=i[1][r]-i[0][r];return 180*Math.atan2(a,o)/Math.PI},N.touchBBox=function(t){if(!t.length)return null;var e=W(t),n=Math.min(e[0].pageX,e[1].pageX),r=Math.min(e[0].pageY,e[1].pageY),i=Math.max(e[0].pageX,e[1].pageX),o=Math.max(e[0].pageY,e[1].pageY);return{x:n,y:r,left:n,top:r,right:i,bottom:o,width:i-n,height:o-r}},N.touchDistance=function(t,e){var n=e+"X",r=e+"Y",i=W(t),o=i[0][n]-i[1][n],a=i[0][r]-i[1][r];return(0,D.default)(o,a)};var V={};function G(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(V,"__esModule",{value:!0}),V.BaseEvent=void 0;var Y=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),G(this,"immediatePropagationStopped",!1),G(this,"propagationStopped",!1),this._interaction=e}var e,n;return e=t,(n=[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();V.BaseEvent=Y,Object.defineProperty(Y.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var X={};Object.defineProperty(X,"__esModule",{value:!0}),X.remove=X.merge=X.from=X.findIndex=X.find=X.contains=void 0,X.contains=function(t,e){return-1!==t.indexOf(e)},X.remove=function(t,e){return t.splice(t.indexOf(e),1)};var q=function(t,e){for(var n=0;n<e.length;n++){var r=e[n];t.push(r)}return t};X.merge=q,X.from=function(t){return q([],t)};var K=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return n;return-1};X.findIndex=K,X.find=function(t,e){return t[K(t,e)]};var Z={};function J(t){return J="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},J(t)}function Q(t,e){return Q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Q(t,e)}function tt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function et(t){return et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},et(t)}function nt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(Z,"__esModule",{value:!0}),Z.DropEvent=void 0;var rt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Q(t,e)}(a,t);var e,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=et(r);if(i){var n=et(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===J(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return tt(t)}(this,t)});function a(t,e,n){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),nt(tt(r=o.call(this,e._interaction)),"dropzone",void 0),nt(tt(r),"dragEvent",void 0),nt(tt(r),"relatedTarget",void 0),nt(tt(r),"draggable",void 0),nt(tt(r),"propagationStopped",!1),nt(tt(r),"immediatePropagationStopped",!1);var i="dragleave"===n?t.prev:t.cur,s=i.element,u=i.dropzone;return r.type=n,r.target=s,r.currentTarget=s,r.dropzone=u,r.dragEvent=e,r.relatedTarget=e.target,r.draggable=e.interactable,r.timeStamp=e.timeStamp,r}return e=a,(n=[{key:"reject",value:function(){var t=this,e=this._interaction.dropState;if("dropactivate"===this.type||this.dropzone&&e.cur.dropzone===this.dropzone&&e.cur.element===this.target)if(e.prev.dropzone=this.dropzone,e.prev.element=this.target,e.rejected=!0,e.events.enter=null,this.stopImmediatePropagation(),"dropactivate"===this.type){var n=e.activeDrops,r=X.findIndex(n,(function(e){var n=e.dropzone,r=e.element;return n===t.dropzone&&r===t.target}));e.activeDrops.splice(r,1);var i=new a(e,this.dragEvent,"dropdeactivate");i.dropzone=this.dropzone,i.target=this.target,this.dropzone.fire(i)}else this.dropzone.fire(new a(e,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(V.BaseEvent);Z.DropEvent=rt;var it={};function ot(t,e){for(var n=0;n<t.slice().length;n++){var r=t.slice()[n],i=r.dropzone,o=r.element;e.dropzone=i,e.target=o,i.fire(e),e.propagationStopped=e.immediatePropagationStopped=!1}}function at(t,e){for(var n=function(t,e){for(var n=t.interactables,r=[],i=0;i<n.list.length;i++){var a=n.list[i];if(a.options.drop.enabled){var s=a.options.drop.accept;if(!(o.default.element(s)&&s!==e||o.default.string(s)&&!_.matchesSelector(e,s)||o.default.func(s)&&!s({dropzone:a,draggableElement:e})))for(var u=o.default.string(a.target)?a._context.querySelectorAll(a.target):o.default.array(a.target)?a.target:[a.target],c=0;c<u.length;c++){var l=u[c];l!==e&&r.push({dropzone:a,element:l,rect:a.getRect(l)})}}}return r}(t,e),r=0;r<n.length;r++){var i=n[r];i.rect=i.dropzone.getRect(i.element)}return n}function st(t,e,n){for(var r=t.dropState,i=t.interactable,o=t.element,a=[],s=0;s<r.activeDrops.length;s++){var u=r.activeDrops[s],c=u.dropzone,l=u.element,f=u.rect;a.push(c.dropCheck(e,n,i,o,l,f)?l:null)}var h=_.indexOfDeepestElement(a);return r.activeDrops[h]||null}function ut(t,e,n){var r=t.dropState,i={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return"dragstart"===n.type&&(i.activate=new Z.DropEvent(r,n,"dropactivate"),i.activate.target=null,i.activate.dropzone=null),"dragend"===n.type&&(i.deactivate=new Z.DropEvent(r,n,"dropdeactivate"),i.deactivate.target=null,i.deactivate.dropzone=null),r.rejected||(r.cur.element!==r.prev.element&&(r.prev.dropzone&&(i.leave=new Z.DropEvent(r,n,"dragleave"),n.dragLeave=i.leave.target=r.prev.element,n.prevDropzone=i.leave.dropzone=r.prev.dropzone),r.cur.dropzone&&(i.enter=new Z.DropEvent(r,n,"dragenter"),n.dragEnter=r.cur.element,n.dropzone=r.cur.dropzone)),"dragend"===n.type&&r.cur.dropzone&&(i.drop=new Z.DropEvent(r,n,"drop"),n.dropzone=r.cur.dropzone,n.relatedTarget=r.cur.element),"dragmove"===n.type&&r.cur.dropzone&&(i.move=new Z.DropEvent(r,n,"dropmove"),i.move.dragmove=n,n.dropzone=r.cur.dropzone)),i}function ct(t,e){var n=t.dropState,r=n.activeDrops,i=n.cur,o=n.prev;e.leave&&o.dropzone.fire(e.leave),e.enter&&i.dropzone.fire(e.enter),e.move&&i.dropzone.fire(e.move),e.drop&&i.dropzone.fire(e.drop),e.deactivate&&ot(r,e.deactivate),n.prev.dropzone=i.dropzone,n.prev.element=i.element}function lt(t,e){var n=t.interaction,r=t.iEvent,i=t.event;if("dragmove"===r.type||"dragend"===r.type){var o=n.dropState;e.dynamicDrop&&(o.activeDrops=at(e,n.element));var a=r,s=st(n,a,i);o.rejected=o.rejected&&!!s&&s.dropzone===o.cur.dropzone&&s.element===o.cur.element,o.cur.dropzone=s&&s.dropzone,o.cur.element=s&&s.element,o.events=ut(n,0,a)}}Object.defineProperty(it,"__esModule",{value:!0}),it.default=void 0;var ft={id:"actions/drop",install:function(t){var e=t.actions,n=t.interactStatic,r=t.Interactable,i=t.defaults;t.usePlugin(l.default),r.prototype.dropzone=function(t){return function(t,e){if(o.default.object(e)){if(t.options.drop.enabled=!1!==e.enabled,e.listeners){var n=(0,I.default)(e.listeners),r=Object.keys(n).reduce((function(t,e){return t[/^(enter|leave)/.test(e)?"drag".concat(e):/^(activate|deactivate|move)/.test(e)?"drop".concat(e):e]=n[e],t}),{});t.off(t.options.drop.listeners),t.on(r),t.options.drop.listeners=r}return o.default.func(e.ondrop)&&t.on("drop",e.ondrop),o.default.func(e.ondropactivate)&&t.on("dropactivate",e.ondropactivate),o.default.func(e.ondropdeactivate)&&t.on("dropdeactivate",e.ondropdeactivate),o.default.func(e.ondragenter)&&t.on("dragenter",e.ondragenter),o.default.func(e.ondragleave)&&t.on("dragleave",e.ondragleave),o.default.func(e.ondropmove)&&t.on("dropmove",e.ondropmove),/^(pointer|center)$/.test(e.overlap)?t.options.drop.overlap=e.overlap:o.default.number(e.overlap)&&(t.options.drop.overlap=Math.max(Math.min(1,e.overlap),0)),"accept"in e&&(t.options.drop.accept=e.accept),"checker"in e&&(t.options.drop.checker=e.checker),t}return o.default.bool(e)?(t.options.drop.enabled=e,t):t.options.drop}(this,t)},r.prototype.dropCheck=function(t,e,n,r,i,a){return function(t,e,n,r,i,a,s){var u=!1;if(!(s=s||t.getRect(a)))return!!t.options.drop.checker&&t.options.drop.checker(e,n,u,t,a,r,i);var c=t.options.drop.overlap;if("pointer"===c){var l=(0,A.default)(r,i,"drag"),f=N.getPageXY(e);f.x+=l.x,f.y+=l.y;var h=f.x>s.left&&f.x<s.right,d=f.y>s.top&&f.y<s.bottom;u=h&&d}var p=r.getRect(i);if(p&&"center"===c){var v=p.left+p.width/2,g=p.top+p.height/2;u=v>=s.left&&v<=s.right&&g>=s.top&&g<=s.bottom}return p&&o.default.number(c)&&(u=Math.max(0,Math.min(s.right,p.right)-Math.max(s.left,p.left))*Math.max(0,Math.min(s.bottom,p.bottom)-Math.max(s.top,p.top))/(p.width*p.height)>=c),t.options.drop.checker&&(u=t.options.drop.checker(e,n,u,t,a,r,i)),u}(this,t,e,n,r,i,a)},n.dynamicDrop=function(e){return o.default.bool(e)?(t.dynamicDrop=e,n):t.dynamicDrop},(0,C.default)(e.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),e.methodDict.drop="dropzone",t.dynamicDrop=!1,i.actions.drop=ft.defaults},listeners:{"interactions:before-action-start":function(t){var e=t.interaction;"drag"===e.prepared.name&&(e.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,e){var n=t.interaction,r=(t.event,t.iEvent);if("drag"===n.prepared.name){var i=n.dropState;i.activeDrops=null,i.events=null,i.activeDrops=at(e,n.element),i.events=ut(n,0,r),i.events.activate&&(ot(i.activeDrops,i.events.activate),e.fire("actions/drop:start",{interaction:n,dragEvent:r}))}},"interactions:action-move":lt,"interactions:after-action-move":function(t,e){var n=t.interaction,r=t.iEvent;"drag"===n.prepared.name&&(ct(n,n.dropState.events),e.fire("actions/drop:move",{interaction:n,dragEvent:r}),n.dropState.events={})},"interactions:action-end":function(t,e){if("drag"===t.interaction.prepared.name){var n=t.interaction,r=t.iEvent;lt(t,e),ct(n,n.dropState.events),e.fire("actions/drop:end",{interaction:n,dragEvent:r})}},"interactions:stop":function(t){var e=t.interaction;if("drag"===e.prepared.name){var n=e.dropState;n&&(n.activeDrops=null,n.events=null,n.cur.dropzone=null,n.cur.element=null,n.prev.dropzone=null,n.prev.element=null,n.rejected=!1)}}},getActiveDrops:at,getDrop:st,getDropEvents:ut,fireDropEvents:ct,defaults:{enabled:!1,accept:null,overlap:"pointer"}},ht=ft;it.default=ht;var dt={};function pt(t){var e=t.interaction,n=t.iEvent,r=t.phase;if("gesture"===e.prepared.name){var i=e.pointers.map((function(t){return t.pointer})),a="start"===r,s="end"===r,u=e.interactable.options.deltaSource;if(n.touches=[i[0],i[1]],a)n.distance=N.touchDistance(i,u),n.box=N.touchBBox(i),n.scale=1,n.ds=0,n.angle=N.touchAngle(i,u),n.da=0,e.gesture.startDistance=n.distance,e.gesture.startAngle=n.angle;else if(s){var c=e.prevEvent;n.distance=c.distance,n.box=c.box,n.scale=c.scale,n.ds=0,n.angle=c.angle,n.da=0}else n.distance=N.touchDistance(i,u),n.box=N.touchBBox(i),n.scale=n.distance/e.gesture.startDistance,n.angle=N.touchAngle(i,u),n.ds=n.scale-e.gesture.scale,n.da=n.angle-e.gesture.angle;e.gesture.distance=n.distance,e.gesture.angle=n.angle,o.default.number(n.scale)&&n.scale!==1/0&&!isNaN(n.scale)&&(e.gesture.scale=n.scale)}}Object.defineProperty(dt,"__esModule",{value:!0}),dt.default=void 0;var vt={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var e=t.actions,n=t.Interactable,r=t.defaults;n.prototype.gesturable=function(t){return o.default.object(t)?(this.options.gesture.enabled=!1!==t.enabled,this.setPerAction("gesture",t),this.setOnEvents("gesture",t),this):o.default.bool(t)?(this.options.gesture.enabled=t,this):this.options.gesture},e.map.gesture=vt,e.methodDict.gesture="gesturable",r.actions.gesture=vt.defaults},listeners:{"interactions:action-start":pt,"interactions:action-move":pt,"interactions:action-end":pt,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var e=t.interactable.options.gesture;if(e&&e.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""}},gt=vt;dt.default=gt;var mt={};function yt(t,e,n,r,i,a,s){if(!e)return!1;if(!0===e){var u=o.default.number(a.width)?a.width:a.right-a.left,c=o.default.number(a.height)?a.height:a.bottom-a.top;if(s=Math.min(s,Math.abs(("left"===t||"right"===t?u:c)/2)),u<0&&("left"===t?t="right":"right"===t&&(t="left")),c<0&&("top"===t?t="bottom":"bottom"===t&&(t="top")),"left"===t){var l=u>=0?a.left:a.right;return n.x<l+s}if("top"===t){var f=c>=0?a.top:a.bottom;return n.y<f+s}if("right"===t)return n.x>(u>=0?a.right:a.left)-s;if("bottom"===t)return n.y>(c>=0?a.bottom:a.top)-s}return!!o.default.element(r)&&(o.default.element(e)?e===r:_.matchesUpTo(r,e,i))}function bt(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.resizeAxes){var r=e;n.interactable.options.resize.square?("y"===n.resizeAxes?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=n.resizeAxes,"x"===n.resizeAxes?r.delta.y=0:"y"===n.resizeAxes&&(r.delta.x=0))}}Object.defineProperty(mt,"__esModule",{value:!0}),mt.default=void 0;var wt={id:"actions/resize",before:["actions/drag"],install:function(t){var e=t.actions,n=t.browser,r=t.Interactable,i=t.defaults;wt.cursors=function(t){return t.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(n),wt.defaultMargin=n.supportsTouch||n.supportsPointerEvent?20:10,r.prototype.resizable=function(e){return function(t,e,n){return o.default.object(e)?(t.options.resize.enabled=!1!==e.enabled,t.setPerAction("resize",e),t.setOnEvents("resize",e),o.default.string(e.axis)&&/^x$|^y$|^xy$/.test(e.axis)?t.options.resize.axis=e.axis:null===e.axis&&(t.options.resize.axis=n.defaults.actions.resize.axis),o.default.bool(e.preserveAspectRatio)?t.options.resize.preserveAspectRatio=e.preserveAspectRatio:o.default.bool(e.square)&&(t.options.resize.square=e.square),t):o.default.bool(e)?(t.options.resize.enabled=e,t):t.options.resize}(this,e,t)},e.map.resize=wt,e.methodDict.resize="resizable",i.actions.resize=wt.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){!function(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var r=e,i=n.rect;n._rects={start:(0,C.default)({},i),corrected:(0,C.default)({},i),previous:(0,C.default)({},i),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},r.edges=n.prepared.edges,r.rect=n._rects.corrected,r.deltaRect=n._rects.delta}}(t),bt(t)},"interactions:action-move":function(t){!function(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var r=e,i=n.interactable.options.resize.invert,o="reposition"===i||"negate"===i,a=n.rect,s=n._rects,u=s.start,c=s.corrected,l=s.delta,f=s.previous;if((0,C.default)(f,c),o){if((0,C.default)(c,a),"reposition"===i){if(c.top>c.bottom){var h=c.top;c.top=c.bottom,c.bottom=h}if(c.left>c.right){var d=c.left;c.left=c.right,c.right=d}}}else c.top=Math.min(a.top,u.bottom),c.bottom=Math.max(a.bottom,u.top),c.left=Math.min(a.left,u.right),c.right=Math.max(a.right,u.left);for(var p in c.width=c.right-c.left,c.height=c.bottom-c.top,c)l[p]=c[p]-f[p];r.edges=n.prepared.edges,r.rect=c,r.deltaRect=l}}(t),bt(t)},"interactions:action-end":function(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var r=e;r.edges=n.prepared.edges,r.rect=n._rects.corrected,r.deltaRect=n._rects.delta}},"auto-start:check":function(t){var e=t.interaction,n=t.interactable,r=t.element,i=t.rect,a=t.buttons;if(i){var s=(0,C.default)({},e.coords.cur.page),u=n.options.resize;if(u&&u.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||0!=(a&u.mouseButtons))){if(o.default.object(u.edges)){var c={left:!1,right:!1,top:!1,bottom:!1};for(var l in c)c[l]=yt(l,u.edges[l],s,e._latestPointer.eventTarget,r,i,u.margin||wt.defaultMargin);c.left=c.left&&!c.right,c.top=c.top&&!c.bottom,(c.left||c.right||c.top||c.bottom)&&(t.action={name:"resize",edges:c})}else{var f="y"!==u.axis&&s.x>i.right-wt.defaultMargin,h="x"!==u.axis&&s.y>i.bottom-wt.defaultMargin;(f||h)&&(t.action={name:"resize",axes:(f?"x":"")+(h?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var e=t.edges,n=t.axis,r=t.name,i=wt.cursors,o=null;if(n)o=i[r+n];else if(e){for(var a="",s=["top","bottom","left","right"],u=0;u<s.length;u++){var c=s[u];e[c]&&(a+=c)}o=i[a]}return o},defaultMargin:null},xt=wt;mt.default=xt;var _t={};Object.defineProperty(_t,"__esModule",{value:!0}),_t.default=void 0;var St={id:"actions",install:function(t){t.usePlugin(dt.default),t.usePlugin(mt.default),t.usePlugin(l.default),t.usePlugin(it.default)}};_t.default=St;var kt={};Object.defineProperty(kt,"__esModule",{value:!0}),kt.default=void 0;var Pt,Et,Ot=0,Tt={request:function(t){return Pt(t)},cancel:function(t){return Et(t)},init:function(t){if(Pt=t.requestAnimationFrame,Et=t.cancelAnimationFrame,!Pt)for(var e=["ms","moz","webkit","o"],n=0;n<e.length;n++){var r=e[n];Pt=t["".concat(r,"RequestAnimationFrame")],Et=t["".concat(r,"CancelAnimationFrame")]||t["".concat(r,"CancelRequestAnimationFrame")]}Pt=Pt&&Pt.bind(t),Et=Et&&Et.bind(t),Pt||(Pt=function(e){var n=Date.now(),r=Math.max(0,16-(n-Ot)),i=t.setTimeout((function(){e(n+r)}),r);return Ot=n+r,i},Et=function(t){return clearTimeout(t)})}};kt.default=Tt;var Ct={};Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.default=void 0,Ct.getContainer=Mt,Ct.getScroll=Rt,Ct.getScrollSize=function(t){return o.default.window(t)&&(t=window.document.body),{x:t.scrollWidth,y:t.scrollHeight}},Ct.getScrollSizeDelta=function(t,e){var n=t.interaction,r=t.element,i=n&&n.interactable.options[n.prepared.name].autoScroll;if(!i||!i.enabled)return e(),{x:0,y:0};var o=Mt(i.container,n.interactable,r),a=Rt(o);e();var s=Rt(o);return{x:s.x-a.x,y:s.y-a.y}};var jt={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(t){jt.isScrolling=!0,kt.default.cancel(jt.i),t.autoScroll=jt,jt.interaction=t,jt.prevTime=jt.now(),jt.i=kt.default.request(jt.scroll)},stop:function(){jt.isScrolling=!1,jt.interaction&&(jt.interaction.autoScroll=null),kt.default.cancel(jt.i)},scroll:function(){var t=jt.interaction,e=t.interactable,n=t.element,r=t.prepared.name,i=e.options[r].autoScroll,a=Mt(i.container,e,n),s=jt.now(),u=(s-jt.prevTime)/1e3,c=i.speed*u;if(c>=1){var l={x:jt.x*c,y:jt.y*c};if(l.x||l.y){var f=Rt(a);o.default.window(a)?a.scrollBy(l.x,l.y):a&&(a.scrollLeft+=l.x,a.scrollTop+=l.y);var h=Rt(a),d={x:h.x-f.x,y:h.y-f.y};(d.x||d.y)&&e.fire({type:"autoscroll",target:n,interactable:e,delta:d,interaction:t,container:a})}jt.prevTime=s}jt.isScrolling&&(kt.default.cancel(jt.i),jt.i=kt.default.request(jt.scroll))},check:function(t,e){var n;return null==(n=t.options[e].autoScroll)?void 0:n.enabled},onInteractionMove:function(t){var e=t.interaction,n=t.pointer;if(e.interacting()&&jt.check(e.interactable,e.prepared.name))if(e.simulation)jt.x=jt.y=0;else{var r,i,a,s,u=e.interactable,c=e.element,l=e.prepared.name,f=u.options[l].autoScroll,h=Mt(f.container,u,c);if(o.default.window(h))s=n.clientX<jt.margin,r=n.clientY<jt.margin,i=n.clientX>h.innerWidth-jt.margin,a=n.clientY>h.innerHeight-jt.margin;else{var d=_.getElementClientRect(h);s=n.clientX<d.left+jt.margin,r=n.clientY<d.top+jt.margin,i=n.clientX>d.right-jt.margin,a=n.clientY>d.bottom-jt.margin}jt.x=i?1:s?-1:0,jt.y=a?1:r?-1:0,jt.isScrolling||(jt.margin=f.margin,jt.speed=f.speed,jt.start(e))}}};function Mt(t,n,r){return(o.default.string(t)?(0,j.getStringOptionResult)(t,n,r):t)||(0,e.getWindow)(r)}function Rt(t){return o.default.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var At={id:"auto-scroll",install:function(t){var e=t.defaults,n=t.actions;t.autoScroll=jt,jt.now=function(){return t.now()},n.phaselessTypes.autoscroll=!0,e.perAction.autoScroll=jt.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,jt.stop(),jt.interaction&&(jt.interaction=null)},"interactions:stop":jt.stop,"interactions:action-move":function(t){return jt.onInteractionMove(t)}}},It=At;Ct.default=It;var Lt={};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.copyAction=function(t,e){return t.name=e.name,t.axis=e.axis,t.edges=e.edges,t},Lt.sign=void 0,Lt.warnOnce=function(t,n){var r=!1;return function(){return r||(e.window.console.warn(n),r=!0),t.apply(this,arguments)}},Lt.sign=function(t){return t>=0?1:-1};var Dt={};function $t(t){return o.default.bool(t)?(this.options.styleCursor=t,this):null===t?(delete this.options.styleCursor,this):this.options.styleCursor}function Nt(t){return o.default.func(t)?(this.options.actionChecker=t,this):null===t?(delete this.options.actionChecker,this):this.options.actionChecker}Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.default=void 0;var Ft={id:"auto-start/interactableMethods",install:function(t){var e=t.Interactable;e.prototype.getAction=function(e,n,r,i){var o=function(t,e,n,r,i){var o=t.getRect(r),a={action:null,interactable:t,interaction:n,element:r,rect:o,buttons:e.buttons||{0:1,1:4,3:8,4:16}[e.button]};return i.fire("auto-start:check",a),a.action}(this,n,r,i,t);return this.options.actionChecker?this.options.actionChecker(e,n,o,this,i,r):o},e.prototype.ignoreFrom=(0,Lt.warnOnce)((function(t){return this._backCompatOption("ignoreFrom",t)}),"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),e.prototype.allowFrom=(0,Lt.warnOnce)((function(t){return this._backCompatOption("allowFrom",t)}),"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),e.prototype.actionChecker=Nt,e.prototype.styleCursor=$t}};Dt.default=Ft;var Bt={};function Ut(t,e,n,r,i){return e.testIgnoreAllow(e.options[t.name],n,r)&&e.options[t.name].enabled&&Vt(e,n,t,i)?t:null}function zt(t,e,n,r,i,o,a){for(var s=0,u=r.length;s<u;s++){var c=r[s],l=i[s],f=c.getAction(e,n,t,l);if(f){var h=Ut(f,c,l,o,a);if(h)return{action:h,interactable:c,element:l}}}return{action:null,interactable:null,element:null}}function Wt(t,e,n,r,i){var a=[],s=[],u=r;function c(t){a.push(t),s.push(u)}for(;o.default.element(u);){a=[],s=[],i.interactables.forEachMatch(u,c);var l=zt(t,e,n,a,s,r,i);if(l.action&&!l.interactable.options[l.action.name].manualStart)return l;u=_.parentNode(u)}return{action:null,interactable:null,element:null}}function Ht(t,e,n){var r=e.action,i=e.interactable,o=e.element;r=r||{name:null},t.interactable=i,t.element=o,(0,Lt.copyAction)(t.prepared,r),t.rect=i&&r.name?i.getRect(o):null,Xt(t,n),n.fire("autoStart:prepared",{interaction:t})}function Vt(t,e,n,r){var i=t.options,o=i[n.name].max,a=i[n.name].maxPerElement,s=r.autoStart.maxInteractions,u=0,c=0,l=0;if(!(o&&a&&s))return!1;for(var f=0;f<r.interactions.list.length;f++){var h=r.interactions.list[f],d=h.prepared.name;if(h.interacting()){if(++u>=s)return!1;if(h.interactable===t){if((c+=d===n.name?1:0)>=o)return!1;if(h.element===e&&(l++,d===n.name&&l>=a))return!1}}}return s>0}function Gt(t,e){return o.default.number(t)?(e.autoStart.maxInteractions=t,this):e.autoStart.maxInteractions}function Yt(t,e,n){var r=n.autoStart.cursorElement;r&&r!==t&&(r.style.cursor=""),t.ownerDocument.documentElement.style.cursor=e,t.style.cursor=e,n.autoStart.cursorElement=e?t:null}function Xt(t,e){var n=t.interactable,r=t.element,i=t.prepared;if("mouse"===t.pointerType&&n&&n.options.styleCursor){var a="";if(i.name){var s=n.options[i.name].cursorChecker;a=o.default.func(s)?s(i,n,r,t._interacting):e.actions.map[i.name].getCursor(i)}Yt(t.element,a||"",e)}else e.autoStart.cursorElement&&Yt(e.autoStart.cursorElement,"",e)}Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.default=void 0;var qt={id:"auto-start/base",before:["actions"],install:function(t){var e=t.interactStatic,n=t.defaults;t.usePlugin(Dt.default),n.base.actionChecker=null,n.base.styleCursor=!0,(0,C.default)(n.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),e.maxInteractions=function(e){return Gt(e,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:Vt,cursorElement:null}},listeners:{"interactions:down":function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;n.interacting()||Ht(n,Wt(n,r,i,o,e),e)},"interactions:move":function(t,e){!function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;"mouse"!==n.pointerType||n.pointerIsDown||n.interacting()||Ht(n,Wt(n,r,i,o,e),e)}(t,e),function(t,e){var n=t.interaction;if(n.pointerIsDown&&!n.interacting()&&n.pointerWasMoved&&n.prepared.name){e.fire("autoStart:before-start",t);var r=n.interactable,i=n.prepared.name;i&&r&&(r.options[i].manualStart||!Vt(r,n.element,n.prepared,e)?n.stop():(n.start(n.prepared,r,n.element),Xt(n,e)))}}(t,e)},"interactions:stop":function(t,e){var n=t.interaction,r=n.interactable;r&&r.options.styleCursor&&Yt(n.element,"",e)}},maxInteractions:Gt,withinInteractionLimit:Vt,validateAction:Ut},Kt=qt;Bt.default=Kt;var Zt={};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.default=void 0;var Jt={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,e){var n=t.interaction,r=t.eventTarget,i=t.dx,a=t.dy;if("drag"===n.prepared.name){var s=Math.abs(i),u=Math.abs(a),c=n.interactable.options.drag,l=c.startAxis,f=s>u?"x":s<u?"y":"xy";if(n.prepared.axis="start"===c.lockAxis?f[0]:c.lockAxis,"xy"!==f&&"xy"!==l&&l!==f){n.prepared.name=null;for(var h=r,d=function(t){if(t!==n.interactable){var i=n.interactable.options.drag;if(!i.manualStart&&t.testIgnoreAllow(i,h,r)){var o=t.getAction(n.downPointer,n.downEvent,n,h);if(o&&"drag"===o.name&&function(t,e){if(!e)return!1;var n=e.options.drag.startAxis;return"xy"===t||"xy"===n||n===t}(f,t)&&Bt.default.validateAction(o,t,h,r,e))return t}}};o.default.element(h);){var p=e.interactables.forEachMatch(h,d);if(p){n.prepared.name="drag",n.interactable=p,n.element=h;break}h=(0,_.parentNode)(h)}}}}}};Zt.default=Jt;var Qt={};function te(t){var e=t.prepared&&t.prepared.name;if(!e)return null;var n=t.interactable.options;return n[e].hold||n[e].delay}Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.default=void 0;var ee={id:"auto-start/hold",install:function(t){var e=t.defaults;t.usePlugin(Bt.default),e.perAction.hold=0,e.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var e=t.interaction,n=te(e);n>0&&(e.autoStartHoldTimer=setTimeout((function(){e.start(e.prepared,e.interactable,e.element)}),n))},"interactions:move":function(t){var e=t.interaction,n=t.duplicate;e.autoStartHoldTimer&&e.pointerWasMoved&&!n&&(clearTimeout(e.autoStartHoldTimer),e.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var e=t.interaction;te(e)>0&&(e.prepared.name=null)}},getHoldDuration:te},ne=ee;Qt.default=ne;var re={};Object.defineProperty(re,"__esModule",{value:!0}),re.default=void 0;var ie={id:"auto-start",install:function(t){t.usePlugin(Bt.default),t.usePlugin(Qt.default),t.usePlugin(Zt.default)}};re.default=ie;var oe={};function ae(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):o.default.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault}function se(t){var e=t.interaction,n=t.event;e.interactable&&e.interactable.checkAndPreventDefault(n)}function ue(t){var n=t.Interactable;n.prototype.preventDefault=ae,n.prototype.checkAndPreventDefault=function(n){return function(t,n,r){var i=t.options.preventDefault;if("never"!==i)if("always"!==i){if(n.events.supportsPassive&&/^touch(start|move)$/.test(r.type)){var a=(0,e.getWindow)(r.target).document,s=n.getDocOptions(a);if(!s||!s.events||!1!==s.events.passive)return}/^(mouse|pointer|touch)*(down|start)/i.test(r.type)||o.default.element(r.target)&&(0,_.matchesSelector)(r.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||r.preventDefault()}else r.preventDefault()}(this,t,n)},t.interactions.docEvents.push({type:"dragstart",listener:function(e){for(var n=0;n<t.interactions.list.length;n++){var r=t.interactions.list[n];if(r.element&&(r.element===e.target||(0,_.nodeContains)(r.element,e.target)))return void r.interactable.checkAndPreventDefault(e)}}})}Object.defineProperty(oe,"__esModule",{value:!0}),oe.default=void 0,oe.install=ue;var ce={id:"core/interactablePreventDefault",install:ue,listeners:["down","move","up","cancel"].reduce((function(t,e){return t["interactions:".concat(e)]=se,t}),{})};oe.default=ce;var le={};Object.defineProperty(le,"__esModule",{value:!0}),le.default=void 0,le.default={};var fe,he={};Object.defineProperty(he,"__esModule",{value:!0}),he.default=void 0,function(t){t.touchAction="touchAction",t.boxSizing="boxSizing",t.noListeners="noListeners"}(fe||(fe={})),fe.touchAction,fe.boxSizing,fe.noListeners;he.default={id:"dev-tools",install:function(){}};var de={};Object.defineProperty(de,"__esModule",{value:!0}),de.default=function t(e){var n={};for(var r in e){var i=e[r];o.default.plainObject(i)?n[r]=t(i):o.default.array(i)?n[r]=X.from(i):n[r]=i}return n};var pe={};function ve(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ge(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ge(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ge(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function me(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(pe,"__esModule",{value:!0}),pe.default=void 0,pe.getRectOffset=we;var ye=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),me(this,"states",[]),me(this,"startOffset",{left:0,right:0,top:0,bottom:0}),me(this,"startDelta",void 0),me(this,"result",void 0),me(this,"endResult",void 0),me(this,"startEdges",void 0),me(this,"edges",void 0),me(this,"interaction",void 0),this.interaction=e,this.result=be(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}var e,n;return e=t,(n=[{key:"start",value:function(t,e){var n=t.phase,r=this.interaction,i=function(t){var e=t.interactable.options[t.prepared.name],n=e.modifiers;return n&&n.length?n:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map((function(t){var n=e[t];return n&&n.enabled&&{options:n,methods:n._methods}})).filter((function(t){return!!t}))}(r);this.prepareStates(i),this.startEdges=(0,C.default)({},r.edges),this.edges=(0,C.default)({},this.startEdges),this.startOffset=we(r.rect,e),this.startDelta={x:0,y:0};var o=this.fillArg({phase:n,pageCoords:e,preEnd:!1});return this.result=be(),this.startAll(o),this.result=this.setAll(o)}},{key:"fillArg",value:function(t){var e=this.interaction;return t.interaction=e,t.interactable=e.interactable,t.element=e.element,t.rect||(t.rect=e.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var e=0;e<this.states.length;e++){var n=this.states[e];n.methods.start&&(t.state=n,n.methods.start(t))}}},{key:"setAll",value:function(t){var e=t.phase,n=t.preEnd,r=t.skipModifiers,i=t.rect,o=t.edges;t.coords=(0,C.default)({},t.pageCoords),t.rect=(0,C.default)({},i),t.edges=(0,C.default)({},o);for(var a=r?this.states.slice(r):this.states,s=be(t.coords,t.rect),u=0;u<a.length;u++){var c,l=a[u],f=l.options,h=(0,C.default)({},t.coords),d=null;null!=(c=l.methods)&&c.set&&this.shouldDo(f,n,e)&&(t.state=l,d=l.methods.set(t),j.addEdges(t.edges,t.rect,{x:t.coords.x-h.x,y:t.coords.y-h.y})),s.eventProps.push(d)}(0,C.default)(this.edges,t.edges),s.delta.x=t.coords.x-t.pageCoords.x,s.delta.y=t.coords.y-t.pageCoords.y,s.rectDelta.left=t.rect.left-i.left,s.rectDelta.right=t.rect.right-i.right,s.rectDelta.top=t.rect.top-i.top,s.rectDelta.bottom=t.rect.bottom-i.bottom;var p=this.result.coords,v=this.result.rect;if(p&&v){var g=s.rect.left!==v.left||s.rect.right!==v.right||s.rect.top!==v.top||s.rect.bottom!==v.bottom;s.changed=g||p.x!==s.coords.x||p.y!==s.coords.y}return s}},{key:"applyToInteraction",value:function(t){var e=this.interaction,n=t.phase,r=e.coords.cur,i=e.coords.start,o=this.result,a=this.startDelta,s=o.delta;"start"===n&&(0,C.default)(this.startDelta,o.delta);for(var u=0;u<2;u++){var c=ve([[i,a],[r,s]][u],2),l=c[0],f=c[1];l.page.x+=f.x,l.page.y+=f.y,l.client.x+=f.x,l.client.y+=f.y}var h=this.result.rectDelta,d=t.rect||e.rect;d.left+=h.left,d.right+=h.right,d.top+=h.top,d.bottom+=h.bottom,d.width=d.right-d.left,d.height=d.bottom-d.top}},{key:"setAndApply",value:function(t){var e=this.interaction,n=t.phase,r=t.preEnd,i=t.skipModifiers,o=this.setAll(this.fillArg({preEnd:r,phase:n,pageCoords:t.modifiedCoords||e.coords.cur.page}));if(this.result=o,!o.changed&&(!i||i<this.states.length)&&e.interacting())return!1;if(t.modifiedCoords){var a=e.coords.cur.page,s={x:t.modifiedCoords.x-a.x,y:t.modifiedCoords.y-a.y};o.coords.x+=s.x,o.coords.y+=s.y,o.delta.x+=s.x,o.delta.y+=s.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var e=t.interaction,n=t.event,r=this.states;if(r&&r.length){for(var i=!1,o=0;o<r.length;o++){var a=r[o];t.state=a;var s=a.options,u=a.methods,c=u.beforeEnd&&u.beforeEnd(t);if(c)return this.endResult=c,!1;i=i||!i&&this.shouldDo(s,!0,t.phase,!0)}i&&e.move({event:n,preEnd:!0})}}},{key:"stop",value:function(t){var e=t.interaction;if(this.states&&this.states.length){var n=(0,C.default)({states:this.states,interactable:e.interactable,element:e.element,rect:null},t);this.fillArg(n);for(var r=0;r<this.states.length;r++){var i=this.states[r];n.state=i,i.methods.stop&&i.methods.stop(n)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var e=0;e<t.length;e++){var n=t[e],r=n.options,i=n.methods,o=n.name;this.states.push({options:r,methods:i,index:e,name:o})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var e=t.interaction,n=e.coords,r=e.rect,i=e.modification;if(i.result){for(var o=i.startDelta,a=i.result,s=a.delta,u=a.rectDelta,c=[[n.start,o],[n.cur,s]],l=0;l<c.length;l++){var f=ve(c[l],2),h=f[0],d=f[1];h.page.x-=d.x,h.page.y-=d.y,h.client.x-=d.x,h.client.y-=d.y}r.left-=u.left,r.right-=u.right,r.top-=u.top,r.bottom-=u.bottom}}},{key:"shouldDo",value:function(t,e,n,r){return!(!t||!1===t.enabled||r&&!t.endOnly||t.endOnly&&!e||"start"===n&&!t.setStart)}},{key:"copyFrom",value:function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map((function(t){return(0,de.default)(t)})),this.result=be((0,C.default)({},t.result.coords),(0,C.default)({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function be(t,e){return{rect:e,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function we(t,e){return t?{left:e.x-t.left,top:e.y-t.top,right:t.right-e.x,bottom:t.bottom-e.y}:{left:0,top:0,right:0,bottom:0}}pe.default=ye;var xe={};function _e(t){var e=t.iEvent,n=t.interaction.modification.result;n&&(e.modifiers=n.eventProps)}Object.defineProperty(xe,"__esModule",{value:!0}),xe.addEventModifiers=_e,xe.default=void 0,xe.makeModifier=function(t,e){var n=t.defaults,r={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},i=function(t){var i=t||{};for(var o in i.enabled=!1!==i.enabled,n)o in i||(i[o]=n[o]);var a={options:i,methods:r,name:e,enable:function(){return i.enabled=!0,a},disable:function(){return i.enabled=!1,a}};return a};return e&&"string"==typeof e&&(i._defaults=n,i._methods=r),i};var Se={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var e=t.interaction;e.modification=new pe.default(e)},"interactions:before-action-start":function(t){var e=t.interaction,n=t.interaction.modification;n.start(t,e.coords.start.page),e.edges=n.edges,n.applyToInteraction(t)},"interactions:before-action-move":function(t){var e=t.interaction,n=e.modification,r=n.setAndApply(t);return e.edges=n.edges,r},"interactions:before-action-end":function(t){var e=t.interaction,n=e.modification,r=n.beforeEnd(t);return e.edges=n.startEdges,r},"interactions:action-start":_e,"interactions:action-move":_e,"interactions:action-end":_e,"interactions:after-action-start":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-move":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:stop":function(t){return t.interaction.modification.stop(t)}}},ke=Se;xe.default=ke;var Pe={};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.defaults=void 0,Pe.defaults={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}};var Ee={};function Oe(t){return Oe="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},Oe(t)}function Te(t,e){return Te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Te(t,e)}function Ce(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function je(t){return je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},je(t)}function Me(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.InteractEvent=void 0;var Re=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Te(t,e)}(a,t);var e,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=je(r);if(i){var n=je(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Oe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ce(t)}(this,t)});function a(t,e,n,r,i,s,u){var c;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),Me(Ce(c=o.call(this,t)),"relatedTarget",null),Me(Ce(c),"screenX",void 0),Me(Ce(c),"screenY",void 0),Me(Ce(c),"button",void 0),Me(Ce(c),"buttons",void 0),Me(Ce(c),"ctrlKey",void 0),Me(Ce(c),"shiftKey",void 0),Me(Ce(c),"altKey",void 0),Me(Ce(c),"metaKey",void 0),Me(Ce(c),"page",void 0),Me(Ce(c),"client",void 0),Me(Ce(c),"delta",void 0),Me(Ce(c),"rect",void 0),Me(Ce(c),"x0",void 0),Me(Ce(c),"y0",void 0),Me(Ce(c),"t0",void 0),Me(Ce(c),"dt",void 0),Me(Ce(c),"duration",void 0),Me(Ce(c),"clientX0",void 0),Me(Ce(c),"clientY0",void 0),Me(Ce(c),"velocity",void 0),Me(Ce(c),"speed",void 0),Me(Ce(c),"swipe",void 0),Me(Ce(c),"axes",void 0),Me(Ce(c),"preEnd",void 0),i=i||t.element;var l=t.interactable,f=(l&&l.options||Pe.defaults).deltaSource,h=(0,A.default)(l,i,n),d="start"===r,p="end"===r,v=d?Ce(c):t.prevEvent,g=d?t.coords.start:p?{page:v.page,client:v.client,timeStamp:t.coords.cur.timeStamp}:t.coords.cur;return c.page=(0,C.default)({},g.page),c.client=(0,C.default)({},g.client),c.rect=(0,C.default)({},t.rect),c.timeStamp=g.timeStamp,p||(c.page.x-=h.x,c.page.y-=h.y,c.client.x-=h.x,c.client.y-=h.y),c.ctrlKey=e.ctrlKey,c.altKey=e.altKey,c.shiftKey=e.shiftKey,c.metaKey=e.metaKey,c.button=e.button,c.buttons=e.buttons,c.target=i,c.currentTarget=i,c.preEnd=s,c.type=u||n+(r||""),c.interactable=l,c.t0=d?t.pointers[t.pointers.length-1].downTime:v.t0,c.x0=t.coords.start.page.x-h.x,c.y0=t.coords.start.page.y-h.y,c.clientX0=t.coords.start.client.x-h.x,c.clientY0=t.coords.start.client.y-h.y,c.delta=d||p?{x:0,y:0}:{x:c[f].x-v[f].x,y:c[f].y-v[f].y},c.dt=t.coords.delta.timeStamp,c.duration=c.timeStamp-c.t0,c.velocity=(0,C.default)({},t.coords.velocity[f]),c.speed=(0,D.default)(c.velocity.x,c.velocity.y),c.swipe=p||"inertiastart"===r?c.getSwipe():null,c}return e=a,(n=[{key:"getSwipe",value:function(){var t=this._interaction;if(t.prevEvent.speed<600||this.timeStamp-t.prevEvent.timeStamp>150)return null;var e=180*Math.atan2(t.prevEvent.velocityY,t.prevEvent.velocityX)/Math.PI;e<0&&(e+=360);var n=112.5<=e&&e<247.5,r=202.5<=e&&e<337.5;return{up:r,down:!r&&22.5<=e&&e<157.5,left:n,right:!n&&(292.5<=e||e<67.5),angle:e,speed:t.prevEvent.speed,velocity:{x:t.prevEvent.velocityX,y:t.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(V.BaseEvent);Ee.InteractEvent=Re,Object.defineProperties(Re.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var Ae={};function Ie(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Le(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.PointerInfo=void 0;var De=function(t,e,n){return e&&Ie(t.prototype,e),n&&Ie(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,n,r,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Le(this,"id",void 0),Le(this,"pointer",void 0),Le(this,"event",void 0),Le(this,"downTime",void 0),Le(this,"downTarget",void 0),this.id=e,this.pointer=n,this.event=r,this.downTime=i,this.downTarget=o}));Ae.PointerInfo=De;var $e,Ne,Fe={};function Be(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.Interaction=void 0,Object.defineProperty(Fe,"PointerInfo",{enumerable:!0,get:function(){return Ae.PointerInfo}}),Fe.default=Fe._ProxyValues=Fe._ProxyMethods=void 0,Fe._ProxyValues=$e,function(t){t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy=""}($e||(Fe._ProxyValues=$e={})),Fe._ProxyMethods=Ne,function(t){t.start="",t.move="",t.end="",t.stop="",t.interacting=""}(Ne||(Fe._ProxyMethods=Ne={}));var Ue=0,ze=function(){function t(e){var n=this,r=e.pointerType,i=e.scopeFire;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Be(this,"interactable",null),Be(this,"element",null),Be(this,"rect",null),Be(this,"_rects",void 0),Be(this,"edges",null),Be(this,"_scopeFire",void 0),Be(this,"prepared",{name:null,axis:null,edges:null}),Be(this,"pointerType",void 0),Be(this,"pointers",[]),Be(this,"downEvent",null),Be(this,"downPointer",{}),Be(this,"_latestPointer",{pointer:null,event:null,eventTarget:null}),Be(this,"prevEvent",null),Be(this,"pointerIsDown",!1),Be(this,"pointerWasMoved",!1),Be(this,"_interacting",!1),Be(this,"_ending",!1),Be(this,"_stopped",!0),Be(this,"_proxy",null),Be(this,"simulation",null),Be(this,"doMove",(0,Lt.warnOnce)((function(t){this.move(t)}),"The interaction.doMove() method has been renamed to interaction.move()")),Be(this,"coords",{start:N.newCoords(),prev:N.newCoords(),cur:N.newCoords(),delta:N.newCoords(),velocity:N.newCoords()}),Be(this,"_id",Ue++),this._scopeFire=i,this.pointerType=r;var o=this;this._proxy={};var a=function(t){Object.defineProperty(n._proxy,t,{get:function(){return o[t]}})};for(var s in $e)a(s);var u=function(t){Object.defineProperty(n._proxy,t,{value:function(){return o[t].apply(o,arguments)}})};for(var c in Ne)u(c);this._scopeFire("interactions:new",{interaction:this})}var e,n;return e=t,n=[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,e,n){var r=this.updatePointer(t,e,n,!0),i=this.pointers[r];this._scopeFire("interactions:down",{pointer:t,event:e,eventTarget:n,pointerIndex:r,pointerInfo:i,type:"down",interaction:this})}},{key:"start",value:function(t,e,n){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<("gesture"===t.name?2:1)||!e.options[t.name].enabled)&&((0,Lt.copyAction)(this.prepared,t),this.interactable=e,this.element=n,this.rect=e.getRect(n),this.edges=this.prepared.edges?(0,C.default)({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(t,e,n){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,e,n,!1);var r,i,o=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(r=this.coords.cur.client.x-this.coords.start.client.x,i=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=(0,D.default)(r,i)>this.pointerMoveTolerance);var a=this.getPointerIndex(t),s={pointer:t,pointerIndex:a,pointerInfo:this.pointers[a],event:e,type:"move",eventTarget:n,dx:r,dy:i,duplicate:o,interaction:this};o||N.setCoordVelocity(this.coords.velocity,this.coords.delta),this._scopeFire("interactions:move",s),o||this.simulation||(this.interacting()&&(s.type=null,this.move(s)),this.pointerWasMoved&&N.copyCoords(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||N.setZeroCoords(this.coords.delta),(t=(0,C.default)({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{})).phase="move",this._doPhase(t)}},{key:"pointerUp",value:function(t,e,n,r){var i=this.getPointerIndex(t);-1===i&&(i=this.updatePointer(t,e,n,!1));var o=/cancel$/i.test(e.type)?"cancel":"up";this._scopeFire("interactions:".concat(o),{pointer:t,pointerIndex:i,pointerInfo:this.pointers[i],event:e,eventTarget:n,type:o,curEventTarget:r,interaction:this}),this.simulation||this.end(e),this.removePointer(t,e)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var e;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(e=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,!0===e&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var e=N.getPointerId(t);return"mouse"===this.pointerType||"pen"===this.pointerType?this.pointers.length-1:X.findIndex(this.pointers,(function(t){return t.id===e}))}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,e,n,r){var i=N.getPointerId(t),o=this.getPointerIndex(t),a=this.pointers[o];return r=!1!==r&&(r||/(down|start)$/i.test(e.type)),a?a.pointer=t:(a=new Ae.PointerInfo(i,t,e,null,null),o=this.pointers.length,this.pointers.push(a)),N.setCoords(this.coords.cur,this.pointers.map((function(t){return t.pointer})),this._now()),N.setCoordDeltas(this.coords.delta,this.coords.prev,this.coords.cur),r&&(this.pointerIsDown=!0,a.downTime=this.coords.cur.timeStamp,a.downTarget=n,N.pointerExtend(this.downPointer,t),this.interacting()||(N.copyCoords(this.coords.start,this.coords.cur),N.copyCoords(this.coords.prev,this.coords.cur),this.downEvent=e,this.pointerWasMoved=!1)),this._updateLatestPointer(t,e,n),this._scopeFire("interactions:update-pointer",{pointer:t,event:e,eventTarget:n,down:r,pointerInfo:a,pointerIndex:o,interaction:this}),o}},{key:"removePointer",value:function(t,e){var n=this.getPointerIndex(t);if(-1!==n){var r=this.pointers[n];this._scopeFire("interactions:remove-pointer",{pointer:t,event:e,eventTarget:null,pointerIndex:n,pointerInfo:r,interaction:this}),this.pointers.splice(n,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,e,n){this._latestPointer.pointer=t,this._latestPointer.event=e,this._latestPointer.eventTarget=n}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,e,n,r){return new Ee.InteractEvent(this,t,this.prepared.name,e,this.element,n,r)}},{key:"_fireEvent",value:function(t){var e;null==(e=this.interactable)||e.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var e=t.event,n=t.phase,r=t.preEnd,i=t.type,o=this.rect;if(o&&"move"===n&&(j.addEdges(this.edges,o,this.coords.delta[this.interactable.options.deltaSource]),o.width=o.right-o.left,o.height=o.bottom-o.top),!1===this._scopeFire("interactions:before-action-".concat(n),t))return!1;var a=t.iEvent=this._createPreparedEvent(e,n,r,i);return this._scopeFire("interactions:action-".concat(n),t),"start"===n&&(this.prevEvent=a),this._fireEvent(a),this._scopeFire("interactions:after-action-".concat(n),t),!0}},{key:"_now",value:function(){return Date.now()}}],n&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();Fe.Interaction=ze;var We=ze;Fe.default=We;var He={};function Ve(t){t.pointerIsDown&&(qe(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}function Ge(t){Ye(t.interaction)}function Ye(t){if(!function(t){return!(!t.offset.pending.x&&!t.offset.pending.y)}(t))return!1;var e=t.offset.pending;return qe(t.coords.cur,e),qe(t.coords.delta,e),j.addEdges(t.edges,t.rect,e),e.x=0,e.y=0,!0}function Xe(t){var e=t.x,n=t.y;this.offset.pending.x+=e,this.offset.pending.y+=n,this.offset.total.x+=e,this.offset.total.y+=n}function qe(t,e){var n=t.page,r=t.client,i=e.x,o=e.y;n.x+=i,n.y+=o,r.x+=i,r.y+=o}Object.defineProperty(He,"__esModule",{value:!0}),He.addTotal=Ve,He.applyPending=Ye,He.default=void 0,Fe._ProxyMethods.offsetBy="";var Ke={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=Xe},listeners:{"interactions:new":function(t){t.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(t){return Ve(t.interaction)},"interactions:before-action-start":Ge,"interactions:before-action-move":Ge,"interactions:before-action-end":function(t){var e=t.interaction;if(Ye(e))return e.move({offset:!0}),e.end(),!1},"interactions:stop":function(t){var e=t.interaction;e.offset.total.x=0,e.offset.total.y=0,e.offset.pending.x=0,e.offset.pending.y=0}}},Ze=Ke;He.default=Ze;var Je={};function Qe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(Je,"__esModule",{value:!0}),Je.default=Je.InertiaState=void 0;var tn=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Qe(this,"active",!1),Qe(this,"isModified",!1),Qe(this,"smoothEnd",!1),Qe(this,"allowResume",!1),Qe(this,"modification",void 0),Qe(this,"modifierCount",0),Qe(this,"modifierArg",void 0),Qe(this,"startCoords",void 0),Qe(this,"t0",0),Qe(this,"v0",0),Qe(this,"te",0),Qe(this,"targetOffset",void 0),Qe(this,"modifiedOffset",void 0),Qe(this,"currentOffset",void 0),Qe(this,"lambda_v0",0),Qe(this,"one_ve_v0",0),Qe(this,"timeout",void 0),Qe(this,"interaction",void 0),this.interaction=e}var e,n;return e=t,(n=[{key:"start",value:function(t){var e=this.interaction,n=en(e);if(!n||!n.enabled)return!1;var r=e.coords.velocity.client,i=(0,D.default)(r.x,r.y),o=this.modification||(this.modification=new pe.default(e));if(o.copyFrom(e.modification),this.t0=e._now(),this.allowResume=n.allowResume,this.v0=i,this.currentOffset={x:0,y:0},this.startCoords=e.coords.cur.page,this.modifierArg=o.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-e.coords.cur.timeStamp<50&&i>n.minSpeed&&i>n.endSpeed)this.startInertia();else{if(o.result=o.setAll(this.modifierArg),!o.result.changed)return!1;this.startSmoothEnd()}return e.modification.result.rect=null,e.offsetBy(this.targetOffset),e._doPhase({interaction:e,event:t,phase:"inertiastart"}),e.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),e.modification.result.rect=null,this.active=!0,e.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,e=this.interaction.coords.velocity.client,n=en(this.interaction),r=n.resistance,i=-Math.log(n.endSpeed/this.v0)/r;this.targetOffset={x:(e.x-i)/r,y:(e.y-i)/r},this.te=i,this.lambda_v0=r/this.v0,this.one_ve_v0=1-n.endSpeed/this.v0;var o=this.modification,a=this.modifierArg;a.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},o.result=o.setAll(a),o.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+o.result.delta.x,y:this.targetOffset.y+o.result.delta.y}),this.onNextFrame((function(){return t.inertiaTick()}))}},{key:"startSmoothEnd",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame((function(){return t.smoothEndTick()}))}},{key:"onNextFrame",value:function(t){var e=this;this.timeout=kt.default.request((function(){e.active&&t()}))}},{key:"inertiaTick",value:function(){var t,e,n,r,i,o=this,a=this.interaction,s=en(a).resistance,u=(a._now()-this.t0)/1e3;if(u<this.te){var c,l=1-(Math.exp(-s*u)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=this.targetOffset.x,e=this.targetOffset.y,n=this.modifiedOffset.x,r=this.modifiedOffset.y,c={x:rn(i=l,0,t,n),y:rn(i,0,e,r)}):c={x:this.targetOffset.x*l,y:this.targetOffset.y*l};var f={x:c.x-this.currentOffset.x,y:c.y-this.currentOffset.y};this.currentOffset.x+=f.x,this.currentOffset.y+=f.y,a.offsetBy(f),a.move(),this.onNextFrame((function(){return o.inertiaTick()}))}else a.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,e=this.interaction,n=e._now()-this.t0,r=en(e).smoothEndDuration;if(n<r){var i={x:on(n,0,this.targetOffset.x,r),y:on(n,0,this.targetOffset.y,r)},o={x:i.x-this.currentOffset.x,y:i.y-this.currentOffset.y};this.currentOffset.x+=o.x,this.currentOffset.y+=o.y,e.offsetBy(o),e.move({skipModifiers:this.modifierCount}),this.onNextFrame((function(){return t.smoothEndTick()}))}else e.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var e=t.pointer,n=t.event,r=t.eventTarget,i=this.interaction;i.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),i.updatePointer(e,n,r,!0),i._doPhase({interaction:i,event:n,phase:"resume"}),(0,N.copyCoords)(i.coords.prev,i.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,kt.default.cancel(this.timeout)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function en(t){var e=t.interactable,n=t.prepared;return e&&e.options&&n.name&&e.options[n.name].inertia}Je.InertiaState=tn;var nn={id:"inertia",before:["modifiers","actions"],install:function(t){var e=t.defaults;t.usePlugin(He.default),t.usePlugin(xe.default),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,e.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(t){var e=t.interaction;e.inertia=new tn(e)},"interactions:before-action-end":function(t){var e=t.interaction,n=t.event;return(!e._interacting||e.simulation||!e.inertia.start(n))&&null},"interactions:down":function(t){var e=t.interaction,n=t.eventTarget,r=e.inertia;if(r.active)for(var i=n;o.default.element(i);){if(i===e.element){r.resume(t);break}i=_.parentNode(i)}},"interactions:stop":function(t){var e=t.interaction.inertia;e.active&&e.stop()},"interactions:before-action-resume":function(t){var e=t.interaction.modification;e.stop(t),e.start(t,t.interaction.coords.cur.page),e.applyToInteraction(t)},"interactions:before-action-inertiastart":function(t){return t.interaction.modification.setAndApply(t)},"interactions:action-resume":xe.addEventModifiers,"interactions:action-inertiastart":xe.addEventModifiers,"interactions:after-action-inertiastart":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-resume":function(t){return t.interaction.modification.restoreInteractionCoords(t)}}};function rn(t,e,n,r){var i=1-t;return i*i*e+2*i*t*n+t*t*r}function on(t,e,n,r){return-n*(t/=r)*(t-2)+e}var an=nn;Je.default=an;var sn={};function un(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cn(t,e){for(var n=0;n<e.length;n++){var r=e[n];if(t.immediatePropagationStopped)break;r(t)}}Object.defineProperty(sn,"__esModule",{value:!0}),sn.Eventable=void 0;var ln=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),un(this,"options",void 0),un(this,"types",{}),un(this,"propagationStopped",!1),un(this,"immediatePropagationStopped",!1),un(this,"global",void 0),this.options=(0,C.default)({},e||{})}var e,n;return e=t,(n=[{key:"fire",value:function(t){var e,n=this.global;(e=this.types[t.type])&&cn(t,e),!t.propagationStopped&&n&&(e=n[t.type])&&cn(t,e)}},{key:"on",value:function(t,e){var n=(0,I.default)(t,e);for(t in n)this.types[t]=X.merge(this.types[t]||[],n[t])}},{key:"off",value:function(t,e){var n=(0,I.default)(t,e);for(t in n){var r=this.types[t];if(r&&r.length)for(var i=0;i<n[t].length;i++){var o=n[t][i],a=r.indexOf(o);-1!==a&&r.splice(a,1)}}}},{key:"getRect",value:function(t){return null}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();sn.Eventable=ln;var fn={};Object.defineProperty(fn,"__esModule",{value:!0}),fn.default=function(t,e){if(e.phaselessTypes[t])return!0;for(var n in e.map)if(0===t.indexOf(n)&&t.substr(n.length)in e.phases)return!0;return!1};var hn={};Object.defineProperty(hn,"__esModule",{value:!0}),hn.createInteractStatic=function(t){var e=function e(n,r){var i=t.interactables.get(n,r);return i||((i=t.interactables.new(n,r)).events.global=e.globalEvents),i};return e.getPointerAverage=N.pointerAverage,e.getTouchBBox=N.touchBBox,e.getTouchDistance=N.touchDistance,e.getTouchAngle=N.touchAngle,e.getElementRect=_.getElementRect,e.getElementClientRect=_.getElementClientRect,e.matchesSelector=_.matchesSelector,e.closest=_.closest,e.globalEvents={},e.version="1.10.18",e.scope=t,e.use=function(t,e){return this.scope.usePlugin(t,e),this},e.isSet=function(t,e){return!!this.scope.interactables.get(t,e&&e.context)},e.on=(0,Lt.warnOnce)((function(t,e,n){if(o.default.string(t)&&-1!==t.search(" ")&&(t=t.trim().split(/ +/)),o.default.array(t)){for(var r=0;r<t.length;r++){var i=t[r];this.on(i,e,n)}return this}if(o.default.object(t)){for(var a in t)this.on(a,t[a],e);return this}return(0,fn.default)(t,this.scope.actions)?this.globalEvents[t]?this.globalEvents[t].push(e):this.globalEvents[t]=[e]:this.scope.events.add(this.scope.document,t,e,{options:n}),this}),"The interact.on() method is being deprecated"),e.off=(0,Lt.warnOnce)((function(t,e,n){if(o.default.string(t)&&-1!==t.search(" ")&&(t=t.trim().split(/ +/)),o.default.array(t)){for(var r=0;r<t.length;r++){var i=t[r];this.off(i,e,n)}return this}if(o.default.object(t)){for(var a in t)this.off(a,t[a],e);return this}var s;return(0,fn.default)(t,this.scope.actions)?t in this.globalEvents&&-1!==(s=this.globalEvents[t].indexOf(e))&&this.globalEvents[t].splice(s,1):this.scope.events.remove(this.scope.document,t,e,n),this}),"The interact.off() method is being deprecated"),e.debug=function(){return this.scope},e.supportsTouch=function(){return b.default.supportsTouch},e.supportsPointerEvent=function(){return b.default.supportsPointerEvent},e.stop=function(){for(var t=0;t<this.scope.interactions.list.length;t++)this.scope.interactions.list[t].stop();return this},e.pointerMoveTolerance=function(t){return o.default.number(t)?(this.scope.interactions.pointerMoveTolerance=t,this):this.scope.interactions.pointerMoveTolerance},e.addDocument=function(t,e){this.scope.addDocument(t,e)},e.removeDocument=function(t){this.scope.removeDocument(t)},e};var dn={};function pn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(dn,"__esModule",{value:!0}),dn.Interactable=void 0;var vn=function(){function t(n,r,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),pn(this,"options",void 0),pn(this,"_actions",void 0),pn(this,"target",void 0),pn(this,"events",new sn.Eventable),pn(this,"_context",void 0),pn(this,"_win",void 0),pn(this,"_doc",void 0),pn(this,"_scopeEvents",void 0),pn(this,"_rectChecker",void 0),this._actions=r.actions,this.target=n,this._context=r.context||i,this._win=(0,e.getWindow)((0,_.trySelector)(n)?this._context:n),this._doc=this._win.document,this._scopeEvents=o,this.set(r)}var n,r;return n=t,(r=[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,e){return o.default.func(e.onstart)&&this.on("".concat(t,"start"),e.onstart),o.default.func(e.onmove)&&this.on("".concat(t,"move"),e.onmove),o.default.func(e.onend)&&this.on("".concat(t,"end"),e.onend),o.default.func(e.oninertiastart)&&this.on("".concat(t,"inertiastart"),e.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,e,n){(o.default.array(e)||o.default.object(e))&&this.off(t,e),(o.default.array(n)||o.default.object(n))&&this.on(t,n)}},{key:"setPerAction",value:function(t,e){var n=this._defaults;for(var r in e){var i=r,a=this.options[t],s=e[i];"listeners"===i&&this.updatePerActionListeners(t,a.listeners,s),o.default.array(s)?a[i]=X.from(s):o.default.plainObject(s)?(a[i]=(0,C.default)(a[i]||{},(0,de.default)(s)),o.default.object(n.perAction[i])&&"enabled"in n.perAction[i]&&(a[i].enabled=!1!==s.enabled)):o.default.bool(s)&&o.default.object(n.perAction[i])?a[i].enabled=s:a[i]=s}}},{key:"getRect",value:function(t){return t=t||(o.default.element(this.target)?this.target:null),o.default.string(this.target)&&(t=t||this._context.querySelector(this.target)),(0,_.getElementRect)(t)}},{key:"rectChecker",value:function(t){var e=this;return o.default.func(t)?(this._rectChecker=t,this.getRect=function(t){var n=(0,C.default)({},e._rectChecker(t));return"width"in n||(n.width=n.right-n.left,n.height=n.bottom-n.top),n},this):null===t?(delete this.getRect,delete this._rectChecker,this):this.getRect}},{key:"_backCompatOption",value:function(t,e){if((0,_.trySelector)(e)||o.default.object(e)){for(var n in this.options[t]=e,this._actions.map)this.options[n][t]=e;return this}return this.options[t]}},{key:"origin",value:function(t){return this._backCompatOption("origin",t)}},{key:"deltaSource",value:function(t){return"page"===t||"client"===t?(this.options.deltaSource=t,this):this.options.deltaSource}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||(0,_.nodeContains)(this._context,t)}},{key:"testIgnoreAllow",value:function(t,e,n){return!this.testIgnore(t.ignoreFrom,e,n)&&this.testAllow(t.allowFrom,e,n)}},{key:"testAllow",value:function(t,e,n){return!t||!!o.default.element(n)&&(o.default.string(t)?(0,_.matchesUpTo)(n,t,e):!!o.default.element(t)&&(0,_.nodeContains)(t,n))}},{key:"testIgnore",value:function(t,e,n){return!(!t||!o.default.element(n))&&(o.default.string(t)?(0,_.matchesUpTo)(n,t,e):!!o.default.element(t)&&(0,_.nodeContains)(t,n))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,e,n,r){o.default.object(e)&&!o.default.array(e)&&(r=n,n=null);var i="on"===t?"add":"remove",a=(0,I.default)(e,n);for(var s in a){"wheel"===s&&(s=b.default.wheelEvent);for(var u=0;u<a[s].length;u++){var c=a[s][u];(0,fn.default)(s,this._actions)?this.events[t](s,c):o.default.string(this.target)?this._scopeEvents["".concat(i,"Delegate")](this.target,this._context,s,c,r):this._scopeEvents[i](this.target,s,c,r)}}return this}},{key:"on",value:function(t,e,n){return this._onOff("on",t,e,n)}},{key:"off",value:function(t,e,n){return this._onOff("off",t,e,n)}},{key:"set",value:function(t){var e=this._defaults;for(var n in o.default.object(t)||(t={}),this.options=(0,de.default)(e.base),this._actions.methodDict){var r=n,i=this._actions.methodDict[r];this.options[r]={},this.setPerAction(r,(0,C.default)((0,C.default)({},e.perAction),e.actions[r])),this[i](t[r])}for(var a in t)o.default.func(this[a])&&this[a](t[a]);return this}},{key:"unset",value:function(){if(o.default.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var e=this._scopeEvents.delegatedEvents[t],n=e.length-1;n>=0;n--){var r=e[n],i=r.selector,a=r.context,s=r.listeners;i===this.target&&a===this._context&&e.splice(n,1);for(var u=s.length-1;u>=0;u--)this._scopeEvents.removeDelegate(this.target,this._context,t,s[u][0],s[u][1])}else this._scopeEvents.remove(this.target,"all")}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();dn.Interactable=vn;var gn={};function mn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(gn,"__esModule",{value:!0}),gn.InteractableSet=void 0;var yn=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),mn(this,"list",[]),mn(this,"selectorMap",{}),mn(this,"scope",void 0),this.scope=e,e.addListeners({"interactable:unset":function(t){var e=t.interactable,r=e.target,i=e._context,a=o.default.string(r)?n.selectorMap[r]:r[n.scope.id],s=X.findIndex(a,(function(t){return t.context===i}));a[s]&&(a[s].context=null,a[s].interactable=null),a.splice(s,1)}})}var e,n;return e=t,(n=[{key:"new",value:function(t,e){e=(0,C.default)(e||{},{actions:this.scope.actions});var n=new this.scope.Interactable(t,e,this.scope.document,this.scope.events),r={context:n._context,interactable:n};return this.scope.addDocument(n._doc),this.list.push(n),o.default.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(r)):(n.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(r)),this.scope.fire("interactable:new",{target:t,options:e,interactable:n,win:this.scope._win}),n}},{key:"get",value:function(t,e){var n=e&&e.context||this.scope.document,r=o.default.string(t),i=r?this.selectorMap[t]:t[this.scope.id];if(!i)return null;var a=X.find(i,(function(e){return e.context===n&&(r||e.interactable.inContext(t))}));return a&&a.interactable}},{key:"forEachMatch",value:function(t,e){for(var n=0;n<this.list.length;n++){var r=this.list[n],i=void 0;if((o.default.string(r.target)?o.default.element(t)&&_.matchesSelector(t,r.target):t===r.target)&&r.inContext(t)&&(i=e(r)),void 0!==i)return i}}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();gn.InteractableSet=yn;var bn={};function wn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return _n(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_n(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}Object.defineProperty(bn,"__esModule",{value:!0}),bn.default=void 0;var Sn=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),wn(this,"currentTarget",void 0),wn(this,"originalEvent",void 0),wn(this,"type",void 0),this.originalEvent=e,(0,$.default)(this,e)}var e,n;return e=t,(n=[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function kn(t){if(!o.default.object(t))return{capture:!!t,passive:!1};var e=(0,C.default)({},t);return e.capture=!!t.capture,e.passive=!!t.passive,e}var Pn={id:"events",install:function(t){var e,n=[],r={},i=[],a={add:s,remove:u,addDelegate:function(t,e,n,o,a){var u=kn(a);if(!r[n]){r[n]=[];for(var f=0;f<i.length;f++){var h=i[f];s(h,n,c),s(h,n,l,!0)}}var d=r[n],p=X.find(d,(function(n){return n.selector===t&&n.context===e}));p||(p={selector:t,context:e,listeners:[]},d.push(p)),p.listeners.push([o,u])},removeDelegate:function(t,e,n,i,o){var a,s=kn(o),f=r[n],h=!1;if(f)for(a=f.length-1;a>=0;a--){var d=f[a];if(d.selector===t&&d.context===e){for(var p=d.listeners,v=p.length-1;v>=0;v--){var g=xn(p[v],2),m=g[0],y=g[1],b=y.capture,w=y.passive;if(m===i&&b===s.capture&&w===s.passive){p.splice(v,1),p.length||(f.splice(a,1),u(e,n,c),u(e,n,l,!0)),h=!0;break}}if(h)break}}},delegateListener:c,delegateUseCapture:l,delegatedEvents:r,documents:i,targets:n,supportsOptions:!1,supportsPassive:!1};function s(t,e,r,i){var o=kn(i),s=X.find(n,(function(e){return e.eventTarget===t}));s||(s={eventTarget:t,events:{}},n.push(s)),s.events[e]||(s.events[e]=[]),t.addEventListener&&!X.contains(s.events[e],r)&&(t.addEventListener(e,r,a.supportsOptions?o:o.capture),s.events[e].push(r))}function u(t,e,r,i){var o=kn(i),s=X.findIndex(n,(function(e){return e.eventTarget===t})),c=n[s];if(c&&c.events)if("all"!==e){var l=!1,f=c.events[e];if(f){if("all"===r){for(var h=f.length-1;h>=0;h--)u(t,e,f[h],o);return}for(var d=0;d<f.length;d++)if(f[d]===r){t.removeEventListener(e,r,a.supportsOptions?o:o.capture),f.splice(d,1),0===f.length&&(delete c.events[e],l=!0);break}}l&&!Object.keys(c.events).length&&n.splice(s,1)}else for(e in c.events)c.events.hasOwnProperty(e)&&u(t,e,"all")}function c(t,e){for(var n=kn(e),i=new Sn(t),a=r[t.type],s=xn(N.getEventTargets(t),1)[0],u=s;o.default.element(u);){for(var c=0;c<a.length;c++){var l=a[c],f=l.selector,h=l.context;if(_.matchesSelector(u,f)&&_.nodeContains(h,s)&&_.nodeContains(h,u)){var d=l.listeners;i.currentTarget=u;for(var p=0;p<d.length;p++){var v=xn(d[p],2),g=v[0],m=v[1],y=m.capture,b=m.passive;y===n.capture&&b===n.passive&&g(i)}}}u=_.parentNode(u)}}function l(t){return c(t,!0)}return null==(e=t.document)||e.createElement("div").addEventListener("test",null,{get capture(){return a.supportsOptions=!0},get passive(){return a.supportsPassive=!0}}),t.events=a,a}};bn.default=Pn;var En={};Object.defineProperty(En,"__esModule",{value:!0}),En.default=void 0;var On={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var e=0;e<On.methodOrder.length;e++){var n;n=On.methodOrder[e];var r=On[n](t);if(r)return r}return null},simulationResume:function(t){var e=t.pointerType,n=t.eventType,r=t.eventTarget,i=t.scope;if(!/down|start/i.test(n))return null;for(var o=0;o<i.interactions.list.length;o++){var a=i.interactions.list[o],s=r;if(a.simulation&&a.simulation.allowResume&&a.pointerType===e)for(;s;){if(s===a.element)return a;s=_.parentNode(s)}}return null},mouseOrPen:function(t){var e,n=t.pointerId,r=t.pointerType,i=t.eventType,o=t.scope;if("mouse"!==r&&"pen"!==r)return null;for(var a=0;a<o.interactions.list.length;a++){var s=o.interactions.list[a];if(s.pointerType===r){if(s.simulation&&!Tn(s,n))continue;if(s.interacting())return s;e||(e=s)}}if(e)return e;for(var u=0;u<o.interactions.list.length;u++){var c=o.interactions.list[u];if(!(c.pointerType!==r||/down/i.test(i)&&c.simulation))return c}return null},hasPointer:function(t){for(var e=t.pointerId,n=t.scope,r=0;r<n.interactions.list.length;r++){var i=n.interactions.list[r];if(Tn(i,e))return i}return null},idle:function(t){for(var e=t.pointerType,n=t.scope,r=0;r<n.interactions.list.length;r++){var i=n.interactions.list[r];if(1===i.pointers.length){var o=i.interactable;if(o&&(!o.options.gesture||!o.options.gesture.enabled))continue}else if(i.pointers.length>=2)continue;if(!i.interacting()&&e===i.pointerType)return i}return null}};function Tn(t,e){return t.pointers.some((function(t){return t.id===e}))}var Cn=On;En.default=Cn;var jn={};function Mn(t){return Mn="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},Mn(t)}function Rn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return An(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?An(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function An(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function In(t,e){return In=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},In(t,e)}function Ln(t){return Ln=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ln(t)}Object.defineProperty(jn,"__esModule",{value:!0}),jn.default=void 0;var Dn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function $n(t,e){return function(n){var r=e.interactions.list,i=N.getPointerType(n),o=Rn(N.getEventTargets(n),2),a=o[0],s=o[1],u=[];if(/^touch/.test(n.type)){e.prevTouchTime=e.now();for(var c=0;c<n.changedTouches.length;c++){var l=n.changedTouches[c],f={pointer:l,pointerId:N.getPointerId(l),pointerType:i,eventType:n.type,eventTarget:a,curEventTarget:s,scope:e},h=Nn(f);u.push([f.pointer,f.eventTarget,f.curEventTarget,h])}}else{var d=!1;if(!b.default.supportsPointerEvent&&/mouse/.test(n.type)){for(var p=0;p<r.length&&!d;p++)d="mouse"!==r[p].pointerType&&r[p].pointerIsDown;d=d||e.now()-e.prevTouchTime<500||0===n.timeStamp}if(!d){var v={pointer:n,pointerId:N.getPointerId(n),pointerType:i,eventType:n.type,curEventTarget:s,eventTarget:a,scope:e},g=Nn(v);u.push([v.pointer,v.eventTarget,v.curEventTarget,g])}}for(var m=0;m<u.length;m++){var y=Rn(u[m],4),w=y[0],x=y[1],_=y[2];y[3][t](w,n,x,_)}}}function Nn(t){var e=t.pointerType,n=t.scope,r={interaction:En.default.search(t),searchDetails:t};return n.fire("interactions:find",r),r.interaction||n.interactions.new({pointerType:e})}function Fn(t,e){var n=t.doc,r=t.scope,i=t.options,o=r.interactions.docEvents,a=r.events,s=a[e];for(var u in r.browser.isIOS&&!i.events&&(i.events={passive:!1}),a.delegatedEvents)s(n,u,a.delegateListener),s(n,u,a.delegateUseCapture,!0);for(var c=i&&i.events,l=0;l<o.length;l++){var f=o[l];s(n,f.type,f.listener,c)}}var Bn={id:"core/interactions",install:function(t){for(var e={},n=0;n<Dn.length;n++){var r=Dn[n];e[r]=$n(r,t)}var i,o=b.default.pEventTypes;function a(){for(var e=0;e<t.interactions.list.length;e++){var n=t.interactions.list[e];if(n.pointerIsDown&&"touch"===n.pointerType&&!n._interacting)for(var r=function(){var e=n.pointers[i];t.documents.some((function(t){var n=t.doc;return(0,_.nodeContains)(n,e.downTarget)}))||n.removePointer(e.pointer,e.event)},i=0;i<n.pointers.length;i++)r()}}(i=v.default.PointerEvent?[{type:o.down,listener:a},{type:o.down,listener:e.pointerDown},{type:o.move,listener:e.pointerMove},{type:o.up,listener:e.pointerUp},{type:o.cancel,listener:e.pointerUp}]:[{type:"mousedown",listener:e.pointerDown},{type:"mousemove",listener:e.pointerMove},{type:"mouseup",listener:e.pointerUp},{type:"touchstart",listener:a},{type:"touchstart",listener:e.pointerDown},{type:"touchmove",listener:e.pointerMove},{type:"touchend",listener:e.pointerUp},{type:"touchcancel",listener:e.pointerUp}]).push({type:"blur",listener:function(e){for(var n=0;n<t.interactions.list.length;n++)t.interactions.list[n].documentBlur(e)}}),t.prevTouchTime=0,t.Interaction=function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&In(t,e)}(s,e);var n,r,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Ln(i);if(o){var n=Ln(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Mn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(r=[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(e){t.interactions.pointerMoveTolerance=e}},{key:"_now",value:function(){return t.now()}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),s}(Fe.default),t.interactions={list:[],new:function(e){e.scopeFire=function(e,n){return t.fire(e,n)};var n=new t.Interaction(e);return t.interactions.list.push(n),n},listeners:e,docEvents:i,pointerMoveTolerance:1},t.usePlugin(oe.default)},listeners:{"scope:add-document":function(t){return Fn(t,"add")},"scope:remove-document":function(t){return Fn(t,"remove")},"interactable:unset":function(t,e){for(var n=t.interactable,r=e.interactions.list.length-1;r>=0;r--){var i=e.interactions.list[r];i.interactable===n&&(i.stop(),e.fire("interactions:destroy",{interaction:i}),i.destroy(),e.interactions.list.length>2&&e.interactions.list.splice(r,1))}}},onDocSignal:Fn,doOnInteractions:$n,methodNames:Dn},Un=Bn;jn.default=Un;var zn={};function Wn(t){return Wn="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},Wn(t)}function Hn(){return Hn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Gn(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Hn.apply(this,arguments)}function Vn(t,e){return Vn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vn(t,e)}function Gn(t){return Gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gn(t)}function Yn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function qn(t,e,n){return e&&Xn(t.prototype,e),n&&Xn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Kn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(zn,"__esModule",{value:!0}),zn.Scope=void 0,zn.initScope=Jn;var Zn=function(){function t(){var e=this;Yn(this,t),Kn(this,"id","__interact_scope_".concat(Math.floor(100*Math.random()))),Kn(this,"isInitialized",!1),Kn(this,"listenerMaps",[]),Kn(this,"browser",b.default),Kn(this,"defaults",(0,de.default)(Pe.defaults)),Kn(this,"Eventable",sn.Eventable),Kn(this,"actions",{map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}}),Kn(this,"interactStatic",(0,hn.createInteractStatic)(this)),Kn(this,"InteractEvent",Ee.InteractEvent),Kn(this,"Interactable",void 0),Kn(this,"interactables",new gn.InteractableSet(this)),Kn(this,"_win",void 0),Kn(this,"document",void 0),Kn(this,"window",void 0),Kn(this,"documents",[]),Kn(this,"_plugins",{list:[],map:{}}),Kn(this,"onWindowUnload",(function(t){return e.removeDocument(t.target)}));var n=this;this.Interactable=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vn(t,e)}(o,t);var e,r,i=(e=o,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=Gn(e);if(r){var i=Gn(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return function(t,e){if(e&&("object"===Wn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function o(){return Yn(this,o),i.apply(this,arguments)}return qn(o,[{key:"_defaults",get:function(){return n.defaults}},{key:"set",value:function(t){return Hn(Gn(o.prototype),"set",this).call(this,t),n.fire("interactable:set",{options:t,interactable:this}),this}},{key:"unset",value:function(){Hn(Gn(o.prototype),"unset",this).call(this);var t=n.interactables.list.indexOf(this);t<0||(Hn(Gn(o.prototype),"unset",this).call(this),n.interactables.list.splice(t,1),n.fire("interactable:unset",{interactable:this}))}}]),o}(dn.Interactable)}return qn(t,[{key:"addListeners",value:function(t,e){this.listenerMaps.push({id:e,map:t})}},{key:"fire",value:function(t,e){for(var n=0;n<this.listenerMaps.length;n++){var r=this.listenerMaps[n].map[t];if(r&&!1===r(e,this,t))return!1}}},{key:"init",value:function(t){return this.isInitialized?this:Jn(this,t)}},{key:"pluginIsInstalled",value:function(t){return this._plugins.map[t.id]||-1!==this._plugins.list.indexOf(t)}},{key:"usePlugin",value:function(t,e){if(!this.isInitialized)return this;if(this.pluginIsInstalled(t))return this;if(t.id&&(this._plugins.map[t.id]=t),this._plugins.list.push(t),t.install&&t.install(this,e),t.listeners&&t.before){for(var n=0,r=this.listenerMaps.length,i=t.before.reduce((function(t,e){return t[e]=!0,t[Qn(e)]=!0,t}),{});n<r;n++){var o=this.listenerMaps[n].id;if(i[o]||i[Qn(o)])break}this.listenerMaps.splice(n,0,{id:t.id,map:t.listeners})}else t.listeners&&this.listenerMaps.push({id:t.id,map:t.listeners});return this}},{key:"addDocument",value:function(t,n){if(-1!==this.getDocIndex(t))return!1;var r=e.getWindow(t);n=n?(0,C.default)({},n):{},this.documents.push({doc:t,options:n}),this.events.documents.push(t),t!==this.document&&this.events.add(r,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:r,scope:this,options:n})}},{key:"removeDocument",value:function(t){var n=this.getDocIndex(t),r=e.getWindow(t),i=this.documents[n].options;this.events.remove(r,"unload",this.onWindowUnload),this.documents.splice(n,1),this.events.documents.splice(n,1),this.fire("scope:remove-document",{doc:t,window:r,scope:this,options:i})}},{key:"getDocIndex",value:function(t){for(var e=0;e<this.documents.length;e++)if(this.documents[e].doc===t)return e;return-1}},{key:"getDocOptions",value:function(t){var e=this.getDocIndex(t);return-1===e?null:this.documents[e].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),t}();function Jn(t,n){return t.isInitialized=!0,o.default.window(n)&&e.init(n),v.default.init(n),b.default.init(n),kt.default.init(n),t.window=n,t.document=n.document,t.usePlugin(jn.default),t.usePlugin(bn.default),t}function Qn(t){return t&&t.replace(/\/.*$/,"")}zn.Scope=Zn;var tr={};Object.defineProperty(tr,"__esModule",{value:!0}),tr.default=void 0;var er=new zn.Scope,nr=er.interactStatic;tr.default=nr;var rr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0;er.init(rr);var ir={};Object.defineProperty(ir,"__esModule",{value:!0}),ir.default=void 0,ir.default=function(){};var or={};Object.defineProperty(or,"__esModule",{value:!0}),or.default=void 0,or.default=function(){};var ar={};function sr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ur(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ur(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ur(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}Object.defineProperty(ar,"__esModule",{value:!0}),ar.default=void 0,ar.default=function(t){var e=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter((function(e){var n=sr(e,2),r=n[0],i=n[1];return r in t||i in t})),n=function(n,r){for(var i=t.range,o=t.limits,a=void 0===o?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:o,s=t.offset,u=void 0===s?{x:0,y:0}:s,c={range:i,grid:t,x:null,y:null},l=0;l<e.length;l++){var f=sr(e[l],2),h=f[0],d=f[1],p=Math.round((n-u.x)/t[h]),v=Math.round((r-u.y)/t[d]);c[h]=Math.max(a.left,Math.min(a.right,p*t[h]+u.x)),c[d]=Math.max(a.top,Math.min(a.bottom,v*t[d]+u.y))}return c};return n.grid=t,n.coordFields=e,n};var cr={};Object.defineProperty(cr,"__esModule",{value:!0}),Object.defineProperty(cr,"edgeTarget",{enumerable:!0,get:function(){return ir.default}}),Object.defineProperty(cr,"elements",{enumerable:!0,get:function(){return or.default}}),Object.defineProperty(cr,"grid",{enumerable:!0,get:function(){return ar.default}});var lr={};Object.defineProperty(lr,"__esModule",{value:!0}),lr.default=void 0;var fr={id:"snappers",install:function(t){var e=t.interactStatic;e.snappers=(0,C.default)(e.snappers||{},cr),e.createSnapGrid=e.snappers.grid}},hr=fr;lr.default=hr;var dr={};function pr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function vr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pr(Object(n),!0).forEach((function(e){gr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function gr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(dr,"__esModule",{value:!0}),dr.default=dr.aspectRatio=void 0;var mr={start:function(t){var e=t.state,n=t.rect,r=t.edges,i=t.pageCoords,o=e.options,a=o.ratio,s=o.enabled,u=e.options,c=u.equalDelta,l=u.modifiers;"preserve"===a&&(a=n.width/n.height),e.startCoords=(0,C.default)({},i),e.startRect=(0,C.default)({},n),e.ratio=a,e.equalDelta=c;var f=e.linkedEdges={top:r.top||r.left&&!r.bottom,left:r.left||r.top&&!r.right,bottom:r.bottom||r.right&&!r.top,right:r.right||r.bottom&&!r.left};if(e.xIsPrimaryAxis=!(!r.left&&!r.right),e.equalDelta){var h=(f.left?1:-1)*(f.top?1:-1);e.edgeSign={x:h,y:h}}else e.edgeSign={x:f.left?-1:1,y:f.top?-1:1};if(!1!==s&&(0,C.default)(r,f),null!=l&&l.length){var d=new pe.default(t.interaction);d.copyFrom(t.interaction.modification),d.prepareStates(l),e.subModification=d,d.startAll(vr({},t))}},set:function(t){var e=t.state,n=t.rect,r=t.coords,i=e.linkedEdges,o=(0,C.default)({},r),a=e.equalDelta?yr:br;if((0,C.default)(t.edges,i),a(e,e.xIsPrimaryAxis,r,n),!e.subModification)return null;var s=(0,C.default)({},n);(0,j.addEdges)(i,s,{x:r.x-o.x,y:r.y-o.y});var u=e.subModification.setAll(vr(vr({},t),{},{rect:s,edges:i,pageCoords:r,prevCoords:r,prevRect:s})),c=u.delta;return u.changed&&(a(e,Math.abs(c.x)>Math.abs(c.y),u.coords,u.rect),(0,C.default)(r,u.coords)),u.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function yr(t,e,n){var r=t.startCoords,i=t.edgeSign;e?n.y=r.y+(n.x-r.x)*i.y:n.x=r.x+(n.y-r.y)*i.x}function br(t,e,n,r){var i=t.startRect,o=t.startCoords,a=t.ratio,s=t.edgeSign;if(e){var u=r.width/a;n.y=o.y+(u-i.height)*s.y}else{var c=r.height*a;n.x=o.x+(c-i.width)*s.x}}dr.aspectRatio=mr;var wr=(0,xe.makeModifier)(mr,"aspectRatio");dr.default=wr;var xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.default=void 0;var _r=function(){};_r._defaults={};var Sr=_r;xr.default=Sr;var kr={};Object.defineProperty(kr,"__esModule",{value:!0}),Object.defineProperty(kr,"default",{enumerable:!0,get:function(){return xr.default}});var Pr={};function Er(t,e,n){return o.default.func(t)?j.resolveRectLike(t,e.interactable,e.element,[n.x,n.y,e]):j.resolveRectLike(t,e.interactable,e.element)}Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.default=void 0,Pr.getRestrictionRect=Er,Pr.restrict=void 0;var Or={start:function(t){var e=t.rect,n=t.startOffset,r=t.state,i=t.interaction,o=t.pageCoords,a=r.options,s=a.elementRect,u=(0,C.default)({left:0,top:0,right:0,bottom:0},a.offset||{});if(e&&s){var c=Er(a.restriction,i,o);if(c){var l=c.right-c.left-e.width,f=c.bottom-c.top-e.height;l<0&&(u.left+=l,u.right+=l),f<0&&(u.top+=f,u.bottom+=f)}u.left+=n.left-e.width*s.left,u.top+=n.top-e.height*s.top,u.right+=n.right-e.width*(1-s.right),u.bottom+=n.bottom-e.height*(1-s.bottom)}r.offset=u},set:function(t){var e=t.coords,n=t.interaction,r=t.state,i=r.options,o=r.offset,a=Er(i.restriction,n,e);if(a){var s=j.xywhToTlbr(a);e.x=Math.max(Math.min(s.right-o.right,e.x),s.left+o.left),e.y=Math.max(Math.min(s.bottom-o.bottom,e.y),s.top+o.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}};Pr.restrict=Or;var Tr=(0,xe.makeModifier)(Or,"restrict");Pr.default=Tr;var Cr={};Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.restrictEdges=Cr.default=void 0;var jr={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Mr={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Rr(t,e){for(var n=["top","left","bottom","right"],r=0;r<n.length;r++){var i=n[r];i in t||(t[i]=e[i])}return t}var Ar={noInner:jr,noOuter:Mr,start:function(t){var e,n=t.interaction,r=t.startOffset,i=t.state,o=i.options;if(o){var a=(0,Pr.getRestrictionRect)(o.offset,n,n.coords.start.page);e=j.rectToXY(a)}e=e||{x:0,y:0},i.offset={top:e.y+r.top,left:e.x+r.left,bottom:e.y-r.bottom,right:e.x-r.right}},set:function(t){var e=t.coords,n=t.edges,r=t.interaction,i=t.state,o=i.offset,a=i.options;if(n){var s=(0,C.default)({},e),u=(0,Pr.getRestrictionRect)(a.inner,r,s)||{},c=(0,Pr.getRestrictionRect)(a.outer,r,s)||{};Rr(u,jr),Rr(c,Mr),n.top?e.y=Math.min(Math.max(c.top+o.top,s.y),u.top+o.top):n.bottom&&(e.y=Math.max(Math.min(c.bottom+o.bottom,s.y),u.bottom+o.bottom)),n.left?e.x=Math.min(Math.max(c.left+o.left,s.x),u.left+o.left):n.right&&(e.x=Math.max(Math.min(c.right+o.right,s.x),u.right+o.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}};Cr.restrictEdges=Ar;var Ir=(0,xe.makeModifier)(Ar,"restrictEdges");Cr.default=Ir;var Lr={};Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.restrictRect=Lr.default=void 0;var Dr=(0,C.default)({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},Pr.restrict.defaults),$r={start:Pr.restrict.start,set:Pr.restrict.set,defaults:Dr};Lr.restrictRect=$r;var Nr=(0,xe.makeModifier)($r,"restrictRect");Lr.default=Nr;var Fr={};Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.restrictSize=Fr.default=void 0;var Br={width:-1/0,height:-1/0},Ur={width:1/0,height:1/0},zr={start:function(t){return Cr.restrictEdges.start(t)},set:function(t){var e=t.interaction,n=t.state,r=t.rect,i=t.edges,o=n.options;if(i){var a=j.tlbrToXywh((0,Pr.getRestrictionRect)(o.min,e,t.coords))||Br,s=j.tlbrToXywh((0,Pr.getRestrictionRect)(o.max,e,t.coords))||Ur;n.options={endOnly:o.endOnly,inner:(0,C.default)({},Cr.restrictEdges.noInner),outer:(0,C.default)({},Cr.restrictEdges.noOuter)},i.top?(n.options.inner.top=r.bottom-a.height,n.options.outer.top=r.bottom-s.height):i.bottom&&(n.options.inner.bottom=r.top+a.height,n.options.outer.bottom=r.top+s.height),i.left?(n.options.inner.left=r.right-a.width,n.options.outer.left=r.right-s.width):i.right&&(n.options.inner.right=r.left+a.width,n.options.outer.right=r.left+s.width),Cr.restrictEdges.set(t),n.options=o}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}};Fr.restrictSize=zr;var Wr=(0,xe.makeModifier)(zr,"restrictSize");Fr.default=Wr;var Hr={};Object.defineProperty(Hr,"__esModule",{value:!0}),Object.defineProperty(Hr,"default",{enumerable:!0,get:function(){return xr.default}});var Vr={};Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.snap=Vr.default=void 0;var Gr={start:function(t){var e,n=t.interaction,r=t.interactable,i=t.element,o=t.rect,a=t.state,s=t.startOffset,u=a.options,c=u.offsetWithOrigin?function(t){var e=t.interaction.element;return(0,j.rectToXY)((0,j.resolveRectLike)(t.state.options.origin,null,null,[e]))||(0,A.default)(t.interactable,e,t.interaction.prepared.name)}(t):{x:0,y:0};if("startCoords"===u.offset)e={x:n.coords.start.page.x,y:n.coords.start.page.y};else{var l=(0,j.resolveRectLike)(u.offset,r,i,[n]);(e=(0,j.rectToXY)(l)||{x:0,y:0}).x+=c.x,e.y+=c.y}var f=u.relativePoints;a.offsets=o&&f&&f.length?f.map((function(t,n){return{index:n,relativePoint:t,x:s.left-o.width*t.x+e.x,y:s.top-o.height*t.y+e.y}})):[{index:0,relativePoint:null,x:e.x,y:e.y}]},set:function(t){var e=t.interaction,n=t.coords,r=t.state,i=r.options,a=r.offsets,s=(0,A.default)(e.interactable,e.element,e.prepared.name),u=(0,C.default)({},n),c=[];i.offsetWithOrigin||(u.x-=s.x,u.y-=s.y);for(var l=0;l<a.length;l++)for(var f=a[l],h=u.x-f.x,d=u.y-f.y,p=0,v=i.targets.length;p<v;p++){var g,m=i.targets[p];(g=o.default.func(m)?m(h,d,e._proxy,f,p):m)&&c.push({x:(o.default.number(g.x)?g.x:h)+f.x,y:(o.default.number(g.y)?g.y:d)+f.y,range:o.default.number(g.range)?g.range:i.range,source:m,index:p,offset:f})}for(var y={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},b=0;b<c.length;b++){var w=c[b],x=w.range,_=w.x-u.x,S=w.y-u.y,k=(0,D.default)(_,S),P=k<=x;x===1/0&&y.inRange&&y.range!==1/0&&(P=!1),y.target&&!(P?y.inRange&&x!==1/0?k/x<y.distance/y.range:x===1/0&&y.range!==1/0||k<y.distance:!y.inRange&&k<y.distance)||(y.target=w,y.distance=k,y.range=x,y.inRange=P,y.delta.x=_,y.delta.y=S)}return y.inRange&&(n.x=y.target.x,n.y=y.target.y),r.closest=y,y},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}};Vr.snap=Gr;var Yr=(0,xe.makeModifier)(Gr,"snap");Vr.default=Yr;var Xr={};function qr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.snapSize=Xr.default=void 0;var Kr={start:function(t){var e=t.state,n=t.edges,r=e.options;if(!n)return null;t.state={options:{targets:null,relativePoints:[{x:n.left?0:1,y:n.top?0:1}],offset:r.offset||"self",origin:{x:0,y:0},range:r.range}},e.targetFields=e.targetFields||[["width","height"],["x","y"]],Vr.snap.start(t),e.offsets=t.state.offsets,t.state=e},set:function(t){var e,n=t.interaction,r=t.state,i=t.coords,a=r.options,s=r.offsets,u={x:i.x-s[0].x,y:i.y-s[0].y};r.options=(0,C.default)({},a),r.options.targets=[];for(var c=0;c<(a.targets||[]).length;c++){var l=(a.targets||[])[c],f=void 0;if(f=o.default.func(l)?l(u.x,u.y,n):l){for(var h=0;h<r.targetFields.length;h++){var d=(2,function(t){if(Array.isArray(t))return t}(e=r.targetFields[h])||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),2!==o.length);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e)||function(t,e){if(t){if("string"==typeof t)return qr(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qr(t,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),p=d[0],v=d[1];if(p in f||v in f){f.x=f[p],f.y=f[v];break}}r.options.targets.push(f)}}var g=Vr.snap.set(t);return r.options=a,g},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}};Xr.snapSize=Kr;var Zr=(0,xe.makeModifier)(Kr,"snapSize");Xr.default=Zr;var Jr={};Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.snapEdges=Jr.default=void 0;var Qr={start:function(t){var e=t.edges;return e?(t.state.targetFields=t.state.targetFields||[[e.left?"left":"right",e.top?"top":"bottom"]],Xr.snapSize.start(t)):null},set:Xr.snapSize.set,defaults:(0,C.default)((0,de.default)(Xr.snapSize.defaults),{targets:null,range:null,offset:{x:0,y:0}})};Jr.snapEdges=Qr;var ti=(0,xe.makeModifier)(Qr,"snapEdges");Jr.default=ti;var ei={};Object.defineProperty(ei,"__esModule",{value:!0}),Object.defineProperty(ei,"default",{enumerable:!0,get:function(){return xr.default}});var ni={};Object.defineProperty(ni,"__esModule",{value:!0}),Object.defineProperty(ni,"default",{enumerable:!0,get:function(){return xr.default}});var ri={};Object.defineProperty(ri,"__esModule",{value:!0}),ri.default=void 0;var ii={aspectRatio:dr.default,restrictEdges:Cr.default,restrict:Pr.default,restrictRect:Lr.default,restrictSize:Fr.default,snapEdges:Jr.default,snap:Vr.default,snapSize:Xr.default,spring:ei.default,avoid:kr.default,transform:ni.default,rubberband:Hr.default};ri.default=ii;var oi={};Object.defineProperty(oi,"__esModule",{value:!0}),oi.default=void 0;var ai={id:"modifiers",install:function(t){var e=t.interactStatic;for(var n in t.usePlugin(xe.default),t.usePlugin(lr.default),e.modifiers=ri.default,ri.default){var r=ri.default[n],i=r._defaults,o=r._methods;i._methods=o,t.defaults.perAction[n]=i}}},si=ai;oi.default=si;var ui={};function ci(t){return ci="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},ci(t)}function li(t,e){return li=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},li(t,e)}function fi(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function hi(t){return hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hi(t)}Object.defineProperty(ui,"__esModule",{value:!0}),ui.default=ui.PointerEvent=void 0;var di=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&li(t,e)}(a,t);var e,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=hi(r);if(i){var n=hi(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===ci(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return fi(t)}(this,t)});function a(t,e,n,r,i,s){var u;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),u=o.call(this,i),N.pointerExtend(fi(u),n),n!==e&&N.pointerExtend(fi(u),e),u.timeStamp=s,u.originalEvent=n,u.type=t,u.pointerId=N.getPointerId(e),u.pointerType=N.getPointerType(e),u.target=r,u.currentTarget=null,"tap"===t){var c=i.getPointerIndex(e);u.dt=u.timeStamp-i.pointers[c].downTime;var l=u.timeStamp-i.tapTime;u.double=!!i.prevTap&&"doubletap"!==i.prevTap.type&&i.prevTap.target===u.target&&l<500}else"doubletap"===t&&(u.dt=e.timeStamp-i.tapTime,u.double=!0);return u}return e=a,(n=[{key:"_subtractOrigin",value:function(t){var e=t.x,n=t.y;return this.pageX-=e,this.pageY-=n,this.clientX-=e,this.clientY-=n,this}},{key:"_addOrigin",value:function(t){var e=t.x,n=t.y;return this.pageX+=e,this.pageY+=n,this.clientX+=e,this.clientY+=n,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(V.BaseEvent);ui.PointerEvent=ui.default=di;var pi={};Object.defineProperty(pi,"__esModule",{value:!0}),pi.default=void 0;var vi={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=vi,t.defaults.actions.pointerEvents=vi.defaults,(0,C.default)(t.actions.phaselessTypes,vi.types)},listeners:{"interactions:new":function(t){var e=t.interaction;e.prevTap=null,e.tapTime=0},"interactions:update-pointer":function(t){var e=t.down,n=t.pointerInfo;!e&&n.hold||(n.hold={duration:1/0,timeout:null})},"interactions:move":function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;t.duplicate||n.pointerIsDown&&!n.pointerWasMoved||(n.pointerIsDown&&yi(t),gi({interaction:n,pointer:r,event:i,eventTarget:o,type:"move"},e))},"interactions:down":function(t,e){!function(t,e){for(var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget,a=t.pointerIndex,s=n.pointers[a].hold,u=_.getPath(o),c={interaction:n,pointer:r,event:i,eventTarget:o,type:"hold",targets:[],path:u,node:null},l=0;l<u.length;l++){var f=u[l];c.node=f,e.fire("pointerEvents:collect-targets",c)}if(c.targets.length){for(var h=1/0,d=0;d<c.targets.length;d++){var p=c.targets[d].eventable.options.holdDuration;p<h&&(h=p)}s.duration=h,s.timeout=setTimeout((function(){gi({interaction:n,eventTarget:o,pointer:r,event:i,type:"hold"},e)}),h)}}(t,e),gi(t,e)},"interactions:up":function(t,e){yi(t),gi(t,e),function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;n.pointerWasMoved||gi({interaction:n,eventTarget:o,pointer:r,event:i,type:"tap"},e)}(t,e)},"interactions:cancel":function(t,e){yi(t),gi(t,e)}},PointerEvent:ui.PointerEvent,fire:gi,collectEventTargets:mi,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function gi(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget,a=t.type,s=t.targets,u=void 0===s?mi(t,e):s,c=new ui.PointerEvent(a,r,i,o,n,e.now());e.fire("pointerEvents:new",{pointerEvent:c});for(var l={interaction:n,pointer:r,event:i,eventTarget:o,targets:u,type:a,pointerEvent:c},f=0;f<u.length;f++){var h=u[f];for(var d in h.props||{})c[d]=h.props[d];var p=(0,A.default)(h.eventable,h.node);if(c._subtractOrigin(p),c.eventable=h.eventable,c.currentTarget=h.node,h.eventable.fire(c),c._addOrigin(p),c.immediatePropagationStopped||c.propagationStopped&&f+1<u.length&&u[f+1].node!==c.currentTarget)break}if(e.fire("pointerEvents:fired",l),"tap"===a){var v=c.double?gi({interaction:n,pointer:r,event:i,eventTarget:o,type:"doubletap"},e):c;n.prevTap=v,n.tapTime=v.timeStamp}return c}function mi(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget,a=t.type,s=n.getPointerIndex(r),u=n.pointers[s];if("tap"===a&&(n.pointerWasMoved||!u||u.downTarget!==o))return[];for(var c=_.getPath(o),l={interaction:n,pointer:r,event:i,eventTarget:o,type:a,path:c,targets:[],node:null},f=0;f<c.length;f++){var h=c[f];l.node=h,e.fire("pointerEvents:collect-targets",l)}return"hold"===a&&(l.targets=l.targets.filter((function(t){var e;return t.eventable.options.holdDuration===(null==(e=n.pointers[s])?void 0:e.hold.duration)}))),l.targets}function yi(t){var e=t.interaction,n=t.pointerIndex,r=e.pointers[n].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var bi=vi;pi.default=bi;var wi={};function xi(t){var e=t.interaction;e.holdIntervalHandle&&(clearInterval(e.holdIntervalHandle),e.holdIntervalHandle=null)}Object.defineProperty(wi,"__esModule",{value:!0}),wi.default=void 0;var _i={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin(pi.default);var e=t.pointerEvents;e.defaults.holdRepeatInterval=0,e.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce((function(t,e){return t["pointerEvents:".concat(e)]=xi,t}),{"pointerEvents:new":function(t){var e=t.pointerEvent;"hold"===e.type&&(e.count=(e.count||0)+1)},"pointerEvents:fired":function(t,e){var n=t.interaction,r=t.pointerEvent,i=t.eventTarget,o=t.targets;if("hold"===r.type&&o.length){var a=o[0].eventable.options.holdRepeatInterval;a<=0||(n.holdIntervalHandle=setTimeout((function(){e.pointerEvents.fire({interaction:n,eventTarget:i,type:"hold",pointer:r,event:r},e)}),a))}}})},Si=_i;wi.default=Si;var ki={};function Pi(t){return(0,C.default)(this.events.options,t),this}Object.defineProperty(ki,"__esModule",{value:!0}),ki.default=void 0;var Ei={id:"pointer-events/interactableTargets",install:function(t){var e=t.Interactable;e.prototype.pointerEvents=Pi;var n=e.prototype._backCompatOption;e.prototype._backCompatOption=function(t,e){var r=n.call(this,t,e);return r===this&&(this.events.options[t]=e),r}},listeners:{"pointerEvents:collect-targets":function(t,e){var n=t.targets,r=t.node,i=t.type,o=t.eventTarget;e.interactables.forEachMatch(r,(function(t){var e=t.events,a=e.options;e.types[i]&&e.types[i].length&&t.testIgnoreAllow(a,r,o)&&n.push({node:r,eventable:e,props:{interactable:t}})}))},"interactable:new":function(t){var e=t.interactable;e.events.getRect=function(t){return e.getRect(t)}},"interactable:set":function(t,e){var n=t.interactable,r=t.options;(0,C.default)(n.events.options,e.pointerEvents.defaults),(0,C.default)(n.events.options,r.pointerEvents||{})}}},Oi=Ei;ki.default=Oi;var Ti={};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.default=void 0;var Ci={id:"pointer-events",install:function(t){t.usePlugin(pi),t.usePlugin(wi.default),t.usePlugin(ki.default)}},ji=Ci;Ti.default=ji;var Mi={};function Ri(t){var e=t.Interactable;t.actions.phases.reflow=!0,e.prototype.reflow=function(e){return function(t,e,n){for(var r=o.default.string(t.target)?X.from(t._context.querySelectorAll(t.target)):[t.target],i=n.window.Promise,a=i?[]:null,s=function(){var o=r[u],s=t.getRect(o);if(!s)return"break";var c=X.find(n.interactions.list,(function(n){return n.interacting()&&n.interactable===t&&n.element===o&&n.prepared.name===e.name})),l=void 0;if(c)c.move(),a&&(l=c._reflowPromise||new i((function(t){c._reflowResolve=t})));else{var f=(0,j.tlbrToXywh)(s),h={page:{x:f.x,y:f.y},client:{x:f.x,y:f.y},timeStamp:n.now()},d=N.coordsToEvent(h);l=function(t,e,n,r,i){var o=t.interactions.new({pointerType:"reflow"}),a={interaction:o,event:i,pointer:i,eventTarget:n,phase:"reflow"};o.interactable=e,o.element=n,o.prevEvent=i,o.updatePointer(i,i,n,!0),N.setZeroCoords(o.coords.delta),(0,Lt.copyAction)(o.prepared,r),o._doPhase(a);var s=t.window.Promise,u=s?new s((function(t){o._reflowResolve=t})):void 0;return o._reflowPromise=u,o.start(r,e,n),o._interacting?(o.move(a),o.end(i)):(o.stop(),o._reflowResolve()),o.removePointer(i,i),u}(n,t,o,e,d)}a&&a.push(l)},u=0;u<r.length&&"break"!==s();u++);return a&&i.all(a).then((function(){return t}))}(this,e,t)}}Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.default=void 0,Mi.install=Ri;var Ai={id:"reflow",install:Ri,listeners:{"interactions:stop":function(t,e){var n=t.interaction;"reflow"===n.pointerType&&(n._reflowResolve&&n._reflowResolve(),X.remove(e.interactions.list,n))}}},Ii=Ai;Mi.default=Ii;var Li={};Object.defineProperty(Li,"__esModule",{value:!0}),Li.default=void 0,tr.default.use(oe.default),tr.default.use(He.default),tr.default.use(Ti.default),tr.default.use(Je.default),tr.default.use(oi.default),tr.default.use(re.default),tr.default.use(_t.default),tr.default.use(Ct.default),tr.default.use(Mi.default);var Di=tr.default;Li.default=Di,tr.default.default=tr.default,_t.default,Ct.default,re.default,oe.default,he.default,Je.default,tr.default,oi.default,He.default,Ti.default,Mi.default;var $i={exports:{}};function Ni(t){return Ni="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},Ni(t)}Object.defineProperty($i.exports,"__esModule",{value:!0}),$i.exports.default=void 0;var Fi=Li.default;if($i.exports.default=Fi,"object"===Ni($i)&&$i)try{$i.exports=Li.default}catch(t){}return Li.default.default=Li.default,$i.exports}()},4581:function(t,e,n){!function(t,e,n){var r,i,o,a,s,u,c,l,f,h,d,p,v,g,m,y,b,w,x,_,S,k,P,E,O,T,C,j,M,R,A,I,L,D={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,n=t(this).data("cbox-img-attrs");return"object"==typeof n&&t.each(n,(function(t,n){e[t]=n})),e},createIframe:function(){var n=e.createElement("iframe"),r=t(this).data("cbox-iframe-attrs");return"object"==typeof r&&t.each(r,(function(t,e){n[t]=e})),"frameBorder"in n&&(n.frameBorder=0),"allowTransparency"in n&&(n.allowTransparency="true"),n.name=(new Date).getTime(),n.allowFullscreen=!0,n}},$="colorbox",N="cbox",F=N+"Element",B=N+"_open",U=N+"_load",z=N+"_complete",W=N+"_cleanup",H=N+"_closed",V=N+"_purge",G=t("<a/>"),Y="div",X=0,q={};function K(n,r,i){var o=e.createElement(n);return r&&(o.id=N+r),i&&(o.style.cssText=i),t(o)}function Z(){return n.innerHeight?n.innerHeight:t(n).height()}function J(e,n){n!==Object(n)&&(n={}),this.cache={},this.el=e,this.value=function(e){var r;return void 0===this.cache[e]&&(void 0!==(r=t(this.el).attr("data-cbox-"+e))?this.cache[e]=r:void 0!==n[e]?this.cache[e]=n[e]:void 0!==D[e]&&(this.cache[e]=D[e])),this.cache[e]},this.get=function(e){var n=this.value(e);return t.isFunction(n)?n.call(this.el,this):n}}function Q(t){var e=f.length,n=(T+t)%e;return n<0?e+n:n}function tt(t,e){return Math.round((/%/.test(t)?("x"===e?h.width():Z())/100:1)*parseInt(t,10))}function et(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function nt(t,e){return t.get("retinaUrl")&&n.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function rt(t){"contains"in i[0]&&!i[0].contains(t.target)&&t.target!==r[0]&&(t.stopPropagation(),i.focus())}function it(t){it.str!==t&&(i.add(r).removeClass(it.str).addClass(t),it.str=t)}function ot(n){t(e).trigger(n),G.triggerHandler(n)}var at=function(){var t,e,n=N+"Slideshow_",r="click."+N;function o(){clearTimeout(e)}function a(){(S.get("loop")||f[T+1])&&(o(),e=setTimeout(I.next,S.get("slideshowSpeed")))}function s(){y.html(S.get("slideshowStop")).unbind(r).one(r,u),G.bind(z,a).bind(U,o),i.removeClass(n+"off").addClass(n+"on")}function u(){o(),G.unbind(z,a).unbind(U,o),y.html(S.get("slideshowStart")).unbind(r).one(r,(function(){I.next(),s()})),i.removeClass(n+"on").addClass(n+"off")}function c(){t=!1,y.hide(),o(),G.unbind(z,a).unbind(U,o),i.removeClass(n+"off "+n+"on")}return function(){t?S.get("slideshow")||(G.unbind(W,c),c()):S.get("slideshow")&&f[1]&&(t=!0,G.one(W,c),S.get("slideshowAuto")?s():u(),y.show())}}();function st(o){var h,m;if(!R){if(h=t(o).data($),S=new J(o,h),m=S.get("rel"),T=0,m&&!1!==m&&"nofollow"!==m?(f=t("."+F).filter((function(){return new J(this,t.data(this,$)).get("rel")===m})),-1===(T=f.index(S.el))&&(f=f.add(S.el),T=f.length-1)):f=t(S.el),!j){j=M=!0,it(S.get("className")),i.css({visibility:"hidden",display:"block",opacity:""}),d=K(Y,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),a.css({width:"",height:""}).append(d),k=s.height()+l.height()+a.outerHeight(!0)-a.height(),P=u.width()+c.width()+a.outerWidth(!0)-a.width(),E=d.outerHeight(!0),O=d.outerWidth(!0);var y=tt(S.get("initialWidth"),"x"),b=tt(S.get("initialHeight"),"y"),w=S.get("maxWidth"),L=S.get("maxHeight");S.w=Math.max((!1!==w?Math.min(y,tt(w,"x")):y)-O-P,0),S.h=Math.max((!1!==L?Math.min(b,tt(L,"y")):b)-E-k,0),d.css({width:"",height:S.h}),I.position(),ot(B),S.get("onOpen"),_.add(g).hide(),i.focus(),S.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",rt,!0),G.one(H,(function(){e.removeEventListener("focus",rt,!0)}))),S.get("returnFocus")&&G.one(H,(function(){t(S.el).focus()}))}var D=parseFloat(S.get("opacity"));r.css({opacity:D==D?D:"",cursor:S.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),S.get("closeButton")?x.html(S.get("close")).appendTo(a):x.appendTo("<div/>"),function(){var e,r,i,o=I.prep,a=++X;if(M=!0,C=!1,ot(V),ot(U),S.get("onLoad"),S.h=S.get("height")?tt(S.get("height"),"y")-E-k:S.get("innerHeight")&&tt(S.get("innerHeight"),"y"),S.w=S.get("width")?tt(S.get("width"),"x")-O-P:S.get("innerWidth")&&tt(S.get("innerWidth"),"x"),S.mw=S.w,S.mh=S.h,S.get("maxWidth")&&(S.mw=tt(S.get("maxWidth"),"x")-O-P,S.mw=S.w&&S.w<S.mw?S.w:S.mw),S.get("maxHeight")&&(S.mh=tt(S.get("maxHeight"),"y")-E-k,S.mh=S.h&&S.h<S.mh?S.h:S.mh),e=S.get("href"),A=setTimeout((function(){v.show()}),100),S.get("inline")){var s=t(e).eq(0);i=t("<div>").hide().insertBefore(s),G.one(V,(function(){i.replaceWith(s)})),o(s)}else S.get("iframe")?o(" "):S.get("html")?o(S.get("html")):et(S,e)?(e=nt(S,e),C=S.get("createImg"),t(C).addClass(N+"Photo").bind("error."+N,(function(){o(K(Y,"Error").html(S.get("imgError")))})).one("load",(function(){a===X&&setTimeout((function(){var e;S.get("retinaImage")&&n.devicePixelRatio>1&&(C.height=C.height/n.devicePixelRatio,C.width=C.width/n.devicePixelRatio),S.get("scalePhotos")&&(r=function(){C.height-=C.height*e,C.width-=C.width*e},S.mw&&C.width>S.mw&&(e=(C.width-S.mw)/C.width,r()),S.mh&&C.height>S.mh&&(e=(C.height-S.mh)/C.height,r())),S.h&&(C.style.marginTop=Math.max(S.mh-C.height,0)/2+"px"),f[1]&&(S.get("loop")||f[T+1])&&(C.style.cursor="pointer",t(C).bind("click."+N,(function(){I.next()}))),C.style.width=C.width+"px",C.style.height=C.height+"px",o(C)}),1)})),C.src=e):e&&p.load(e,S.get("data"),(function(e,n){a===X&&o("error"===n?K(Y,"Error").html(S.get("xhrError")):t(this).contents())}))}()}}function ut(){i||(L=!1,h=t(n),i=K(Y).attr({id:$,class:!1===t.support.opacity?N+"IE":"",role:"dialog",tabindex:"-1"}).hide(),r=K(Y,"Overlay").hide(),v=t([K(Y,"LoadingOverlay")[0],K(Y,"LoadingGraphic")[0]]),o=K(Y,"Wrapper"),a=K(Y,"Content").append(g=K(Y,"Title"),m=K(Y,"Current"),w=t('<button type="button"/>').attr({id:N+"Previous"}),b=t('<button type="button"/>').attr({id:N+"Next"}),y=t('<button type="button"/>').attr({id:N+"Slideshow"}),v),x=t('<button type="button"/>').attr({id:N+"Close"}),o.append(K(Y).append(K(Y,"TopLeft"),s=K(Y,"TopCenter"),K(Y,"TopRight")),K(Y,!1,"clear:left").append(u=K(Y,"MiddleLeft"),a,c=K(Y,"MiddleRight")),K(Y,!1,"clear:left").append(K(Y,"BottomLeft"),l=K(Y,"BottomCenter"),K(Y,"BottomRight"))).find("div div").css({float:"left"}),p=K(Y,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),_=b.add(w).add(m).add(y)),e.body&&!i.parent().length&&t(e.body).append(r,i.append(o,p))}t[$]||(t(ut),(I=t.fn[$]=t[$]=function(n,o){var a=this;return n=n||{},t.isFunction(a)&&(a=t("<a/>"),n.open=!0),a[0]?(ut(),function(){function n(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),st(this))}return!!i&&(L||(L=!0,b.click((function(){I.next()})),w.click((function(){I.prev()})),x.click((function(){I.close()})),r.click((function(){S.get("overlayClose")&&I.close()})),t(e).bind("keydown."+N,(function(t){var e=t.keyCode;j&&S.get("escKey")&&27===e&&(t.preventDefault(),I.close()),j&&S.get("arrowKey")&&f[1]&&!t.altKey&&(37===e?(t.preventDefault(),w.click()):39===e&&(t.preventDefault(),b.click()))})),t.isFunction(t.fn.on)?t(e).on("click."+N,"."+F,n):t("."+F).live("click."+N,n)),!0)}()&&(o&&(n.onComplete=o),a.each((function(){var e=t.data(this,$)||{};t.data(this,$,t.extend(e,n))})).addClass(F),new J(a[0],n).get("open")&&st(a[0])),a):a}).position=function(e,n){var r,f,d,p=0,v=0,g=i.offset();function m(){s[0].style.width=l[0].style.width=a[0].style.width=parseInt(i[0].style.width,10)-P+"px",a[0].style.height=u[0].style.height=c[0].style.height=parseInt(i[0].style.height,10)-k+"px"}if(h.unbind("resize."+N),i.css({top:-9e4,left:-9e4}),f=h.scrollTop(),d=h.scrollLeft(),S.get("fixed")?(g.top-=f,g.left-=d,i.css({position:"fixed"})):(p=f,v=d,i.css({position:"absolute"})),!1!==S.get("right")?v+=Math.max(h.width()-S.w-O-P-tt(S.get("right"),"x"),0):!1!==S.get("left")?v+=tt(S.get("left"),"x"):v+=Math.round(Math.max(h.width()-S.w-O-P,0)/2),!1!==S.get("bottom")?p+=Math.max(Z()-S.h-E-k-tt(S.get("bottom"),"y"),0):!1!==S.get("top")?p+=tt(S.get("top"),"y"):p+=Math.round(Math.max(Z()-S.h-E-k,0)/2),i.css({top:g.top,left:g.left,visibility:"visible"}),o[0].style.width=o[0].style.height="9999px",r={width:S.w+O+P,height:S.h+E+k,top:p,left:v},e){var y=0;t.each(r,(function(t){r[t]===q[t]||(y=e)})),e=y}q=r,e||i.css(r),i.dequeue().animate(r,{duration:e||0,complete:function(){m(),M=!1,o[0].style.width=S.w+O+P+"px",o[0].style.height=S.h+E+k+"px",S.get("reposition")&&setTimeout((function(){h.bind("resize."+N,I.position)}),1),t.isFunction(n)&&n()},step:m})},I.resize=function(t){var e;j&&((t=t||{}).width&&(S.w=tt(t.width,"x")-O-P),t.innerWidth&&(S.w=tt(t.innerWidth,"x")),d.css({width:S.w}),t.height&&(S.h=tt(t.height,"y")-E-k),t.innerHeight&&(S.h=tt(t.innerHeight,"y")),t.innerHeight||t.height||(e=d.scrollTop(),d.css({height:"auto"}),S.h=d.height()),d.css({height:S.h}),e&&d.scrollTop(e),I.position("none"===S.get("transition")?0:S.get("speed")))},I.prep=function(n){if(j){var r,o="none"===S.get("transition")?0:S.get("speed");d.remove(),(d=K(Y,"LoadedContent").append(n)).hide().appendTo(p.show()).css({width:(S.w=S.w||d.width(),S.w=S.mw&&S.mw<S.w?S.mw:S.w,S.w),overflow:S.get("scrolling")?"auto":"hidden"}).css({height:(S.h=S.h||d.height(),S.h=S.mh&&S.mh<S.h?S.mh:S.h,S.h)}).prependTo(a),p.hide(),t(C).css({float:"none"}),it(S.get("className")),r=function(){var n,r,a=f.length;function s(){!1===t.support.opacity&&i[0].style.removeAttribute("filter")}j&&(r=function(){clearTimeout(A),v.hide(),ot(z),S.get("onComplete")},g.html(S.get("title")).show(),d.show(),a>1?("string"==typeof S.get("current")&&m.html(S.get("current").replace("{current}",T+1).replace("{total}",a)).show(),b[S.get("loop")||T<a-1?"show":"hide"]().html(S.get("next")),w[S.get("loop")||T?"show":"hide"]().html(S.get("previous")),at(),S.get("preloading")&&t.each([Q(-1),Q(1)],(function(){var n=f[this],r=new J(n,t.data(n,$)),i=r.get("href");i&&et(r,i)&&(i=nt(r,i),e.createElement("img").src=i)}))):_.hide(),S.get("iframe")?(n=S.get("createIframe"),S.get("scrolling")||(n.scrolling="no"),t(n).attr({src:S.get("href"),class:N+"Iframe"}).one("load",r).appendTo(d),G.one(V,(function(){n.src="//about:blank"})),S.get("fastIframe")&&t(n).trigger("load")):r(),"fade"===S.get("transition")?i.fadeTo(o,1,s):s())},"fade"===S.get("transition")?i.fadeTo(o,0,(function(){I.position(0,r)})):I.position(o,r)}},I.next=function(){!M&&f[1]&&(S.get("loop")||f[T+1])&&(T=Q(1),st(f[T]))},I.prev=function(){!M&&f[1]&&(S.get("loop")||T)&&(T=Q(-1),st(f[T]))},I.close=function(){j&&!R&&(R=!0,j=!1,ot(W),S.get("onCleanup"),h.unbind("."+N),r.fadeTo(S.get("fadeOut")||0,0),i.stop().fadeTo(S.get("fadeOut")||0,0,(function(){i.hide(),r.hide(),ot(V),d.remove(),setTimeout((function(){R=!1,ot(H),S.get("onClosed")}),1)})))},I.remove=function(){i&&(i.stop(),t[$].close(),i.stop(!1,!0).remove(),r.remove(),R=!1,i=null,t("."+F).removeData($).removeClass(F),t(e).unbind("click."+N).unbind("keydown."+N))},I.element=function(){return t(S.el)},I.settings=D)}(n(5311),document,window)},5557:function(t,e,n){!function(t){if(t.support.touch="ontouchend"in document,t.support.touch){var e,n=t.ui.mouse.prototype,r=n._mouseInit,i=n._mouseDestroy;n._touchStart=function(t){!e&&this._mouseCapture(t.originalEvent.changedTouches[0])&&(e=!0,this._touchMoved=!1,o(t,"mouseover"),o(t,"mousemove"),o(t,"mousedown"))},n._touchMove=function(t){e&&(this._touchMoved=!0,o(t,"mousemove"))},n._touchEnd=function(t){e&&(o(t,"mouseup"),o(t,"mouseout"),this._touchMoved||o(t,"click"),e=!1)},n._mouseInit=function(){var e=this;e.element.bind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),r.call(e)},n._mouseDestroy=function(){var e=this;e.element.unbind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),i.call(e)}}function o(t,e){if(!(t.originalEvent.touches.length>1)){t.preventDefault();var n=t.originalEvent.changedTouches[0],r=document.createEvent("MouseEvents");r.initMouseEvent(e,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(r)}}}(n(5311))},1870:function(t,e,n){var r,i,o;i=[n(5311),n(5592)],void 0===(o="function"==typeof(r=function(t){return t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase())})?r.apply(e,i):r)||(t.exports=o)},7053:function(t,e,n){var r,i,o;i=[n(5311),n(5592)],void 0===(o="function"==typeof(r=function(t){return t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}})?r.apply(e,i):r)||(t.exports=o)},5592:function(t,e,n){var r,i,o;i=[n(5311)],void 0===(o="function"==typeof(r=function(t){return t.ui=t.ui||{},t.ui.version="1.12.1"})?r.apply(e,i):r)||(t.exports=o)},6891:function(t,e,n){var r,i,o;i=[n(5311),n(5592)],r=function(t){var e,n=0,r=Array.prototype.slice;return t.cleanData=(e=t.cleanData,function(n){var r,i,o;for(o=0;null!=(i=n[o]);o++)try{(r=t._data(i,"events"))&&r.remove&&t(i).triggerHandler("remove")}catch(t){}e(n)}),t.widget=function(e,n,r){var i,o,a,s={},u=e.split(".")[0],c=u+"-"+(e=e.split(".")[1]);return r||(r=n,n=t.Widget),t.isArray(r)&&(r=t.extend.apply(null,[{}].concat(r))),t.expr[":"][c.toLowerCase()]=function(e){return!!t.data(e,c)},t[u]=t[u]||{},i=t[u][e],o=t[u][e]=function(t,e){if(!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},t.extend(o,i,{version:r.version,_proto:t.extend({},r),_childConstructors:[]}),(a=new n).options=t.widget.extend({},a.options),t.each(r,(function(e,r){t.isFunction(r)?s[e]=function(){function t(){return n.prototype[e].apply(this,arguments)}function i(t){return n.prototype[e].apply(this,t)}return function(){var e,n=this._super,o=this._superApply;return this._super=t,this._superApply=i,e=r.apply(this,arguments),this._super=n,this._superApply=o,e}}():s[e]=r})),o.prototype=t.widget.extend(a,{widgetEventPrefix:i&&a.widgetEventPrefix||e},s,{constructor:o,namespace:u,widgetName:e,widgetFullName:c}),i?(t.each(i._childConstructors,(function(e,n){var r=n.prototype;t.widget(r.namespace+"."+r.widgetName,o,n._proto)})),delete i._childConstructors):n._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var n,i,o=r.call(arguments,1),a=0,s=o.length;a<s;a++)for(n in o[a])i=o[a][n],o[a].hasOwnProperty(n)&&void 0!==i&&(t.isPlainObject(i)?e[n]=t.isPlainObject(e[n])?t.widget.extend({},e[n],i):t.widget.extend({},i):e[n]=i);return e},t.widget.bridge=function(e,n){var i=n.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,s=r.call(arguments,1),u=this;return a?this.length||"instance"!==o?this.each((function(){var n,r=t.data(this,i);return"instance"===o?(u=r,!1):r?t.isFunction(r[o])&&"_"!==o.charAt(0)?(n=r[o].apply(r,s))!==r&&void 0!==n?(u=n&&n.jquery?u.pushStack(n.get()):n,!1):void 0:t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+o+"'")})):u=void 0:(s.length&&(o=t.widget.extend.apply(null,[o].concat(s))),this.each((function(){var e=t.data(this,i);e?(e.option(o||{}),e._init&&e._init()):t.data(this,i,new n(o,this))}))),u}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,r){r=t(r||this.defaultElement||this)[0],this.element=t(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},r!==this&&(t.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===r&&this.destroy()}}),this.document=t(r.style?r.ownerDocument:r.document||r),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,(function(t,n){e._removeClass(n,t)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,n){var r,i,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},r=e.split("."),e=r.shift(),r.length){for(i=a[e]=t.widget.extend({},this.options[e]),o=0;o<r.length-1;o++)i[r[o]]=i[r[o]]||{},i=i[r[o]];if(e=r.pop(),1===arguments.length)return void 0===i[e]?null:i[e];i[e]=n}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=n}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var n,r,i;for(n in e)i=this.classesElementLookup[n],e[n]!==this.options.classes[n]&&i&&i.length&&(r=t(i.get()),this._removeClass(i,n),r.addClass(this._classes({element:r,keys:n,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){var n=[],r=this;function i(i,o){var a,s;for(s=0;s<i.length;s++)a=r.classesElementLookup[i[s]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),r.classesElementLookup[i[s]]=a,n.push(i[s]),o&&e.classes[i[s]]&&n.push(e.classes[i[s]])}return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(e){var n=this;t.each(n.classesElementLookup,(function(r,i){-1!==t.inArray(e.target,i)&&(n.classesElementLookup[r]=t(i.not(e.target).get()))}))},_removeClass:function(t,e,n){return this._toggleClass(t,e,n,!1)},_addClass:function(t,e,n){return this._toggleClass(t,e,n,!0)},_toggleClass:function(t,e,n,r){r="boolean"==typeof r?r:n;var i="string"==typeof t||null===t,o={extra:i?e:n,keys:i?t:e,element:i?this.element:t,add:r};return o.element.toggleClass(this._classes(o),r),this},_on:function(e,n,r){var i,o=this;"boolean"!=typeof e&&(r=n,n=e,e=!1),r?(n=i=t(n),this.bindings=this.bindings.add(n)):(r=n,n=this.element,i=this.widget()),t.each(r,(function(r,a){function s(){if(e||!0!==o.options.disabled&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof a?o[a]:a).apply(o,arguments)}"string"!=typeof a&&(s.guid=a.guid=a.guid||s.guid||t.guid++);var u=r.match(/^([\w:-]*)\s*(.*)$/),c=u[1]+o.eventNamespace,l=u[2];l?i.on(c,l,s):n.on(c,s)}))},_off:function(e,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(n).off(n),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){var n=this;return setTimeout((function(){return("string"==typeof t?n[t]:t).apply(n,arguments)}),e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,n,r){var i,o,a=this.options[e];if(r=r||{},(n=t.Event(n)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(i in o)i in n||(n[i]=o[i]);return this.element.trigger(n,r),!(t.isFunction(a)&&!1===a.apply(this.element[0],[n].concat(r))||n.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},(function(e,n){t.Widget.prototype["_"+e]=function(r,i,o){var a;"string"==typeof i&&(i={effect:i});var s=i?!0===i||"number"==typeof i?n:i.effect||n:e;"number"==typeof(i=i||{})&&(i={duration:i}),a=!t.isEmptyObject(i),i.complete=o,i.delay&&r.delay(i.delay),a&&t.effects&&t.effects.effect[s]?r[e](i):s!==e&&r[s]?r[s](i.duration,i.easing,o):r.queue((function(n){t(this)[e](),o&&o.call(r[0]),n()}))}})),t.widget},void 0===(o=r.apply(e,i))||(t.exports=o)},6177:function(t,e,n){var r,i,o;i=[n(5311),n(1870),n(5592),n(6891)],void 0===(o="function"==typeof(r=function(t){var e=!1;return t(document).on("mouseup",(function(){e=!1})),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,(function(t){return e._mouseDown(t)})).on("click."+this.widgetName,(function(n){if(!0===t.data(n.target,e.widgetName+".preventClickEvent"))return t.removeData(n.target,e.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1})),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(n){if(!e){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(n),this._mouseDownEvent=n;var r=this,i=1===n.which,o=!("string"!=typeof this.options.cancel||!n.target.nodeName)&&t(n.target).closest(this.options.cancel).length;return!(i&&!o&&this._mouseCapture(n)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){r.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(n)&&this._mouseDelayMet(n)&&(this._mouseStarted=!1!==this._mouseStart(n),!this._mouseStarted)?(n.preventDefault(),0):(!0===t.data(n.target,this.widgetName+".preventClickEvent")&&t.removeData(n.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return r._mouseMove(t)},this._mouseUpDelegate=function(t){return r._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),n.preventDefault(),e=!0,0)))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(n){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,n.target===this._mouseDownEvent.target&&t.data(n.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(n)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,e=!1,n.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})?r.apply(e,i):r)||(t.exports=o)},6227:function(t,e,n){var r,i,o;i=[n(5311),n(6177),n(7053),n(5592),n(6891)],r=function(t){return t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,n,r=this.options,i=this.element.find(".ui-slider-handle"),o=[];for(n=r.values&&r.values.length||1,i.length>n&&(i.slice(n).remove(),i=i.slice(0,n)),e=i.length;e<n;e++)o.push("<span tabindex='0'></span>");this.handles=i.add(t(o.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each((function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)}))},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==e.range&&"max"!==e.range||this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var n,r,i,o,a,s,u,c=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),n={x:e.pageX,y:e.pageY},r=this._normValueFromMouse(n),i=this._valueMax()-this._valueMin()+1,this.handles.each((function(e){var n=Math.abs(r-c.values(e));(i>n||i===n&&(e===c._lastChangedValue||c.values(e)===l.min))&&(i=n,o=t(this),a=e)})),!1!==this._start(e,a)&&(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),s=o.offset(),u=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=u?{left:0,top:0}:{left:e.pageX-s.left-o.width()/2,top:e.pageY-s.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,r),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},n=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,n),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,n,r,i,o;return"horizontal"===this.orientation?(e=this.elementSize.width,n=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,n=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),(r=n/e)>1&&(r=1),r<0&&(r=0),"vertical"===this.orientation&&(r=1-r),i=this._valueMax()-this._valueMin(),o=this._valueMin()+r*i,this._trimAlignValue(o)},_uiHash:function(t,e,n){var r={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(r.value=void 0!==e?e:this.values(t),r.values=n||this.values()),r},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,n){var r,i=this.value(),o=this.values();this._hasMultipleValues()&&(r=this.values(e?0:1),i=this.values(e),2===this.options.values.length&&!0===this.options.range&&(n=0===e?Math.min(r,n):Math.max(r,n)),o[e]=n),n!==i&&!1!==this._trigger("slide",t,this._uiHash(e,n,o))&&(this._hasMultipleValues()?this.values(e,n):this.value(n))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,n){var r,i,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(n),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(r=this.options.values,i=arguments[0],o=0;o<r.length;o+=1)r[o]=this._trimAlignValue(i[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,n){var r,i=0;switch("range"===e&&!0===this.options.range&&("min"===n?(this.options.value=this._values(0),this.options.values=null):"max"===n&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(i=this.options.values.length),this._super(e,n),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(n),this.handles.css("horizontal"===n?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),r=i-1;r>=0;r--)this._change(null,r);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return this._trimAlignValue(t)},_values:function(t){var e,n,r;if(arguments.length)return e=this.options.values[t],this._trimAlignValue(e);if(this._hasMultipleValues()){for(n=this.options.values.slice(),r=0;r<n.length;r+=1)n[r]=this._trimAlignValue(n[r]);return n}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,n=(t-this._valueMin())%e,r=t-n;return 2*Math.abs(n)>=e&&(r+=n>0?e:-e),parseFloat(r.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),n=this.options.step;(t=Math.round((t-e)/n)*n+e)>this.options.max&&(t-=n),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),n=e.indexOf(".");return-1===n?0:e.length-n-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,n,r,i,o,a=this.options.range,s=this.options,u=this,c=!this._animateOff&&s.animate,l={};this._hasMultipleValues()?this.handles.each((function(r){n=(u.values(r)-u._valueMin())/(u._valueMax()-u._valueMin())*100,l["horizontal"===u.orientation?"left":"bottom"]=n+"%",t(this).stop(1,1)[c?"animate":"css"](l,s.animate),!0===u.options.range&&("horizontal"===u.orientation?(0===r&&u.range.stop(1,1)[c?"animate":"css"]({left:n+"%"},s.animate),1===r&&u.range[c?"animate":"css"]({width:n-e+"%"},{queue:!1,duration:s.animate})):(0===r&&u.range.stop(1,1)[c?"animate":"css"]({bottom:n+"%"},s.animate),1===r&&u.range[c?"animate":"css"]({height:n-e+"%"},{queue:!1,duration:s.animate}))),e=n})):(r=this.value(),i=this._valueMin(),o=this._valueMax(),n=o!==i?(r-i)/(o-i)*100:0,l["horizontal"===this.orientation?"left":"bottom"]=n+"%",this.handle.stop(1,1)[c?"animate":"css"](l,s.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:n+"%"},s.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:100-n+"%"},s.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:n+"%"},s.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:100-n+"%"},s.animate))},_handleEvents:{keydown:function(e){var n,r,i,o=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),!1===this._start(e,o)))return}switch(i=this.options.step,n=r=this._hasMultipleValues()?this.values(o):this.value(),e.keyCode){case t.ui.keyCode.HOME:r=this._valueMin();break;case t.ui.keyCode.END:r=this._valueMax();break;case t.ui.keyCode.PAGE_UP:r=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:r=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;r=this._trimAlignValue(n+i);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;r=this._trimAlignValue(n-i)}this._slide(e,o,r)},keyup:function(e){var n=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,n),this._change(e,n),this._removeClass(t(e.target),null,"ui-state-active"))}}})},void 0===(o=r.apply(e,i))||(t.exports=o)},5311:function(t){"use strict";t.exports=jQuery},509:function(t,e,n){"use strict";var r=n(9985),i=n(3691),o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not a function")}},2655:function(t,e,n){"use strict";var r=n(9429),i=n(3691),o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not a constructor")}},3550:function(t,e,n){"use strict";var r=n(9985),i=String,o=TypeError;t.exports=function(t){if("object"==typeof t||r(t))return t;throw new o("Can't set "+i(t)+" as a prototype")}},7370:function(t,e,n){"use strict";var r=n(4201),i=n(5391),o=n(2560).f,a=r("unscopables"),s=Array.prototype;void 0===s[a]&&o(s,a,{configurable:!0,value:i(null)}),t.exports=function(t){s[a][t]=!0}},727:function(t,e,n){"use strict";var r=n(730).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},767:function(t,e,n){"use strict";var r=n(3622),i=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw new i("Incorrect invocation")}},5027:function(t,e,n){"use strict";var r=n(8999),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not an object")}},1655:function(t,e,n){"use strict";var r=n(3689);t.exports=r((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},2872:function(t,e,n){"use strict";var r=n(690),i=n(7578),o=n(6310);t.exports=function(t){for(var e=r(this),n=o(e),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>s;)e[s++]=t;return e}},7612:function(t,e,n){"use strict";var r=n(2960).forEach,i=n(6834)("forEach");t.exports=i?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},1055:function(t,e,n){"use strict";var r=n(4071),i=n(2615),o=n(690),a=n(1228),s=n(3292),u=n(9429),c=n(6310),l=n(6522),f=n(5185),h=n(1664),d=Array;t.exports=function(t){var e=o(t),n=u(this),p=arguments.length,v=p>1?arguments[1]:void 0,g=void 0!==v;g&&(v=r(v,p>2?arguments[2]:void 0));var m,y,b,w,x,_,S=h(e),k=0;if(!S||this===d&&s(S))for(m=c(e),y=n?new this(m):d(m);m>k;k++)_=g?v(e[k],k):e[k],l(y,k,_);else for(x=(w=f(e,S)).next,y=n?new this:[];!(b=i(x,w)).done;k++)_=g?a(w,v,[b.value,k],!0):b.value,l(y,k,_);return y.length=k,y}},4328:function(t,e,n){"use strict";var r=n(5290),i=n(7578),o=n(6310),a=function(t){return function(e,n,a){var s,u=r(e),c=o(u),l=i(a,c);if(t&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},2960:function(t,e,n){"use strict";var r=n(4071),i=n(8844),o=n(4413),a=n(690),s=n(6310),u=n(7120),c=i([].push),l=function(t){var e=1===t,n=2===t,i=3===t,l=4===t,f=6===t,h=7===t,d=5===t||f;return function(p,v,g,m){for(var y,b,w=a(p),x=o(w),_=r(v,g),S=s(x),k=0,P=m||u,E=e?P(p,S):n||h?P(p,0):void 0;S>k;k++)if((d||k in x)&&(b=_(y=x[k],k,w),t))if(e)E[k]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return k;case 2:c(E,y)}else switch(t){case 4:return!1;case 7:c(E,y)}return f?-1:i||l?l:E}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},9042:function(t,e,n){"use strict";var r=n(3689),i=n(4201),o=n(3615),a=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},6834:function(t,e,n){"use strict";var r=n(3689);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},8820:function(t,e,n){"use strict";var r=n(509),i=n(690),o=n(4413),a=n(6310),s=TypeError,u=function(t){return function(e,n,u,c){r(n);var l=i(e),f=o(l),h=a(l),d=t?h-1:0,p=t?-1:1;if(u<2)for(;;){if(d in f){c=f[d],d+=p;break}if(d+=p,t?d<0:h<=d)throw new s("Reduce of empty array with no initial value")}for(;t?d>=0:h>d;d+=p)d in f&&(c=n(c,f[d],d,l));return c}};t.exports={left:u(!1),right:u(!0)}},5649:function(t,e,n){"use strict";var r=n(7697),i=n(2297),o=TypeError,a=Object.getOwnPropertyDescriptor,s=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(i(t)&&!a(t,"length").writable)throw new o("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},9015:function(t,e,n){"use strict";var r=n(7578),i=n(6310),o=n(6522),a=Array,s=Math.max;t.exports=function(t,e,n){for(var u=i(t),c=r(e,u),l=r(void 0===n?u:n,u),f=a(s(l-c,0)),h=0;c<l;c++,h++)o(f,h,t[c]);return f.length=h,f}},6004:function(t,e,n){"use strict";var r=n(8844);t.exports=r([].slice)},382:function(t,e,n){"use strict";var r=n(9015),i=Math.floor,o=function(t,e){var n=t.length,u=i(n/2);return n<8?a(t,e):s(t,o(r(t,0,u),e),o(r(t,u),e),e)},a=function(t,e){for(var n,r,i=t.length,o=1;o<i;){for(r=o,n=t[o];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==o++&&(t[r]=n)}return t},s=function(t,e,n,r){for(var i=e.length,o=n.length,a=0,s=0;a<i||s<o;)t[a+s]=a<i&&s<o?r(e[a],n[s])<=0?e[a++]:n[s++]:a<i?e[a++]:n[s++];return t};t.exports=o},5271:function(t,e,n){"use strict";var r=n(2297),i=n(9429),o=n(8999),a=n(4201)("species"),s=Array;t.exports=function(t){var e;return r(t)&&(e=t.constructor,(i(e)&&(e===s||r(e.prototype))||o(e)&&null===(e=e[a]))&&(e=void 0)),void 0===e?s:e}},7120:function(t,e,n){"use strict";var r=n(5271);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},1228:function(t,e,n){"use strict";var r=n(5027),i=n(2125);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){i(t,"throw",e)}}},6431:function(t,e,n){"use strict";var r=n(4201)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){try{if(!e&&!i)return!1}catch(t){return!1}var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},6648:function(t,e,n){"use strict";var r=n(8844),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},926:function(t,e,n){"use strict";var r=n(3043),i=n(9985),o=n(6648),a=n(4201)("toStringTag"),s=Object,u="Arguments"===o(function(){return arguments}());t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=s(t),a))?n:u?o(e):"Object"===(r=o(e))&&i(e.callee)?"Arguments":r}},800:function(t,e,n){"use strict";var r=n(5391),i=n(2148),o=n(6045),a=n(4071),s=n(767),u=n(981),c=n(8734),l=n(1934),f=n(7807),h=n(4241),d=n(7697),p=n(5375).fastKey,v=n(618),g=v.set,m=v.getterFor;t.exports={getConstructor:function(t,e,n,l){var f=t((function(t,i){s(t,h),g(t,{type:e,index:r(null),first:void 0,last:void 0,size:0}),d||(t.size=0),u(i)||c(i,t[l],{that:t,AS_ENTRIES:n})})),h=f.prototype,v=m(e),y=function(t,e,n){var r,i,o=v(t),a=b(t,e);return a?a.value=n:(o.last=a={index:i=p(e,!0),key:e,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),d?o.size++:t.size++,"F"!==i&&(o.index[i]=a)),t},b=function(t,e){var n,r=v(t),i=p(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key===e)return n};return o(h,{clear:function(){for(var t=v(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,d?t.size=0:this.size=0},delete:function(t){var e=this,n=v(e),r=b(e,t);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first===r&&(n.first=i),n.last===r&&(n.last=o),d?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=v(this),r=a(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),o(h,n?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),d&&i(h,"size",{configurable:!0,get:function(){return v(this).size}}),f},setStrong:function(t,e,n){var r=e+" Iterator",i=m(e),o=m(r);l(t,e,(function(t,e){g(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?f("keys"===e?n.key:"values"===e?n.value:[n.key,n.value],!1):(t.target=void 0,f(void 0,!0))}),n?"entries":"values",!n,!0),h(e)}}},637:function(t,e,n){"use strict";var r=n(8844),i=n(6045),o=n(5375).getWeakData,a=n(767),s=n(5027),u=n(981),c=n(8999),l=n(8734),f=n(2960),h=n(6812),d=n(618),p=d.set,v=d.getterFor,g=f.find,m=f.findIndex,y=r([].splice),b=0,w=function(t){return t.frozen||(t.frozen=new x)},x=function(){this.entries=[]},_=function(t,e){return g(t.entries,(function(t){return t[0]===e}))};x.prototype={get:function(t){var e=_(this,t);if(e)return e[1]},has:function(t){return!!_(this,t)},set:function(t,e){var n=_(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=m(this.entries,(function(e){return e[0]===t}));return~e&&y(this.entries,e,1),!!~e}},t.exports={getConstructor:function(t,e,n,r){var f=t((function(t,i){a(t,d),p(t,{type:e,id:b++,frozen:void 0}),u(i)||l(i,t[r],{that:t,AS_ENTRIES:n})})),d=f.prototype,g=v(e),m=function(t,e,n){var r=g(t),i=o(s(e),!0);return!0===i?w(r).set(e,n):i[r.id]=n,t};return i(d,{delete:function(t){var e=g(this);if(!c(t))return!1;var n=o(t);return!0===n?w(e).delete(t):n&&h(n,e.id)&&delete n[e.id]},has:function(t){var e=g(this);if(!c(t))return!1;var n=o(t);return!0===n?w(e).has(t):n&&h(n,e.id)}}),i(d,n?{get:function(t){var e=g(this);if(c(t)){var n=o(t);return!0===n?w(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return m(this,t,e)}}:{add:function(t){return m(this,t,!0)}}),f}}},319:function(t,e,n){"use strict";var r=n(9989),i=n(9037),o=n(8844),a=n(5266),s=n(1880),u=n(5375),c=n(8734),l=n(767),f=n(9985),h=n(981),d=n(8999),p=n(3689),v=n(6431),g=n(5997),m=n(3457);t.exports=function(t,e,n){var y=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),w=y?"set":"add",x=i[t],_=x&&x.prototype,S=x,k={},P=function(t){var e=o(_[t]);s(_,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return b&&!d(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(a(t,!f(x)||!(b||_.forEach&&!p((function(){(new x).entries().next()})))))S=n.getConstructor(e,t,y,w),u.enable();else if(a(t,!0)){var E=new S,O=E[w](b?{}:-0,1)!==E,T=p((function(){E.has(1)})),C=v((function(t){new x(t)})),j=!b&&p((function(){for(var t=new x,e=5;e--;)t[w](e,e);return!t.has(-0)}));C||((S=e((function(t,e){l(t,_);var n=m(new x,t,S);return h(e)||c(e,n[w],{that:n,AS_ENTRIES:y}),n}))).prototype=_,_.constructor=S),(T||j)&&(P("delete"),P("has"),y&&P("get")),(j||O)&&P(w),b&&_.clear&&delete _.clear}return k[t]=S,r({global:!0,constructor:!0,forced:S!==x},k),g(S,t),b||n.setStrong(S,t,y),S}},8758:function(t,e,n){"use strict";var r=n(6812),i=n(9152),o=n(2474),a=n(2560);t.exports=function(t,e,n){for(var s=i(e),u=a.f,c=o.f,l=0;l<s.length;l++){var f=s[l];r(t,f)||n&&r(n,f)||u(t,f,c(e,f))}}},7413:function(t,e,n){"use strict";var r=n(4201)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},1748:function(t,e,n){"use strict";var r=n(3689);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},7807:function(t){"use strict";t.exports=function(t,e){return{value:t,done:e}}},5773:function(t,e,n){"use strict";var r=n(7697),i=n(2560),o=n(5684);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},5684:function(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6522:function(t,e,n){"use strict";var r=n(8360),i=n(2560),o=n(5684);t.exports=function(t,e,n){var a=r(e);a in t?i.f(t,a,o(0,n)):t[a]=n}},1797:function(t,e,n){"use strict";var r=n(5027),i=n(5899),o=TypeError;t.exports=function(t){if(r(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw new o("Incorrect hint");return i(this,t)}},2148:function(t,e,n){"use strict";var r=n(8702),i=n(2560);t.exports=function(t,e,n){return n.get&&r(n.get,e,{getter:!0}),n.set&&r(n.set,e,{setter:!0}),i.f(t,e,n)}},1880:function(t,e,n){"use strict";var r=n(9985),i=n(2560),o=n(8702),a=n(5014);t.exports=function(t,e,n,s){s||(s={});var u=s.enumerable,c=void 0!==s.name?s.name:e;if(r(n)&&o(n,c,s),s.global)u?t[e]=n:a(e,n);else{try{s.unsafe?t[e]&&(u=!0):delete t[e]}catch(t){}u?t[e]=n:i.f(t,e,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},6045:function(t,e,n){"use strict";var r=n(1880);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},5014:function(t,e,n){"use strict";var r=n(9037),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},8494:function(t,e,n){"use strict";var r=n(3691),i=TypeError;t.exports=function(t,e){if(!delete t[e])throw new i("Cannot delete property "+r(e)+" of "+r(t))}},7697:function(t,e,n){"use strict";var r=n(3689);t.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2659:function(t){"use strict";var e="object"==typeof document&&document.all,n=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:n}},6420:function(t,e,n){"use strict";var r=n(9037),i=n(8999),o=r.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},5565:function(t){"use strict";var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},6338:function(t){"use strict";t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},3265:function(t,e,n){"use strict";var r=n(6420)("span").classList,i=r&&r.constructor&&r.constructor.prototype;t.exports=i===Object.prototype?void 0:i},7365:function(t,e,n){"use strict";var r=n(71).match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},2532:function(t,e,n){"use strict";var r=n(8563),i=n(806);t.exports=!r&&!i&&"object"==typeof window&&"object"==typeof document},8563:function(t){"use strict";t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},7298:function(t,e,n){"use strict";var r=n(71);t.exports=/MSIE|Trident/.test(r)},3221:function(t,e,n){"use strict";var r=n(71);t.exports=/ipad|iphone|ipod/i.test(r)&&"undefined"!=typeof Pebble},4764:function(t,e,n){"use strict";var r=n(71);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},806:function(t,e,n){"use strict";var r=n(9037),i=n(6648);t.exports="process"===i(r.process)},7486:function(t,e,n){"use strict";var r=n(71);t.exports=/web0s(?!.*chrome)/i.test(r)},71:function(t){"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3615:function(t,e,n){"use strict";var r,i,o=n(9037),a=n(71),s=o.process,u=o.Deno,c=s&&s.versions||u&&u.version,l=c&&c.v8;l&&(i=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},7922:function(t,e,n){"use strict";var r=n(71).match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},2739:function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},9989:function(t,e,n){"use strict";var r=n(9037),i=n(2474).f,o=n(5773),a=n(1880),s=n(5014),u=n(8758),c=n(5266);t.exports=function(t,e){var n,l,f,h,d,p=t.target,v=t.global,g=t.stat;if(n=v?r:g?r[p]||s(p,{}):(r[p]||{}).prototype)for(l in e){if(h=e[l],f=t.dontCallGetSet?(d=i(n,l))&&d.value:n[l],!c(v?l:p+(g?".":"#")+l,t.forced)&&void 0!==f){if(typeof h==typeof f)continue;u(h,f)}(t.sham||f&&f.sham)&&o(h,"sham",!0),a(n,l,h,t)}}},3689:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},8678:function(t,e,n){"use strict";n(4043);var r=n(6576),i=n(1880),o=n(6308),a=n(3689),s=n(4201),u=n(5773),c=s("species"),l=RegExp.prototype;t.exports=function(t,e,n,f){var h=s(t),d=!a((function(){var e={};return e[h]=function(){return 7},7!==""[t](e)})),p=d&&!a((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return e=!0,null},n[h](""),!e}));if(!d||!p||n){var v=r(/./[h]),g=e(h,""[t],(function(t,e,n,i,a){var s=r(t),u=e.exec;return u===o||u===l.exec?d&&!a?{done:!0,value:v(e,n,i)}:{done:!0,value:s(n,e,i)}:{done:!1}}));i(String.prototype,t,g[0]),i(l,h,g[1])}f&&u(l[h],"sham",!0)}},7809:function(t,e,n){"use strict";var r=n(2297),i=n(6310),o=n(5565),a=n(4071),s=function(t,e,n,u,c,l,f,h){for(var d,p,v=c,g=0,m=!!f&&a(f,h);g<u;)g in n&&(d=m?m(n[g],g,e):n[g],l>0&&r(d)?(p=i(d),v=s(t,e,d,p,v,l-1)-1):(o(v+1),t[v]=d),v++),g++;return v};t.exports=s},1594:function(t,e,n){"use strict";var r=n(3689);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},1735:function(t,e,n){"use strict";var r=n(7215),i=Function.prototype,o=i.apply,a=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(o):function(){return a.apply(o,arguments)})},4071:function(t,e,n){"use strict";var r=n(6576),i=n(509),o=n(7215),a=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?a(t,e):function(){return t.apply(e,arguments)}}},7215:function(t,e,n){"use strict";var r=n(3689);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},6761:function(t,e,n){"use strict";var r=n(8844),i=n(509),o=n(8999),a=n(6812),s=n(6004),u=n(7215),c=Function,l=r([].concat),f=r([].join),h={};t.exports=u?c.bind:function(t){var e=i(this),n=e.prototype,r=s(arguments,1),u=function(){var n=l(r,s(arguments));return this instanceof u?function(t,e,n){if(!a(h,e)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";h[e]=c("C,a","return new C("+f(r,",")+")")}return h[e](t,n)}(e,n.length,n):e.apply(t,n)};return o(n)&&(u.prototype=n),u}},2615:function(t,e,n){"use strict";var r=n(7215),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},1236:function(t,e,n){"use strict";var r=n(7697),i=n(6812),o=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=i(o,"name"),u=s&&"something"===function(){}.name,c=s&&(!r||r&&a(o,"name").configurable);t.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},2743:function(t,e,n){"use strict";var r=n(8844),i=n(509);t.exports=function(t,e,n){try{return r(i(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},6576:function(t,e,n){"use strict";var r=n(6648),i=n(8844);t.exports=function(t){if("Function"===r(t))return i(t)}},8844:function(t,e,n){"use strict";var r=n(7215),i=Function.prototype,o=i.call,a=r&&i.bind.bind(o,o);t.exports=r?a:function(t){return function(){return o.apply(t,arguments)}}},6058:function(t,e,n){"use strict";var r=n(9037),i=n(9985);t.exports=function(t,e){return arguments.length<2?(n=r[t],i(n)?n:void 0):r[t]&&r[t][e];var n}},1664:function(t,e,n){"use strict";var r=n(926),i=n(4849),o=n(981),a=n(9478),s=n(4201)("iterator");t.exports=function(t){if(!o(t))return i(t,s)||i(t,"@@iterator")||a[r(t)]}},5185:function(t,e,n){"use strict";var r=n(2615),i=n(509),o=n(5027),a=n(3691),s=n(1664),u=TypeError;t.exports=function(t,e){var n=arguments.length<2?s(t):e;if(i(n))return o(r(n,t));throw new u(a(t)+" is not iterable")}},2643:function(t,e,n){"use strict";var r=n(8844),i=n(2297),o=n(9985),a=n(6648),s=n(4327),u=r([].push);t.exports=function(t){if(o(t))return t;if(i(t)){for(var e=t.length,n=[],r=0;r<e;r++){var c=t[r];"string"==typeof c?u(n,c):"number"!=typeof c&&"Number"!==a(c)&&"String"!==a(c)||u(n,s(c))}var l=n.length,f=!0;return function(t,e){if(f)return f=!1,e;if(i(this))return e;for(var r=0;r<l;r++)if(n[r]===t)return e}}}},4849:function(t,e,n){"use strict";var r=n(509),i=n(981);t.exports=function(t,e){var n=t[e];return i(n)?void 0:r(n)}},7017:function(t,e,n){"use strict";var r=n(8844),i=n(690),o=Math.floor,a=r("".charAt),s=r("".replace),u=r("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,r,f,h){var d=n+t.length,p=r.length,v=l;return void 0!==f&&(f=i(f),v=c),s(h,v,(function(i,s){var c;switch(a(s,0)){case"$":return"$";case"&":return t;case"`":return u(e,0,n);case"'":return u(e,d);case"<":c=f[u(s,1,-1)];break;default:var l=+s;if(0===l)return i;if(l>p){var h=o(l/10);return 0===h?i:h<=p?void 0===r[h-1]?a(s,1):r[h-1]+a(s,1):i}c=r[l-1]}return void 0===c?"":c}))}},9037:function(t,e,n){"use strict";var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},6812:function(t,e,n){"use strict";var r=n(8844),i=n(690),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},7248:function(t){"use strict";t.exports={}},920:function(t){"use strict";t.exports=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}},2688:function(t,e,n){"use strict";var r=n(6058);t.exports=r("document","documentElement")},8506:function(t,e,n){"use strict";var r=n(7697),i=n(3689),o=n(6420);t.exports=!r&&!i((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},4413:function(t,e,n){"use strict";var r=n(8844),i=n(3689),o=n(6648),a=Object,s=r("".split);t.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"===o(t)?s(t,""):a(t)}:a},3457:function(t,e,n){"use strict";var r=n(9985),i=n(8999),o=n(9385);t.exports=function(t,e,n){var a,s;return o&&r(a=e.constructor)&&a!==n&&i(s=a.prototype)&&s!==n.prototype&&o(t,s),t}},6738:function(t,e,n){"use strict";var r=n(8844),i=n(9985),o=n(4091),a=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return a(t)}),t.exports=o.inspectSource},5375:function(t,e,n){"use strict";var r=n(9989),i=n(8844),o=n(7248),a=n(8999),s=n(6812),u=n(2560).f,c=n(2741),l=n(6062),f=n(1129),h=n(4630),d=n(1594),p=!1,v=h("meta"),g=0,m=function(t){u(t,v,{value:{objectID:"O"+g++,weakData:{}}})},y=t.exports={enable:function(){y.enable=function(){},p=!0;var t=c.f,e=i([].splice),n={};n[v]=1,t(n).length&&(c.f=function(n){for(var r=t(n),i=0,o=r.length;i<o;i++)if(r[i]===v){e(r,i,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(t,e){if(!a(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!s(t,v)){if(!f(t))return"F";if(!e)return"E";m(t)}return t[v].objectID},getWeakData:function(t,e){if(!s(t,v)){if(!f(t))return!0;if(!e)return!1;m(t)}return t[v].weakData},onFreeze:function(t){return d&&p&&f(t)&&!s(t,v)&&m(t),t}};o[v]=!0},618:function(t,e,n){"use strict";var r,i,o,a=n(9834),s=n(9037),u=n(8999),c=n(5773),l=n(6812),f=n(4091),h=n(2713),d=n(7248),p="Object already initialized",v=s.TypeError,g=s.WeakMap;if(a||f.state){var m=f.state||(f.state=new g);m.get=m.get,m.has=m.has,m.set=m.set,r=function(t,e){if(m.has(t))throw new v(p);return e.facade=t,m.set(t,e),e},i=function(t){return m.get(t)||{}},o=function(t){return m.has(t)}}else{var y=h("state");d[y]=!0,r=function(t,e){if(l(t,y))throw new v(p);return e.facade=t,c(t,y,e),e},i=function(t){return l(t,y)?t[y]:{}},o=function(t){return l(t,y)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=i(e)).type!==t)throw new v("Incompatible receiver, "+t+" required");return n}}}},3292:function(t,e,n){"use strict";var r=n(4201),i=n(9478),o=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},2297:function(t,e,n){"use strict";var r=n(6648);t.exports=Array.isArray||function(t){return"Array"===r(t)}},9985:function(t,e,n){"use strict";var r=n(2659),i=r.all;t.exports=r.IS_HTMLDDA?function(t){return"function"==typeof t||t===i}:function(t){return"function"==typeof t}},9429:function(t,e,n){"use strict";var r=n(8844),i=n(3689),o=n(9985),a=n(926),s=n(6058),u=n(6738),c=function(){},l=[],f=s("Reflect","construct"),h=/^\s*(?:class|function)\b/,d=r(h.exec),p=!h.test(c),v=function(t){if(!o(t))return!1;try{return f(c,l,t),!0}catch(t){return!1}},g=function(t){if(!o(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!d(h,u(t))}catch(t){return!0}};g.sham=!0,t.exports=!f||i((function(){var t;return v(v.call)||!v(Object)||!v((function(){t=!0}))||t}))?g:v},6251:function(t,e,n){"use strict";var r=n(6812);t.exports=function(t){return void 0!==t&&(r(t,"value")||r(t,"writable"))}},5266:function(t,e,n){"use strict";var r=n(3689),i=n(9985),o=/#|\.prototype\./,a=function(t,e){var n=u[s(t)];return n===l||n!==c&&(i(e)?r(e):!!e)},s=a.normalize=function(t){return String(t).replace(o,".").toLowerCase()},u=a.data={},c=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},981:function(t){"use strict";t.exports=function(t){return null==t}},8999:function(t,e,n){"use strict";var r=n(9985),i=n(2659),o=i.all;t.exports=i.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:r(t)||t===o}:function(t){return"object"==typeof t?null!==t:r(t)}},3931:function(t){"use strict";t.exports=!1},1245:function(t,e,n){"use strict";var r=n(8999),i=n(6648),o=n(4201)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"===i(t))}},734:function(t,e,n){"use strict";var r=n(6058),i=n(9985),o=n(3622),a=n(9525),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,s(t))}},8734:function(t,e,n){"use strict";var r=n(4071),i=n(2615),o=n(5027),a=n(3691),s=n(3292),u=n(6310),c=n(3622),l=n(5185),f=n(1664),h=n(2125),d=TypeError,p=function(t,e){this.stopped=t,this.result=e},v=p.prototype;t.exports=function(t,e,n){var g,m,y,b,w,x,_,S=n&&n.that,k=!(!n||!n.AS_ENTRIES),P=!(!n||!n.IS_RECORD),E=!(!n||!n.IS_ITERATOR),O=!(!n||!n.INTERRUPTED),T=r(e,S),C=function(t){return g&&h(g,"normal",t),new p(!0,t)},j=function(t){return k?(o(t),O?T(t[0],t[1],C):T(t[0],t[1])):O?T(t,C):T(t)};if(P)g=t.iterator;else if(E)g=t;else{if(!(m=f(t)))throw new d(a(t)+" is not iterable");if(s(m)){for(y=0,b=u(t);b>y;y++)if((w=j(t[y]))&&c(v,w))return w;return new p(!1)}g=l(t,m)}for(x=P?t.next:g.next;!(_=i(x,g)).done;){try{w=j(_.value)}catch(t){h(g,"throw",t)}if("object"==typeof w&&w&&c(v,w))return w}return new p(!1)}},2125:function(t,e,n){"use strict";var r=n(2615),i=n(5027),o=n(4849);t.exports=function(t,e,n){var a,s;i(t);try{if(!(a=o(t,"return"))){if("throw"===e)throw n;return n}a=r(a,t)}catch(t){s=!0,a=t}if("throw"===e)throw n;if(s)throw a;return i(a),n}},974:function(t,e,n){"use strict";var r=n(2013).IteratorPrototype,i=n(5391),o=n(5684),a=n(5997),s=n(9478),u=function(){return this};t.exports=function(t,e,n,c){var l=e+" Iterator";return t.prototype=i(r,{next:o(+!c,n)}),a(t,l,!1,!0),s[l]=u,t}},1934:function(t,e,n){"use strict";var r=n(9989),i=n(2615),o=n(3931),a=n(1236),s=n(9985),u=n(974),c=n(1868),l=n(9385),f=n(5997),h=n(5773),d=n(1880),p=n(4201),v=n(9478),g=n(2013),m=a.PROPER,y=a.CONFIGURABLE,b=g.IteratorPrototype,w=g.BUGGY_SAFARI_ITERATORS,x=p("iterator"),_="keys",S="values",k="entries",P=function(){return this};t.exports=function(t,e,n,a,p,g,E){u(n,e,a);var O,T,C,j=function(t){if(t===p&&L)return L;if(!w&&t&&t in A)return A[t];switch(t){case _:case S:case k:return function(){return new n(this,t)}}return function(){return new n(this)}},M=e+" Iterator",R=!1,A=t.prototype,I=A[x]||A["@@iterator"]||p&&A[p],L=!w&&I||j(p),D="Array"===e&&A.entries||I;if(D&&(O=c(D.call(new t)))!==Object.prototype&&O.next&&(o||c(O)===b||(l?l(O,b):s(O[x])||d(O,x,P)),f(O,M,!0,!0),o&&(v[M]=P)),m&&p===S&&I&&I.name!==S&&(!o&&y?h(A,"name",S):(R=!0,L=function(){return i(I,this)})),p)if(T={values:j(S),keys:g?L:j(_),entries:j(k)},E)for(C in T)(w||R||!(C in A))&&d(A,C,T[C]);else r({target:e,proto:!0,forced:w||R},T);return o&&!E||A[x]===L||d(A,x,L,{name:p}),v[e]=L,T}},2013:function(t,e,n){"use strict";var r,i,o,a=n(3689),s=n(9985),u=n(8999),c=n(5391),l=n(1868),f=n(1880),h=n(4201),d=n(3931),p=h("iterator"),v=!1;[].keys&&("next"in(o=[].keys())?(i=l(l(o)))!==Object.prototype&&(r=i):v=!0),!u(r)||a((function(){var t={};return r[p].call(t)!==t}))?r={}:d&&(r=c(r)),s(r[p])||f(r,p,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:v}},9478:function(t){"use strict";t.exports={}},6310:function(t,e,n){"use strict";var r=n(3126);t.exports=function(t){return r(t.length)}},8702:function(t,e,n){"use strict";var r=n(8844),i=n(3689),o=n(9985),a=n(6812),s=n(7697),u=n(1236).CONFIGURABLE,c=n(6738),l=n(618),f=l.enforce,h=l.get,d=String,p=Object.defineProperty,v=r("".slice),g=r("".replace),m=r([].join),y=s&&!i((function(){return 8!==p((function(){}),"length",{value:8}).length})),b=String(String).split("String"),w=t.exports=function(t,e,n){"Symbol("===v(d(e),0,7)&&(e="["+g(d(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!a(t,"name")||u&&t.name!==e)&&(s?p(t,"name",{value:e,configurable:!0}):t.name=e),y&&n&&a(n,"arity")&&t.length!==n.arity&&p(t,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?s&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=f(t);return a(r,"source")||(r.source=m(b,"string"==typeof e?e:"")),t};Function.prototype.toString=w((function(){return o(this)&&h(this).source||c(this)}),"toString")},5680:function(t){"use strict";t.exports=Math.sign||function(t){var e=+t;return 0===e||e!=e?e:e<0?-1:1}},8828:function(t){"use strict";var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},231:function(t,e,n){"use strict";var r,i,o,a,s,u=n(9037),c=n(4071),l=n(2474).f,f=n(9886).set,h=n(4410),d=n(4764),p=n(3221),v=n(7486),g=n(806),m=u.MutationObserver||u.WebKitMutationObserver,y=u.document,b=u.process,w=u.Promise,x=l(u,"queueMicrotask"),_=x&&x.value;if(!_){var S=new h,k=function(){var t,e;for(g&&(t=b.domain)&&t.exit();e=S.get();)try{e()}catch(t){throw S.head&&r(),t}t&&t.enter()};d||g||v||!m||!y?!p&&w&&w.resolve?((a=w.resolve(void 0)).constructor=w,s=c(a.then,a),r=function(){s(k)}):g?r=function(){b.nextTick(k)}:(f=c(f,u),r=function(){f(k)}):(i=!0,o=y.createTextNode(""),new m(k).observe(o,{characterData:!0}),r=function(){o.data=i=!i}),_=function(t){S.head||r(),S.add(t)}}t.exports=_},8742:function(t,e,n){"use strict";var r=n(509),i=TypeError,o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw new i("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},2124:function(t,e,n){"use strict";var r=n(1245),i=TypeError;t.exports=function(t){if(r(t))throw new i("The method doesn't accept regular expressions");return t}},7897:function(t,e,n){"use strict";var r=n(9037),i=n(3689),o=n(8844),a=n(4327),s=n(1435).trim,u=n(6350),c=r.parseInt,l=r.Symbol,f=l&&l.iterator,h=/^[+-]?0x/i,d=o(h.exec),p=8!==c(u+"08")||22!==c(u+"0x16")||f&&!i((function(){c(Object(f))}));t.exports=p?function(t,e){var n=s(a(t));return c(n,e>>>0||(d(h,n)?16:10))}:c},5394:function(t,e,n){"use strict";var r=n(7697),i=n(8844),o=n(2615),a=n(3689),s=n(300),u=n(7518),c=n(9556),l=n(690),f=n(4413),h=Object.assign,d=Object.defineProperty,p=i([].concat);t.exports=!h||a((function(){if(r&&1!==h({b:1},h(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach((function(t){e[t]=t})),7!==h({},t)[n]||s(h({},e)).join("")!==i}))?function(t,e){for(var n=l(t),i=arguments.length,a=1,h=u.f,d=c.f;i>a;)for(var v,g=f(arguments[a++]),m=h?p(s(g),h(g)):s(g),y=m.length,b=0;y>b;)v=m[b++],r&&!o(d,g,v)||(n[v]=g[v]);return n}:h},5391:function(t,e,n){"use strict";var r,i=n(5027),o=n(8920),a=n(2739),s=n(7248),u=n(2688),c=n(6420),l=n(2713),f="prototype",h="script",d=l("IE_PROTO"),p=function(){},v=function(t){return"<"+h+">"+t+"</"+h+">"},g=function(t){t.write(v("")),t.close();var e=t.parentWindow.Object;return t=null,e},m=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;m="undefined"!=typeof document?document.domain&&r?g(r):(e=c("iframe"),n="java"+h+":",e.style.display="none",u.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(v("document.F=Object")),t.close(),t.F):g(r);for(var i=a.length;i--;)delete m[f][a[i]];return m()};s[d]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(p[f]=i(t),n=new p,p[f]=null,n[d]=t):n=m(),void 0===e?n:o.f(n,e)}},8920:function(t,e,n){"use strict";var r=n(7697),i=n(5648),o=n(2560),a=n(5027),s=n(5290),u=n(300);e.f=r&&!i?Object.defineProperties:function(t,e){a(t);for(var n,r=s(e),i=u(e),c=i.length,l=0;c>l;)o.f(t,n=i[l++],r[n]);return t}},2560:function(t,e,n){"use strict";var r=n(7697),i=n(8506),o=n(5648),a=n(5027),s=n(8360),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",d="writable";e.f=r?o?function(t,e,n){if(a(t),e=s(e),a(n),"function"==typeof t&&"prototype"===e&&"value"in n&&d in n&&!n[d]){var r=l(t,e);r&&r[d]&&(t[e]=n.value,n={configurable:h in n?n[h]:r[h],enumerable:f in n?n[f]:r[f],writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(a(t),e=s(e),a(n),i)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new u("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},2474:function(t,e,n){"use strict";var r=n(7697),i=n(2615),o=n(9556),a=n(5684),s=n(5290),u=n(8360),c=n(6812),l=n(8506),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=s(t),e=u(e),l)try{return f(t,e)}catch(t){}if(c(t,e))return a(!i(o.f,t,e),t[e])}},6062:function(t,e,n){"use strict";var r=n(6648),i=n(5290),o=n(2741).f,a=n(9015),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"Window"===r(t)?function(t){try{return o(t)}catch(t){return a(s)}}(t):o(i(t))}},2741:function(t,e,n){"use strict";var r=n(4948),i=n(2739).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},7518:function(t,e){"use strict";e.f=Object.getOwnPropertySymbols},1868:function(t,e,n){"use strict";var r=n(6812),i=n(9985),o=n(690),a=n(2713),s=n(1748),u=a("IE_PROTO"),c=Object,l=c.prototype;t.exports=s?c.getPrototypeOf:function(t){var e=o(t);if(r(e,u))return e[u];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof c?l:null}},1129:function(t,e,n){"use strict";var r=n(3689),i=n(8999),o=n(6648),a=n(1655),s=Object.isExtensible,u=r((function(){s(1)}));t.exports=u||a?function(t){return!!i(t)&&(!a||"ArrayBuffer"!==o(t))&&(!s||s(t))}:s},3622:function(t,e,n){"use strict";var r=n(8844);t.exports=r({}.isPrototypeOf)},4948:function(t,e,n){"use strict";var r=n(8844),i=n(6812),o=n(5290),a=n(4328).indexOf,s=n(7248),u=r([].push);t.exports=function(t,e){var n,r=o(t),c=0,l=[];for(n in r)!i(s,n)&&i(r,n)&&u(l,n);for(;e.length>c;)i(r,n=e[c++])&&(~a(l,n)||u(l,n));return l}},300:function(t,e,n){"use strict";var r=n(4948),i=n(2739);t.exports=Object.keys||function(t){return r(t,i)}},9556:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},9385:function(t,e,n){"use strict";var r=n(2743),i=n(5027),o=n(3550);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return i(n),o(r),e?t(n,r):n.__proto__=r,n}}():void 0)},9419:function(t,e,n){"use strict";var r=n(7697),i=n(3689),o=n(8844),a=n(1868),s=n(300),u=n(5290),c=o(n(9556).f),l=o([].push),f=r&&i((function(){var t=Object.create(null);return t[2]=2,!c(t,2)})),h=function(t){return function(e){for(var n,i=u(e),o=s(i),h=f&&null===a(i),d=o.length,p=0,v=[];d>p;)n=o[p++],r&&!(h?n in i:c(i,n))||l(v,t?[n,i[n]]:i[n]);return v}};t.exports={entries:h(!0),values:h(!1)}},5073:function(t,e,n){"use strict";var r=n(3043),i=n(926);t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},5899:function(t,e,n){"use strict";var r=n(2615),i=n(9985),o=n(8999),a=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&i(n=t.toString)&&!o(s=r(n,t)))return s;if(i(n=t.valueOf)&&!o(s=r(n,t)))return s;if("string"!==e&&i(n=t.toString)&&!o(s=r(n,t)))return s;throw new a("Can't convert object to primitive value")}},9152:function(t,e,n){"use strict";var r=n(6058),i=n(8844),o=n(2741),a=n(7518),s=n(5027),u=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(s(t)),n=a.f;return n?u(e,n(t)):e}},496:function(t,e,n){"use strict";var r=n(9037);t.exports=r},9302:function(t){"use strict";t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},7073:function(t,e,n){"use strict";var r=n(9037),i=n(7919),o=n(9985),a=n(5266),s=n(6738),u=n(4201),c=n(2532),l=n(8563),f=n(3931),h=n(3615),d=i&&i.prototype,p=u("species"),v=!1,g=o(r.PromiseRejectionEvent),m=a("Promise",(function(){var t=s(i),e=t!==String(i);if(!e&&66===h)return!0;if(f&&(!d.catch||!d.finally))return!0;if(!h||h<51||!/native code/.test(t)){var n=new i((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[p]=r,!(v=n.then((function(){}))instanceof r))return!0}return!e&&(c||l)&&!g}));t.exports={CONSTRUCTOR:m,REJECTION_EVENT:g,SUBCLASSING:v}},7919:function(t,e,n){"use strict";var r=n(9037);t.exports=r.Promise},2945:function(t,e,n){"use strict";var r=n(5027),i=n(8999),o=n(8742);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},562:function(t,e,n){"use strict";var r=n(7919),i=n(6431),o=n(7073).CONSTRUCTOR;t.exports=o||!i((function(t){r.all(t).then(void 0,(function(){}))}))},8055:function(t,e,n){"use strict";var r=n(2560).f;t.exports=function(t,e,n){n in t||r(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},4410:function(t){"use strict";var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=e},6100:function(t,e,n){"use strict";var r=n(2615),i=n(5027),o=n(9985),a=n(6648),s=n(6308),u=TypeError;t.exports=function(t,e){var n=t.exec;if(o(n)){var c=r(n,t,e);return null!==c&&i(c),c}if("RegExp"===a(t))return r(s,t,e);throw new u("RegExp#exec called on incompatible receiver")}},6308:function(t,e,n){"use strict";var r,i,o=n(2615),a=n(8844),s=n(4327),u=n(9633),c=n(7901),l=n(3430),f=n(5391),h=n(618).get,d=n(2100),p=n(6422),v=l("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,m=g,y=a("".charAt),b=a("".indexOf),w=a("".replace),x=a("".slice),_=(i=/b*/g,o(g,r=/a/,"a"),o(g,i,"a"),0!==r.lastIndex||0!==i.lastIndex),S=c.BROKEN_CARET,k=void 0!==/()??/.exec("")[1];(_||k||S||d||p)&&(m=function(t){var e,n,r,i,a,c,l,d=this,p=h(d),P=s(t),E=p.raw;if(E)return E.lastIndex=d.lastIndex,e=o(m,E,P),d.lastIndex=E.lastIndex,e;var O=p.groups,T=S&&d.sticky,C=o(u,d),j=d.source,M=0,R=P;if(T&&(C=w(C,"y",""),-1===b(C,"g")&&(C+="g"),R=x(P,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==y(P,d.lastIndex-1))&&(j="(?: "+j+")",R=" "+R,M++),n=new RegExp("^(?:"+j+")",C)),k&&(n=new RegExp("^"+j+"$(?!\\s)",C)),_&&(r=d.lastIndex),i=o(g,T?n:d,R),T?i?(i.input=x(i.input,M),i[0]=x(i[0],M),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:_&&i&&(d.lastIndex=d.global?i.index+i[0].length:r),k&&i&&i.length>1&&o(v,i[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&O)for(i.groups=c=f(null),a=0;a<O.length;a++)c[(l=O[a])[0]]=i[l[1]];return i}),t.exports=m},9633:function(t,e,n){"use strict";var r=n(5027);t.exports=function(){var t=r(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},3477:function(t,e,n){"use strict";var r=n(2615),i=n(6812),o=n(3622),a=n(9633),s=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in s||i(t,"flags")||!o(s,t)?e:r(a,t)}},7901:function(t,e,n){"use strict";var r=n(3689),i=n(9037).RegExp,o=r((function(){var t=i("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),a=o||r((function(){return!i("a","y").sticky})),s=o||r((function(){var t=i("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));t.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:o}},2100:function(t,e,n){"use strict";var r=n(3689),i=n(9037).RegExp;t.exports=r((function(){var t=i(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))},6422:function(t,e,n){"use strict";var r=n(3689),i=n(9037).RegExp;t.exports=r((function(){var t=i("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},4684:function(t,e,n){"use strict";var r=n(981),i=TypeError;t.exports=function(t){if(r(t))throw new i("Can't call method on "+t);return t}},953:function(t){"use strict";t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},4241:function(t,e,n){"use strict";var r=n(6058),i=n(2148),o=n(4201),a=n(7697),s=o("species");t.exports=function(t){var e=r(t);a&&e&&!e[s]&&i(e,s,{configurable:!0,get:function(){return this}})}},5997:function(t,e,n){"use strict";var r=n(2560).f,i=n(6812),o=n(4201)("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!i(t,o)&&r(t,o,{configurable:!0,value:e})}},2713:function(t,e,n){"use strict";var r=n(3430),i=n(4630),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},4091:function(t,e,n){"use strict";var r=n(9037),i=n(5014),o="__core-js_shared__",a=r[o]||i(o,{});t.exports=a},3430:function(t,e,n){"use strict";var r=n(3931),i=n(4091);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.33.3",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE",source:"https://github.com/zloirock/core-js"})},6373:function(t,e,n){"use strict";var r=n(5027),i=n(2655),o=n(981),a=n(4201)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||o(n=r(s)[a])?e:i(n)}},730:function(t,e,n){"use strict";var r=n(8844),i=n(8700),o=n(4327),a=n(4684),s=r("".charAt),u=r("".charCodeAt),c=r("".slice),l=function(t){return function(e,n){var r,l,f=o(a(e)),h=i(n),d=f.length;return h<0||h>=d?t?"":void 0:(r=u(f,h))<55296||r>56319||h+1===d||(l=u(f,h+1))<56320||l>57343?t?s(f,h):r:t?c(f,h,h+2):l-56320+(r-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},1435:function(t,e,n){"use strict";var r=n(8844),i=n(4684),o=n(4327),a=n(6350),s=r("".replace),u=RegExp("^["+a+"]+"),c=RegExp("(^|[^"+a+"])["+a+"]+$"),l=function(t){return function(e){var n=o(i(e));return 1&t&&(n=s(n,u,"")),2&t&&(n=s(n,c,"$1")),n}};t.exports={start:l(1),end:l(2),trim:l(3)}},146:function(t,e,n){"use strict";var r=n(3615),i=n(3689),o=n(9037).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3032:function(t,e,n){"use strict";var r=n(2615),i=n(6058),o=n(4201),a=n(1880);t.exports=function(){var t=i("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,s=o("toPrimitive");e&&!e[s]&&a(e,s,(function(t){return r(n,this)}),{arity:1})}},6549:function(t,e,n){"use strict";var r=n(146);t.exports=r&&!!Symbol.for&&!!Symbol.keyFor},9886:function(t,e,n){"use strict";var r,i,o,a,s=n(9037),u=n(1735),c=n(4071),l=n(9985),f=n(6812),h=n(3689),d=n(2688),p=n(6004),v=n(6420),g=n(1500),m=n(4764),y=n(806),b=s.setImmediate,w=s.clearImmediate,x=s.process,_=s.Dispatch,S=s.Function,k=s.MessageChannel,P=s.String,E=0,O={},T="onreadystatechange";h((function(){r=s.location}));var C=function(t){if(f(O,t)){var e=O[t];delete O[t],e()}},j=function(t){return function(){C(t)}},M=function(t){C(t.data)},R=function(t){s.postMessage(P(t),r.protocol+"//"+r.host)};b&&w||(b=function(t){g(arguments.length,1);var e=l(t)?t:S(t),n=p(arguments,1);return O[++E]=function(){u(e,void 0,n)},i(E),E},w=function(t){delete O[t]},y?i=function(t){x.nextTick(j(t))}:_&&_.now?i=function(t){_.now(j(t))}:k&&!m?(a=(o=new k).port2,o.port1.onmessage=M,i=c(a.postMessage,a)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&r&&"file:"!==r.protocol&&!h(R)?(i=R,s.addEventListener("message",M,!1)):i=T in v("script")?function(t){d.appendChild(v("script"))[T]=function(){d.removeChild(this),C(t)}}:function(t){setTimeout(j(t),0)}),t.exports={set:b,clear:w}},3648:function(t,e,n){"use strict";var r=n(8844);t.exports=r(1..valueOf)},7578:function(t,e,n){"use strict";var r=n(8700),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},5290:function(t,e,n){"use strict";var r=n(4413),i=n(4684);t.exports=function(t){return r(i(t))}},8700:function(t,e,n){"use strict";var r=n(8828);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},3126:function(t,e,n){"use strict";var r=n(8700),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},690:function(t,e,n){"use strict";var r=n(4684),i=Object;t.exports=function(t){return i(r(t))}},8732:function(t,e,n){"use strict";var r=n(2615),i=n(8999),o=n(734),a=n(4849),s=n(5899),u=n(4201),c=TypeError,l=u("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var n,u=a(t,l);if(u){if(void 0===e&&(e="default"),n=r(u,t,e),!i(n)||o(n))return n;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},8360:function(t,e,n){"use strict";var r=n(8732),i=n(734);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},3043:function(t,e,n){"use strict";var r={};r[n(4201)("toStringTag")]="z",t.exports="[object z]"===String(r)},4327:function(t,e,n){"use strict";var r=n(926),i=String;t.exports=function(t){if("Symbol"===r(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},3691:function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},4630:function(t,e,n){"use strict";var r=n(8844),i=0,o=Math.random(),a=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++i+o,36)}},6837:function(t,e,n){"use strict";var r=n(3689),i=n(4201),o=n(7697),a=n(3931),s=i("iterator");t.exports=!r((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),n.delete("a",2),n.delete("b",void 0),a&&(!t.toJSON||!n.has("a",1)||n.has("a",2)||!n.has("a",void 0)||n.has("b"))||!e.size&&(a||!o)||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host}))},9525:function(t,e,n){"use strict";var r=n(146);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5648:function(t,e,n){"use strict";var r=n(7697),i=n(3689);t.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1500:function(t){"use strict";var e=TypeError;t.exports=function(t,n){if(t<n)throw new e("Not enough arguments");return t}},9834:function(t,e,n){"use strict";var r=n(9037),i=n(9985),o=r.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},5405:function(t,e,n){"use strict";var r=n(496),i=n(6812),o=n(6145),a=n(2560).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||a(e,t,{value:o.f(t)})}},6145:function(t,e,n){"use strict";var r=n(4201);e.f=r},4201:function(t,e,n){"use strict";var r=n(9037),i=n(3430),o=n(6812),a=n(4630),s=n(146),u=n(9525),c=r.Symbol,l=i("wks"),f=u?c.for||c:c&&c.withoutSetter||a;t.exports=function(t){return o(l,t)||(l[t]=s&&o(c,t)?c[t]:f("Symbol."+t)),l[t]}},6350:function(t){"use strict";t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},4338:function(t,e,n){"use strict";var r=n(9989),i=n(3689),o=n(2297),a=n(8999),s=n(690),u=n(6310),c=n(5565),l=n(6522),f=n(7120),h=n(9042),d=n(4201),p=n(3615),v=d("isConcatSpreadable"),g=p>=51||!i((function(){var t=[];return t[v]=!1,t.concat()[0]!==t})),m=function(t){if(!a(t))return!1;var e=t[v];return void 0!==e?!!e:o(t)};r({target:"Array",proto:!0,arity:1,forced:!g||!h("concat")},{concat:function(t){var e,n,r,i,o,a=s(this),h=f(a,0),d=0;for(e=-1,r=arguments.length;e<r;e++)if(m(o=-1===e?a:arguments[e]))for(i=u(o),c(d+i),n=0;n<i;n++,d++)n in o&&l(h,d,o[n]);else c(d+1),l(h,d++,o);return h.length=d,h}})},7895:function(t,e,n){"use strict";var r=n(9989),i=n(2872),o=n(7370);r({target:"Array",proto:!0},{fill:i}),o("fill")},8077:function(t,e,n){"use strict";var r=n(9989),i=n(2960).filter;r({target:"Array",proto:!0,forced:!n(9042)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},9772:function(t,e,n){"use strict";var r=n(9989),i=n(2960).findIndex,o=n(7370),a="findIndex",s=!0;a in[]&&Array(1)[a]((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(a)},5728:function(t,e,n){"use strict";var r=n(9989),i=n(2960).find,o=n(7370),a="find",s=!0;a in[]&&Array(1)[a]((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(a)},4564:function(t,e,n){"use strict";var r=n(9989),i=n(7809),o=n(509),a=n(690),s=n(6310),u=n(7120);r({target:"Array",proto:!0},{flatMap:function(t){var e,n=a(this),r=s(n);return o(t),(e=u(n,0)).length=i(e,n,n,r,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},2795:function(t,e,n){"use strict";var r=n(9989),i=n(7809),o=n(690),a=n(6310),s=n(8700),u=n(7120);r({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=o(this),n=a(e),r=u(e,0);return r.length=i(r,e,e,n,0,void 0===t?1:s(t)),r}})},7049:function(t,e,n){"use strict";var r=n(9989),i=n(1055);r({target:"Array",stat:!0,forced:!n(6431)((function(t){Array.from(t)}))},{from:i})},6801:function(t,e,n){"use strict";var r=n(9989),i=n(4328).includes,o=n(3689),a=n(7370);r({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a("includes")},752:function(t,e,n){"use strict";var r=n(5290),i=n(7370),o=n(9478),a=n(618),s=n(2560).f,u=n(1934),c=n(7807),l=n(3931),f=n(7697),h="Array Iterator",d=a.set,p=a.getterFor(h);t.exports=u(Array,"Array",(function(t,e){d(this,{type:h,target:r(t),index:0,kind:e})}),(function(){var t=p(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=void 0,c(void 0,!0);switch(t.kind){case"keys":return c(n,!1);case"values":return c(e[n],!1)}return c([n,e[n]],!1)}),"values");var v=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!l&&f&&"values"!==v.name)try{s(v,"name",{value:"values"})}catch(t){}},6203:function(t,e,n){"use strict";var r=n(9989),i=n(8844),o=n(4413),a=n(5290),s=n(6834),u=i([].join);r({target:"Array",proto:!0,forced:o!==Object||!s("join",",")},{join:function(t){return u(a(this),void 0===t?",":t)}})},886:function(t,e,n){"use strict";var r=n(9989),i=n(2960).map;r({target:"Array",proto:!0,forced:!n(9042)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},278:function(t,e,n){"use strict";var r=n(9989),i=n(8820).left,o=n(6834),a=n(3615);r({target:"Array",proto:!0,forced:!n(806)&&a>79&&a<83||!o("reduce")},{reduce:function(t){var e=arguments.length;return i(this,t,e,e>1?arguments[1]:void 0)}})},3374:function(t,e,n){"use strict";var r=n(9989),i=n(8844),o=n(2297),a=i([].reverse),s=[1,2];r({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return o(this)&&(this.length=this.length),a(this)}})},9730:function(t,e,n){"use strict";var r=n(9989),i=n(2297),o=n(9429),a=n(8999),s=n(7578),u=n(6310),c=n(5290),l=n(6522),f=n(4201),h=n(9042),d=n(6004),p=h("slice"),v=f("species"),g=Array,m=Math.max;r({target:"Array",proto:!0,forced:!p},{slice:function(t,e){var n,r,f,h=c(this),p=u(h),y=s(t,p),b=s(void 0===e?p:e,p);if(i(h)&&(n=h.constructor,(o(n)&&(n===g||i(n.prototype))||a(n)&&null===(n=n[v]))&&(n=void 0),n===g||void 0===n))return d(h,y,b);for(r=new(void 0===n?g:n)(m(b-y,0)),f=0;y<b;y++,f++)y in h&&l(r,f,h[y]);return r.length=f,r}})},5137:function(t,e,n){"use strict";var r=n(9989),i=n(8844),o=n(509),a=n(690),s=n(6310),u=n(8494),c=n(4327),l=n(3689),f=n(382),h=n(6834),d=n(7365),p=n(7298),v=n(3615),g=n(7922),m=[],y=i(m.sort),b=i(m.push),w=l((function(){m.sort(void 0)})),x=l((function(){m.sort(null)})),_=h("sort"),S=!l((function(){if(v)return v<70;if(!(d&&d>3)){if(p)return!0;if(g)return g<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)m.push({k:e+r,v:n})}for(m.sort((function(t,e){return e.v-t.v})),r=0;r<m.length;r++)e=m[r].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}}));r({target:"Array",proto:!0,forced:w||!x||!_||!S},{sort:function(t){void 0!==t&&o(t);var e=a(this);if(S)return void 0===t?y(e):y(e,t);var n,r,i=[],l=s(e);for(r=0;r<l;r++)r in e&&b(i,e[r]);for(f(i,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:c(e)>c(n)?1:-1}}(t)),n=s(i),r=0;r<n;)e[r]=i[r++];for(;r<l;)u(e,r++);return e}})},2506:function(t,e,n){"use strict";var r=n(9989),i=n(690),o=n(7578),a=n(8700),s=n(6310),u=n(5649),c=n(5565),l=n(7120),f=n(6522),h=n(8494),d=n(9042)("splice"),p=Math.max,v=Math.min;r({target:"Array",proto:!0,forced:!d},{splice:function(t,e){var n,r,d,g,m,y,b=i(this),w=s(b),x=o(t,w),_=arguments.length;for(0===_?n=r=0:1===_?(n=0,r=w-x):(n=_-2,r=v(p(a(e),0),w-x)),c(w+n-r),d=l(b,r),g=0;g<r;g++)(m=x+g)in b&&f(d,g,b[m]);if(d.length=r,n<r){for(g=x;g<w-r;g++)y=g+n,(m=g+r)in b?b[y]=b[m]:h(b,y);for(g=w;g>w-r+n;g--)h(b,g-1)}else if(n>r)for(g=w-r;g>x;g--)y=g+n-1,(m=g+r-1)in b?b[y]=b[m]:h(b,y);for(g=0;g<n;g++)b[g+x]=arguments[g+2];return u(b,w-r+n),d}})},385:function(t,e,n){"use strict";n(7370)("flatMap")},3383:function(t,e,n){"use strict";n(7370)("flat")},9903:function(t,e,n){"use strict";var r=n(6812),i=n(1880),o=n(1797),a=n(4201)("toPrimitive"),s=Date.prototype;r(s,a)||i(s,a,o)},4284:function(t,e,n){"use strict";var r=n(7697),i=n(1236).EXISTS,o=n(8844),a=n(2148),s=Function.prototype,u=o(s.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=o(c.exec);r&&!i&&a(s,"name",{configurable:!0,get:function(){try{return l(c,u(this))[1]}catch(t){return""}}})},5398:function(t,e,n){"use strict";var r=n(9989),i=n(9037);r({global:!0,forced:i.globalThis!==i},{globalThis:i})},8324:function(t,e,n){"use strict";var r=n(9989),i=n(6058),o=n(1735),a=n(2615),s=n(8844),u=n(3689),c=n(9985),l=n(734),f=n(6004),h=n(2643),d=n(146),p=String,v=i("JSON","stringify"),g=s(/./.exec),m=s("".charAt),y=s("".charCodeAt),b=s("".replace),w=s(1..toString),x=/[\uD800-\uDFFF]/g,_=/^[\uD800-\uDBFF]$/,S=/^[\uDC00-\uDFFF]$/,k=!d||u((function(){var t=i("Symbol")("stringify detection");return"[null]"!==v([t])||"{}"!==v({a:t})||"{}"!==v(Object(t))})),P=u((function(){return'"\\udf06\\ud834"'!==v("\udf06\ud834")||'"\\udead"'!==v("\udead")})),E=function(t,e){var n=f(arguments),r=h(e);if(c(r)||void 0!==t&&!l(t))return n[1]=function(t,e){if(c(r)&&(e=a(r,this,p(t),e)),!l(e))return e},o(v,null,n)},O=function(t,e,n){var r=m(n,e-1),i=m(n,e+1);return g(_,t)&&!g(S,i)||g(S,t)&&!g(_,r)?"\\u"+w(y(t,0),16):t};v&&r({target:"JSON",stat:!0,arity:3,forced:k||P},{stringify:function(t,e,n){var r=f(arguments),i=o(k?E:v,null,r);return P&&"string"==typeof i?b(i,x,O):i}})},7629:function(t,e,n){"use strict";var r=n(9037);n(5997)(r.JSON,"JSON",!0)},9322:function(t,e,n){"use strict";n(319)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(800))},6646:function(t,e,n){"use strict";n(9322)},8813:function(t,e,n){"use strict";var r=n(9989),i=Math.log,o=Math.LN2;r({target:"Math",stat:!0},{log2:function(t){return i(t)/o}})},6976:function(t,e,n){"use strict";n(9989)({target:"Math",stat:!0},{sign:n(5680)})},7509:function(t,e,n){"use strict";n(5997)(Math,"Math",!0)},9288:function(t,e,n){"use strict";var r=n(9989),i=n(3931),o=n(7697),a=n(9037),s=n(496),u=n(8844),c=n(5266),l=n(6812),f=n(3457),h=n(3622),d=n(734),p=n(8732),v=n(3689),g=n(2741).f,m=n(2474).f,y=n(2560).f,b=n(3648),w=n(1435).trim,x="Number",_=a[x],S=s[x],k=_.prototype,P=a.TypeError,E=u("".slice),O=u("".charCodeAt),T=c(x,!_(" 0o1")||!_("0b1")||_("+0x1")),C=function(t){var e,n=arguments.length<1?0:_(function(t){var e=p(t,"number");return"bigint"==typeof e?e:function(t){var e,n,r,i,o,a,s,u,c=p(t,"number");if(d(c))throw new P("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=w(c),43===(e=O(c,0))||45===e){if(88===(n=O(c,2))||120===n)return NaN}else if(48===e){switch(O(c,1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(a=(o=E(c,2)).length,s=0;s<a;s++)if((u=O(o,s))<48||u>i)return NaN;return parseInt(o,r)}return+c}(e)}(t));return h(k,e=this)&&v((function(){b(e)}))?f(Object(n),this,C):n};C.prototype=k,T&&!i&&(k.constructor=C),r({global:!0,constructor:!0,wrap:!0,forced:T},{Number:C});var j=function(t,e){for(var n,r=o?g(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0;r.length>i;i++)l(e,n=r[i])&&!l(t,n)&&y(t,n,m(e,n))};i&&S&&j(s[x],S),(T||i)&&j(s[x],_)},429:function(t,e,n){"use strict";var r=n(9989),i=n(5394);r({target:"Object",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},1830:function(t,e,n){"use strict";var r=n(9989),i=n(1594),o=n(3689),a=n(8999),s=n(5375).onFreeze,u=Object.freeze;r({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!i},{freeze:function(t){return u&&a(t)?u(s(t)):t}})},1919:function(t,e,n){"use strict";var r=n(9989),i=n(3689),o=n(5290),a=n(2474).f,s=n(7697);r({target:"Object",stat:!0,forced:!s||i((function(){a(1)})),sham:!s},{getOwnPropertyDescriptor:function(t,e){return a(o(t),e)}})},9474:function(t,e,n){"use strict";var r=n(9989),i=n(7697),o=n(9152),a=n(5290),s=n(2474),u=n(6522);r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),i=s.f,c=o(r),l={},f=0;c.length>f;)void 0!==(n=i(r,e=c[f++]))&&u(l,e,n);return l}})},9997:function(t,e,n){"use strict";var r=n(9989),i=n(3689),o=n(6062).f;r({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:o})},9434:function(t,e,n){"use strict";var r=n(9989),i=n(146),o=n(3689),a=n(7518),s=n(690);r({target:"Object",stat:!0,forced:!i||o((function(){a.f(1)}))},{getOwnPropertySymbols:function(t){var e=a.f;return e?e(s(t)):[]}})},8052:function(t,e,n){"use strict";var r=n(9989),i=n(3689),o=n(690),a=n(1868),s=n(1748);r({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!s},{getPrototypeOf:function(t){return a(o(t))}})},9358:function(t,e,n){"use strict";var r=n(9989),i=n(690),o=n(300);r({target:"Object",stat:!0,forced:n(3689)((function(){o(1)}))},{keys:function(t){return o(i(t))}})},228:function(t,e,n){"use strict";var r=n(3043),i=n(1880),o=n(5073);r||i(Object.prototype,"toString",o,{unsafe:!0})},6466:function(t,e,n){"use strict";var r=n(9989),i=n(9419).values;r({target:"Object",stat:!0},{values:function(t){return i(t)}})},2320:function(t,e,n){"use strict";var r=n(9989),i=n(7897);r({global:!0,forced:parseInt!==i},{parseInt:i})},1692:function(t,e,n){"use strict";var r=n(9989),i=n(2615),o=n(509),a=n(8742),s=n(9302),u=n(8734);r({target:"Promise",stat:!0,forced:n(562)},{all:function(t){var e=this,n=a.f(e),r=n.resolve,c=n.reject,l=s((function(){var n=o(e.resolve),a=[],s=0,l=1;u(t,(function(t){var o=s++,u=!1;l++,i(n,e,t).then((function(t){u||(u=!0,a[o]=t,--l||r(a))}),c)})),--l||r(a)}));return l.error&&c(l.value),n.promise}})},5089:function(t,e,n){"use strict";var r=n(9989),i=n(3931),o=n(7073).CONSTRUCTOR,a=n(7919),s=n(6058),u=n(9985),c=n(1880),l=a&&a.prototype;if(r({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(t){return this.then(void 0,t)}}),!i&&u(a)){var f=s("Promise").prototype.catch;l.catch!==f&&c(l,"catch",f,{unsafe:!0})}},6697:function(t,e,n){"use strict";var r,i,o,a=n(9989),s=n(3931),u=n(806),c=n(9037),l=n(2615),f=n(1880),h=n(9385),d=n(5997),p=n(4241),v=n(509),g=n(9985),m=n(8999),y=n(767),b=n(6373),w=n(9886).set,x=n(231),_=n(920),S=n(9302),k=n(4410),P=n(618),E=n(7919),O=n(7073),T=n(8742),C="Promise",j=O.CONSTRUCTOR,M=O.REJECTION_EVENT,R=O.SUBCLASSING,A=P.getterFor(C),I=P.set,L=E&&E.prototype,D=E,$=L,N=c.TypeError,F=c.document,B=c.process,U=T.f,z=U,W=!!(F&&F.createEvent&&c.dispatchEvent),H="unhandledrejection",V=function(t){var e;return!(!m(t)||!g(e=t.then))&&e},G=function(t,e){var n,r,i,o=e.value,a=1===e.state,s=a?t.ok:t.fail,u=t.resolve,c=t.reject,f=t.domain;try{s?(a||(2===e.rejection&&Z(e),e.rejection=1),!0===s?n=o:(f&&f.enter(),n=s(o),f&&(f.exit(),i=!0)),n===t.promise?c(new N("Promise-chain cycle")):(r=V(n))?l(r,n,u,c):u(n)):c(o)}catch(t){f&&!i&&f.exit(),c(t)}},Y=function(t,e){t.notified||(t.notified=!0,x((function(){for(var n,r=t.reactions;n=r.get();)G(n,t);t.notified=!1,e&&!t.rejection&&q(t)})))},X=function(t,e,n){var r,i;W?((r=F.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),c.dispatchEvent(r)):r={promise:e,reason:n},!M&&(i=c["on"+t])?i(r):t===H&&_("Unhandled promise rejection",n)},q=function(t){l(w,c,(function(){var e,n=t.facade,r=t.value;if(K(t)&&(e=S((function(){u?B.emit("unhandledRejection",r,n):X(H,n,r)})),t.rejection=u||K(t)?2:1,e.error))throw e.value}))},K=function(t){return 1!==t.rejection&&!t.parent},Z=function(t){l(w,c,(function(){var e=t.facade;u?B.emit("rejectionHandled",e):X("rejectionhandled",e,t.value)}))},J=function(t,e,n){return function(r){t(e,r,n)}},Q=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,Y(t,!0))},tt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new N("Promise can't be resolved itself");var r=V(e);r?x((function(){var n={done:!1};try{l(r,e,J(tt,n,t),J(Q,n,t))}catch(e){Q(n,e,t)}})):(t.value=e,t.state=1,Y(t,!1))}catch(e){Q({done:!1},e,t)}}};if(j&&($=(D=function(t){y(this,$),v(t),l(r,this);var e=A(this);try{t(J(tt,e),J(Q,e))}catch(t){Q(e,t)}}).prototype,(r=function(t){I(this,{type:C,done:!1,notified:!1,parent:!1,reactions:new k,rejection:!1,state:0,value:void 0})}).prototype=f($,"then",(function(t,e){var n=A(this),r=U(b(this,D));return n.parent=!0,r.ok=!g(t)||t,r.fail=g(e)&&e,r.domain=u?B.domain:void 0,0===n.state?n.reactions.add(r):x((function(){G(r,n)})),r.promise})),i=function(){var t=new r,e=A(t);this.promise=t,this.resolve=J(tt,e),this.reject=J(Q,e)},T.f=U=function(t){return t===D||void 0===t?new i(t):z(t)},!s&&g(E)&&L!==Object.prototype)){o=L.then,R||f(L,"then",(function(t,e){var n=this;return new D((function(t,e){l(o,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete L.constructor}catch(t){}h&&h(L,$)}a({global:!0,constructor:!0,wrap:!0,forced:j},{Promise:D}),d(D,C,!1,!0),p(C)},3964:function(t,e,n){"use strict";n(6697),n(1692),n(5089),n(8829),n(2092),n(7905)},8829:function(t,e,n){"use strict";var r=n(9989),i=n(2615),o=n(509),a=n(8742),s=n(9302),u=n(8734);r({target:"Promise",stat:!0,forced:n(562)},{race:function(t){var e=this,n=a.f(e),r=n.reject,c=s((function(){var a=o(e.resolve);u(t,(function(t){i(a,e,t).then(n.resolve,r)}))}));return c.error&&r(c.value),n.promise}})},2092:function(t,e,n){"use strict";var r=n(9989),i=n(2615),o=n(8742);r({target:"Promise",stat:!0,forced:n(7073).CONSTRUCTOR},{reject:function(t){var e=o.f(this);return i(e.reject,void 0,t),e.promise}})},7905:function(t,e,n){"use strict";var r=n(9989),i=n(6058),o=n(3931),a=n(7919),s=n(7073).CONSTRUCTOR,u=n(2945),c=i("Promise"),l=o&&!s;r({target:"Promise",stat:!0,forced:o||s},{resolve:function(t){return u(l&&this===c?a:this,t)}})},50:function(t,e,n){"use strict";var r=n(9989),i=n(6058),o=n(1735),a=n(6761),s=n(2655),u=n(5027),c=n(8999),l=n(5391),f=n(3689),h=i("Reflect","construct"),d=Object.prototype,p=[].push,v=f((function(){function t(){}return!(h((function(){}),[],t)instanceof t)})),g=!f((function(){h((function(){}))})),m=v||g;r({target:"Reflect",stat:!0,forced:m,sham:m},{construct:function(t,e){s(t),u(e);var n=arguments.length<3?t:s(arguments[2]);if(g&&!v)return h(t,e,n);if(t===n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return o(p,r,e),new(o(a,t,r))}var i=n.prototype,f=l(c(i)?i:d),m=o(t,f,e);return c(m)?m:f}})},2349:function(t,e,n){"use strict";var r=n(9989),i=n(2615),o=n(8999),a=n(5027),s=n(6251),u=n(2474),c=n(1868);r({target:"Reflect",stat:!0},{get:function t(e,n){var r,l,f=arguments.length<3?e:arguments[2];return a(e)===f?e[n]:(r=u.f(e,n))?s(r)?r.value:void 0===r.get?void 0:i(r.get,f):o(l=c(e))?t(l,n,f):void 0}})},2003:function(t,e,n){"use strict";var r=n(7697),i=n(9037),o=n(8844),a=n(5266),s=n(3457),u=n(5773),c=n(2741).f,l=n(3622),f=n(1245),h=n(4327),d=n(3477),p=n(7901),v=n(8055),g=n(1880),m=n(3689),y=n(6812),b=n(618).enforce,w=n(4241),x=n(4201),_=n(2100),S=n(6422),k=x("match"),P=i.RegExp,E=P.prototype,O=i.SyntaxError,T=o(E.exec),C=o("".charAt),j=o("".replace),M=o("".indexOf),R=o("".slice),A=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,I=/a/g,L=/a/g,D=new P(I)!==I,$=p.MISSED_STICKY,N=p.UNSUPPORTED_Y;if(a("RegExp",r&&(!D||$||_||S||m((function(){return L[k]=!1,P(I)!==I||P(L)===L||"/a/i"!==String(P(I,"i"))}))))){for(var F=function(t,e){var n,r,i,o,a,c,p=l(E,this),v=f(t),g=void 0===e,m=[],w=t;if(!p&&v&&g&&t.constructor===F)return t;if((v||l(E,t))&&(t=t.source,g&&(e=d(w))),t=void 0===t?"":h(t),e=void 0===e?"":h(e),w=t,_&&"dotAll"in I&&(r=!!e&&M(e,"s")>-1)&&(e=j(e,/s/g,"")),n=e,$&&"sticky"in I&&(i=!!e&&M(e,"y")>-1)&&N&&(e=j(e,/y/g,"")),S&&(o=function(t){for(var e,n=t.length,r=0,i="",o=[],a={},s=!1,u=!1,c=0,l="";r<=n;r++){if("\\"===(e=C(t,r)))e+=C(t,++r);else if("]"===e)s=!1;else if(!s)switch(!0){case"["===e:s=!0;break;case"("===e:T(A,R(t,r+1))&&(r+=2,u=!0),i+=e,c++;continue;case">"===e&&u:if(""===l||y(a,l))throw new O("Invalid capture group name");a[l]=!0,o[o.length]=[l,c],u=!1,l="";continue}u?l+=e:i+=e}return[i,o]}(t),t=o[0],m=o[1]),a=s(P(t,e),p?this:E,F),(r||i||m.length)&&(c=b(a),r&&(c.dotAll=!0,c.raw=F(function(t){for(var e,n=t.length,r=0,i="",o=!1;r<=n;r++)"\\"!==(e=C(t,r))?o||"."!==e?("["===e?o=!0:"]"===e&&(o=!1),i+=e):i+="[\\s\\S]":i+=e+C(t,++r);return i}(t),n)),i&&(c.sticky=!0),m.length&&(c.groups=m)),t!==w)try{u(a,"source",""===w?"(?:)":w)}catch(t){}return a},B=c(P),U=0;B.length>U;)v(F,P,B[U++]);E.constructor=F,F.prototype=E,g(i,"RegExp",F,{constructor:!0})}w("RegExp")},4043:function(t,e,n){"use strict";var r=n(9989),i=n(6308);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},2826:function(t,e,n){"use strict";var r=n(1236).PROPER,i=n(1880),o=n(5027),a=n(4327),s=n(3689),u=n(3477),c="toString",l=RegExp.prototype[c],f=s((function(){return"/a/b"!==l.call({source:"a",flags:"b"})})),h=r&&l.name!==c;(f||h)&&i(RegExp.prototype,c,(function(){var t=o(this);return"/"+a(t.source)+"/"+a(u(t))}),{unsafe:!0})},7985:function(t,e,n){"use strict";n(319)("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(800))},9649:function(t,e,n){"use strict";n(7985)},2918:function(t,e,n){"use strict";var r,i=n(9989),o=n(6576),a=n(2474).f,s=n(3126),u=n(4327),c=n(2124),l=n(4684),f=n(7413),h=n(3931),d=o("".endsWith),p=o("".slice),v=Math.min,g=f("endsWith");i({target:"String",proto:!0,forced:!(!h&&!g&&(r=a(String.prototype,"endsWith"),r&&!r.writable)||g)},{endsWith:function(t){var e=u(l(this));c(t);var n=arguments.length>1?arguments[1]:void 0,r=e.length,i=void 0===n?r:v(s(n),r),o=u(t);return d?d(e,o,i):p(e,i-o.length,i)===o}})},3843:function(t,e,n){"use strict";var r=n(9989),i=n(8844),o=n(2124),a=n(4684),s=n(4327),u=n(7413),c=i("".indexOf);r({target:"String",proto:!0,forced:!u("includes")},{includes:function(t){return!!~c(s(a(this)),s(o(t)),arguments.length>1?arguments[1]:void 0)}})},1694:function(t,e,n){"use strict";var r=n(730).charAt,i=n(4327),o=n(618),a=n(1934),s=n(7807),u="String Iterator",c=o.set,l=o.getterFor(u);a(String,"String",(function(t){c(this,{type:u,string:i(t),index:0})}),(function(){var t,e=l(this),n=e.string,i=e.index;return i>=n.length?s(void 0,!0):(t=r(n,i),e.index+=t.length,s(t,!1))}))},2462:function(t,e,n){"use strict";var r=n(2615),i=n(8678),o=n(5027),a=n(981),s=n(3126),u=n(4327),c=n(4684),l=n(4849),f=n(727),h=n(6100);i("match",(function(t,e,n){return[function(e){var n=c(this),i=a(e)?void 0:l(e,t);return i?r(i,e,n):new RegExp(e)[t](u(n))},function(t){var r=o(this),i=u(t),a=n(e,r,i);if(a.done)return a.value;if(!r.global)return h(r,i);var c=r.unicode;r.lastIndex=0;for(var l,d=[],p=0;null!==(l=h(r,i));){var v=u(l[0]);d[p]=v,""===v&&(r.lastIndex=f(i,s(r.lastIndex),c)),p++}return 0===p?null:d}]}))},7267:function(t,e,n){"use strict";var r=n(1735),i=n(2615),o=n(8844),a=n(8678),s=n(3689),u=n(5027),c=n(9985),l=n(981),f=n(8700),h=n(3126),d=n(4327),p=n(4684),v=n(727),g=n(4849),m=n(7017),y=n(6100),b=n(4201)("replace"),w=Math.max,x=Math.min,_=o([].concat),S=o([].push),k=o("".indexOf),P=o("".slice),E="$0"==="a".replace(/./,"$0"),O=!!/./[b]&&""===/./[b]("a","$0");a("replace",(function(t,e,n){var o=O?"$":"$0";return[function(t,n){var r=p(this),o=l(t)?void 0:g(t,b);return o?i(o,t,r,n):i(e,d(r),t,n)},function(t,i){var a=u(this),s=d(t);if("string"==typeof i&&-1===k(i,o)&&-1===k(i,"$<")){var l=n(e,a,s,i);if(l.done)return l.value}var p=c(i);p||(i=d(i));var g,b=a.global;b&&(g=a.unicode,a.lastIndex=0);for(var E,O=[];null!==(E=y(a,s))&&(S(O,E),b);)""===d(E[0])&&(a.lastIndex=v(s,h(a.lastIndex),g));for(var T,C="",j=0,M=0;M<O.length;M++){for(var R,A=d((E=O[M])[0]),I=w(x(f(E.index),s.length),0),L=[],D=1;D<E.length;D++)S(L,void 0===(T=E[D])?T:String(T));var $=E.groups;if(p){var N=_([A],L,I,s);void 0!==$&&S(N,$),R=d(r(i,void 0,N))}else R=m(A,s,I,L,$,i);I>=j&&(C+=P(s,j,I)+R,j=I+A.length)}return C+P(s,j)}]}),!!s((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!E||O)},1514:function(t,e,n){"use strict";var r=n(2615),i=n(8678),o=n(5027),a=n(981),s=n(4684),u=n(953),c=n(4327),l=n(4849),f=n(6100);i("search",(function(t,e,n){return[function(e){var n=s(this),i=a(e)?void 0:l(e,t);return i?r(i,e,n):new RegExp(e)[t](c(n))},function(t){var r=o(this),i=c(t),a=n(e,r,i);if(a.done)return a.value;var s=r.lastIndex;u(s,0)||(r.lastIndex=0);var l=f(r,i);return u(r.lastIndex,s)||(r.lastIndex=s),null===l?-1:l.index}]}))},9873:function(t,e,n){"use strict";var r=n(1735),i=n(2615),o=n(8844),a=n(8678),s=n(5027),u=n(981),c=n(1245),l=n(4684),f=n(6373),h=n(727),d=n(3126),p=n(4327),v=n(4849),g=n(9015),m=n(6100),y=n(6308),b=n(7901),w=n(3689),x=b.UNSUPPORTED_Y,_=4294967295,S=Math.min,k=[].push,P=o(/./.exec),E=o(k),O=o("".slice),T=!w((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));a("split",(function(t,e,n){var o;return o="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var o=p(l(this)),a=void 0===n?_:n>>>0;if(0===a)return[];if(void 0===t)return[o];if(!c(t))return i(e,o,t,a);for(var s,u,f,h=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,m=new RegExp(t.source,d+"g");(s=i(y,m,o))&&!((u=m.lastIndex)>v&&(E(h,O(o,v,s.index)),s.length>1&&s.index<o.length&&r(k,h,g(s,1)),f=s[0].length,v=u,h.length>=a));)m.lastIndex===s.index&&m.lastIndex++;return v===o.length?!f&&P(m,"")||E(h,""):E(h,O(o,v)),h.length>a?g(h,0,a):h}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:i(e,this,t,n)}:e,[function(e,n){var r=l(this),a=u(e)?void 0:v(e,t);return a?i(a,e,r,n):i(o,p(r),e,n)},function(t,r){var i=s(this),a=p(t),u=n(o,i,a,r,o!==e);if(u.done)return u.value;var c=f(i,RegExp),l=i.unicode,v=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(x?"g":"y"),g=new c(x?"^(?:"+i.source+")":i,v),y=void 0===r?_:r>>>0;if(0===y)return[];if(0===a.length)return null===m(g,a)?[a]:[];for(var b=0,w=0,k=[];w<a.length;){g.lastIndex=x?0:w;var P,T=m(g,x?O(a,w):a);if(null===T||(P=S(d(g.lastIndex+(x?w:0)),a.length))===b)w=h(a,w,l);else{if(E(k,O(a,b,w)),k.length===y)return k;for(var C=1;C<=T.length-1;C++)if(E(k,T[C]),k.length===y)return k;w=b=P}}return E(k,O(a,b)),k}]}),!T,x)},268:function(t,e,n){"use strict";var r,i=n(9989),o=n(6576),a=n(2474).f,s=n(3126),u=n(4327),c=n(2124),l=n(4684),f=n(7413),h=n(3931),d=o("".startsWith),p=o("".slice),v=Math.min,g=f("startsWith");i({target:"String",proto:!0,forced:!(!h&&!g&&(r=a(String.prototype,"startsWith"),r&&!r.writable)||g)},{startsWith:function(t){var e=u(l(this));c(t);var n=s(v(arguments.length>1?arguments[1]:void 0,e.length)),r=u(t);return d?d(e,r,n):p(e,n,n+r.length)===r}})},8373:function(t,e,n){"use strict";n(5405)("asyncIterator")},7855:function(t,e,n){"use strict";var r=n(9989),i=n(9037),o=n(2615),a=n(8844),s=n(3931),u=n(7697),c=n(146),l=n(3689),f=n(6812),h=n(3622),d=n(5027),p=n(5290),v=n(8360),g=n(4327),m=n(5684),y=n(5391),b=n(300),w=n(2741),x=n(6062),_=n(7518),S=n(2474),k=n(2560),P=n(8920),E=n(9556),O=n(1880),T=n(2148),C=n(3430),j=n(2713),M=n(7248),R=n(4630),A=n(4201),I=n(6145),L=n(5405),D=n(3032),$=n(5997),N=n(618),F=n(2960).forEach,B=j("hidden"),U="Symbol",z="prototype",W=N.set,H=N.getterFor(U),V=Object[z],G=i.Symbol,Y=G&&G[z],X=i.RangeError,q=i.TypeError,K=i.QObject,Z=S.f,J=k.f,Q=x.f,tt=E.f,et=a([].push),nt=C("symbols"),rt=C("op-symbols"),it=C("wks"),ot=!K||!K[z]||!K[z].findChild,at=function(t,e,n){var r=Z(V,e);r&&delete V[e],J(t,e,n),r&&t!==V&&J(V,e,r)},st=u&&l((function(){return 7!==y(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a}))?at:J,ut=function(t,e){var n=nt[t]=y(Y);return W(n,{type:U,tag:t,description:e}),u||(n.description=e),n},ct=function(t,e,n){t===V&&ct(rt,e,n),d(t);var r=v(e);return d(n),f(nt,r)?(n.enumerable?(f(t,B)&&t[B][r]&&(t[B][r]=!1),n=y(n,{enumerable:m(0,!1)})):(f(t,B)||J(t,B,m(1,{})),t[B][r]=!0),st(t,r,n)):J(t,r,n)},lt=function(t,e){d(t);var n=p(e),r=b(n).concat(pt(n));return F(r,(function(e){u&&!o(ft,n,e)||ct(t,e,n[e])})),t},ft=function(t){var e=v(t),n=o(tt,this,e);return!(this===V&&f(nt,e)&&!f(rt,e))&&(!(n||!f(this,e)||!f(nt,e)||f(this,B)&&this[B][e])||n)},ht=function(t,e){var n=p(t),r=v(e);if(n!==V||!f(nt,r)||f(rt,r)){var i=Z(n,r);return!i||!f(nt,r)||f(n,B)&&n[B][r]||(i.enumerable=!0),i}},dt=function(t){var e=Q(p(t)),n=[];return F(e,(function(t){f(nt,t)||f(M,t)||et(n,t)})),n},pt=function(t){var e=t===V,n=Q(e?rt:p(t)),r=[];return F(n,(function(t){!f(nt,t)||e&&!f(V,t)||et(r,nt[t])})),r};c||(G=function(){if(h(Y,this))throw new q("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,e=R(t),n=function(t){var r=void 0===this?i:this;r===V&&o(n,rt,t),f(r,B)&&f(r[B],e)&&(r[B][e]=!1);var a=m(1,t);try{st(r,e,a)}catch(t){if(!(t instanceof X))throw t;at(r,e,a)}};return u&&ot&&st(V,e,{configurable:!0,set:n}),ut(e,t)},O(Y=G[z],"toString",(function(){return H(this).tag})),O(G,"withoutSetter",(function(t){return ut(R(t),t)})),E.f=ft,k.f=ct,P.f=lt,S.f=ht,w.f=x.f=dt,_.f=pt,I.f=function(t){return ut(A(t),t)},u&&(T(Y,"description",{configurable:!0,get:function(){return H(this).description}}),s||O(V,"propertyIsEnumerable",ft,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:G}),F(b(it),(function(t){L(t)})),r({target:U,stat:!0,forced:!c},{useSetter:function(){ot=!0},useSimple:function(){ot=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(t,e){return void 0===e?y(t):lt(y(t),e)},defineProperty:ct,defineProperties:lt,getOwnPropertyDescriptor:ht}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:dt}),D(),$(G,U),M[B]=!0},6544:function(t,e,n){"use strict";var r=n(9989),i=n(7697),o=n(9037),a=n(8844),s=n(6812),u=n(9985),c=n(3622),l=n(4327),f=n(2148),h=n(8758),d=o.Symbol,p=d&&d.prototype;if(i&&u(d)&&(!("description"in p)||void 0!==d().description)){var v={},g=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),e=c(p,this)?new d(t):void 0===t?d():d(t);return""===t&&(v[e]=!0),e};h(g,d),g.prototype=p,p.constructor=g;var m="Symbol(description detection)"===String(d("description detection")),y=a(p.valueOf),b=a(p.toString),w=/^Symbol\((.*)\)[^)]+$/,x=a("".replace),_=a("".slice);f(p,"description",{configurable:!0,get:function(){var t=y(this);if(s(v,t))return"";var e=b(t),n=m?_(e,7,-1):x(e,w,"$1");return""===n?void 0:n}}),r({global:!0,constructor:!0,forced:!0},{Symbol:g})}},3975:function(t,e,n){"use strict";var r=n(9989),i=n(6058),o=n(6812),a=n(4327),s=n(3430),u=n(6549),c=s("string-to-symbol-registry"),l=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!u},{for:function(t){var e=a(t);if(o(c,e))return c[e];var n=i("Symbol")(e);return c[e]=n,l[n]=e,n}})},4254:function(t,e,n){"use strict";n(5405)("iterator")},9749:function(t,e,n){"use strict";n(7855),n(3975),n(1445),n(8324),n(9434)},1445:function(t,e,n){"use strict";var r=n(9989),i=n(6812),o=n(734),a=n(3691),s=n(3430),u=n(6549),c=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!u},{keyFor:function(t){if(!o(t))throw new TypeError(a(t)+" is not a symbol");if(i(c,t))return c[t]}})},9373:function(t,e,n){"use strict";var r=n(5405),i=n(3032);r("toPrimitive"),i()},6793:function(t,e,n){"use strict";var r=n(6058),i=n(5405),o=n(5997);i("toStringTag"),o(r("Symbol"),"Symbol")},5164:function(t,e,n){"use strict";var r,i=n(1594),o=n(9037),a=n(8844),s=n(6045),u=n(5375),c=n(319),l=n(637),f=n(8999),h=n(618).enforce,d=n(3689),p=n(9834),v=Object,g=Array.isArray,m=v.isExtensible,y=v.isFrozen,b=v.isSealed,w=v.freeze,x=v.seal,_={},S={},k=!o.ActiveXObject&&"ActiveXObject"in o,P=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},E=c("WeakMap",P,l),O=E.prototype,T=a(O.set);if(p)if(k){r=l.getConstructor(P,"WeakMap",!0),u.enable();var C=a(O.delete),j=a(O.has),M=a(O.get);s(O,{delete:function(t){if(f(t)&&!m(t)){var e=h(this);return e.frozen||(e.frozen=new r),C(this,t)||e.frozen.delete(t)}return C(this,t)},has:function(t){if(f(t)&&!m(t)){var e=h(this);return e.frozen||(e.frozen=new r),j(this,t)||e.frozen.has(t)}return j(this,t)},get:function(t){if(f(t)&&!m(t)){var e=h(this);return e.frozen||(e.frozen=new r),j(this,t)?M(this,t):e.frozen.get(t)}return M(this,t)},set:function(t,e){if(f(t)&&!m(t)){var n=h(this);n.frozen||(n.frozen=new r),j(this,t)?T(this,t,e):n.frozen.set(t,e)}else T(this,t,e);return this}})}else i&&d((function(){var t=w([]);return T(new E,t,1),!y(t)}))&&s(O,{set:function(t,e){var n;return g(t)&&(y(t)?n=_:b(t)&&(n=S)),T(this,t,e),n===_&&w(t),n===S&&x(t),this}})},1090:function(t,e,n){"use strict";n(5164)},8832:function(t,e,n){"use strict";n(5398)},7522:function(t,e,n){"use strict";var r=n(9037),i=n(6338),o=n(3265),a=n(7612),s=n(5773),u=function(t){if(t&&t.forEach!==a)try{s(t,"forEach",a)}catch(e){t.forEach=a}};for(var c in i)i[c]&&u(r[c]&&r[c].prototype);u(o)},6265:function(t,e,n){"use strict";var r=n(9037),i=n(6338),o=n(3265),a=n(752),s=n(5773),u=n(4201),c=u("iterator"),l=u("toStringTag"),f=a.values,h=function(t,e){if(t){if(t[c]!==f)try{s(t,c,f)}catch(e){t[c]=f}if(t[l]||s(t,l,e),i[e])for(var n in a)if(t[n]!==a[n])try{s(t,n,a[n])}catch(e){t[n]=a[n]}}};for(var d in i)h(r[d]&&r[d].prototype,d);h(o,"DOMTokenList")},2625:function(t,e,n){"use strict";n(752);var r=n(9989),i=n(9037),o=n(2615),a=n(8844),s=n(7697),u=n(6837),c=n(1880),l=n(2148),f=n(6045),h=n(5997),d=n(974),p=n(618),v=n(767),g=n(9985),m=n(6812),y=n(4071),b=n(926),w=n(5027),x=n(8999),_=n(4327),S=n(5391),k=n(5684),P=n(5185),E=n(1664),O=n(7807),T=n(1500),C=n(4201),j=n(382),M=C("iterator"),R="URLSearchParams",A=R+"Iterator",I=p.set,L=p.getterFor(R),D=p.getterFor(A),$=Object.getOwnPropertyDescriptor,N=function(t){if(!s)return i[t];var e=$(i,t);return e&&e.value},F=N("fetch"),B=N("Request"),U=N("Headers"),z=B&&B.prototype,W=U&&U.prototype,H=i.RegExp,V=i.TypeError,G=i.decodeURIComponent,Y=i.encodeURIComponent,X=a("".charAt),q=a([].join),K=a([].push),Z=a("".replace),J=a([].shift),Q=a([].splice),tt=a("".split),et=a("".slice),nt=/\+/g,rt=Array(4),it=function(t){return rt[t-1]||(rt[t-1]=H("((?:%[\\da-f]{2}){"+t+"})","gi"))},ot=function(t){try{return G(t)}catch(e){return t}},at=function(t){var e=Z(t,nt," "),n=4;try{return G(e)}catch(t){for(;n;)e=Z(e,it(n--),ot);return e}},st=/[!'()~]|%20/g,ut={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ct=function(t){return ut[t]},lt=function(t){return Z(Y(t),st,ct)},ft=d((function(t,e){I(this,{type:A,target:L(t).entries,index:0,kind:e})}),R,(function(){var t=D(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=void 0,O(void 0,!0);var r=e[n];switch(t.kind){case"keys":return O(r.key,!1);case"values":return O(r.value,!1)}return O([r.key,r.value],!1)}),!0),ht=function(t){this.entries=[],this.url=null,void 0!==t&&(x(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===X(t,0)?et(t,1):t:_(t)))};ht.prototype={type:R,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,r,i,a,s,u,c=this.entries,l=E(t);if(l)for(n=(e=P(t,l)).next;!(r=o(n,e)).done;){if(a=(i=P(w(r.value))).next,(s=o(a,i)).done||(u=o(a,i)).done||!o(a,i).done)throw new V("Expected sequence with length 2");K(c,{key:_(s.value),value:_(u.value)})}else for(var f in t)m(t,f)&&K(c,{key:f,value:_(t[f])})},parseQuery:function(t){if(t)for(var e,n,r=this.entries,i=tt(t,"&"),o=0;o<i.length;)(e=i[o++]).length&&(n=tt(e,"="),K(r,{key:at(J(n)),value:at(q(n,"="))}))},serialize:function(){for(var t,e=this.entries,n=[],r=0;r<e.length;)t=e[r++],K(n,lt(t.key)+"="+lt(t.value));return q(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var dt=function(){v(this,pt);var t=I(this,new ht(arguments.length>0?arguments[0]:void 0));s||(this.size=t.entries.length)},pt=dt.prototype;if(f(pt,{append:function(t,e){var n=L(this);T(arguments.length,2),K(n.entries,{key:_(t),value:_(e)}),s||this.length++,n.updateURL()},delete:function(t){for(var e=L(this),n=T(arguments.length,1),r=e.entries,i=_(t),o=n<2?void 0:arguments[1],a=void 0===o?o:_(o),u=0;u<r.length;){var c=r[u];if(c.key!==i||void 0!==a&&c.value!==a)u++;else if(Q(r,u,1),void 0!==a)break}s||(this.size=r.length),e.updateURL()},get:function(t){var e=L(this).entries;T(arguments.length,1);for(var n=_(t),r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){var e=L(this).entries;T(arguments.length,1);for(var n=_(t),r=[],i=0;i<e.length;i++)e[i].key===n&&K(r,e[i].value);return r},has:function(t){for(var e=L(this).entries,n=T(arguments.length,1),r=_(t),i=n<2?void 0:arguments[1],o=void 0===i?i:_(i),a=0;a<e.length;){var s=e[a++];if(s.key===r&&(void 0===o||s.value===o))return!0}return!1},set:function(t,e){var n=L(this);T(arguments.length,1);for(var r,i=n.entries,o=!1,a=_(t),u=_(e),c=0;c<i.length;c++)(r=i[c]).key===a&&(o?Q(i,c--,1):(o=!0,r.value=u));o||K(i,{key:a,value:u}),s||(this.size=i.length),n.updateURL()},sort:function(){var t=L(this);j(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,n=L(this).entries,r=y(t,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((e=n[i++]).value,e.key,this)},keys:function(){return new ft(this,"keys")},values:function(){return new ft(this,"values")},entries:function(){return new ft(this,"entries")}},{enumerable:!0}),c(pt,M,pt.entries,{name:"entries"}),c(pt,"toString",(function(){return L(this).serialize()}),{enumerable:!0}),s&&l(pt,"size",{get:function(){return L(this).entries.length},configurable:!0,enumerable:!0}),h(dt,R),r({global:!0,constructor:!0,forced:!u},{URLSearchParams:dt}),!u&&g(U)){var vt=a(W.has),gt=a(W.set),mt=function(t){if(x(t)){var e,n=t.body;if(b(n)===R)return e=t.headers?new U(t.headers):new U,vt(e,"content-type")||gt(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),S(t,{body:k(0,_(n)),headers:k(0,e)})}return t};if(g(F)&&r({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return F(t,arguments.length>1?mt(arguments[1]):{})}}),g(B)){var yt=function(t){return v(this,z),new B(t,arguments.length>1?mt(arguments[1]):{})};z.constructor=yt,yt.prototype=z,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:yt})}}t.exports={URLSearchParams:dt,getState:L}},9307:function(t,e,n){"use strict";n(2625)},5756:function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}n.d(e,{XM:function(){return s},Xe:function(){return u},pX:function(){return a}}),n(9373),n(9903),n(9749),n(6544),n(228),n(9288),n(4254),n(752),n(1694),n(6265),n(7049),n(9730),n(2826),n(4284),n(4043);var a={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},s=function(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return{_$litDirective$:t,values:n}}},u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AT",value:function(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}},{key:"_$AS",value:function(t,e){return this.update(t,e)}},{key:"update",value:function(t,e){return this.render.apply(this,function(t){if(Array.isArray(t))return i(t)}(n=e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());var n}}],n&&o(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()},4817:function(t,e,n){"use strict";var r;function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=s(t);if(e){var i=s(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=c(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function c(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==p(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===p(i)?i:String(i)),r)}var i}function d(t,e,n){return e&&h(t.prototype,e),n&&h(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t){return p="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},p(t)}n.d(e,{Al:function(){return tt},Jb:function(){return N},Ld:function(){return F},YP:function(){return $},dy:function(){return D},sY:function(){return nt}}),n(9730),n(4254),n(752),n(228),n(1694),n(6265),n(9749),n(6544),n(2003),n(4043),n(2826),n(4338),n(1090),n(268),n(2918),n(9873),n(4284),n(7895),n(9373),n(9903),n(9288),n(7049),n(8052),n(50);var v=window,g=v.trustedTypes,m=g?g.createPolicy("lit-html",{createHTML:function(t){return t}}):void 0,y="$lit$",b="lit$".concat((Math.random()+"").slice(9),"$"),w="?"+b,x="<".concat(w,">"),_=document,S=function(){return _.createComment("")},k=function(t){return null===t||"object"!=p(t)&&"function"!=typeof t},P=Array.isArray,E=function(t){return P(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator])},O="[ \t\n\f\r]",T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,C=/-->/g,j=/>/g,M=RegExp(">|".concat(O,"(?:([^\\s\"'>=/]+)(").concat(O,"*=").concat(O,"*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)"),"g"),R=/'/g,A=/"/g,I=/^(?:script|style|textarea|title)$/i,L=function(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return{_$litType$:t,strings:e,values:r}}},D=L(1),$=L(2),N=Symbol.for("lit-noChange"),F=Symbol.for("lit-nothing"),B=new WeakMap,U=_.createTreeWalker(_,129,null,!1);function z(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==m?m.createHTML(e):e}var W=function(t,e){for(var n,r=t.length-1,i=[],o=2===e?"<svg>":"",a=T,s=0;s<r;s++){for(var u=t[s],c=void 0,l=void 0,f=-1,h=0;h<u.length&&(a.lastIndex=h,null!==(l=a.exec(u)));)h=a.lastIndex,a===T?"!--"===l[1]?a=C:void 0!==l[1]?a=j:void 0!==l[2]?(I.test(l[2])&&(n=RegExp("</"+l[2],"g")),a=M):void 0!==l[3]&&(a=M):a===M?">"===l[0]?(a=null!=n?n:T,f=-1):void 0===l[1]?f=-2:(f=a.lastIndex-l[2].length,c=l[1],a=void 0===l[3]?M:'"'===l[3]?A:R):a===A||a===R?a=M:a===C||a===j?a=T:(a=M,n=void 0);var d=a===M&&t[s+1].startsWith("/>")?" ":"";o+=a===T?u+x:f>=0?(i.push(c),u.slice(0,f)+y+u.slice(f)+b+d):u+b+(-2===f?(i.push(void 0),s):d)}return[z(t,o+(t[r]||"<?>")+(2===e?"</svg>":"")),i]},H=function(){function t(e,n){var r,i=e.strings,o=e._$litType$;f(this,t),this.parts=[];var a,s=0,h=0,d=i.length-1,p=this.parts,v=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||c(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(W(i,o),2),m=v[0],x=v[1];if(this.el=t.createElement(m,n),U.currentNode=this.el.content,2===o){var _=this.el.content,k=_.firstChild;k.remove(),_.append.apply(_,function(t){if(Array.isArray(t))return l(t)}(a=k.childNodes)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(a)||c(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}for(;null!==(r=U.nextNode())&&p.length<d;){if(1===r.nodeType){if(r.hasAttributes()){var P,E=[],O=u(r.getAttributeNames());try{for(O.s();!(P=O.n()).done;){var T=P.value;if(T.endsWith(y)||T.startsWith(b)){var C=x[h++];if(E.push(T),void 0!==C){var j=r.getAttribute(C.toLowerCase()+y).split(b),M=/([.?@])?(.*)/.exec(C);p.push({type:1,index:s,name:M[2],strings:j,ctor:"."===M[1]?q:"?"===M[1]?Z:"@"===M[1]?J:X})}else p.push({type:6,index:s})}}}catch(t){O.e(t)}finally{O.f()}for(var R=0,A=E;R<A.length;R++){var L=A[R];r.removeAttribute(L)}}if(I.test(r.tagName)){var D=r.textContent.split(b),$=D.length-1;if($>0){r.textContent=g?g.emptyScript:"";for(var N=0;N<$;N++)r.append(D[N],S()),U.nextNode(),p.push({type:2,index:++s});r.append(D[$],S())}}}else if(8===r.nodeType)if(r.data===w)p.push({type:2,index:s});else for(var F=-1;-1!==(F=r.data.indexOf(b,F+1));)p.push({type:7,index:s}),F+=b.length-1;s++}}return d(t,null,[{key:"createElement",value:function(t,e){var n=_.createElement("template");return n.innerHTML=t,n}}]),t}();function V(t,e){var n,r,i,o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,s=arguments.length>3?arguments[3]:void 0;if(e===N)return e;var u=void 0!==s?null===(n=a._$Co)||void 0===n?void 0:n[s]:a._$Cl,c=k(e)?void 0:e._$litDirective$;return(null==u?void 0:u.constructor)!==c&&(null===(r=null==u?void 0:u._$AO)||void 0===r||r.call(u,!1),void 0===c?u=void 0:(u=new c(t))._$AT(t,a,s),void 0!==s?(null!==(i=(o=a)._$Co)&&void 0!==i?i:o._$Co=[])[s]=u:a._$Cl=u),void 0!==u&&(e=V(t,u._$AS(t,e.values),u,s)),e}var G=function(){function t(e,n){f(this,t),this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}return d(t,[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"u",value:function(t){var e,n=this._$AD,r=n.el.content,i=n.parts,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:_).importNode(r,!0);U.currentNode=o;for(var a=U.nextNode(),s=0,u=0,c=i[0];void 0!==c;){if(s===c.index){var l=void 0;2===c.type?l=new Y(a,a.nextSibling,this,t):1===c.type?l=new c.ctor(a,c.name,c.strings,this,t):6===c.type&&(l=new Q(a,this,t)),this._$AV.push(l),c=i[++u]}s!==(null==c?void 0:c.index)&&(a=U.nextNode(),s++)}return U.currentNode=_,o}},{key:"v",value:function(t){var e,n=0,r=u(this._$AV);try{for(r.s();!(e=r.n()).done;){var i=e.value;void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,n),n+=i.strings.length-2):i._$AI(t[n])),n++}}catch(t){r.e(t)}finally{r.f()}}}]),t}(),Y=function(){function t(e,n,r,i){var o;f(this,t),this.type=2,this._$AH=F,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=r,this.options=i,this._$Cp=null===(o=null==i?void 0:i.isConnected)||void 0===o||o}return d(t,[{key:"_$AU",get:function(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}},{key:"parentNode",get:function(){var t=this._$AA.parentNode,e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(t){t=V(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),k(t)?t===F||null==t||""===t?(this._$AH!==F&&this._$AR(),this._$AH=F):t!==this._$AH&&t!==N&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):E(t)?this.T(t):this._(t)}},{key:"k",value:function(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}},{key:"$",value:function(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}},{key:"_",value:function(t){this._$AH!==F&&k(this._$AH)?this._$AA.nextSibling.data=t:this.$(_.createTextNode(t)),this._$AH=t}},{key:"g",value:function(t){var e,n=t.values,r=t._$litType$,i="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=H.createElement(z(r.h,r.h[0]),this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.v(n);else{var o=new G(i,this),a=o.u(this.options);o.v(n),this.$(a),this._$AH=o}}},{key:"_$AC",value:function(t){var e=B.get(t.strings);return void 0===e&&B.set(t.strings,e=new H(t)),e}},{key:"T",value:function(e){P(this._$AH)||(this._$AH=[],this._$AR());var n,r,i=this._$AH,o=0,a=u(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;o===i.length?i.push(n=new t(this.k(S()),this.k(S()),this,this.options)):n=i[o],n._$AI(s),o++}}catch(t){a.e(t)}finally{a.f()}o<i.length&&(this._$AR(n&&n._$AB.nextSibling,o),i.length=o)}},{key:"_$AR",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,n=arguments.length>1?arguments[1]:void 0;for(null===(t=this._$AP)||void 0===t||t.call(this,!1,!0,n);e&&e!==this._$AB;){var r=e.nextSibling;e.remove(),e=r}}},{key:"setConnected",value:function(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}]),t}(),X=function(){function t(e,n,r,i,o){f(this,t),this.type=1,this._$AH=F,this._$AN=void 0,this.element=e,this.name=n,this._$AM=i,this.options=o,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=F}return d(t,[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=this.strings,o=!1;if(void 0===i)t=V(this,t,e,0),(o=!k(t)||t!==this._$AH&&t!==N)&&(this._$AH=t);else{var a,s,u=t;for(t=i[0],a=0;a<i.length-1;a++)(s=V(this,u[n+a],e,a))===N&&(s=this._$AH[a]),o||(o=!k(s)||s!==this._$AH[a]),s===F?t=F:t!==F&&(t+=(null!=s?s:"")+i[a+1]),this._$AH[a]=s}o&&!r&&this.j(t)}},{key:"j",value:function(t){t===F?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}]),t}(),q=function(t){i(n,t);var e=a(n);function n(){var t;return f(this,n),(t=e.apply(this,arguments)).type=3,t}return d(n,[{key:"j",value:function(t){this.element[this.name]=t===F?void 0:t}}]),n}(X),K=g?g.emptyScript:"",Z=function(t){i(n,t);var e=a(n);function n(){var t;return f(this,n),(t=e.apply(this,arguments)).type=4,t}return d(n,[{key:"j",value:function(t){t&&t!==F?this.element.setAttribute(this.name,K):this.element.removeAttribute(this.name)}}]),n}(X),J=function(t){i(n,t);var e=a(n);function n(t,r,i,o,a){var s;return f(this,n),(s=e.call(this,t,r,i,o,a)).type=5,s}return d(n,[{key:"_$AI",value:function(t){var e;if((t=null!==(e=V(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,0))&&void 0!==e?e:F)!==N){var n=this._$AH,r=t===F&&n!==F||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==F&&(n===F||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}}},{key:"handleEvent",value:function(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}]),n}(X),Q=function(){function t(e,n,r){f(this,t),this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}return d(t,[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){V(this,t)}}]),t}(),tt={O:y,P:b,A:w,C:1,M:W,L:G,R:E,D:V,I:Y,V:X,H:Z,N:J,U:q,F:Q},et=v.litHtmlPolyfillSupport;null==et||et(H,Y),(null!==(r=v.litHtmlVersions)&&void 0!==r?r:v.litHtmlVersions=[]).push("2.8.0");var nt=function(t,e,n){var r,i,o=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:e,a=o._$litPart$;if(void 0===a){var s=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:null;o._$litPart$=a=new Y(e.insertBefore(S(),s),s,void 0,null!=n?n:{})}return a._$AI(t),a}},9089:function(t,e,n){"use strict";n.d(e,{Mo:function(){return r},Cb:function(){return c},IO:function(){return w},SB:function(){return d}});var r=function(t){return function(e){return"function"==typeof e?function(t,e){return customElements.define(t,e),e}(t,e):function(t,e){return{kind:e.kind,elements:e.elements,finisher:function(e){customElements.define(t,e)}}}(t,e)}};function i(t){return i="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},i(t)}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){var r,o,a;r=t,o=e,a=n[e],(o=function(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===i(e)?e:String(e)}(o))in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}n(9749),n(6544),n(228),n(9373),n(9903),n(9288),n(9358),n(8077),n(1919),n(7522),n(9474),n(4254),n(752),n(1694),n(6265);var s=function(t,e){return"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?a(a({},e),{},{finisher:function(n){n.createProperty(e.key,t)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer:function(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher:function(n){n.createProperty(e.key,t)}}},u=function(t,e,n){e.constructor.createProperty(n,t)};function c(t){return function(e,n){return void 0!==n?u(t,e,n):s(t,e)}}function l(t){return l="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},l(t)}function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){var r,i,o;r=t,i=e,o=n[e],(i=function(t){var e=function(t,e){if("object"!==l(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===l(e)?e:String(e)}(i))in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function d(t){return c(h(h({},t),{},{state:!0}))}function p(t){return p="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},p(t)}function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?v(Object(n),!0).forEach((function(e){var r,i,o;r=t,i=e,o=n[e],(i=function(t){var e=function(t,e){if("object"!==p(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===p(e)?e:String(e)}(i))in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}n(429);var m,y=function(t){var e=t.finisher,n=t.descriptor;return function(t,r){var i;if(void 0===r){var o=null!==(i=t.originalKey)&&void 0!==i?i:t.key,a=null!=n?{kind:"method",placement:"prototype",key:o,descriptor:n(t.key)}:g(g({},t),{},{key:o});return null!=e&&(a.finisher=function(t){e(t,o)}),a}var s=t.constructor;void 0!==n&&Object.defineProperty(t,r,n(r)),null==e||e(s,r)}};function b(t){return b="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},b(t)}function w(t,e){return y({descriptor:function(n){var r={get:function(){var e,n;return null!==(n=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==n?n:null},enumerable:!0,configurable:!0};if(e){var i="symbol"==b(n)?Symbol():"__"+n;r.get=function(){var e,n;return void 0===this[i]&&(this[i]=null!==(n=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==n?n:null),this[i]}}return r}})}n(3964),n(8373),n(6793),n(7629),n(7509),n(8052),n(4284),n(3374),n(9730),null===(m=window.HTMLSlotElement)||void 0===m||m.prototype.assignedElements},1312:function(t,e,n){"use strict";n.d(e,{V:function(){return d}}),n(4284),n(278),n(228),n(9358),n(4338),n(6801),n(3843),n(4043),n(7267),n(752),n(9649),n(1694),n(6265),n(7522),n(2918),n(9730),n(8052),n(50),n(9373),n(9903),n(9749),n(6544),n(9288),n(4254),n(2826),n(7049);var r=n(4817),i=n(5756);function o(t){return o="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},o(t)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==o(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===o(i)?i:String(i)),r)}var i}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function c(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}var f="important",h=" !"+f,d=(0,i.XM)(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(v,t);var e,n,o,d,p=(o=v,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(o);if(d){var n=l(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return c(this,t)});function v(t){var e,n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,v),e=p.call(this,t),t.type!==i.pX.ATTRIBUTE||"style"!==t.name||(null===(n=t.strings)||void 0===n?void 0:n.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");return c(e)}return e=v,(n=[{key:"render",value:function(t){return Object.keys(t).reduce((function(e,n){var r=t[n];return null==r?e:e+"".concat(n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase(),":").concat(r,";")}),"")}},{key:"update",value:function(t,e){var n=this,i=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,1)[0],o=t.element.style;if(void 0===this.ht){for(var s in this.ht=new Set,i)this.ht.add(s);return this.render(i)}for(var u in this.ht.forEach((function(t){null==i[t]&&(n.ht.delete(t),t.includes("-")?o.removeProperty(t):o[t]="")})),i){var c=i[u];if(null!=c){this.ht.add(u);var l="string"==typeof c&&c.endsWith(h);u.includes("-")||l?o.setProperty(u,l?c.slice(0,-11):c,l?f:""):o[u]=c}}return r.Jb}}])&&s(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),v}(i.Xe))},8318:function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}n.d(e,{oi:function(){return V},iv:function(){return h},dy:function(){return N.dy},Ld:function(){return N.Ld},sY:function(){return N.sY},YP:function(){return N.YP}}),n(9288),n(9358),n(752),n(6646),n(228),n(1694),n(6265),n(3964),n(7522),n(2506),n(9749),n(6544),n(8052),n(4338),n(9997),n(9649),n(3374),n(2795),n(3383),n(2826),n(50),n(9373),n(9903),n(4254),n(8373),n(6793),n(7629),n(7509),n(4284),n(9730),n(7049),n(4043),n(1090),n(278),n(886);var a,s=window,u=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,c=Symbol(),l=new WeakMap,f=function(){function t(e,n,r){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._$cssResult$=!0,r!==c)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}var e,n;return e=t,n=[{key:"styleSheet",get:function(){var t=this.o,e=this.t;if(u&&void 0===t){var n=void 0!==e&&1===e.length;n&&(t=l.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&l.set(e,t))}return t}},{key:"toString",value:function(){return this.cssText}}],n&&o(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),h=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=1===t.length?t[0]:n.reduce((function(e,n,r){return e+function(t){if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")}(n)+t[r+1]}),t[0]);return new f(i,t,c)},d=u?function(t){return t}:function(t){return t instanceof CSSStyleSheet?function(t){var e,n="",r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}(t.cssRules);try{for(r.s();!(e=r.n()).done;)n+=e.value.cssText}catch(t){r.e(t)}finally{r.f()}return function(t){return new f("string"==typeof t?t:t+"",void 0,c)}(n)}(t):t};function p(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=g(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function v(t){return function(t){if(Array.isArray(t))return m(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||g(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e){if(t){if("string"==typeof t)return m(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(t,e):void 0}}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function y(t){return y="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},y(t)}function b(){b=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new R(r||[]);return i(a,"_invoke",{value:T(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",g={};function m(){}function w(){}function x(){}var _={};c(_,a,(function(){return this}));var S=Object.getPrototypeOf,k=S&&S(S(A([])));k&&k!==n&&r.call(k,a)&&(_=k);var P=x.prototype=m.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==y(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,n,r){var i=h;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?v:d,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=v,r.method="throw",r.arg=c.arg)}}}function C(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(y(e)+" is not iterable")}return w.prototype=x,i(P,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:w,configurable:!0}),w.displayName=c(x,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,c(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},E(O.prototype),c(O.prototype,s,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(P),c(P,u,"Generator"),c(P,a,(function(){return this})),c(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=A,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;M(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:A(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function w(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function x(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==y(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===y(i)?i:String(i)),r)}var i}function _(t){var e="function"==typeof Map?new Map:void 0;return _=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return S(t,arguments,E(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),P(n,t)},_(t)}function S(t,e,n){return S=k()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&P(i,n.prototype),i},S.apply(null,arguments)}function k(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function P(t,e){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},P(t,e)}function E(t){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(t)}var O=window,T=O.trustedTypes,C=T?T.emptyScript:"",j=O.reactiveElementPolyfillSupport,M={toAttribute:function(t,e){switch(e){case Boolean:t=t?C:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute:function(t,e){var n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},R=function(t,e){return e!==t&&(e==e||t==t)},A={attribute:!0,type:String,converter:M,reflect:!1,hasChanged:R},I="finalized",L=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&P(t,e)}(f,t);var e,n,r,i,o,a,c,l=(a=f,c=k(),function(){var t,e=E(a);if(c){var n=E(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function f(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),(t=l.call(this))._$Ei=new Map,t.isUpdatePending=!1,t.hasUpdated=!1,t._$El=null,t._$Eu(),t}return e=f,n=[{key:"_$Eu",value:function(){var t,e=this;this._$E_=new Promise((function(t){return e.enableUpdating=t})),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((function(t){return t(e)}))}},{key:"addController",value:function(t){var e,n;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}},{key:"removeController",value:function(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}},{key:"_$Eg",value:function(){var t=this;this.constructor.elementProperties.forEach((function(e,n){t.hasOwnProperty(n)&&(t._$Ei.set(n,t[n]),delete t[n])}))}},{key:"createRenderRoot",value:function(){var t,e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return function(t,e){u?t.adoptedStyleSheets=e.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet})):e.forEach((function(e){var n=document.createElement("style"),r=s.litNonce;void 0!==r&&n.setAttribute("nonce",r),n.textContent=e.cssText,t.appendChild(n)}))}(e,this.constructor.elementStyles),e}},{key:"connectedCallback",value:function(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}},{key:"enableUpdating",value:function(t){}},{key:"disconnectedCallback",value:function(){var t;null===(t=this._$ES)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}},{key:"attributeChangedCallback",value:function(t,e,n){this._$AK(t,n)}},{key:"_$EO",value:function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A,i=this.constructor._$Ep(t,r);if(void 0!==i&&!0===r.reflect){var o=(void 0!==(null===(n=r.converter)||void 0===n?void 0:n.toAttribute)?r.converter:M).toAttribute(e,r.type);this._$El=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$El=null}}},{key:"_$AK",value:function(t,e){var n,r=this.constructor,i=r._$Ev.get(t);if(void 0!==i&&this._$El!==i){var o=r.getPropertyOptions(i),a="function"==typeof o.converter?{fromAttribute:o.converter}:void 0!==(null===(n=o.converter)||void 0===n?void 0:n.fromAttribute)?o.converter:M;this._$El=i,this[i]=a.fromAttribute(e,o.type),this._$El=null}}},{key:"requestUpdate",value:function(t,e,n){var r=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||R)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,n))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}},{key:"_$Ej",value:(i=b().mark((function t(){var e;return b().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.isUpdatePending=!0,t.prev=1,t.next=4,this._$E_;case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),Promise.reject(t.t0);case 9:if(e=this.scheduleUpdate(),t.t1=null!=e,!t.t1){t.next=14;break}return t.next=14,e;case 14:return t.abrupt("return",!this.isUpdatePending);case 15:case"end":return t.stop()}}),t,this,[[1,6]])})),o=function(){var t=this,e=arguments;return new Promise((function(n,r){var o=i.apply(t,e);function a(t){w(o,n,r,a,s,"next",t)}function s(t){w(o,n,r,a,s,"throw",t)}a(void 0)}))},function(){return o.apply(this,arguments)})},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){var t,e=this;if(this.isUpdatePending){this.hasUpdated,this._$Ei&&(this._$Ei.forEach((function(t,n){return e[n]=t})),this._$Ei=void 0);var n=!1,r=this._$AL;try{(n=this.shouldUpdate(r))?(this.willUpdate(r),null===(t=this._$ES)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(r)):this._$Ek()}catch(t){throw n=!1,this._$Ek(),t}n&&this._$AE(r)}}},{key:"willUpdate",value:function(t){}},{key:"_$AE",value:function(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((function(t){var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}},{key:"_$Ek",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$E_}},{key:"shouldUpdate",value:function(t){return!0}},{key:"update",value:function(t){var e=this;void 0!==this._$EC&&(this._$EC.forEach((function(t,n){return e._$EO(n,e[n],t)})),this._$EC=void 0),this._$Ek()}},{key:"updated",value:function(t){}},{key:"firstUpdated",value:function(t){}}],r=[{key:"addInitializer",value:function(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}},{key:"observedAttributes",get:function(){var t=this;this.finalize();var e=[];return this.elementProperties.forEach((function(n,r){var i=t._$Ep(r,n);void 0!==i&&(t._$Ev.set(i,r),e.push(i))})),e}},{key:"createProperty",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A;if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){var n="symbol"==y(t)?Symbol():"__"+t,r=this.getPropertyDescriptor(t,n,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}},{key:"getPropertyDescriptor",value:function(t,e,n){return{get:function(){return this[e]},set:function(r){var i=this[t];this[e]=r,this.requestUpdate(t,i,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(t){return this.elementProperties.get(t)||A}},{key:"finalize",value:function(){if(this.hasOwnProperty(I))return!1;this[I]=!0;var t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=v(t.h)),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){var e,n=this.properties,r=p([].concat(v(Object.getOwnPropertyNames(n)),v(Object.getOwnPropertySymbols(n))));try{for(r.s();!(e=r.n()).done;){var i=e.value;this.createProperty(i,n[i])}}catch(t){r.e(t)}finally{r.f()}}return this.elementStyles=this.finalizeStyles(this.styles),!0}},{key:"finalizeStyles",value:function(t){var e=[];if(Array.isArray(t)){var n,r=p(new Set(t.flat(1/0).reverse()));try{for(r.s();!(n=r.n()).done;){var i=n.value;e.unshift(d(i))}}catch(t){r.e(t)}finally{r.f()}}else void 0!==t&&e.push(d(t));return e}},{key:"_$Ep",value:function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}}],n&&x(e.prototype,n),r&&x(e,r),Object.defineProperty(e,"prototype",{writable:!1}),f}(_(HTMLElement));L[I]=!0,L.elementProperties=new Map,L.elementStyles=[],L.shadowRootOptions={mode:"open"},null==j||j({ReactiveElement:L}),(null!==(a=O.reactiveElementVersions)&&void 0!==a?a:O.reactiveElementVersions=[]).push("1.6.3");var D,$,N=n(4817);function F(t){return F="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},F(t)}function B(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==F(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==F(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===F(i)?i:String(i)),r)}var i}function U(){return U="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=H(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},U.apply(this,arguments)}function z(t,e){return z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},z(t,e)}function W(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function H(t){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},H(t)}n(8832),n(2349),n(1919);var V=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&z(t,e)}(a,t);var e,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=H(r);if(i){var n=H(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===F(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return W(t)}(this,t)});function a(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.apply(this,arguments)).renderOptions={host:W(t)},t._$Do=void 0,t}return e=a,n=[{key:"createRenderRoot",value:function(){var t,e,n=U(H(a.prototype),"createRenderRoot",this).call(this);return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=n.firstChild),n}},{key:"update",value:function(t){var e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),U(H(a.prototype),"update",this).call(this,t),this._$Do=(0,N.sY)(e,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function(){var t;U(H(a.prototype),"connectedCallback",this).call(this),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}},{key:"disconnectedCallback",value:function(){var t;U(H(a.prototype),"disconnectedCallback",this).call(this),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}},{key:"render",value:function(){return N.Jb}}],n&&B(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(L);V.finalized=!0,V._$litElement$=!0,null===(D=globalThis.litElementHydrateSupport)||void 0===D||D.call(globalThis,{LitElement:V});var G=globalThis.litElementPolyfillSupport;null==G||G({LitElement:V}),(null!==($=globalThis.litElementVersions)&&void 0!==$?$:globalThis.litElementVersions=[]).push("3.3.3")}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={id:t,loaded:!1,exports:{}};return e[t].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.m=e,t=[],r.O=function(e,n,i,o){if(!n){var a=1/0;for(l=0;l<t.length;l++){n=t[l][0],i=t[l][1],o=t[l][2];for(var s=!0,u=0;u<n.length;u++)(!1&o||a>=o)&&Object.keys(r.O).every((function(t){return r.O[t](n[u])}))?n.splice(u--,1):(s=!1,o<a&&(a=o));if(s){t.splice(l--,1);var c=i();void 0!==c&&(e=c)}}return e}o=o||0;for(var l=t.length;l>0&&t[l-1][2]>o;l--)t[l]=t[l-1];t[l]=[n,i,o]},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){var t={898:0};r.O.j=function(e){return 0===t[e]};var e=function(e,n){var i,o,a=n[0],s=n[1],u=n[2],c=0;if(a.some((function(e){return 0!==t[e]}))){for(i in s)r.o(s,i)&&(r.m[i]=s[i]);if(u)var l=u(r)}for(e&&e(n);c<a.length;c++)o=a[c],r.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return r.O(l)},n=self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}();var i={};!function(){"use strict";r(278),r(228),r(4338),r(886),r(6466),r(3964),r(8077),r(9358),r(4043),r(752),r(1694),r(6265),r(9307),r(1514),r(9730),r(7522),r(5728),r(6801),r(3843),r(2320),r(6203),r(2826),r(9749),r(6544),r(4254),r(7049),r(4284),r(8373),r(6793),r(7629),r(7509),r(8052),r(3374),r(6891),r(6177),r(5557);var t=JSON.parse('{"i8":"5.0.0-78-alpha23"}'),e=r(5685);r(9373),r(9903),r(9288),r(6227);var n={fragmentChange:"fragmentChange",pageChanged:"pageChanged",PostInit:"PostInit",stop:"stop",resize:"resize",userAction:"userAction",fullscreenToggled:"fullscreenToggled",zoomOut:"zoomOut",zoomIn:"zoomIn","1PageViewSelected":"1PageViewSelected","2PageViewSelected":"2PageViewSelected","3PageViewSelected":"3PageViewSelected"},i=r(5311);function o(t){return o="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},o(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==o(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===o(i)?i:String(i)),r)}var i}var s=function(){function t(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.br=n,this.$root=null,this.$nav=null,this.maxPageNum=null,this.minimumControls=["viewmode"],this.maximumControls=["book_left","book_right","zoom_in","zoom_out","onepg","twopg","thumb"],this.updateNavIndexThrottled=(0,e.throttle)(this.updateNavIndex.bind(this),250,!1)}var r,o;return r=t,(o=[{key:"controlFor",value:function(t){var e=this.br.options.controls[t];return e.visible?e.template?"<li>".concat(e.template(this.br),"</li>"):'<li>\n <button class="BRicon '.concat(e.className,'" title="').concat(e.label,'">\n <div class="icon icon-').concat(e.iconClassName,'"></div>\n <span class="BRtooltip">').concat(e.label,"</span>\n </button>\n </li>"):""}},{key:"_renderControls",value:function(){var t=this;return["bookLeft","bookRight","onePage","twoPage","thumbnail","viewmode","zoomOut","zoomIn","fullScreen"].map((function(e){return t.controlFor(e)})).join("")}},{key:"_bindViewModeButton",value:function(){var t=this,e=this.br,r=e.options.controls.viewmode,o=[{mode:e.constMode1up,className:"onepg",title:"One-page view"},{mode:e.constMode2up,className:"twopg",title:"Two-page view"},{mode:e.constModeThumb,className:"thumb",title:"Thumbnail view"}].filter((function(t){return!r.excludedModes.includes(t.mode)})),a=o.map((function(t){return t.mode}));r.excludedModes.includes(e.mode)&&e.switchMode(a[0]);for(var s=a.indexOf(e.mode),u=0;u<=s;u++)a.push(a.shift());o.length<2&&this.$nav.find(".".concat(r.className)).remove(),this.br.bind(n.PostInit,(function(){var n=t.$nav.find(".".concat(r.className)).off(".bindNavigationHandlers").on("click",(function(n){var r=a.shift(),s=o.find((function(t){return t.mode===r})),u=o.find((function(t){return t.mode===a[0]}));a.push(r),e.viewModeOrder=a,t.updateViewModeButton(i(n.currentTarget),u.className,u.title),e.switchMode(s.mode)})),s=o.find((function(t){return t.mode===a[0]}));t.updateViewModeButton(n,s.className,s.title)}))}},{key:"updateViewModeButton",value:function(t,e,n){t.attr("title",n).find(".icon").removeClass().addClass("icon icon-".concat(e)).end().find(".BRtooltip").text(n)}},{key:"switchNavbarControls",value:function(){"linerNotes"!==this.br.options.bookType&&(this.br.refs.$brContainer.prop("clientWidth")<640?this.showMinimumNavbarControls():this.showMaximumNavbarControls())}},{key:"showMinimumNavbarControls",value:function(){this.minimumControls.forEach((function(t){var e=document.querySelector(".controls .".concat(t));e&&e.classList.remove("hide")})),this.maximumControls.forEach((function(t){var e=document.querySelector(".controls .".concat(t));e&&e.classList.add("hide")}))}},{key:"showMaximumNavbarControls",value:function(){this.maximumControls.forEach((function(t){var e=document.querySelector(".controls .".concat(t));e&&e.classList.remove("hide")})),this.minimumControls.forEach((function(t){var e=document.querySelector(".controls .".concat(t));e&&e.classList.add("hide")}))}},{key:"init",value:function(){var t=this,e=this.br,n=e.options.navbarTitle,r="rl"===e.pageProgression,o=r?"book_flip_next":"book_flip_prev",a=r?"book_flip_prev":"book_flip_next";this.br.options.controls.bookLeft.className="book_left ".concat(o),this.br.options.controls.bookRight.className="book_right ".concat(a),e.refs.$BRfooter=this.$root=i('<div class="BRfooter"></div>'),e.refs.$BRnav=this.$nav=i('<div class="BRnav BRnavDesktop">\n '.concat(n?'<div class="BRnavTitle">'.concat(n,"</div>"):"",'\n <nav class="BRcontrols">\n <ul class="controls">\n <li class="scrubber">\n <div class="BRnavpos">\n <div class="BRpager"></div>\n <div class="BRnavline"></div>\n </div>\n <p><span class=\'BRcurrentpage\'></span></p>\n </li>\n ').concat(this._renderControls(),"\n </ul>\n </nav>\n </div>")),this.$root.append(this.$nav),e.refs.$br.append(this.$root);var s=this.$root.find(".BRpager").slider({animate:!0,min:0,max:e.book.getNumLeafs()-1,value:e.currentIndex(),range:"min"});return s.on("slide",(function(e,n){return t.updateNavPageNum(n.value),!0})),s.on("slidechange",(function(n,r){return t.updateNavPageNum(r.value),s.data("swallowchange")?s.data("swallowchange",!1):e.jumpToIndex(r.value),!0})),e.options.controls.viewmode.visible&&this._bindViewModeButton(),this.updateNavPageNum(e.currentIndex()),this.$nav}},{key:"getNavPageNumString",value:function(t){var e=this.br,n=e.book.getPageNum(t),r=(e.book.getPageProp(t,"pageType"),e.book.getNumLeafs());if(!this.maxPageNum){for(var i,o=0,a=0;a<r;a++)i=e.book.getPageNum(a),!isNaN(i)&&i>o&&(o=i);this.maxPageNum=o}return function(t,e,n,r,i){if(!("n"!=n[0]))return"(".concat(t+1," of ").concat(e,")");var o=i?" of ".concat(i):"";return"".concat(n).concat(o)}(t,r,n,0,this.maxPageNum)}},{key:"updateNavPageNum",value:function(t){this.$root.find(".BRcurrentpage").html(this.getNavPageNumString(t))}},{key:"updateNavIndex",value:function(t){t=void 0!==t?t:this.br.currentIndex(),this.$root.find(".BRpager").data("swallowchange",!0).slider("value",t)}}])&&a(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),t}();function u(t){return u="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},u(t)}function c(t){var e="function"==typeof Map?new Map:void 0;return c=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return l(t,arguments,d(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),h(n,t)},c(t)}function l(t,e,n){return l=f()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&h(i,n.prototype),i},l.apply(null,arguments)}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}r(50),r(6646);var p={defaults:null,padding:10,ui:"full",uiAutoHide:!1,thumbRowBuffer:1,thumbColumns:6,thumbMaxLoading:4,thumbPadding:10,thumbMinZoomColumns:2,thumbMaxZoomColumns:8,flipSpeed:400,showToolbar:!0,showNavbar:!0,navBarTitle:"",showLogo:!0,logoURL:"https://archive.org",imagesBaseURL:"/BookReader/images/",reduceSet:"pow2",reductionFactors:[{reduce:.25,autofit:null},{reduce:.5,autofit:null},{reduce:1,autofit:null},{reduce:2,autofit:null},{reduce:3,autofit:null},{reduce:4,autofit:null},{reduce:6,autofit:null}],onePage:{autofit:"auto"},twoPage:{coverInternalPadding:0,coverExternalPadding:0,bookSpineDivWidth:64,autofit:"auto"},onePageMinBreakpoint:800,bookTitle:"",bookUrl:null,bookUrlText:null,bookUrlTitle:null,enableBookTitleLink:!0,bookLanguage:null,metadata:[],thumbnail:null,bookUrlMoreInfo:null,enableExperimentalControls:!1,el:"#BookReader",pageProgression:"lr",ppi:500,protected:!1,plugins:{textSelection:null},vars:{},data:[],table_of_contents:null,getNumLeafs:null,getPageWidth:null,getPageHeight:null,getPageURI:null,getPageSide:null,getSpreadIndices:null,getPageNum:null,getPageProp:null,leafNumToIndex:null,getEmbedCode:null,controls:{bookLeft:{visible:!0,label:"Flip left",className:"book_left",iconClassName:"left-arrow"},bookRight:{visible:!0,label:"Flip right",className:"book_right",iconClassName:"left-arrow hflip"},onePage:{visible:!0,label:"One-page view",className:"onepg",iconClassName:"onepg"},twoPage:{visible:!0,label:"Two-page view",className:"twopg",iconClassName:"twopg"},thumbnail:{visible:!0,label:"Thumbnail view",className:"thumb",iconClassName:"thumb"},viewmode:{visible:!0,className:"viewmode",excludedModes:[]},zoomOut:{visible:!0,label:"Zoom out",className:"zoom_out",iconClassName:"magnify"},zoomIn:{visible:!0,label:"Zoom in",className:"zoom_in",iconClassName:"magnify plus"},fullScreen:{visible:!0,label:"Toggle fullscreen",className:"full",iconClassName:"fullscreen"}},startFullscreen:!1,enableFSLogoShortcut:!1,autoResize:!0,useSrcSet:!1},v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(o,t);var e,n,r,i=(n=o,r=f(),function(){var t,e=d(n);if(r){var i=d(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function o(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.apply(this,arguments)}return e=o,Object.defineProperty(e,"prototype",{writable:!1}),e}(c(Error)),g=(r(7267),r(4581),r(5311));function m(t){return m="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},m(t)}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==m(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===m(i)?i:String(i)),r)}var i}var w=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.br=e}var r,i;return r=t,(i=[{key:"buildToolbarElement",value:function(){var t=this.br,e=t.showLogo?'\n <span class="BRtoolbarSection BRtoolbarSectionLogo">\n <a class="logo" href="'.concat(t.logoURL,'"></a>\n </span>'):"";t.refs.$BRtoolbar=g('\n <div class="BRtoolbar header">\n <div class="BRtoolbarbuttons">\n <div class="BRtoolbarLeft">\n '.concat(e,'\n <span class="BRtoolbarSection BRtoolbarSectionTitle"></span>\n </div>\n <div class="BRtoolbarRight">\n <span class="BRtoolbarSection BRtoolbarSectionInfo">\n <button class="BRpill info js-tooltip">Info</button>\n <button class="BRpill share js-tooltip">Share</button>\n </span>\n </div>\n </div>\n </div>'));var n=t.refs.$BRtoolbar.find(".BRtoolbarSectionTitle");return t.bookUrl&&t.options.enableBookTitleLink?n.append(g("<a>").attr({href:t.bookUrl,title:t.bookUrlTitle}).addClass("BRreturn").html(t.bookUrlText||t.bookTitle)):t.bookTitle&&n.append(t.bookUrlText||t.bookTitle),t.refs.$BRtoolbar}},{key:"initToolbar",value:function(t,e){var r=this.br;r.refs.$br.append(this.buildToolbarElement()),r.$(".BRnavCntl").addClass("BRup"),r.$(".pause").hide(),r.refs.$BRtoolbar.append(),r.canSwitchToMode(r.constMode2up)||r.$(".two_page_mode, .play, .pause").hide(),r.canSwitchToMode(r.constModeThumb)||r.$(".thumbnail_mode").hide(),r.canSwitchToMode(r.constMode2up)||r.canSwitchToMode(r.constModeThumb)||r.$(".one_page_mode").hide(),g('<div style="display: none;"></div>').append(g('\n <div class="BRfloat BRshare">\n <div class="BRfloatHead">\n Share\n <button class="floatShut" href="javascript:;" onclick="$.fn.colorbox.close();"><span class="br-colorbox-shift">Close</span></button>\n </div>\n </div>')).append(g('\n <div class="BRfloat BRinfo">\n <div class="BRfloatHead">About this book\n <button class="floatShut" href="javascript:;" onclick="$.fn.colorbox.close();"><span class="br-colorbox-shift">Close</span></button>\n </div>\n <div class="BRfloatBody">\n <div class="BRfloatCover"></div>\n <div class="BRfloatMeta">\n <div class="BRfloatTitle">\n <h2><a /></h2>\n </div>\n </div>\n </div>\n <div class="BRfloatFoot">\n <a href="https://openlibrary.org/dev/docs/bookreader">About the BookReader</a>\n </div>\n </div>')).appendTo(r.refs.$br),r.$(".BRinfo .BRfloatTitle a").attr({href:r.bookUrl}).text(r.bookTitle).addClass("title"),this.buildInfoDiv(r.$(".BRinfo")),this.buildShareDiv(r.$(".BRshare")),r.$(".share").colorbox({inline:!0,opacity:"0.5",href:r.$(".BRshare"),onLoad:function(){r.trigger(n.stop),r.$(".BRpageviewValue").val(window.location.href)}}),r.$(".info").colorbox({inline:!0,opacity:"0.5",href:r.$(".BRinfo"),onLoad:function(){r.trigger(n.stop)}})}},{key:"buildShareDiv",value:function(t){var e=this,n=this.br,r=document.location+"",i=(r+"").replace(/#.*/,""),o=n.getEmbedCode?'\n <div class="share-embed">\n <p class="share-embed-prompt">Copy and paste one of these options to share this book elsewhere.</p>\n <form method="post" action="">\n <fieldset class="fieldset-share-pageview">\n <label for="pageview">Link to this page view</label>\n <input type="text" name="pageview" class="BRpageviewValue" value="'.concat(r,'"/>\n </fieldset>\n <fieldset class="fieldset-share-book-link">\n <label for="booklink">Link to the book</label>\n <input type="text" name="booklink" class="booklink" value="').concat(i,'"/>\n </fieldset>\n <fieldset class="fieldset-embed">\n <label for="iframe">Embed a mini Book Reader</label>\n <fieldset class="sub">\n <label class="sub">\n <input type="radio" name="pages" value="').concat(n.constMode1up,'" checked="checked"/>\n 1 page\n </label>\n <label class="sub">\n <input type="radio" name="pages" value="').concat(n.constMode2up,'"/>\n 2 pages\n </label>\n <label class="sub">\n <input type="checkbox" name="thispage" value="thispage"/>\n Open to this page?\n </label>\n </fieldset>\n <textarea cols="30" rows="4" name="iframe" class="BRframeEmbed"></textarea>\n </fieldset>\n </form>\n </div>'):"",a=g('\n <div class="share-title">Share this book</div>\n <div class="share-social">\n <label class="sub open-to-this-page">\n <input class="thispage-social" type="checkbox" />\n Open to this page?\n </label>\n <div><button class="BRaction share facebook-share-button"><i class="BRicon fb" /> Facebook</button></div>\n <div><button class="BRaction share twitter-share-button"><i class="BRicon twitter" /> Twitter</button></div>\n <div><button class="BRaction share email-share-button"><i class="BRicon email" /> Email</button></div>\n </div>\n '.concat(o,'\n <div class="BRfloatFoot">\n <button class="share-finished" type="button" onclick="$.fn.colorbox.close();">Finished</button>\n </div>'));a.appendTo(t),a.find(".fieldset-embed input").on("change",(function(t){var e=g(t.target).parents("form").first(),r={};r.mode=g(e.find(".fieldset-embed input[name=pages]:checked")).val(),e.find(".fieldset-embed input[name=thispage]").prop("checked")&&(r.page=n.book.getPageNum(n.currentIndex())),n.getEmbedCode&&e.find(".BRframeEmbed").val(n.getEmbedCode("480px","430px",r))})),a.find("input, textarea").on("focus",(function(t){return t.target.select()})),a.find(".facebook-share-button").on("click",(function(){x("https://www.facebook.com/sharer.php?"+g.param({u:e._getSocialShareUrl()}),600,400,"Share")})),a.find(".twitter-share-button").on("click",(function(){x("https://twitter.com/intent/tweet?"+g.param({url:e._getSocialShareUrl(),text:n.bookTitle}),600,400,"Share")})),a.find(".email-share-button").on("click",(function(){var t="".concat(n.bookTitle,"\n\n").concat(e._getSocialShareUrl());window.location.href="mailto:?subject=".concat(encodeURI(n.bookTitle),"&body=").concat(encodeURI(t))})),a.find("input[name=thispage]").trigger("change"),a.appendTo(t)}},{key:"_getSocialShareUrl",value:function(){return this.br.$(".thispage-social").prop("checked")?window.location.href:"".concat(document.location.protocol,"//").concat(window.location.hostname).concat(window.location.pathname)}},{key:"buildInfoDiv",value:function(t){var n=this.br;t.find(".BRfloatBody, .BRfloatCover, .BRfloatFoot").remove();var r=g('<div class="BRinfoLeftCol"></div>');n.thumbnail&&r.append(g('\n <div class="BRimageW">\n <img src="'.concat(n.thumbnail,'" alt="').concat((0,e.escapeHTML)(n.bookTitle),'" />\n </div>')));var i,o=g('<div class="BRinfoRightCol">'),a=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(n.metadata);try{for(a.s();!(i=a.n()).done;){var s=i.value,u=s.extraValueClass,c=void 0===u?"":u,l=s.label,f=s.value,h="Title"===l?(0,e.escapeHTML)(f):f;o.append(g('\n <div class="BRinfoValueWrapper">\n <div class="BRinfoLabel">'.concat(l,'</div>\n <div class="BRinfoValue ').concat(c,'">').concat(h,"</div>\n </div>")))}}catch(t){a.e(t)}finally{a.f()}var d=n.bookUrlMoreInfo?n.bookUrlMoreInfo:n.bookTitle;d&&n.bookUrl&&o.append(g('\n <div class="BRinfoValueWrapper">\n <div class="BRinfoMoreInfoWrapper">\n <a class="BRinfoMoreInfo" href="'.concat(n.bookUrl,'">\n ').concat((0,e.escapeHTML)(d),"\n </a>\n </div>\n </div>")));var p=g('<div class="BRfloatFoot BRinfoFooter"></div>'),v=g('<div class="BRinfoW mv20-lg">').append([r,o,g('<br style="clear:both"/>')]);t.append(v,p).addClass("wide")}},{key:"getToolBarHeight",value:function(){var t=this.br.refs.$BRtoolbar;return t&&"block"===t.css("display")?t.outerHeight()+parseInt(t.css("top")):0}}])&&b(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),t}();function x(t,e,n,r){var i=null!=window.screenLeft?window.screenLeft:screen.left,o=null!=window.screenTop?window.screenTop:screen.top,a=(window.innerWidth||document.documentElement.clientWidth||screen.width)/2-e/2+i,s=(window.innerHeight||document.documentElement.clientHeight||screen.height)/2-n/2+o,u="status=1,width=".concat(e,",height=").concat(n,",top=").concat(s,",left=").concat(a);window.open(t,r,u)}function _(t){return _="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},_(t)}function S(){S=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new R(r||[]);return i(a,"_invoke",{value:T(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",g={};function m(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(A([])));k&&k!==n&&r.call(k,a)&&(w=k);var P=b.prototype=m.prototype=Object.create(w);function E(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==_(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,n,r){var i=h;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?v:d,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=v,r.method="throw",r.arg=c.arg)}}}function C(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(_(e)+" is not iterable")}return y.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},E(O.prototype),c(O.prototype,s,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(P),c(P,u,"Generator"),c(P,a,(function(){return this})),c(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=A,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;M(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:A(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function k(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return P(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function P(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function E(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function O(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==_(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===_(i)?i:String(i)),r)}var i}function T(t,e,n){return e&&O(t.prototype,e),n&&O(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}r(5137),r(9772),r(4564),r(385);var C=function(){function t(e){var n,r,i,o;E(this,t),this.br=e,this.reduceSet=e.reduceSet,this.ppi=null!==(n=null===(r=e.options)||void 0===r?void 0:r.ppi)&&void 0!==n?n:p.ppi,this.pageProgression=null!==(i=null===(o=e.options)||void 0===o?void 0:o.pageProgression)&&void 0!==i?i:p.pageProgression,this._medianPageSize=null,this._getDataFlattenedCached=null}return T(t,[{key:"getMedianPageSizeInches",value:function(){if(this._medianPageSize)return this._medianPageSize;var t,e=[],n=[],r=k(this.pagesIterator());try{for(r.s();!(t=r.n()).done;){var i=t.value;e.push(i.widthInches),n.push(i.heightInches)}}catch(t){r.e(t)}finally{r.f()}return e.sort((function(t,e){return t-e})),n.sort((function(t,e){return t-e})),this._medianPageSize={width:e[Math.floor(e.length/2)],height:n[Math.floor(n.length/2)]},this._medianPageSize}},{key:"_getPageWidth",value:function(t){return t=(0,e.clamp)(t,0,this.getNumLeafs()-1),this.getPageWidth(t)}},{key:"_getPageHeight",value:function(t){var n=(0,e.clamp)(t,0,this.getNumLeafs()-1);return this.getPageHeight(n)}},{key:"getPageIndex",value:function(t){var e=this.getPageIndices(t);return e.length?e[e.length-1]:void 0}},{key:"getPageIndices",value:function(t){var e=[];if("n"==t.slice(0,1))try{var n=t.slice(1,t.length),r=parseInt(n);return e.push(r),e}catch(t){}for(var i=0;i<this.getNumLeafs();i++)this.getPageNum(i)==t&&e.push(i);return e}},{key:"getPageName",value:function(t){return"Page "+this.getPageNum(t)}},{key:"getNumLeafs",value:function(){return void 0!==this.br.numLeafs?this.br.numLeafs:this._getDataFlattened().length}},{key:"getPageWidth",value:function(t){return this.getPageProp(t,"width")}},{key:"getPageHeight",value:function(t){return this.getPageProp(t,"height")}},{key:"getPageURI",value:function(t,e,n){return this.getPageProp(t,"viewable",!0)?this.getPageProp(t,"uri"):"/bookreader/static/preview-default.png"}},{key:"getPageSide",value:function(t){return this.getPageProp(t,"pageSide")||(t%2==0?"R":"L")}},{key:"getPageNum",value:function(t){var e=this.getPageProp(t,"pageNum");return void 0===e?"n".concat(t):e}},{key:"getPageProp",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return this._getDataProp(t,e,n)}},{key:"getSpreadIndices",value:function(t){return"rl"==this.pageProgression?"R"==this.getPageSide(t)?[t+1,t]:[t,t-1]:"L"==this.getPageSide(t)?[t,t+1]:[t-1,t]}},{key:"leafNumToIndex",value:function(t){var e=this._getDataFlattened().findIndex((function(e){return e.leafNum==t}));return e>-1?e:t}},{key:"parsePageString",value:function(t){var e,n=/^leaf(\d+)/.exec(t);return n?null===(e=this.leafNumToIndex(parseInt(n[1],10)))&&(e=void 0):e=this.getPageIndex(t),e}},{key:"getPage",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.getNumLeafs();if(e||!(t<0||t>=n))return t<0&&t>=-n&&(t+=n),new j(this,t%=n)}},{key:"pagesIterator",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.start,r=void 0===n?0:n,i=e.end,o=void 0===i?1/0:i,a=e.combineConsecutiveUnviewables,s=void 0!==a&&a;return S().mark((function e(){var n,i;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Math.max(0,r),o=Math.min(o,t.getNumLeafs()),n=r;case 3:if(!(n<o)){e.next=12;break}if(i=t.getPage(n),!s||!i.isConsecutiveUnviewable){e.next=7;break}return e.abrupt("continue",9);case 7:return e.next=9,i;case 9:n++,e.next=3;break;case 12:case"end":return e.stop()}}),e)}))()}},{key:"_getDataFlattened",value:function(){if(this._getDataFlattenedCached&&this._getDataFlattenedCached[1]===this.br.data.length)return this._getDataFlattenedCached[0];var t=null,e=null,n=0,r=this.br.data.flatMap((function(r){return r.map((function(i){return i.pageSide||(i.pageSide=null===t?2===r.length?"L":"R":"L"===t?"R":"L"),t=i.pageSide,!1===i.viewable?i.unviewablesStart=null===e?e=n:e:e=null,n++,i}))}));return this._getDataFlattenedCached=[r,this.br.data.length],r}},{key:"_getDataProp",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this._getDataFlattened();return isNaN(t)||t<0||t>=r.length||void 0===r[t][e]?n:r[t][e]}}]),t}(),j=function(){function t(e,n){E(this,t);var r=e._getDataProp(n,"ppi",e.ppi);this.ppi=Math.max(r<10?e.ppi:r,10),this.book=e,this.index=n,this.width=e.getPageWidth(n),this.widthInches=this.width/this.ppi,this.height=e.getPageHeight(n),this.heightInches=this.height/this.ppi,this.pageSide=e.getPageSide(n),this.leafNum=e._getDataProp(n,"leafNum",this.index),this.isViewable=e._getDataProp(n,"viewable",!0),this.unviewablesStart=e._getDataProp(n,"unviewablesStart")||null,this.isConsecutiveUnviewable=!this.isViewable&&this.unviewablesStart!=this.index,this._rawData=this.book._getDataFlattened()[this.index]}return T(t,[{key:"makeViewable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.isViewable!=t)if(t){this._rawData.viewable=!0,delete this._rawData.unviewablesStart;var e,n=k(this.book.pagesIterator({start:this.index+1}));try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.isViewable)break;r._rawData.unviewablesStart=this.index+1}}catch(t){n.e(t)}finally{n.f()}}else{this._rawData.viewable=!1,this._rawData.unviewablesStart=this.prev&&!this.prev.isViewable?this.prev.unviewablesStart:this.index;var i,o=k(this.book.pagesIterator({start:this.index+1}));try{for(o.s();!(i=o.n()).done;){var a=i.value;if(!a.isViewable)break;a._rawData.unviewablesStart=this._rawData.unviewablesStart}}catch(t){o.e(t)}finally{o.f()}}}},{key:"prev",get:function(){return this.findPrev()}},{key:"next",get:function(){return this.findNext()}},{key:"left",get:function(){return"lr"===this.book.pageProgression?this.prev:this.next}},{key:"right",get:function(){return"lr"===this.book.pageProgression?this.next:this.prev}},{key:"spread",get:function(){return{left:"L"===this.pageSide?this:this.left,right:"R"===this.pageSide?this:this.right}}},{key:"goLeft",value:function(t){var e="lr"===this.book.pageProgression?this.index-t:this.index+t;return this.book.getPage(e)}},{key:"goRight",value:function(t){var e="lr"===this.book.pageProgression?this.index+t:this.index-t;return this.book.getPage(e)}},{key:"getURI",value:function(t,e){return this.book.getPageURI(this.index,t,e)}},{key:"getURISrcSet",value:function(t){for(var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.book.reduceSet,i=r.floor(t),o=[],a=r.decr(i);a>=1;a=r.decr(a))o.push(a);return o.map((function(t){return"".concat(e.getURI(t,n)," ").concat(i/t,"x")})).join(", ")}},{key:"findNext",value:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).combineConsecutiveUnviewables,e=void 0!==t&&t;return this.book.pagesIterator({start:this.index+1,combineConsecutiveUnviewables:e}).next().value}},{key:"findPrev",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).combineConsecutiveUnviewables,n=void 0!==e&&e;if(0!=this.index){if(n){if(this.isConsecutiveUnviewable)return this.book.getPage(this.unviewablesStart);var r=new t(this.book,this.index-1);return r.isViewable?r:r.findPrev({combineConsecutiveUnviewables:n})}return new t(this.book,this.index-1)}}},{key:"findLeft",value:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).combineConsecutiveUnviewables,e=void 0!==t&&t;return"lr"===this.book.pageProgression?this.findPrev({combineConsecutiveUnviewables:e}):this.findNext({combineConsecutiveUnviewables:e})}},{key:"findRight",value:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).combineConsecutiveUnviewables,e=void 0!==t&&t;return"lr"===this.book.pageProgression?this.findNext({combineConsecutiveUnviewables:e}):this.findPrev({combineConsecutiveUnviewables:e})}}]),t}(),M=(r(2349),r(1919),r(2506),r(429),r(1830),r(9089)),R=r(8318),A=r(1312),I=(r(6976),r(8496)),L=r.n(I),D=r(7775);function $(t){return $="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},$(t)}function N(){N=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:E(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",g={};function m(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(M([])));_&&_!==n&&r.call(_,a)&&(w=_);var S=b.prototype=m.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==$(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function E(e,n,r){var i=h;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=O(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?v:d,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=v,r.method="throw",r.arg=c.arg)}}}function O(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError($(e)+" is not iterable")}return y.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(P.prototype),c(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new P(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=M,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:M(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function F(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function B(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){F(o,r,i,a,s,"next",t)}function s(t){F(o,r,i,a,s,"throw",t)}a(void 0)}))}}function U(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function z(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,V(r.key),r)}}function W(t,e,n){return e&&z(t.prototype,e),n&&z(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function H(t,e,n){return(e=V(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function V(t){var e=function(t,e){if("object"!==$(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==$(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===$(e)?e:String(e)}var G=function(){function t(n){var r=this;U(this,t),H(this,"scaleCenter",{x:.5,y:.5}),H(this,"_preventEvent",(function(t){return t.preventDefault(),!1})),H(this,"_pinchStart",B(N().mark((function t(){var n,i;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r.pinching){t.next=2;break}return t.abrupt("return");case 2:if(!(0,D.gn)()){t.next=7;break}return t.next=5,(0,e.sleep)(0);case 5:if(!(r.touchesMonitor.touches<2)){t.next=7;break}return t.abrupt("return");case 7:r.pinching=!0,r.oldScale=1,r.mode.$visibleWorld.classList.add("BRsmooth-zooming"),r.mode.$visibleWorld.style.willChange="transform",r.mode.autoFit="none",r.detachCtrlZoom(),null===(n=(i=r.mode).detachScrollListeners)||void 0===n||n.call(i),r.interact.gesturable({listeners:{start:r._pinchStart,move:r._pinchMove,end:r._pinchEnd}});case 15:case"end":return t.stop()}}),t)})))),H(this,"_pinchMove",function(){var t=B(N().mark((function t(e){return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.pinching){t.next=2;break}return t.abrupt("return");case 2:r.lastEvent={scale:e.scale,clientX:e.clientX,clientY:e.clientY},r.pinchMoveFrame||(r.pinchMoveFrame=r.bufferFn(r._drawPinchZoomFrame));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),H(this,"_pinchEnd",B(N().mark((function t(){var e,n;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.pinching){t.next=2;break}return t.abrupt("return");case 2:return r.pinching=!1,r.interact.gesturable({listeners:{start:r._pinchStart,end:r._pinchEnd}}),t.next=6,r.pinchMoveFramePromise;case 6:r.scaleCenter={x:.5,y:.5},r.oldScale=1,r.mode.$visibleWorld.classList.remove("BRsmooth-zooming"),r.mode.$visibleWorld.style.willChange="auto",r.attachCtrlZoom(),null===(e=(n=r.mode).attachScrollListeners)||void 0===e||e.call(n);case 12:case"end":return t.stop()}}),t)})))),H(this,"_drawPinchZoomFrame",B(N().mark((function t(){var e,n;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.pinching){t.next=3;break}return r.pinchMoveFrame=null,t.abrupt("return");case 3:if(r.mode.$container.style.overflow="hidden",r.pinchMoveFramePromiseRes=null,r.pinchMoveFramePromise=new Promise((function(t){return r.pinchMoveFramePromiseRes=t})),r.updateScaleCenter({clientX:r.lastEvent.clientX,clientY:r.lastEvent.clientY}),e=r.mode.scale,n=e*r.lastEvent.scale/r.oldScale,e==n){t.next=13;break}return r.mode.scale=n,t.next=13,r.pinchMoveFramePromise;case 13:r.mode.$container.style.overflow="auto",r.oldScale=r.lastEvent.scale,r.pinchMoveFrame=null;case 16:case"end":return t.stop()}}),t)})))),H(this,"_dragMove",function(){var t=B(N().mark((function t(e){return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r.pinching){t.next=3;break}return t.next=3,r._pinchEnd();case 3:r.mode.$container.scrollTop-=e.dy,r.mode.$container.scrollLeft-=e.dx;case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),H(this,"_handleCtrlWheel",(function(t){if(t.ctrlKey){t.preventDefault();var e=/Mac/i.test(navigator.platform)?.045:.03;r.updateScaleCenter(t),r.mode.autoFit="none",r.mode.scale*=1-Math.sign(t.deltaY)*e}})),this.mode=n,this.pinching=!1,this.pinchMoveFrame=null,this.pinchMoveFramePromise=Promise.resolve(),this.oldScale=1,this.lastEvent=null,this.attached=!1,this.bufferFn=window.requestAnimationFrame.bind(window)}return W(t,[{key:"attach",value:function(){this.attached||(this.attachCtrlZoom(),this.mode.$container.addEventListener("gesturestart",this._pinchStart),this.mode.$container.addEventListener("gesturechange",this._preventEvent),this.mode.$container.addEventListener("gestureend",this._pinchEnd),(0,D.gn)()&&(this.touchesMonitor=new Y(this.mode.$container),this.touchesMonitor.attach()),this.mode.$container.style.touchAction="pan-x pan-y",this.interact=L()(this.mode.$container),this.interact.gesturable({listeners:{start:this._pinchStart,end:this._pinchEnd}}),(0,D.Tv)()&&(this.mode.$container.style.touchAction="none",this.interact.draggable({inertia:{resistance:2,minSpeed:100,allowResume:!0},listeners:{move:this._dragMove}})),this.attached=!0)}},{key:"detach",value:function(){var t,e;this.detachCtrlZoom(),this.mode.$container.removeEventListener("gesturestart",this._pinchStart),this.mode.$container.removeEventListener("gesturechange",this._preventEvent),this.mode.$container.removeEventListener("gestureend",this._pinchEnd),null===(t=this.touchesMonitor)||void 0===t||null===(e=t.detach)||void 0===e||e.call(t),this.interact.unset(),L().removeDocument(document),this.attached=!1}},{key:"attachCtrlZoom",value:function(){window.addEventListener("wheel",this._handleCtrlWheel,{passive:!1})}},{key:"detachCtrlZoom",value:function(){window.removeEventListener("wheel",this._handleCtrlWheel)}},{key:"updateScaleCenter",value:function(t){var e=t.clientX,n=t.clientY,r=this.mode.htmlDimensionsCacher.boundingClientRect;this.scaleCenter={x:(e-r.left)/this.mode.htmlDimensionsCacher.clientWidth,y:(n-r.top)/this.mode.htmlDimensionsCacher.clientHeight}}},{key:"updateViewportOnZoom",value:function(t,e){var n,r=this.mode.$container,i=r.scrollTop,o=r.scrollLeft,a=this.mode.htmlDimensionsCacher.clientWidth,s=this.mode.htmlDimensionsCacher.clientHeight,u=t/e,c=this.scaleCenter.x,l=this.scaleCenter.y,f=u*(o+c*a),h=u*(i+l*s);r.scrollTop=h-l*s,r.scrollLeft=f-c*a,null===(n=this.pinchMoveFramePromiseRes)||void 0===n||n.call(this)}}]),t}(),Y=function(){function t(e){var n=this;U(this,t),H(this,"_updateTouchCount",(function(t){n.touches=t.touches.length})),this.container=e,this.touches=0}return W(t,[{key:"attach",value:function(){this.container.addEventListener("touchstart",this._updateTouchCount),this.container.addEventListener("touchend",this._updateTouchCount)}},{key:"detach",value:function(){this.container.removeEventListener("touchstart",this._updateTouchCount),this.container.removeEventListener("touchend",this._updateTouchCount)}}]),t}();function X(t){return X="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},X(t)}function q(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Z(r.key),r)}}function K(t,e,n){return(e=Z(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Z(t){var e=function(t,e){if("object"!==X(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==X(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===X(e)?e:String(e)}var J=function(){function t(n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),K(this,"clientWidth",100),K(this,"clientHeight",100),K(this,"boundingClientRect",{top:0,left:0}),K(this,"updateClientSizes",(function(){var t=r.element.getBoundingClientRect();r.clientWidth=r.element.clientWidth,r.clientHeight=r.element.clientHeight,r.boundingClientRect.top=t.top,r.boundingClientRect.left=t.left})),K(this,"debouncedUpdateClientSizes",(0,e.debounce)(this.updateClientSizes,150,!1)),this.element=n}var n,r;return n=t,r=[{key:"attachResizeListener",value:function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).addEventListener("resize",this.debouncedUpdateClientSizes)}},{key:"detachResizeListener",value:function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).removeEventListener("resize",this.debouncedUpdateClientSizes)}}],r&&q(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();function Q(t){return Q="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},Q(t)}function tt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,et(r.key),r)}}function et(t){var e=function(t,e){if("object"!==Q(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Q(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Q(e)?e:String(e)}var nt=function(){function t(e,n){var r,i,o,a=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,o=function(){a.element.classList.add(a.className),clearTimeout(a.timeout),a.timeout=setTimeout((function(){a.element.classList.remove(a.className)}),600)},(i=et(i="onScroll"))in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o,this.element=e,this.className=n,this.timeout=null}var e,n;return e=t,(n=[{key:"attach",value:function(){this.element.addEventListener("scroll",this.onScroll)}},{key:"detach",value:function(){this.element.removeEventListener("scroll",this.onScroll)}}])&&tt(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function rt(t){return rt="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},rt(t)}function it(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,st(r.key),r)}}function ot(t,e,n){return e&&it(t.prototype,e),n&&it(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function at(t,e,n){return(e=st(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function st(t){var e=function(t,e){if("object"!==rt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==rt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===rt(e)?e:String(e)}var ut,ct=ot((function t(n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),at(this,"screenDPI",(0,e.calcScreenDPI)()),at(this,"worldUnitsToRenderedPixels",(function(t){return t*r.screenDPI})),at(this,"renderedPixelsToWorldUnits",(function(t){return t/r.screenDPI})),at(this,"renderedPixelsToVisiblePixels",(function(t){return t*r.mode.scale})),at(this,"visiblePixelsToRenderedPixels",(function(t){return t/r.mode.scale})),at(this,"worldUnitsToVisiblePixels",(function(t){return r.renderedPixelsToVisiblePixels(r.worldUnitsToRenderedPixels(t))})),at(this,"visiblePixelsToWorldUnits",(function(t){return r.renderedPixelsToWorldUnits(r.visiblePixelsToRenderedPixels(t))})),this.mode=n}));function lt(t){return lt="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},lt(t)}function ft(t){return function(t){if(Array.isArray(t))return _t(t)}(t)||St(t)||xt(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ht(t,e){return ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ht(t,e)}function dt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pt(){pt=function(){return t};var t={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(t,e){["method","field"].forEach((function(n){e.forEach((function(e){e.kind===n&&"own"===e.placement&&this.defineClassElement(t,e)}),this)}),this)},initializeClassElements:function(t,e){var n=t.prototype;["method","field"].forEach((function(r){e.forEach((function(e){var i=e.placement;if(e.kind===r&&("static"===i||"prototype"===i)){var o="static"===i?t:n;this.defineClassElement(o,e)}}),this)}),this)},defineClassElement:function(t,e){var n=e.descriptor;if("field"===e.kind){var r=e.initializer;n={enumerable:n.enumerable,writable:n.writable,configurable:n.configurable,value:void 0===r?void 0:r.call(t)}}Object.defineProperty(t,e.key,n)},decorateClass:function(t,e){var n=[],r=[],i={static:[],prototype:[],own:[]};if(t.forEach((function(t){this.addElementPlacement(t,i)}),this),t.forEach((function(t){if(!mt(t))return n.push(t);var e=this.decorateElement(t,i);n.push(e.element),n.push.apply(n,e.extras),r.push.apply(r,e.finishers)}),this),!e)return{elements:n,finishers:r};var o=this.decorateConstructor(n,e);return r.push.apply(r,o.finishers),o.finishers=r,o},addElementPlacement:function(t,e,n){var r=e[t.placement];if(!n&&-1!==r.indexOf(t.key))throw new TypeError("Duplicated element ("+t.key+")");r.push(t.key)},decorateElement:function(t,e){for(var n=[],r=[],i=t.decorators,o=i.length-1;o>=0;o--){var a=e[t.placement];a.splice(a.indexOf(t.key),1);var s=this.fromElementDescriptor(t),u=this.toElementFinisherExtras((0,i[o])(s)||s);t=u.element,this.addElementPlacement(t,e),u.finisher&&r.push(u.finisher);var c=u.extras;if(c){for(var l=0;l<c.length;l++)this.addElementPlacement(c[l],e);n.push.apply(n,c)}}return{element:t,finishers:r,extras:n}},decorateConstructor:function(t,e){for(var n=[],r=e.length-1;r>=0;r--){var i=this.fromClassDescriptor(t),o=this.toClassDescriptor((0,e[r])(i)||i);if(void 0!==o.finisher&&n.push(o.finisher),void 0!==o.elements){t=o.elements;for(var a=0;a<t.length-1;a++)for(var s=a+1;s<t.length;s++)if(t[a].key===t[s].key&&t[a].placement===t[s].placement)throw new TypeError("Duplicated element ("+t[a].key+")")}}return{elements:t,finishers:n}},fromElementDescriptor:function(t){var e={kind:t.kind,key:t.key,placement:t.placement,descriptor:t.descriptor};return Object.defineProperty(e,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===t.kind&&(e.initializer=t.initializer),e},toElementDescriptors:function(t){var e;if(void 0!==t)return(e=t,function(t){if(Array.isArray(t))return t}(e)||St(e)||xt(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(t){var e=this.toElementDescriptor(t);return this.disallowProperty(t,"finisher","An element descriptor"),this.disallowProperty(t,"extras","An element descriptor"),e}),this)},toElementDescriptor:function(t){var e=String(t.kind);if("method"!==e&&"field"!==e)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+e+'"');var n=wt(t.key),r=String(t.placement);if("static"!==r&&"prototype"!==r&&"own"!==r)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+r+'"');var i=t.descriptor;this.disallowProperty(t,"elements","An element descriptor");var o={kind:e,key:n,placement:r,descriptor:Object.assign({},i)};return"field"!==e?this.disallowProperty(t,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=t.initializer),o},toElementFinisherExtras:function(t){return{element:this.toElementDescriptor(t),finisher:bt(t,"finisher"),extras:this.toElementDescriptors(t.extras)}},fromClassDescriptor:function(t){var e={kind:"class",elements:t.map(this.fromElementDescriptor,this)};return Object.defineProperty(e,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),e},toClassDescriptor:function(t){var e=String(t.kind);if("class"!==e)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+e+'"');this.disallowProperty(t,"key","A class descriptor"),this.disallowProperty(t,"placement","A class descriptor"),this.disallowProperty(t,"descriptor","A class descriptor"),this.disallowProperty(t,"initializer","A class descriptor"),this.disallowProperty(t,"extras","A class descriptor");var n=bt(t,"finisher");return{elements:this.toElementDescriptors(t.elements),finisher:n}},runClassFinishers:function(t,e){for(var n=0;n<e.length;n++){var r=(0,e[n])(t);if(void 0!==r){if("function"!=typeof r)throw new TypeError("Finishers must return a constructor.");t=r}}return t},disallowProperty:function(t,e,n){if(void 0!==t[e])throw new TypeError(n+" can't have a ."+e+" property.")}};return t}function vt(t){var e,n=wt(t.key);"method"===t.kind?e={value:t.value,writable:!0,configurable:!0,enumerable:!1}:"get"===t.kind?e={get:t.value,configurable:!0,enumerable:!1}:"set"===t.kind?e={set:t.value,configurable:!0,enumerable:!1}:"field"===t.kind&&(e={configurable:!0,writable:!0,enumerable:!0});var r={kind:"field"===t.kind?"field":"method",key:n,placement:t.static?"static":"field"===t.kind?"own":"prototype",descriptor:e};return t.decorators&&(r.decorators=t.decorators),"field"===t.kind&&(r.initializer=t.value),r}function gt(t,e){void 0!==t.descriptor.get?e.descriptor.get=t.descriptor.get:e.descriptor.set=t.descriptor.set}function mt(t){return t.decorators&&t.decorators.length}function yt(t){return void 0!==t&&!(void 0===t.value&&void 0===t.writable)}function bt(t,e){var n=t[e];if(void 0!==n&&"function"!=typeof n)throw new TypeError("Expected '"+e+"' to be a function");return n}function wt(t){var e=function(t,e){if("object"!==lt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==lt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===lt(e)?e:String(e)}function xt(t,e){if(t){if("string"==typeof t)return _t(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_t(t,e):void 0}}function _t(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function St(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function kt(){return kt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Pt(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},kt.apply(this,arguments)}function Pt(t){return Pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pt(t)}var Et=function(t,e,n,r){var i=pt(),o=e((function(t){i.initializeInstanceElements(t,a.elements)}),n),a=i.decorateClass(function(t){for(var e=[],n=function(t){return"method"===t.kind&&t.key===o.key&&t.placement===o.placement},r=0;r<t.length;r++){var i,o=t[r];if("method"===o.kind&&(i=e.find(n)))if(yt(o.descriptor)||yt(i.descriptor)){if(mt(o)||mt(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(mt(o)){if(mt(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}gt(o,i)}else e.push(o)}return e}(o.d.map(vt)),t);return i.initializeClassElements(o.F,a.elements),i.runClassFinishers(o.F,a.finishers)}([(0,M.Mo)("br-mode-1up")],(function(t,n){var r=function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ht(t,e)}(a,e);var n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Pt(r);if(i){var n=Pt(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===lt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return dt(t)}(this,t)});function a(e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),r=o.call(this),t(dt(r)),r.book=e,r.br=n,r}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(n);return{F:r,d:[{kind:"field",key:"br",value:void 0},{kind:"field",decorators:[(0,M.Cb)({type:Object})],key:"book",value:void 0},{kind:"field",decorators:[(0,M.Cb)({type:Array})],key:"pages",value:function(){return[]}},{kind:"field",decorators:[(0,M.Cb)({type:Object})],key:"pageTops",value:function(){return{}}},{kind:"field",key:"coordSpace",value:function(){return new ct(this)}},{kind:"field",decorators:[(0,M.Cb)({type:Number})],key:"scale",value:function(){return 1}},{kind:"field",decorators:[(0,M.Cb)({type:Object})],key:"visibleRegion",value:function(){return{top:0,left:0,width:100,height:100}}},{kind:"field",decorators:[(0,M.Cb)({type:Array,hasChanged:e.arrChanged})],key:"visiblePages",value:function(){return[]}},{kind:"field",decorators:[(0,M.Cb)({type:Array})],key:"renderedPages",value:function(){return[]}},{kind:"field",key:"pageContainerCache",value:function(){return{}}},{kind:"field",decorators:[(0,M.IO)(".br-mode-1up__world")],key:"$world",value:void 0},{kind:"field",key:"worldDimensions",value:function(){return{width:100,height:100}}},{kind:"get",key:"worldStyle",value:function(){var t=this.coordSpace.worldUnitsToRenderedPixels;return{width:t(this.worldDimensions.width)+"px",height:t(this.worldDimensions.height)+"px"}}},{kind:"get",key:"$container",value:function(){return this}},{kind:"field",decorators:[(0,M.IO)(".br-mode-1up__visible-world")],key:"$visibleWorld",value:void 0},{kind:"field",key:"htmlDimensionsCacher",value:function(){return new J(this)}},{kind:"field",key:"smoothZoomer",value:function(){return new G(this)}},{kind:"field",key:"scrollClassAdder",value:function(){return new nt(this,"BRscrolling-active")}},{kind:"field",key:"SPACING_IN",value:function(){return.2}},{kind:"field",key:"ZOOM_FACTOR",value:function(){return 1.1}},{kind:"method",key:"jumpToIndex",value:function(t){var e=this,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).smooth,r=void 0!==n&&n;r&&(this.style.scrollBehavior="smooth"),this.scrollTop=this.coordSpace.worldUnitsToVisiblePixels(this.pageTops[t]-this.SPACING_IN/2),r&&setTimeout((function(){return e.style.scrollBehavior=""}),100)}},{kind:"method",key:"zoomIn",value:function(){this.scale*=this.ZOOM_FACTOR}},{kind:"method",key:"zoomOut",value:function(){this.scale*=1/this.ZOOM_FACTOR}},{kind:"method",key:"firstUpdated",value:function(t){kt(Pt(r.prototype),"firstUpdated",this).call(this,t),this.htmlDimensionsCacher.updateClientSizes(),this.smoothZoomer.attach()}},{kind:"method",key:"initFirstRender",value:function(t){var e=this.book.getPage(t);this.scale=this.computeDefaultScale(e)}},{kind:"method",key:"updated",value:function(t){if(t.has("book")&&this.updatePages(),t.has("pages")&&(this.worldDimensions=this.computeWorldDimensions(),this.pageTops=this.computePageTops(this.pages,this.SPACING_IN)),t.has("visibleRegion")&&(this.visiblePages=this.computeVisiblePages()),t.has("visiblePages")&&(this.throttledUpdateRenderedPages(),this.visiblePages.length&&(this.br.displayedIndices=this.visiblePages.map((function(t){return t.index})),this.br.updateFirstIndex(this.br.displayedIndices[0]),this.br._components.navbar.updateNavIndexThrottled())),t.has("scale")){var e=t.get("scale");this.$visibleWorld.style.transform="scale(".concat(this.scale,")"),this.smoothZoomer.updateViewportOnZoom(this.scale,e),this.updateVisibleRegion(),this.$world.style.transform="scale(".concat(this.scale,")")}}},{kind:"method",key:"updatePages",value:function(){this.pages=(0,e.genToArray)(this.book.pagesIterator({combineConsecutiveUnviewables:!0}))}},{kind:"method",key:"connectedCallback",value:function(){kt(Pt(r.prototype),"connectedCallback",this).call(this),this.htmlDimensionsCacher.attachResizeListener(),this.attachScrollListeners(),this.smoothZoomer.attach()}},{kind:"method",key:"disconnectedCallback",value:function(){this.htmlDimensionsCacher.detachResizeListener(),this.detachScrollListeners(),this.smoothZoomer.detach(),kt(Pt(r.prototype),"disconnectedCallback",this).call(this)}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"method",key:"render",value:function(){var t,e,n=this;return(0,R.dy)(ut||(t=['\n <div class="br-mode-1up__world" style=','></div>\n <div class="br-mode-1up__visible-world">\n ',"\n </div>"],e||(e=t.slice(0)),ut=Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))),(0,A.V)(this.worldStyle),this.renderedPages.map((function(t){return n.renderPage(t)})))}},{kind:"field",key:"createPageContainer",value:function(){var t=this;return function(e){return t.pageContainerCache[e.index]||(t.pageContainerCache[e.index]=t.br._createPageContainer(e.index))}}},{kind:"field",key:"renderPage",value:function(){var t=this;return function(e){var n=t.coordSpace.worldUnitsToRenderedPixels,r=t.coordSpace.worldUnitsToVisiblePixels,i=t.coordSpace.visiblePixelsToWorldUnits(t.htmlDimensionsCacher.clientWidth),o=n(e.widthInches),a=n(e.heightInches),s=Math.max(t.SPACING_IN,(i-e.widthInches)/2),u=t.pageTops[e.index],c="translate(".concat(n(s),"px, ").concat(n(u),"px)"),l=t.createPageContainer(e).update({dimensions:{width:o,height:a,top:0,left:0},reduce:e.width/r(e.widthInches)}).$container[0];return l.style.transform=c,l.classList.toggle("BRpage-visible",t.visiblePages.includes(e)),l}}},{kind:"field",key:"updateVisibleRegion",value:function(){var t=this;return function(){var e=t.scrollTop,n=t.scrollLeft,r=t.htmlDimensionsCacher.clientWidth,i=t.htmlDimensionsCacher.clientHeight,o=t.coordSpace.visiblePixelsToWorldUnits;t.visibleRegion={top:o(e),height:o(i),left:o(n),width:o(r)}}}},{kind:"method",key:"computeRenderedPages",value:function(){var t,e;return[null===(t=this.visiblePages[0])||void 0===t?void 0:t.prev].concat(ft(this.visiblePages),[null===(e=this.visiblePages[this.visiblePages.length-1])||void 0===e?void 0:e.next]).filter((function(t){return t})).slice(0,10)}},{kind:"field",key:"throttledUpdateRenderedPages",value:function(){var t=this;return(0,e.throttle)((function(){t.renderedPages=t.computeRenderedPages(),t.requestUpdate()}),100,null)}},{kind:"method",key:"computePageTops",value:function(t,e){var n,r={},i=e,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=xt(t))){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;r[a.index]=i,i+=a.heightInches+e}}catch(t){o.e(t)}finally{o.f()}return r}},{kind:"method",key:"computeDefaultScale",value:function(t){var e=this.coordSpace.renderedPixelsToWorldUnits(this.clientWidth);return Math.min(1,e/(t.widthInches+2*this.SPACING_IN))||1}},{kind:"method",key:"computeWorldDimensions",value:function(){return{width:Math.max.apply(Math,ft(this.pages.map((function(t){return t.widthInches}))))+2*this.SPACING_IN,height:(0,e.sum)(this.pages.map((function(t){return t.heightInches})))+(this.pages.length+1)*this.SPACING_IN}}},{kind:"method",key:"computeVisiblePages",value:function(){var t=this;return this.pages.filter((function(e){var n=t.pageTops[e.index],r=n+e.heightInches,i=t.visibleRegion.top;return n<=i+t.visibleRegion.height&&r>=i}))}},{kind:"field",key:"attachScrollListeners",value:function(){var t=this;return function(){t.addEventListener("scroll",t.updateVisibleRegion),t.scrollClassAdder.attach()}}},{kind:"field",key:"detachScrollListeners",value:function(){var t=this;return function(){t.removeEventListener("scroll",t.updateVisibleRegion),t.scrollClassAdder.detach()}}}]}}),R.oi),Ot=r(5311);function Tt(t){return Tt="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},Tt(t)}function Ct(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Mt(r.key),r)}}function jt(t,e,n){return(e=Mt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Mt(t){var e=function(t,e){if("object"!==Tt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Tt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Tt(e)?e:String(e)}function Rt(t,e){return t.split(" ").map((function(t){return t+e})).join(" ")}function At(t){var e,n;return void 0!==t.clientX?(e=t.clientX,n=t.clientY):void 0!==t.screenX?(e=t.screenX,n=t.screenY):void 0!==t.targetTouches?(e=t.targetTouches[0].pageX,n=t.targetTouches[0].pageY):void 0===t.originalEvent?console.error("don't understand x and y for "+t.type,t):void 0!==t.originalEvent.clientX?(e=t.originalEvent.clientX,n=t.originalEvent.clientY):void 0!==t.originalEvent.screenX?(e=t.originalEvent.screenX,n=t.originalEvent.screenY):void 0!==t.originalEvent.targetTouches&&(e=t.originalEvent.targetTouches[0].pageX,n=t.originalEvent.targetTouches[0].pageY),{left:e,top:n}}var It={dragSelector:">:first",acceptPropagatedEvent:!0,preventDefault:!0,dragstart:"mousedown touchstart",dragcontinue:"mousemove touchmove",dragend:"mouseup touchend",dragMinDistance:5,namespace:".ds",scrollWindow:!1},Lt=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),jt(this,"_dragStartHandler",(function(t){return!!n._shouldAbort()||!(t.which>1||!n.settings.acceptPropagatedEvent&&t.target!=n.handling_element[0])&&(n.lastCoord=n.firstCoord=At(t),n.handling_element.on(n.settings.dragcontinue,n._dragContinueHandler),n.settings.dragend.split(" ").forEach((function(t){n.handling_element[0].addEventListener(t,n._dragEndHandler,!0)})),n.settings.preventDefault?(t.preventDefault(),!1):void 0)})),jt(this,"_dragContinueHandler",(function(t){if(n._shouldAbort())return!0;var e=At(t),r=e.left-n.lastCoord.left,i=e.top-n.lastCoord.top,o=n.settings.scrollWindow?Ot(window):n.handling_element;return o.scrollLeft(o.scrollLeft()-r),o.scrollTop(o.scrollTop()-i),n.lastCoord=e,n.settings.preventDefault?(t.preventDefault(),!1):void 0})),jt(this,"_dragEndHandler",(function(t){if(n._shouldAbort())return!0;n.handling_element.off(n.settings.dragcontinue).off(n.settings.dragend),n.settings.dragend.split(" ").forEach((function(t){n.handling_element[0].removeEventListener(t,n._dragEndHandler,!0)}));var e={left:Math.abs(n.lastCoord.left-n.firstCoord.left),top:Math.abs(n.lastCoord.top-n.firstCoord.top)},r=Math.max(e.left,e.top);return n.settings.preventDefault&&r>n.settings.dragMinDistance?(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),!1):void 0})),this.handling_element=Ot(e),this.settings=Ot.extend({},It,r||{}),this.firstCoord={left:0,top:0},this.lastCoord={left:0,top:0},this.settings.dragstart=Rt(this.settings.dragstart,this.settings.namespace),this.settings.dragcontinue=Rt(this.settings.dragcontinue,this.settings.namespace),this.handling_element.find(this.settings.dragSelector).on(this.settings.dragstart,this._dragStartHandler)}var e,n;return e=t,(n=[{key:"_shouldAbort",value:function(){return!!("ontouchstart"in window)||!!("msmaxtouchpoints"in window.navigator)}}])&&Ct(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Dt=r(5311);function $t(t){return $t="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},$t(t)}function Nt(){Nt=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:E(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",g={};function m(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(M([])));_&&_!==n&&r.call(_,a)&&(w=_);var S=b.prototype=m.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==$t(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function E(e,n,r){var i=h;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=O(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?v:d,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=v,r.method="throw",r.arg=c.arg)}}}function O(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError($t(e)+" is not iterable")}return y.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(P.prototype),c(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new P(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=M,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:M(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Ft(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Bt(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Ft(o,r,i,a,s,"next",t)}function s(t){Ft(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Ut(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==$t(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==$t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===$t(i)?i:String(i)),r)}var i}var zt,Wt,Ht,Vt,Gt,Yt,Xt,qt,Kt=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.br=e,this.book=n,this.mode1UpLit=new Et(n,e),this.$el=Dt(this.mode1UpLit).addClass("br-mode-1up__root BRmode1up"),this.everShown=!1}var e,n;return e=t,(n=[{key:"$brContainer",get:function(){return this.br.refs.$brContainer}},{key:"prepare",value:function(){var t=this,e=this.br.currentIndex();this.$brContainer.empty().css({overflow:"hidden"}).append(this.$el),setTimeout(Bt(Nt().mark((function n(){return Nt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.everShown){n.next=7;break}return t.mode1UpLit.initFirstRender(e),t.everShown=!0,t.mode1UpLit.requestUpdate(),n.next=6,t.mode1UpLit.updateComplete;case 6:new Lt(t.mode1UpLit,{preventDefault:!0,dragSelector:".br-mode-1up__visible-world",dragstart:"mousedown",dragcontinue:"mousemove",dragend:"mouseup"});case 7:t.mode1UpLit.jumpToIndex(e),setTimeout((function(){t.mode1UpLit.updateVisibleRegion()}));case 9:case"end":return n.stop()}}),n)})))),this.br.updateBrClasses()}},{key:"jumpToIndex",value:function(t,e,n,r){var i=Math.abs(this.br.currentIndex()-t),o=!r&&i>0&&i<=4;this.mode1UpLit.jumpToIndex(t,{smooth:o})}},{key:"zoom",value:function(t){switch(t){case"in":this.mode1UpLit.zoomIn();break;case"out":this.mode1UpLit.zoomOut();break;default:console.error("Unsupported direction: ".concat(t))}}},{key:"resizePageView",value:function(){this.mode1UpLit.htmlDimensionsCacher.updateClientSizes(),this.mode1UpLit.requestUpdate()}}])&&Ut(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Zt=(r(2462),r(5311));function Jt(t){return Jt="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},Jt(t)}function Qt(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function te(){te=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:E(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",g={};function m(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(M([])));_&&_!==n&&r.call(_,a)&&(w=_);var S=b.prototype=m.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Jt(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function E(e,n,r){var i=h;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=O(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?v:d,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=v,r.method="throw",r.arg=c.arg)}}}function O(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(Jt(e)+" is not iterable")}return y.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(P.prototype),c(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new P(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=M,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:M(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function ee(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function ne(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){ee(o,r,i,a,s,"next",t)}function s(t){ee(o,r,i,a,s,"throw",t)}a(void 0)}))}}function re(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,me(r.key),r)}}function ie(t,e,n){return e&&re(t.prototype,e),n&&re(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function oe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ae(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&se(t,e)}function se(t,e){return se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},se(t,e)}function ue(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=_e(t);if(e){var i=_e(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Jt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ce(t)}(this,n)}}function ce(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function le(t,e,n,r){var i=fe();if(r)for(var o=0;o<r.length;o++)i=r[o](i);var a=e((function(t){i.initializeInstanceElements(t,s.elements)}),n),s=i.decorateClass(function(t){for(var e=[],n=function(t){return"method"===t.kind&&t.key===o.key&&t.placement===o.placement},r=0;r<t.length;r++){var i,o=t[r];if("method"===o.kind&&(i=e.find(n)))if(ve(o.descriptor)||ve(i.descriptor)){if(pe(o)||pe(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(pe(o)){if(pe(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}de(o,i)}else e.push(o)}return e}(a.d.map(he)),t);return i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}function fe(){fe=function(){return t};var t={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(t,e){["method","field"].forEach((function(n){e.forEach((function(e){e.kind===n&&"own"===e.placement&&this.defineClassElement(t,e)}),this)}),this)},initializeClassElements:function(t,e){var n=t.prototype;["method","field"].forEach((function(r){e.forEach((function(e){var i=e.placement;if(e.kind===r&&("static"===i||"prototype"===i)){var o="static"===i?t:n;this.defineClassElement(o,e)}}),this)}),this)},defineClassElement:function(t,e){var n=e.descriptor;if("field"===e.kind){var r=e.initializer;n={enumerable:n.enumerable,writable:n.writable,configurable:n.configurable,value:void 0===r?void 0:r.call(t)}}Object.defineProperty(t,e.key,n)},decorateClass:function(t,e){var n=[],r=[],i={static:[],prototype:[],own:[]};if(t.forEach((function(t){this.addElementPlacement(t,i)}),this),t.forEach((function(t){if(!pe(t))return n.push(t);var e=this.decorateElement(t,i);n.push(e.element),n.push.apply(n,e.extras),r.push.apply(r,e.finishers)}),this),!e)return{elements:n,finishers:r};var o=this.decorateConstructor(n,e);return r.push.apply(r,o.finishers),o.finishers=r,o},addElementPlacement:function(t,e,n){var r=e[t.placement];if(!n&&-1!==r.indexOf(t.key))throw new TypeError("Duplicated element ("+t.key+")");r.push(t.key)},decorateElement:function(t,e){for(var n=[],r=[],i=t.decorators,o=i.length-1;o>=0;o--){var a=e[t.placement];a.splice(a.indexOf(t.key),1);var s=this.fromElementDescriptor(t),u=this.toElementFinisherExtras((0,i[o])(s)||s);t=u.element,this.addElementPlacement(t,e),u.finisher&&r.push(u.finisher);var c=u.extras;if(c){for(var l=0;l<c.length;l++)this.addElementPlacement(c[l],e);n.push.apply(n,c)}}return{element:t,finishers:r,extras:n}},decorateConstructor:function(t,e){for(var n=[],r=e.length-1;r>=0;r--){var i=this.fromClassDescriptor(t),o=this.toClassDescriptor((0,e[r])(i)||i);if(void 0!==o.finisher&&n.push(o.finisher),void 0!==o.elements){t=o.elements;for(var a=0;a<t.length-1;a++)for(var s=a+1;s<t.length;s++)if(t[a].key===t[s].key&&t[a].placement===t[s].placement)throw new TypeError("Duplicated element ("+t[a].key+")")}}return{elements:t,finishers:n}},fromElementDescriptor:function(t){var e={kind:t.kind,key:t.key,placement:t.placement,descriptor:t.descriptor};return Object.defineProperty(e,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===t.kind&&(e.initializer=t.initializer),e},toElementDescriptors:function(t){var e;if(void 0!==t)return(e=t,function(t){if(Array.isArray(t))return t}(e)||we(e)||ye(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(t){var e=this.toElementDescriptor(t);return this.disallowProperty(t,"finisher","An element descriptor"),this.disallowProperty(t,"extras","An element descriptor"),e}),this)},toElementDescriptor:function(t){var e=String(t.kind);if("method"!==e&&"field"!==e)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+e+'"');var n=me(t.key),r=String(t.placement);if("static"!==r&&"prototype"!==r&&"own"!==r)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+r+'"');var i=t.descriptor;this.disallowProperty(t,"elements","An element descriptor");var o={kind:e,key:n,placement:r,descriptor:Object.assign({},i)};return"field"!==e?this.disallowProperty(t,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=t.initializer),o},toElementFinisherExtras:function(t){return{element:this.toElementDescriptor(t),finisher:ge(t,"finisher"),extras:this.toElementDescriptors(t.extras)}},fromClassDescriptor:function(t){var e={kind:"class",elements:t.map(this.fromElementDescriptor,this)};return Object.defineProperty(e,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),e},toClassDescriptor:function(t){var e=String(t.kind);if("class"!==e)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+e+'"');this.disallowProperty(t,"key","A class descriptor"),this.disallowProperty(t,"placement","A class descriptor"),this.disallowProperty(t,"descriptor","A class descriptor"),this.disallowProperty(t,"initializer","A class descriptor"),this.disallowProperty(t,"extras","A class descriptor");var n=ge(t,"finisher");return{elements:this.toElementDescriptors(t.elements),finisher:n}},runClassFinishers:function(t,e){for(var n=0;n<e.length;n++){var r=(0,e[n])(t);if(void 0!==r){if("function"!=typeof r)throw new TypeError("Finishers must return a constructor.");t=r}}return t},disallowProperty:function(t,e,n){if(void 0!==t[e])throw new TypeError(n+" can't have a ."+e+" property.")}};return t}function he(t){var e,n=me(t.key);"method"===t.kind?e={value:t.value,writable:!0,configurable:!0,enumerable:!1}:"get"===t.kind?e={get:t.value,configurable:!0,enumerable:!1}:"set"===t.kind?e={set:t.value,configurable:!0,enumerable:!1}:"field"===t.kind&&(e={configurable:!0,writable:!0,enumerable:!0});var r={kind:"field"===t.kind?"field":"method",key:n,placement:t.static?"static":"field"===t.kind?"own":"prototype",descriptor:e};return t.decorators&&(r.decorators=t.decorators),"field"===t.kind&&(r.initializer=t.value),r}function de(t,e){void 0!==t.descriptor.get?e.descriptor.get=t.descriptor.get:e.descriptor.set=t.descriptor.set}function pe(t){return t.decorators&&t.decorators.length}function ve(t){return void 0!==t&&!(void 0===t.value&&void 0===t.writable)}function ge(t,e){var n=t[e];if(void 0!==n&&"function"!=typeof n)throw new TypeError("Expected '"+e+"' to be a function");return n}function me(t){var e=function(t,e){if("object"!==Jt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Jt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Jt(e)?e:String(e)}function ye(t,e){if(t){if("string"==typeof t)return be(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?be(t,e):void 0}}function be(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function we(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function xe(){return xe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_e(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},xe.apply(this,arguments)}function _e(t){return _e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_e(t)}var Se=le([(0,M.Mo)("br-mode-2up")],(function(t,n){var r,i,o=function(e){ae(r,e);var n=ue(r);function r(e,i){var o;return oe(this,r),o=n.call(this),t(ce(o)),o.book=e,o.br=i,o}return ie(r)}(n);return{F:o,d:[{kind:"field",key:"br",value:void 0},{kind:"field",decorators:[(0,M.Cb)({type:Object})],key:"book",value:void 0},{kind:"field",key:"coordSpace",value:function(){return new ct(this)}},{kind:"field",decorators:[(0,M.Cb)({type:Number})],key:"scale",value:function(){return 1}},{kind:"field",key:"initialScale",value:function(){return 1}},{kind:"field",decorators:[(0,M.Cb)({type:String})],key:"autoFit",value:function(){return"auto"}},{kind:"field",key:"flipSpeed",value:function(){return 400}},{kind:"field",decorators:[(0,M.IO)(".br-mode-2up__leafs--flipping")],key:"$flippingEdges",value:void 0},{kind:"field",decorators:[(0,M.Cb)({type:Array,hasChanged:e.arrChanged})],key:"visiblePages",value:function(){return[]}},{kind:"get",key:"pageLeft",value:function(){return this.visiblePages.find((function(t){return"L"==t.pageSide}))}},{kind:"get",key:"pageRight",value:function(){return this.visiblePages.find((function(t){return"R"==t.pageSide}))}},{kind:"field",decorators:[(0,M.Cb)({type:Array})],key:"renderedPages",value:function(){return[]}},{kind:"field",key:"pageContainerCache",value:function(){return{}}},{kind:"field",key:"activeFlip",value:function(){return null}},{kind:"field",key:"_leftCoverWidth",value:function(){return 0}},{kind:"get",key:"$container",value:function(){return this}},{kind:"get",key:"$visibleWorld",value:function(){return this.$book}},{kind:"field",decorators:[(0,M.IO)(".br-mode-2up__book")],key:"$book",value:void 0},{kind:"get",key:"positions",value:function(){return this.computePositions(this.pageLeft,this.pageRight)}},{kind:"method",key:"computePageHeight",value:function(t){return this.book.getMedianPageSizeInches().height}},{kind:"method",key:"computePageWidth",value:function(t){return t.widthInches*this.computePageHeight(t)/t.heightInches}},{kind:"method",key:"computePositions",value:function(t,e){var n,r,i,o,a=this.computePageWidth.bind(this),s=this.book.getNumLeafs(),u=this.activeFlip?Math.ceil(this.activeFlip.pagesFlippingCount/2)*this.PAGE_THICKNESS_IN:0,c="lr"==this.book.pageProgression?null!==(n=null==t?void 0:t.index)&&void 0!==n?n:0:t?s-t.index:0,l=this._leftCoverWidth+c*this.PAGE_THICKNESS_IN,f=l,h=a(t||e.right),d=l-h,p=d,v="left"!=(null===(r=this.activeFlip)||void 0===r?void 0:r.direction)?0:u,g=Math.ceil(c/2)*this.PAGE_THICKNESS_IN-v,m=v+g,y=p-v,b=y-g,w=l,x=e?a(e):0,_=w+x,S="lr"==this.book.pageProgression?e?s-e.index:0:null!==(i=null==e?void 0:e.index)&&void 0!==i?i:0,k=_,P="right"!=(null===(o=this.activeFlip)||void 0===o?void 0:o.direction)?0:u,E=k+P,O=Math.ceil(S/2)*this.PAGE_THICKNESS_IN-P,T=k+O+P;return{leafEdgesLeftStart:b,leafEdgesLeftMainWidth:g,leafEdgesLeftMovingStart:y,leafEdgesLeftMovingWidth:v,leafEdgesLeftEnd:p,leafEdgesLeftFullWidth:m,pageLeftStart:d,pageLeftWidth:h,pageLeftEnd:f,gutter:l,pageRightStart:w,pageRightWidth:x,pageRightEnd:_,leafEdgesRightStart:k,leafEdgesRightMovingWidth:P,leafEdgesRightMainStart:E,leafEdgesRightMainWidth:O,leafEdgesRightEnd:T,leafEdgesRightFullWidth:P+O,spreadWidth:_-d,bookWidth:T-b}}},{kind:"field",key:"htmlDimensionsCacher",value:function(){return new J(this)}},{kind:"field",key:"smoothZoomer",value:function(){return new G(this)}},{kind:"field",key:"ZOOM_FACTOR",value:function(){return 1.1}},{kind:"field",key:"PAGE_THICKNESS_IN",value:function(){return.002}},{kind:"method",key:"jumpToIndex",value:(i=ne(te().mark((function t(e){var n,r,i=arguments;return te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(i.length>1&&void 0!==i[1]?i[1]:{}).smooth,r=void 0===n||n,t.next=3,this.flipAnimation(e,{animate:r});case 3:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{kind:"method",key:"zoomIn",value:function(){this.scale*=this.ZOOM_FACTOR}},{kind:"method",key:"zoomOut",value:function(){this.scale*=1/this.ZOOM_FACTOR}},{kind:"method",key:"firstUpdated",value:function(t){xe(_e(o.prototype),"firstUpdated",this).call(this,t),this.htmlDimensionsCacher.updateClientSizes(),this.smoothZoomer.attach()}},{kind:"method",key:"connectedCallback",value:function(){xe(_e(o.prototype),"connectedCallback",this).call(this),this.htmlDimensionsCacher.attachResizeListener(),this.smoothZoomer.attach()}},{kind:"method",key:"disconnectedCallback",value:function(){this.htmlDimensionsCacher.detachResizeListener(),this.smoothZoomer.detach(),xe(_e(o.prototype),"disconnectedCallback",this).call(this)}},{kind:"method",key:"updated",value:function(t){if(t.has("book")&&(this._leftCoverWidth=this.computePageWidth(this.book.getPage("lr"==this.book.pageProgression?0:-1))),t.has("visiblePages")&&(this.renderedPages=this.computeRenderedPages(),this.br.displayedIndices=this.visiblePages.map((function(t){return t.index})),this.br.updateFirstIndex(this.br.displayedIndices[0]),this.br._components.navbar.updateNavIndexThrottled()),t.has("autoFit")&&"none"!=this.autoFit&&this.resizeViaAutofit(),t.has("scale")){var e=t.get("scale");this.recenter(),this.smoothZoomer.updateViewportOnZoom(this.scale,e)}}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"method",key:"render",value:function(){var t=this;return(0,R.dy)(zt||(zt=Qt(['\n <div class="br-mode-2up__book" @mouseup=',">\n ","\n ","\n ","\n </div>"])),this.handlePageClick,this.renderLeafEdges("left"),this.renderedPages.map((function(e){return t.renderPage(e)})),this.renderLeafEdges("right"))}},{kind:"field",key:"createPageContainer",value:function(){var t=this;return function(e){return t.pageContainerCache[e.index]||(t.pageContainerCache[e.index]=t.br._createPageContainer(e.index))}}},{kind:"method",key:"initFirstRender",value:function(t){var e=this.book.getPage(t),n=e.spread;this.visiblePages=("lr"==this.book.pageProgression?[n.left,n.right]:[n.right,n.left]).filter((function(t){return t})),this.htmlDimensionsCacher.updateClientSizes(),this.resizeViaAutofit(e),this.initialScale=this.scale}},{kind:"field",key:"renderPage",value:function(){var t=this;return function(e){var n=t.coordSpace.worldUnitsToRenderedPixels,r=t.coordSpace.worldUnitsToVisiblePixels,i=n(t.computePageWidth(e)),o=n(t.computePageHeight(e)),a=t.visiblePages.map((function(t){return t.index})).includes(e.index),s=t.computePositions(e.spread.left,e.spread.right),u=t.createPageContainer(e).update({dimensions:{width:i,height:o,top:0,left:n("L"==e.pageSide?s.pageLeftStart:s.pageLeftEnd)},reduce:e.width/r(t.computePageWidth(e))}).$container[0];return u.classList.toggle("BRpage-visible",a),u}}},{kind:"field",key:"renderLeafEdges",value:function(){var t=this;return function(e){var n;if(!t.visiblePages.length)return(0,R.dy)(Wt||(Wt=Qt([""])));if(!("left"==e?t.positions.leafEdgesLeftFullWidth:t.positions.leafEdgesRightFullWidth))return(0,R.dy)(Ht||(Ht=Qt([""])));var r=t.coordSpace.worldUnitsToRenderedPixels,i=r(t.computePageHeight(t.visiblePages[0])),o=(null===(n=t.activeFlip)||void 0===n?void 0:n.direction)==e,a=t.book.getPage("lr"==t.book.pageProgression?0:t.book.getNumLeafs()-1),s=t.book.getPage("lr"==t.book.pageProgression?t.book.getNumLeafs()-1:0),u=o?t.activeFlip.pagesFlippingCount:0,c="left"==e?[a.index,t.pageLeft.goLeft(u).index]:[t.pageRight.goRight(u).index,s.index],l={width:"".concat(r("left"==e?t.positions.leafEdgesLeftMainWidth:t.positions.leafEdgesRightMainWidth),"px"),height:"".concat(i,"px"),left:"".concat(r("left"==e?t.positions.leafEdgesLeftStart:t.positions.leafEdgesRightMainStart),"px")},f=(0,R.dy)(Vt||(Vt=Qt(["\n <br-leaf-edges\n leftIndex=","\n rightIndex=","\n .book=","\n .pageClickHandler=","\n side=",'\n class="br-mode-2up__leafs br-mode-2up__leafs--','"\n style=',"\n ></br-leaf-edges>\n "])),c[0],c[1],t.book,(function(e){return t.br.jumpToIndex(e)}),e,e,(0,A.V)(l));if(o){var h=r("left"==e?t.positions.leafEdgesLeftMovingWidth:t.positions.leafEdgesRightMovingWidth),d={width:"".concat(h,"px"),height:"".concat(i,"px"),left:"".concat(r("left"==e?t.positions.leafEdgesLeftMovingStart:t.positions.leafEdgesRightStart),"px"),pointerEvents:"none",transformOrigin:"".concat(r("left"==e?t.positions.pageLeftWidth:-t.positions.pageRightWidth)+h/2,"px 0")},p=(0,R.dy)(Gt||(Gt=Qt(["\n <br-leaf-edges\n leftIndex=","\n rightIndex=","\n .book=","\n side=",'\n class="br-mode-2up__leafs br-mode-2up__leafs--',' br-mode-2up__leafs--flipping"\n style=',"\n ></br-leaf-edges>\n "])),t.activeFlip.pagesFlipping[0],t.activeFlip.pagesFlipping[1],t.book,e,e,(0,A.V)(d));return"left"==e?(0,R.dy)(Yt||(Yt=Qt(["","",""])),f,p):(0,R.dy)(Xt||(Xt=Qt(["","",""])),p,f)}return f}}},{kind:"method",key:"resizeViaAutofit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.visiblePages[0];this.scale=this.computeScale(t,this.autoFit)}},{kind:"method",key:"recenter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.visiblePages[0],e=this.computeTranslate(t,this.scale);this.$book.style.transform="translateX(".concat(e.x,"px) translateY(").concat(e.y,"px) scale(").concat(this.scale,")")}},{kind:"method",key:"computeRenderedPages",value:function(){var t,e,n,r,i;return[null===(t=this.visiblePages[0])||void 0===t||null===(t=t.prev)||void 0===t?void 0:t.prev,null===(e=this.visiblePages[0])||void 0===e?void 0:e.prev].concat((i=this.visiblePages,function(t){if(Array.isArray(t))return be(t)}(i)||we(i)||ye(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[null===(n=this.visiblePages[this.visiblePages.length-1])||void 0===n?void 0:n.next,null===(r=this.visiblePages[this.visiblePages.length-1])||void 0===r||null===(r=r.next)||void 0===r?void 0:r.next]).filter((function(t){return t})).slice(0,10)}},{kind:"method",key:"computeScale",value:function(t,e){if(!t)return 1;var n=t.spread,r=this.computePositions(n.left,n.right).bookWidth,i=this.computePageHeight(n.left||n.right),o=this.scale;this.scale=1;var a=this.coordSpace.renderedPixelsToWorldUnits(this.htmlDimensionsCacher.clientWidth-20)/r,s=this.coordSpace.renderedPixelsToWorldUnits(this.htmlDimensionsCacher.clientHeight-20)/i;this.scale=o;var u=1;if("width"==e)u=a;else if("height"==e)u=s;else if("auto"==e)u=Math.min(a,s);else{if("none"!=e)throw new Error("Invalid autoFit value: ".concat(e));u=this.scale}return u}},{kind:"method",key:"computeTranslate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scale;if(!t)return{x:0,y:0};var n=t.spread,r=this.computePositions(n.left,n.right),i=r.bookWidth,o=this.computePageHeight(n.left||n.right),a=this.coordSpace.worldUnitsToRenderedPixels(i)*e,s=this.coordSpace.worldUnitsToRenderedPixels(o)*e,u=this.coordSpace.worldUnitsToRenderedPixels(-r.leafEdgesLeftStart)*e,c=(this.htmlDimensionsCacher.clientWidth-a)/2+u,l=(this.htmlDimensionsCacher.clientHeight-s)/2;return{x:Math.max(u,c),y:Math.max(0,l)}}},{kind:"method",key:"flipAnimation",value:(r=ne(te().mark((function t(n){var r,i,o,a,s,u,c,l,f,h,d,p,v,g,m,y,b,w,x,_,S,k,P,E,O,T,C,j,M,R=this,A=arguments;return te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=(A.length>1&&void 0!==A[1]?A[1]:{}).animate,c=void 0===u||u,l=null===(r=this.pageLeft||this.pageRight)||void 0===r?void 0:r.spread){t.next=4;break}return t.abrupt("return");case 4:if(n=this.parseNextSpread(n),!this.activeFlip&&n){t.next=7;break}return t.abrupt("return");case 7:if(f=this.book.pageProgression,h=null!==(i=null===(o=l.left)||void 0===o?void 0:o.index)&&void 0!==i?i:"lr"==f?-1:this.book.getNumLeafs(),d=null!==(a=null===(s=n.left)||void 0===s?void 0:s.index)&&void 0!==a?a:"lr"==f?-1:this.book.getNumLeafs(),h!=d){t.next=12;break}return t.abrupt("return");case 12:p=this.renderedPages.map((function(t){return t.index})),v=[],g=0,m=[n.left,n.right];case 15:if(!(g<m.length)){t.next=24;break}if(y=m[g]){t.next=19;break}return t.abrupt("continue",21);case 19:v.push(this.createPageContainer(y)),p.includes(y.index)||this.renderedPages.push(y);case 21:g++,t.next=15;break;case 24:if(b=this.computeTranslate(l.left||l.right,this.scale),w=this.computeTranslate(n.left||n.right,this.scale),x=Math.sqrt(Math.pow(w.x-b.x,2)+Math.pow(w.y-b.y,2)),_="translate(".concat(w.x,"px, ").concat(w.y,"px)"),x<50&&(k=null===(S=this.$book.style.transform.match(/translate\([^)]+\)/))||void 0===S?void 0:S[0])&&(_=k),P="".concat(_," scale(").concat(this.scale,")"),!c||!("animate"in Element.prototype)){t.next=57;break}return E="lr"==f?d>h?"right":"left":d>h?"left":"right",this.activeFlip={direction:E,pagesFlipping:[h,d],pagesFlippingCount:Math.abs(d-h)},this.classList.add("br-mode-2up--flipping-".concat(E)),this.classList.add("BRpageFlipping"),this.requestUpdate(),t.next=38,this.updateComplete;case 38:return this.visiblePages.map((function(t){return R.pageContainerCache[t.index].$container})).forEach((function(t){return t.addClass("BRpage-exiting")})),v.forEach((function(t){return t.$container.addClass("BRpage-entering")})),O={duration:this.flipSpeed+this.activeFlip.pagesFlippingCount,easing:"ease-in",fill:"none"},T=this.$book.animate([{transform:P}],O),C=this.$flippingEdges.animate([{transform:"rotateY(0deg)"},{transform:"left"==E?"rotateY(-180deg)":"rotateY(180deg)"}],O),j="left"==E?this.querySelector(".BRpage-exiting[data-side=L]").animate([{transform:"rotateY(0deg)"},{transform:"rotateY(180deg)"}],O):this.querySelector(".BRpage-exiting[data-side=R]").animate([{transform:"rotateY(0deg)"},{transform:"rotateY(-180deg)"}],O),M="left"==E?this.querySelector(".BRpage-entering[data-side=R]").animate([{transform:"rotateY(-180deg)"},{transform:"rotateY(0deg)"}],O):this.querySelector(".BRpage-entering[data-side=L]").animate([{transform:"rotateY(180deg)"},{transform:"rotateY(0deg)"}],O),T.play(),C.play(),j.play(),M.play(),v.forEach((function(t){return t.$container.addClass("BRpage-visible")})),t.next=52,Promise.race([(0,e.promisifyEvent)(T,"finish"),(0,e.promisifyEvent)(C,"finish"),(0,e.promisifyEvent)(j,"finish"),(0,e.promisifyEvent)(M,"finish")]);case 52:this.classList.remove("br-mode-2up--flipping-".concat(E)),this.classList.remove("BRpageFlipping"),this.visiblePages.map((function(t){return R.pageContainerCache[t.index].$container})).forEach((function(t){return t.removeClass("BRpage-exiting BRpage-visible")})),v.forEach((function(t){return t.$container.removeClass("BRpage-entering")})),this.activeFlip=null;case 57:this.$book.style.transform=P,this.visiblePages=("lr"==f?[n.left,n.right]:[n.right,n.left]).filter((function(t){return t}));case 59:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{kind:"method",key:"parseNextSpread",value:function(t){"next"==t?t="lr"==this.book.pageProgression?"right":"left":"prev"==t&&(t="lr"==this.book.pageProgression?"left":"right");var e,n=(this.pageLeft||this.pageRight).spread;if("left"==t)t=null===(e=n.left)||void 0===e||null===(e=e.findLeft({combineConsecutiveUnviewables:!0}))||void 0===e?void 0:e.spread;else if("right"==t){var r;t=null===(r=n.right)||void 0===r||null===(r=r.findRight({combineConsecutiveUnviewables:!0}))||void 0===r?void 0:r.spread}return"number"==typeof t&&(t=this.book.getPage(t).spread),t instanceof j&&(t=t.spread),t}},{kind:"field",key:"handlePageClick",value:function(){var t=this;return function(e){if(3==e.which&&t.br.protected)return!1;if(1==e.which){var n=Zt(e.target).closest(".BRpagecontainer");n.length&&("L"==n.data("side")?t.flipAnimation("left"):"R"==n.data("side")&&t.flipAnimation("right"))}}}}]}}),R.oi),ke=(le([(0,M.Mo)("br-leaf-edges")],(function(t,e){var n=function(e){ae(r,e);var n=ue(r);function r(){var e;oe(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=n.call.apply(n,[this].concat(o)),t(ce(e)),e}return ie(r)}(e);return{F:n,d:[{kind:"field",decorators:[(0,M.Cb)({type:Number})],key:"leftIndex",value:function(){return 0}},{kind:"field",decorators:[(0,M.Cb)({type:Number})],key:"rightIndex",value:function(){return 0}},{kind:"field",decorators:[(0,M.Cb)({type:String})],key:"side",value:function(){return"left"}},{kind:"field",decorators:[(0,M.Cb)({attribute:!1})],key:"book",value:function(){return null}},{kind:"field",decorators:[(0,M.Cb)({attribute:!1,type:Function})],key:"pageClickHandler",value:function(){return null}},{kind:"field",decorators:[(0,M.IO)(".br-leaf-edges__bar")],key:"$hoverBar",value:void 0},{kind:"field",decorators:[(0,M.IO)(".br-leaf-edges__label")],key:"$hoverLabel",value:void 0},{kind:"get",key:"pageWidthPercent",value:function(){return 100/(this.rightIndex-this.leftIndex+1)}},{kind:"method",key:"render",value:function(){return(0,R.dy)(qt||(qt=Qt(['\n <div\n class="br-leaf-edges__bar"\n style="','"\n ></div>\n <div class="br-leaf-edges__label">Page</div>'])),(0,A.V)({width:"".concat(this.pageWidthPercent,"%")}))}},{kind:"method",key:"connectedCallback",value:function(){xe(_e(n.prototype),"connectedCallback",this).call(this),this.addEventListener("mouseenter",this.onMouseEnter),this.addEventListener("mouseleave",this.onMouseLeave),this.addEventListener("click",this.onClick)}},{kind:"method",key:"disconnectedCallback",value:function(){xe(_e(n.prototype),"disconnectedCallback",this).call(this),this.addEventListener("mouseenter",this.onMouseEnter),this.removeEventListener("mousemove",this.onMouseMove),this.removeEventListener("mouseleave",this.onMouseLeave)}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"field",key:"onMouseEnter",value:function(){var t=this;return function(e){t.addEventListener("mousemove",t.onMouseMove),t.$hoverBar.style.display="block",t.$hoverLabel.style.display="block"}}},{kind:"field",key:"onMouseMove",value:function(){var t=this;return function(e){t.$hoverBar.style.left="".concat(e.offsetX,"px"),"right"==t.side?t.$hoverLabel.style.left="".concat(e.offsetX,"px"):t.$hoverLabel.style.right="".concat(t.offsetWidth-e.offsetX,"px"),t.$hoverLabel.style.top="".concat(e.offsetY,"px");var n=t.mouseEventToPageIndex(e);t.$hoverLabel.textContent=t.book.getPageName(n)}}},{kind:"field",key:"onMouseLeave",value:function(){var t=this;return function(e){t.removeEventListener("mousemove",t.onMouseMove),t.$hoverBar.style.display="none",t.$hoverLabel.style.display="none"}}},{kind:"field",key:"onClick",value:function(){var t=this;return function(e){t.pageClickHandler(t.mouseEventToPageIndex(e))}}},{kind:"method",key:"mouseEventToPageIndex",value:function(t){return Math.floor(this.leftIndex+t.offsetX/this.offsetWidth*(this.rightIndex-this.leftIndex+1))}}]}}),R.oi),r(5311));function Pe(t){return Pe="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},Pe(t)}function Ee(){Ee=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:E(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",g={};function m(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(M([])));_&&_!==n&&r.call(_,a)&&(w=_);var S=b.prototype=m.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Pe(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function E(e,n,r){var i=h;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=O(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?v:d,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=v,r.method="throw",r.arg=c.arg)}}}function O(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(Pe(e)+" is not iterable")}return y.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(P.prototype),c(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new P(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=M,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:M(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Oe(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Te(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Oe(o,r,i,a,s,"next",t)}function s(t){Oe(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Ce(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Pe(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Pe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Pe(i)?i:String(i)),r)}var i}var je=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.br=e,this.book=n,this.mode2UpLit=new Se(n,e),this.mode2UpLit.flipSpeed=e.flipSpeed,this.$el=ke(this.mode2UpLit).attr("autoFit",this.br.options.twoPage.autofit).addClass("br-mode-2up__root BRmode2up"),this.everShown=!1}var e,n;return e=t,(n=[{key:"prepare",value:function(){var t=this,e=this.br.currentIndex();this.br.refs.$brContainer.empty().css({overflow:"hidden"}).append(this.$el),this.mode2UpLit.style.opacity="0",setTimeout(Te(Ee().mark((function n(){return Ee().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.everShown){n.next=9;break}return t.mode2UpLit.initFirstRender(e),t.everShown=!0,t.mode2UpLit.requestUpdate(),n.next=6,t.mode2UpLit.updateComplete;case 6:new Lt(t.mode2UpLit,{preventDefault:!0,dragSelector:".br-mode-2up__book",dragstart:"mousedown",dragcontinue:"mousemove",dragend:"mouseup"}),n.next=12;break;case 9:return n.next=11,t.mode2UpLit.jumpToIndex(e,{smooth:!1});case 11:t.resizePageView();case 12:t.mode2UpLit.style.opacity="1";case 13:case"end":return n.stop()}}),n)})))),this.br.updateBrClasses()}},{key:"jumpToIndex",value:function(t,e,n,r){this.mode2UpLit.jumpToIndex(t)}},{key:"zoom",value:function(t){switch(t){case"in":this.mode2UpLit.zoomIn();break;case"out":this.mode2UpLit.zoomOut();break;default:console.error("Unsupported direction: ".concat(t))}}},{key:"resizePageView",value:function(){this.mode2UpLit.htmlDimensionsCacher.updateClientSizes(),this.mode2UpLit.scale<this.mode2UpLit.initialScale&&"none"==this.mode2UpLit.autoFit&&(this.mode2UpLit.autoFit="auto"),"none"!=this.mode2UpLit.autoFit&&this.mode2UpLit.resizeViaAutofit(),this.mode2UpLit.recenter()}}])&&Ce(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Me=r(5311);function Re(t){return Re="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},Re(t)}function Ae(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Ie(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ie(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ie(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Le(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Re(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Re(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Re(i)?i:String(i)),r)}var i}var De=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.br=e,this.book=n}var r,i;return r=t,(i=[{key:"drawLeafs",value:function(t){var r,i,o,a=this,s=Math.floor,u=this.book,c=this.br.refs.$brContainer.prop("scrollWidth")-20,l=0,f=0,h=0,d=0,p=0,v=[],g=Ae(u.pagesIterator({combineConsecutiveUnviewables:!0}));try{for(g.s();!(o=g.n()).done;){var m=o.value,y=this.br.thumbWidth;l+(y+this.br.thumbPadding)>c&&(d++,l=0,p=0),v[d]||(v[d]={}),v[d].leafs||(v[d].leafs=[],v[d].height=0,v[d].top=0),v[d].leafs[p]={num:m.index,left:l},(r=s(m.height*this.br.thumbWidth/m.width))>v[d].height&&(v[d].height=r),0===p&&(f+=this.br.thumbPadding+v[d].height),(l+=y+this.br.thumbPadding)>h&&(h=l),p++,m.index==t&&(i=f-this.br.thumbPadding-v[d].height)}}catch(t){g.e(t)}finally{g.f()}this.br.refs.$brPageViewEl.height(f);var b=s((this.br.refs.$brContainer.prop("scrollWidth")-h)/2)-14;void 0!==i&&this.br.refs.$brContainer.scrollTop(i);for(var w=this.br.refs.$brContainer.prop("scrollTop"),x=w+this.br.refs.$brContainer.height(),_=0,S=0,k=[],P=[],E=u.getNumLeafs()-1,O=0,T=0;T<v.length;T++)v[T]&&(S+=this.br.thumbPadding+v[T].height,(_>=w&&_<=x||S>=w&&S<=x||_<=w&&S>=x)&&(k.push(T),v[T].leafs[0].num<E&&(E=v[T].leafs[0].num),v[T].leafs[v[T].leafs.length-1].num>O&&(O=v[T].leafs[v[T].leafs.length-1].num)),_>v[T].top&&(v[T].top=_),_=S);for(var C=k[0],j=k[k.length-1],M=1;M<this.br.thumbRowBuffer+1;M++)j+M<v.length&&k.push(j+M);for(var R=1;R<this.br.thumbRowBuffer;R++)C-R>=0&&k.push(C-R);k.sort((function(t,e){return t-e}));for(var A=0,I=k;A<I.length;A++){var L=I[A];if((0,e.notInArray)(L,this.br.displayedRows)){if(!v[L])continue;var D,$=Ae(v[L].leafs);try{var N=function(){var t=D.value,e=t.num,r=t.left,i=a.br.thumbWidth,o=s(u.getPageHeight(e)*a.br.thumbWidth/u.getPageWidth(e)),l=v[L].top,f=r+b;"rl"==a.br.pageProgression&&(f=c-i-f),f+=a.br.thumbPadding,P.push(e);var h=s(u.getPageWidth(e)/a.br.thumbWidth),d=2*Math.round(h/2),p=a.br._createPageContainer(e).update({dimensions:{width:i,height:o,top:l,left:f},reduce:d});p.$container.data("leaf",e).on("mouseup",(function(t){a.br.updateFirstIndex(e,{suppressFragmentChange:!0}),a.br.switchMode(a.br.constMode1up,{suppressFragmentChange:!0});var r=a.br.viewModeOrder.shift();a.br.viewModeOrder.push(r),a.br._components.navbar.updateViewModeButton(Me(".viewmode"),"twopg","Two-page view"),a.br.trigger(n.fragmentChange),t.stopPropagation()})),a.br.refs.$brPageViewEl.append(p.$container)};for($.s();!(D=$.n()).done;)N()}catch(t){$.e(t)}finally{$.f()}}}var F,B=Ae(this.br.displayedRows);try{for(B.s();!(F=B.n()).done;){var U=F.value;if((0,e.notInArray)(U,k)){var z,W,H=Ae(null===(z=v[U])||void 0===z?void 0:z.leafs);try{for(H.s();!(W=H.n()).done;){var V,G=W.value.num;null!=P&&P.includes(G)||null===(V=this.br.$(".pagediv".concat(G)))||void 0===V||V.remove()}}catch(t){H.e(t)}finally{H.f()}}}}catch(t){B.e(t)}finally{B.f()}var Y=this.br.currentIndex();Y<E?this.br.updateFirstIndex(E):Y>O&&this.br.updateFirstIndex(O),this.br.displayedRows=k.slice(),this.br.$(".BRpagedivthumb_highlight").removeClass("BRpagedivthumb_highlight"),this.br.$(".pagediv"+this.br.currentIndex()).addClass("BRpagedivthumb_highlight")}},{key:"lazyLoadImage",value:function(t){var e=Me(t).data("leaf"),n=Me(t).data("reduce"),r=this.br.imageCache.image(e,n),i=Me(t).parent();Me(i).append(r),Me(t).remove()}},{key:"zoom",value:function(t){var n=this.br.thumbColumns;switch(t){case"in":this.br.thumbColumns-=1;break;case"out":this.br.thumbColumns+=1;break;default:console.error("Unsupported direction: ".concat(t))}this.br.thumbColumns=(0,e.clamp)(this.br.thumbColumns,this.br.options.thumbMinZoomColumns,this.br.options.thumbMaxZoomColumns),this.br.thumbColumns!=n&&(this.br.displayedRows=[],this.prepare())}},{key:"getThumbnailWidth",value:function(t){var e=(t+1)*this.br.thumbPadding,n=(this.br.refs.$brPageViewEl.width()-e)/(t+.5),r=Math.floor(n);return r>0?r:100}},{key:"prepare",value:function(){this.br.refs.$brContainer.empty(),this.br.refs.$brContainer.css({overflowY:"scroll",overflowX:"auto"}),this.br.refs.$brPageViewEl=Me("<div class='BRpageview'></div>"),this.br.refs.$brContainer.append(this.br.refs.$brPageViewEl),this.dragScrollable=this.dragScrollable||new Lt(this.br.refs.$brContainer[0],{preventDefault:!0}),this.br.bindGestures(this.br.refs.$brContainer),this.br.thumbWidth=this.getThumbnailWidth(this.br.thumbColumns),this.br.reduce=this.book.getPageWidth(0)/this.br.thumbWidth,this.br.displayedRows=[],this.drawLeafs(this.br.currentIndex()),this.br.updateBrClasses()}},{key:"jumpToIndex",value:function(t){for(var e=this,n=Math.floor,r=this.book,i=this.br.refs.$brContainer.prop("scrollWidth")-20,o=this.br.thumbWidth,a=0,s=0,u=0,c=0,l=0,f=0;f<=t;f++){s+(o+this.br.thumbPadding)>i&&(s=0,c=0,l=0);var h=n(r.getPageHeight(l)*this.br.thumbWidth/r.getPageWidth(l));h>c&&(c=h),0==l&&(a=u,u+=this.br.thumbPadding+c),s+=o+this.br.thumbPadding,l++}this.br.updateFirstIndex(t),this.br.refs.$brContainer.prop("scrollTop")==a?this.br.drawLeafs():(this.br.animating=!0,this.br.refs.$brContainer.stop(!0).animate({scrollTop:a},"fast",(function(){e.br.animating=!1})))}}])&&Le(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),t}(),$e=(r(8813),{floor:Math.floor,decr:function(t){return t-1}}),Ne={floor:function(t){return Math.pow(2,Math.floor(Math.log2(Math.max(1,t))))},decr:function(t){return Math.pow(2,Math.log2(t)-1)}},Fe={pow2:Ne,integer:$e},Be=r(5311);function Ue(t){return Ue="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},Ue(t)}function ze(t){return function(t){if(Array.isArray(t))return We(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return We(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?We(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function We(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function He(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Ue(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Ue(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Ue(i)?i:String(i)),r)}var i}var Ve=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.useSrcSet,i=void 0!==r&&r,o=n.reduceSet,a=void 0===o?Ne:o;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.book=e,this.useSrcSet=i,this.reduceSet=a,this.cache={},this.defaultScale=8}var e,n;return e=t,n=[{key:"image",value:function(t,e){var n=(this.cache[t]||[]).filter((function(t){return t.loaded&&t.reduce<=e}));if(n.length){var r=Math.max.apply(Math,ze(n.map((function(t){return t.reduce}))));return this._serveImageElement(t,r)}return this._serveImageElement(t,e)}},{key:"imageLoaded",value:function(t,e){var n,r,i=null===(n=this.cache[t])||void 0===n?void 0:n.find((function(t){return t.reduce<=e}));return null!==(r=null==i?void 0:i.loaded)&&void 0!==r&&r}},{key:"getBestLoadedReduce",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,r=(null===(e=this.cache[t])||void 0===e?void 0:e.filter((function(t){return t.loaded})))||[];if(!r.length)return null;var i=r.filter((function(t){return t.reduce>=n}));if(i.length)return Math.min.apply(Math,ze(i.map((function(t){return t.reduce}))));var o=r.filter((function(t){return t.reduce<n}));return Math.max.apply(Math,ze(o.map((function(t){return t.reduce}))))}},{key:"_serveImageElement",value:function(t,e){var n,r=this.reduceSet.floor(e),i=null===(n=this.cache[t])||void 0===n?void 0:n.find((function(t){return t.reduce==r}));i||(i={reduce:r,loaded:!1},(this.cache[t]||(this.cache[t]=[])).push(i));var o=this.book.getPage(t),a=Be("<img />",{class:"BRpageimage",alt:"Book page image",src:o.getURI(r,0)}).data("reduce",r);return this.useSrcSet&&a.attr("srcset",o.getURISrcSet(r)),i.loaded||a.one("load",(function(){return i.loaded=!0})),a}}],n&&He(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Ge=r(9860),Ye=r(5311),Xe=r(5311);function qe(t){return qe="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},qe(t)}function Ke(){Ke=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:E(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",g={};function m(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(M([])));_&&_!==n&&r.call(_,a)&&(w=_);var S=b.prototype=m.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==qe(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function E(e,n,r){var i=h;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=O(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?v:d,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=v,r.method="throw",r.arg=c.arg)}}}function O(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(qe(e)+" is not iterable")}return y.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(P.prototype),c(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new P(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=M,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:M(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Ze(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Je(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Ze(o,r,i,a,s,"next",t)}function s(t){Ze(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Qe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function tn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Ye.extend(!0,{},tn.defaultOptions,t,tn.optionOverrides);this.setup(e)}function en(t,e,n){var r,i,o,a,s,u,c,l;i=n,o=function(t){return t.br},a=tn,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n,u=function(t){return t._overrideable[e]},c=(r=t).prototype[i],l=function(){return c.apply(u(this),arguments)},Object.defineProperty(a.prototype,s,{get:function(){return l},set:function(t){r.prototype[i]=function(){var e=this instanceof r?o(this):this;return t.apply(e,arguments)},l=t}})}tn.version=t.i8,tn.constMode1up=1,tn.constMode2up=2,tn.constModeThumb=3,tn.imageCache=null,tn.constNavAnimationDuration=300,tn.constResizeAnimationDuration=100,tn.eventNames=n,tn.defaultOptions=p,tn.optionOverrides={},tn.prototype.setup=function(t){this.options=t,this.numLeafs=void 0,this.enableSearch=!1,this.viewModeOrder=[],this.suppressFragmentChange=!1,this.animationFinishedCallback=null,this.constMode1up=tn.constMode1up,this.constMode2up=tn.constMode2up,this.constModeThumb=tn.constModeThumb,this.reduce=8,this.defaults=t.defaults,this.padding=t.padding,this.reduceSet=Fe[t.reduceSet],this.reduceSet||(console.warn("Invalid reduceSet ".concat(t.reduceSet,". Ignoring.")),this.reduceSet=Fe[p.reduceSet]),this.mode=null,this.prevReadMode=null,this.ui=t.ui,this.uiAutoHide=t.uiAutoHide,this.thumbWidth=100,this.thumbRowBuffer=t.thumbRowBuffer,this.thumbColumns=t.thumbColumns,this.thumbMaxLoading=t.thumbMaxLoading,this.thumbPadding=t.thumbPadding,this.displayedRows=[],this.displayedIndices=[],this.animating=!1,this.flipSpeed="number"==typeof t.flipSpeed?t.flipSpeed:{fast:200,slow:600}[t.flipSpeed]||400,this.flipDelay=t.flipDelay,this.firstIndex=null,this.isFullscreenActive=t.startFullscreen||!1,this.lastScroll=null,this.showLogo=t.showLogo,this.logoURL=t.logoURL,this.imagesBaseURL=t.imagesBaseURL,this.reductionFactors=t.reductionFactors,this.onePage=t.onePage,this.twoPage=t.twoPage,this.onePageMinBreakpoint=t.onePageMinBreakpoint,this.bookTitle=t.bookTitle,this.bookUrl=t.bookUrl,this.bookUrlText=t.bookUrlText,this.bookUrlTitle=t.bookUrlTitle,this.titleLeaf=t.titleLeaf,this.metadata=t.metadata,this.thumbnail=t.thumbnail,this.bookUrlMoreInfo=t.bookUrlMoreInfo,this.enableExperimentalControls=t.enableExperimentalControls,this.el=t.el,this.pageProgression=t.pageProgression,this.protected=t.protected,this.getEmbedCode=t.getEmbedCode,this.popup=null,this.data=t.data,this.refs={},this.book=new C(this),t.getNumLeafs&&(this.book.getNumLeafs=t.getNumLeafs.bind(this)),t.getPageWidth&&(this.book.getPageWidth=t.getPageWidth.bind(this)),t.getPageHeight&&(this.book.getPageHeight=t.getPageHeight.bind(this)),t.getPageURI&&(this.book.getPageURI=t.getPageURI.bind(this)),t.getPageSide&&(this.book.getPageSide=t.getPageSide.bind(this)),t.getPageNum&&(this.book.getPageNum=t.getPageNum.bind(this)),t.getPageProp&&(this.book.getPageProp=t.getPageProp.bind(this)),t.getSpreadIndices&&(this.book.getSpreadIndices=t.getSpreadIndices.bind(this)),t.leafNumToIndex&&(this.book.leafNumToIndex=t.leafNumToIndex.bind(this)),this._components={navbar:new s(this),toolbar:new w(this)},this._modes={mode1Up:new Kt(this,this.book),mode2Up:new je(this,this.book),modeThumb:new De(this,this.book)},this._overrideable={book:this.book,"_components.navbar":this._components.navbar,"_components.toolbar":this._components.toolbar,"_modes.mode1Up":this._modes.mode1Up,"_modes.mode2Up":this._modes.mode2Up,"_modes.modeThumb":this._modes.modeThumb},this.imageCache=new Ve(this.book,{useSrcSet:this.options.useSrcSet,reduceSet:this.reduceSet}),this.hasKeyFocus=!0},tn.prototype.getActivePageContainerElements=function(){var t=Object.values(this._modes.mode2Up.mode2UpLit.pageContainerCache).map((function(t){return t.$container[0]})).concat(Object.values(this._modes.mode1Up.mode1UpLit.pageContainerCache).map((function(t){return t.$container[0]})));return this.mode==this.constModeThumb&&(t=t.concat(this.$(".BRpagecontainer").toArray())),t},tn.prototype.getActivePageContainerElementsForIndex=function(t){var e,n,r;return[null===(e=this._modes.mode2Up.mode2UpLit.pageContainerCache[t])||void 0===e||null===(e=e.$container)||void 0===e?void 0:e[0],null===(n=this._modes.mode1Up.mode1UpLit.pageContainerCache[t])||void 0===n||null===(n=n.$container)||void 0===n?void 0:n[0]].concat((r=this.mode==this.constModeThumb?this.$(".pagediv".concat(t)).toArray():[],function(t){if(Array.isArray(t))return Qe(t)}(r)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||function(t,e){if(t){if("string"==typeof t)return Qe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qe(t,e):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())).filter((function(t){return t}))},Object.defineProperty(tn.prototype,"activeMode",{get:function(){return{1:this._modes.mode1Up,2:this._modes.mode2Up,3:this._modes.modeThumb}[this.mode]}}),tn.util=e,tn.prototype.extendParams=function(t,e){var n=Xe.extend({},e);if(void 0!==n.page){var r=this.book.parsePageString(n.page);isNaN(r)||(n.index=r),delete n.page}Xe.extend(t,n)},tn.prototype.initParams=function(){var t={init:!0,pageFound:!1,fragmentChange:!1};if(void 0!==this.titleLeaf&&this.book.getNumLeafs()>2?t.index=this.book.leafNumToIndex(this.titleLeaf):t.index=0,this.defaults){var n=this.paramsFromFragment(this.defaults);void 0!==n.page&&(t.pageFound=!0),this.extendParams(t,n)}if(this.options.enablePageResume){var r=this.getResumeValue();null!==r&&(t.index!==r&&(t.fragmentChange=!0),t.index=r)}if(this.options.enableUrlPlugin){var i=this.paramsFromFragment(this.urlReadFragment());!Object.keys(i).length&&this.urlReadHashFragment()&&"history"===this.options.urlMode&&(i=this.paramsFromFragment(this.urlReadHashFragment())),Object.keys(i).length&&(void 0!==i.page&&(t.pageFound=!0),this.extendParams(t,i),t.fragmentChange=!0)}if(this.options.enableSearch&&(this.options.goToFirstResult=!t.pageFound,!this.options.initialSearchTerm))if(t.search)this.options.initialSearchTerm=t.search,this.searchTerm=t.search;else{var o=new URLSearchParams(this.readQueryString()).get("q");o&&(this.options.initialSearchTerm=e.decodeURIComponentPlus(o))}return this.suppressFragmentChange=!t.fragmentChange,t},tn.prototype.getLocationSearch=function(){return window.location.search},tn.prototype.getLocationHash=function(){return window.location.hash},tn.prototype.readQueryString=function(){var t=this.getLocationSearch();if(t)return t;var e=this.getLocationHash(),n=e.search(/\?\w+=/);return n>-1?e.slice(n):""},tn.prototype.getInitialMode=function(t){var e,n=Xe(window).width(),r=n&&n<=this.onePageMinBreakpoint;if(e=t.mode?t.mode:r?this.constMode1up:this.constMode2up,this.canSwitchToMode(e)||(e=this.constMode1up),this.options.defaults)try{e=function(t){var e={"mode/1up":1,"mode/2up":2,"mode/thumb":3};if(!(t in e))throw new v("Invalid mode string: ".concat(t));return e[t]}(this.options.defaults)}catch(t){}return e},tn.prototype.init=function(){this.init.initComplete=!1,this.pageScale=this.reduce;var t=this.initParams();this.firstIndex=t.index?t.index:0,this.isTouchDevice=!!("ontouchstart"in window)||!!("msmaxtouchpoints"in window.navigator),this.refs.$br=Xe(this.el).empty().removeClass().addClass("ui-"+this.ui).addClass("br-ui-"+this.ui).addClass("BookReader"),this.isTouchDevice?this.refs.$br.addClass("touch"):this.refs.$br.addClass("no-touch"),this.refs.$brContainer=Xe("<div class='BRcontainer' dir='ltr'></div>"),this.refs.$br.append(this.refs.$brContainer),t.mode=this.getInitialMode(t),this.mode=t.mode,this.options.showToolbar&&this.initToolbar(this.mode,this.ui),this.options.showNavbar&&this.initNavbar(),this._components.navbar.switchNavbarControls(),this.resizeBRcontainer(),this.updateFromParams(t),this.initUIStrings(),this.bindNavigationHandlers(),this.setupKeyListeners(),this.lastScroll=(new Date).getTime(),this.refs.$brContainer.on("scroll",this,(function(t){t.data.lastScroll=(new Date).getTime(),t.data.constModeThumb==t.data.mode&&t.data.drawLeafsThrottled()})),this.options.autoResize&&(Xe(window).on("resize",this,(function(t){t.data.resize()})),Xe(window).on("orientationchange",this,function(t){t.data.resize()}.bind(this))),this.protected&&this.$(".BRicon.share").hide(),this.options.initialSearchTerm||(this.suppressFragmentChange=!1),this.options.startFullscreen&&this.enterFullscreen(!0),this.init.initComplete=!0,this.trigger(tn.eventNames.PostInit)},tn.prototype.trigger=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,r="BookReader:"+t;e.polyfillCustomEvent(window),window.dispatchEvent(new CustomEvent(r,{bubbles:!0,composed:!0,detail:{props:n}})),Xe(document).trigger(r,n)},tn.prototype.bind=function(t,e){Xe(document).on("BookReader:"+t,e)},tn.prototype.unbind=function(t,e){Xe(document).off("BookReader:"+t,e)},tn.prototype.resize=function(){this.init.initComplete&&(this.resizeBRcontainer(),this._components.navbar.switchNavbarControls(),this.constMode1up==this.mode?"none"!=this.onePage.autofit?(this._modes.mode1Up.resizePageView(),this.centerPageView()):(this.centerPageView(),this.displayedIndices=[],this.drawLeafsThrottled()):this.constModeThumb==this.mode?this._modes.modeThumb.prepare():this._modes.mode2Up.resizePageView(),this.trigger(tn.eventNames.resize))},tn.prototype.setupKeyListeners=function(){var t=this;window.IntersectionObserver&&new IntersectionObserver((function(e){e.forEach((function(e){0===e.intersectionRatio?t.hasKeyFocus=!1:t.hasKeyFocus=!0}))}),{root:null,rootMargin:"0px",threshold:[0,.05,1]}).observe(this.refs.$br[0]),document.addEventListener("keydown",(function(n){if(t.hasKeyFocus&&!(n.getModifierState("Control")||n.getModifierState("Alt")||n.getModifierState("Meta")||n.getModifierState("Win")||e.isInputActive()))switch(n.key){case"Home":n.preventDefault(),t.first();break;case"End":n.preventDefault(),t.last();break;case"ArrowDown":case"PageDown":case"Down":t.constMode2up===t.mode&&(n.preventDefault(),t.next());break;case"ArrowUp":case"PageUp":case"Up":t.constMode2up===t.mode&&(n.preventDefault(),t.prev());break;case"ArrowLeft":case"Left":t.constModeThumb!=t.mode&&(n.preventDefault(),t.left());break;case"ArrowRight":case"Right":t.constModeThumb!=t.mode&&(n.preventDefault(),t.right());break;case"-":case"Subtract":n.preventDefault(),t.zoom(-1);break;case"+":case"=":case"Add":n.preventDefault(),t.zoom(1);break;case"F":case"f":n.preventDefault(),t.toggleFullscreen()}}))},tn.prototype.drawLeafs=function(){this.constMode1up!=this.mode&&this.activeMode.drawLeafs()},tn.prototype._createPageContainer=function(t){return new Ge._z(this.book.getPage(t,!1),{isProtected:this.protected,imageCache:this.imageCache,loadingImage:this.imagesBaseURL+"loading.gif"})},tn.prototype.bindGestures=function(t){var e=this,n=1;t.unbind("touchmove").bind("touchmove",(function(t){t.originalEvent.cancelable&&(n=t.originalEvent.touches.length),t.stopPropagation()})),t.unbind("gesturechange").bind("gesturechange",(function(t){t.preventDefault(),2!==n||(new Date).getTime()-e.lastScroll<500||(t.originalEvent.scale>1.5?e.zoom(1):t.originalEvent.scale<.6&&e.zoom(-1))}))},tn.prototype.drawLeafsThrottled=e.throttle(tn.prototype.drawLeafs,250),tn.prototype.zoom=function(t){var e;1==t?this.activeMode.zoom("in"):this.activeMode.zoom("out"),null===(e=this.textSelectionPlugin)||void 0===e||e.stopPageFlip(this.refs.$brContainer)},tn.prototype.resizeBRcontainer=function(t){t?this.refs.$brContainer.animate({top:this.getToolBarHeight(),bottom:this.getFooterHeight()},this.constResizeAnimationDuration,"linear"):this.refs.$brContainer.css({top:this.getToolBarHeight(),bottom:this.getFooterHeight()})},tn.prototype.centerPageView=function(){var t=this.refs.$brContainer.prop("scrollWidth"),e=this.refs.$brContainer.prop("clientWidth");t>e&&this.refs.$brContainer.prop("scrollLeft",(t-e)/2)},tn.prototype.quantizeReduce=function(t,e){for(var n=e[0].reduce,r=Math.abs(t-n),i=1;i<e.length;i++){var o=Math.abs(t-e[i].reduce);o<r&&(r=o,n=e[i].reduce)}return n},tn.prototype.nextReduce=function(t,e,n){if("in"===e){for(var r=0,i=1;i<n.length;i++)n[i].reduce<t&&(r=i);return n[r]}if("out"===e){for(var o=n.length-1,a=o,s=o;s>=0;s--)n[s].reduce>t&&(a=s);return n[a]}if("auto"===e){var u=n.find((function(t){return"auto"==t.autofit}));if(u)return u;for(var c=n.filter((function(t){var e=t.autofit;return"height"==e||"width"==e})),l=null,f=0;f<c.length;f++)(null===l||l.reduce<c[f].reduce)&&(l=c[f]);if(l)return l}else if("height"===e||"width"===e){var h=n.find((function(t){return t.autofit==e}));if(h)return h}return n[0]},tn.prototype._reduceSort=function(t,e){return t.reduce-e.reduce},tn.prototype.jumpToPage=function(t){var e=this.book.parsePageString(t);return void 0!==e&&(this.jumpToIndex(e),!0)},tn.prototype._isIndexDisplayed=function(t){return this.displayedIndices?this.displayedIndices.includes(t):this.currentIndex()==t},tn.prototype.jumpToIndex=function(t,e,n,r){var i=this.book.getPage(t);if(!i.isViewable&&i.unviewablesStart!=i.index){var o=this._isIndexDisplayed(i.unviewablesStart)?i.findNext({combineConsecutiveUnviewables:!0}).index:i.unviewablesStart;return this.jumpToIndex(o,e,n,r)}this.trigger(tn.eventNames.stop),this.activeMode.jumpToIndex(t,e,n,r)},tn.prototype.getPrevReadMode=function(t){return t===tn.constMode1up||t===tn.constMode2up?t:null===this.prevReadMode?tn.constMode1up:void 0},tn.prototype.switchMode=function(t){var e,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.suppressFragmentChange,a=void 0!==o&&o;if(i.init,i.pageFound,this.init.initComplete){if(t===this.mode)return;if(!this.canSwitchToMode(t))return}this.trigger(tn.eventNames.stop),this.prevReadMode=this.getPrevReadMode(this.mode),this.mode!=t&&(null===(n=(r=this.activeMode).unprepare)||void 0===n||n.call(r)),this.mode=t,this.pageScale!==this.reduce&&(this.reduce=this.pageScale),this.constMode1up==t?this._modes.mode1Up.prepare():this.constModeThumb==t?(this.reduce=this.quantizeReduce(this.reduce,this.reductionFactors),this._modes.modeThumb.prepare()):this._modes.mode2Up.prepare(),this.suppressFragmentChange||a||this.trigger(tn.eventNames.fragmentChange);var s=t+"PageViewSelected";this.trigger(tn.eventNames[s]),null===(e=this.textSelectionPlugin)||void 0===e||e.stopPageFlip(this.refs.$brContainer)},tn.prototype.updateBrClasses=function(){var t={};t[this.constMode1up]="BRmode1up",t[this.constMode2up]="BRmode2up",t[this.constModeThumb]="BRmodeThumb",this.refs.$br.removeClass("BRmode1up BRmode2up BRmodeThumb").addClass(t[this.mode]),this.isFullscreen()?(this.refs.$br.addClass("fullscreenActive"),Xe(document.body).addClass("BRfullscreenActive")):(this.refs.$br.removeClass("fullscreenActive"),Xe(document.body).removeClass("BRfullscreenActive"))},tn.prototype.isFullscreen=function(){return this.isFullscreenActive},tn.prototype.toggleFullscreen=Je(Ke().mark((function t(){var e,n=arguments;return Ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=!(n.length>0&&void 0!==n[0])||n[0],!this.isFullscreen()){t.next=6;break}return t.next=4,this.exitFullScreen();case 4:t.next=8;break;case 6:return t.next=8,this.enterFullscreen(e);case 8:case"end":return t.stop()}}),t,this)}))),tn.prototype.enterFullscreen=Je(Ke().mark((function t(){var e,n,r,i=this,o=arguments;return Ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=!(o.length>0&&void 0!==o[0])||o[0],this.refs.$br.addClass("BRfullscreenAnimation"),r=this.currentIndex(),n&&(this._fullscreenCloseHandler=function(t){27===t.keyCode&&i.toggleFullscreen()},Xe(document).on("keyup",this._fullscreenCloseHandler)),Xe(window).width()<=this.onePageMinBreakpoint&&this.switchMode(this.constMode1up),this.isFullscreenActive=!0,this.updateBrClasses(),!(this.activeMode instanceof Kt)){t.next=13;break}return this.activeMode.mode1UpLit.scale=this.activeMode.mode1UpLit.computeDefaultScale(this.book.getPage(r)),this.activeMode.mode1UpLit.requestUpdate(),t.next=13,this.activeMode.mode1UpLit.updateComplete;case 13:return this.jumpToIndex(r),null===(e=this.textSelectionPlugin)||void 0===e||e.stopPageFlip(this.refs.$brContainer),this.trigger(tn.eventNames.fragmentChange),this.trigger(tn.eventNames.fullscreenToggled),t.next=19,new Promise((function(t){return setTimeout(t,0)}));case 19:this.resize(),this.refs.$br.removeClass("BRfullscreenAnimation");case 21:case"end":return t.stop()}}),t,this)}))),tn.prototype.exitFullScreen=Je(Ke().mark((function t(){var e,n;return Ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.refs.$br.addClass("BRfullscreenAnimation"),Xe(document).off("keyup",this._fullscreenCloseHandler),n=Xe(window).width(),this.options.controls.twoPage.visible&&n<=this.onePageMinBreakpoint&&this.switchMode(this.constMode2up),this.isFullscreenActive=!1,this.trigger(tn.eventNames.fullscreenToggled),this.updateBrClasses(),t.next=10,new Promise((function(t){return setTimeout(t,0)}));case 10:if(this.resize(),!(this.activeMode instanceof Kt)){t.next=16;break}return this.activeMode.mode1UpLit.scale=this.activeMode.mode1UpLit.computeDefaultScale(this.book.getPage(this.currentIndex())),this.activeMode.mode1UpLit.requestUpdate(),t.next=16,this.activeMode.mode1UpLit.updateComplete;case 16:null===(e=this.textSelectionPlugin)||void 0===e||e.stopPageFlip(this.refs.$brContainer),this.trigger(tn.eventNames.fragmentChange),this.refs.$br.removeClass("BRfullscreenAnimation");case 19:case"end":return t.stop()}}),t,this)}))),tn.prototype.currentIndex=function(){if(this.mode==this.constMode1up||this.mode==this.constModeThumb)return this.firstIndex;if(this.mode==this.constMode2up)return e.clamp(this.firstIndex,0,this.book.getNumLeafs()-1);throw"currentIndex called for unimplemented mode "+this.mode},tn.prototype.updateFirstIndex=function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).suppressFragmentChange,n=void 0!==e&&e;this.firstIndex!==t&&(this.firstIndex=t,this.suppressFragmentChange||n||this.trigger(tn.eventNames.fragmentChange),this.options.initialSearchTerm&&!n&&(this.suppressFragmentChange=!1),this.trigger(tn.eventNames.pageChanged),this.trigger(tn.eventNames.userAction),this._components.navbar.updateNavIndexThrottled(t))},tn.prototype.right=function(){"rl"!=this.pageProgression?this.next():this.prev()},tn.prototype.rightmost=function(){"rl"!=this.pageProgression?this.last():this.first()},tn.prototype.left=function(){"rl"!=this.pageProgression?this.prev():this.next()},tn.prototype.leftmost=function(){"rl"!=this.pageProgression?this.first():this.last()},tn.prototype.next=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).triggerStop,e=void 0===t||t;this.constMode2up==this.mode?(e&&this.trigger(tn.eventNames.stop),this._modes.mode2Up.mode2UpLit.flipAnimation("next")):this.firstIndex<this.book.getNumLeafs()-1&&this.jumpToIndex(this.firstIndex+1)},tn.prototype.prev=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).triggerStop,e=void 0===t||t;this.firstIndex<1||(this.constMode2up==this.mode?(e&&this.trigger(tn.eventNames.stop),this._modes.mode2Up.mode2UpLit.flipAnimation("prev")):this.firstIndex>=1&&this.jumpToIndex(this.firstIndex-1))},tn.prototype.first=function(){this.jumpToIndex(0)},tn.prototype.last=function(){this.jumpToIndex(this.book.getNumLeafs()-1)},tn.prototype.initNavbar=s.prototype.init,en(s,"_components.navbar","init","initNavbar"),tn.prototype.buildToolbarElement=w.prototype.buildToolbarElement,en(w,"_components.toolbar","buildToolbarElement"),tn.prototype.initToolbar=w.prototype.initToolbar,en(w,"_components.toolbar","initToolbar"),tn.prototype.buildShareDiv=w.prototype.buildShareDiv,en(w,"_components.toolbar","buildShareDiv"),tn.prototype.buildInfoDiv=w.prototype.buildInfoDiv,en(w,"_components.toolbar","buildInfoDiv"),tn.prototype.getToolBarHeight=w.prototype.getToolBarHeight,en(w,"_components.toolbar","getToolBarHeight"),tn.prototype.bindNavigationHandlers=function(){var t=this,e=this,n=this.$(".BRicon"),r={book_left:function(){t.trigger(tn.eventNames.stop),t.left()},book_right:function(){t.trigger(tn.eventNames.stop),t.right()},book_top:this.first.bind(this),book_bottom:this.last.bind(this),book_leftmost:this.leftmost.bind(this),book_rightmost:this.rightmost.bind(this),onepg:function(){t.switchMode(e.constMode1up)},thumb:function(){t.switchMode(e.constModeThumb)},twopg:function(){t.switchMode(e.constMode2up)},zoom_in:function(){t.trigger(tn.eventNames.stop),t.zoom(1),t.trigger(tn.eventNames.zoomIn)},zoom_out:function(){t.trigger(tn.eventNames.stop),t.zoom(-1),t.trigger(tn.eventNames.zoomOut)},full:function(){if("embed"==t.ui){var e=t.$(".BRembedreturn a").attr("href");window.open(e)}else t.toggleFullscreen()}};this.$("nav.BRcontrols li button").on("click",(function(){t.trigger(tn.eventNames.userAction)}));var i=function(t){n.filter(".".concat(t)).on("click.bindNavigationHandlers",(function(){return r[t](),!1}))};for(var o in r)i(o);var a=this.$(".BRnavCntlBtm"),s=this.$(".BRnavCntlTop");this.$(".BRnavCntl").click((function(){var t=[];a.hasClass("BRdn")?(e.refs.$BRtoolbar&&t.push(e.refs.$BRtoolbar.animate({top:-1*e.getToolBarHeight()}).promise()),t.push(e.$(".BRfooter").animate({bottom:-1*e.getFooterHeight()}).promise()),a.addClass("BRup").removeClass("BRdn"),s.addClass("BRdn").removeClass("BRup"),e.$(".BRnavCntlBtm.BRnavCntl").animate({height:"45px"}),e.$(".BRnavCntl").delay(1e3).animate({opacity:.75},1e3)):(e.refs.$BRtoolbar&&t.push(e.refs.$BRtoolbar.animate({top:0}).promise()),t.push(e.$(".BRfooter").animate({bottom:0}).promise()),a.addClass("BRdn").removeClass("BRup"),s.addClass("BRup").removeClass("BRdn"),e.$(".BRnavCntlBtm.BRnavCntl").animate({height:"30px"}),e.$(".BRvavCntl").animate({opacity:1})),Xe.when.apply(Xe,t).done((function(){e.mode==e.constMode2up&&null!=e.twoPage.autofit&&"none"!=e.twoPage.autofit||e.mode==e.constMode1up&&null!=e.onePage.autofit&&"none"!=e.onePage.autofit?e.resize():e.resizeBRcontainer()}))})),a.on("mouseover",(function(){Xe(this).hasClass("BRup")&&e.$(".BRnavCntl").animate({opacity:1},250)})).on("mouseleave",(function(){Xe(this).hasClass("BRup")&&e.$(".BRnavCntl").animate({opacity:.75},250)})),s.on("mouseover",(function(){Xe(this).hasClass("BRdn")&&e.$(".BRnavCntl").animate({opacity:1},250)})).on("mouseleave",(function(){Xe(this).hasClass("BRdn")&&e.$(".BRnavCntl").animate({opacity:.75},250)}))},tn.prototype.getPageURI=C.prototype.getPageURI,en(C,"book","getPageURI"),tn.prototype.updateFromParams=function(t){var e=t.mode,n=void 0===e?0:e,r=t.init,i=void 0!==r&&r,o=t.fragmentChange,a=void 0!==o&&o;n&&this.switchMode(n,{init:i,suppressFragmentChange:!a}),void 0!==t.index?t.index!=this.currentIndex()&&this.jumpToIndex(t.index):void 0!==t.page&&t.page!=this.book.getPageNum(this.currentIndex())&&this.jumpToPage(t.page),this.enableSearch&&void 0!==t.search&&this.searchTerm!==t.search&&this.$(".BRsearchInput").val(t.search),this.enableThemesPlugin&&void 0!==t.theme&&this.updateTheme(t.theme)},tn.prototype.canSwitchToMode=function(t){return t!=this.constMode2up&&t!=this.constModeThumb||!(this.book.getNumLeafs()<2)},tn.prototype._getPageURI=function(t,e,n){var r=this.book.getPage(t,!1);return r?(void 0===e&&(e=r.height/this.twoPage.height),r.getURI(e,n)):this.imagesBaseURL+"transparent.png"},tn.prototype.showProgressPopup=function(t,e){var n=this;if(!this.popup){if(this.popup=document.createElement("div"),Xe(this.popup).prop("className","BRprogresspopup"),"function"==typeof e){var r=document.createElement("button");r.setAttribute("title","close"),r.setAttribute("class","close-popup");var i=document.createElement("span");i.setAttribute("class","icon icon-close-dark"),Xe(r).append(i),r.addEventListener("click",(function(){e(),n.removeProgressPopup()})),Xe(this.popup).append(r)}var o=document.createElement("div");if(Xe(o).css({height:"20px"}).prop("className","BRprogressbar"),Xe(this.popup).append(o),t){var a=document.createElement("div");a.innerHTML=t,Xe(this.popup).append(a)}Xe(this.popup).appendTo(this.refs.$br)}},tn.prototype.removeProgressPopup=function(){Xe(this.popup).remove(),this.$(".BRprogresspopup").remove(),this.popup=null},tn.prototype.initUIStrings=function(){var t={".logo":"Go to Archive.org",".zoom_in":"Zoom in",".zoom_out":"Zoom out",".onepg":"One-page view",".twopg":"Two-page view",".thumb":"Thumbnail view",".print":"Print this page",".embed":"Embed BookReader",".link":"Link to this book (and page)",".bookmark":"Bookmark this page",".share":"Share this book",".info":"About this book",".full":"Toggle fullscreen",".book_left":"Flip left",".book_right":"Flip right",".play":"Play",".pause":"Pause",".BRdn":"Show/hide nav bar",".BRup":"Show/hide nav bar",".book_top":"First page",".book_bottom":"Last page",".book_leftmost":"First page",".book_rightmost":"Last page"};for(var e in"rl"==this.pageProgression&&(t[".book_leftmost"]="Last page",t[".book_rightmost"]="First page"),t)this.$(e).prop("title",t[e])},tn.prototype.reloadImages=function(){this.refs.$brContainer.find("img").each((function(t,e){if(!e.complete||0===e.naturalHeight){var n=e.src;e.src="",setTimeout((function(){e.src=n}),1e3)}}))},tn.prototype.getFooterHeight=function(){var t=this.mode==this.constMode2up?this.refs.$BRfooter:this.refs.$BRnav;if(t&&this.refs.$BRfooter){var e=t.outerHeight(),n=parseInt(this.refs.$BRfooter.css("bottom"));if(!isNaN(e)&&!isNaN(n))return e+n}return 0},tn.prototype.paramsFromCurrent=function(){var t={},e=this.currentIndex(),n=this.book.getPageNum(e);return(0===n||n)&&(t.page=n),t.index=e,t.mode=this.mode,this.isFullscreenActive&&(t.view="theater"),this.enableSearch&&(t.search=this.searchTerm),t},tn.prototype.paramsFromFragment=function(t){var n={};"#"==t.substr(0,1)&&(t=t.substr(1));var r=parseInt(/^\d+$/.exec(t));if(!isNaN(r))return n.index=r,n;for(var i=t.split("/"),o={},a=0;a<i.length;a+=2)o[i[a]]=i[a+1];return"1up"==o.mode?n.mode=this.constMode1up:"2up"==o.mode?n.mode=this.constMode2up:"thumb"==o.mode&&(n.mode=this.constModeThumb),void 0!==o.page&&(n.page=decodeURIComponent(o.page)),null!=o.search&&(n.search=e.decodeURIComponentPlus(o.search)),null!=o.theme&&(n.theme=o.theme),n},tn.prototype.fragmentFromParams=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hash",r=[];if(void 0!==t.page?r.push("page",encodeURIComponent(t.page)):void 0!==t.index&&r.push("page","n"+t.index),void 0!==t.mode)if(t.mode==this.constMode1up)r.push("mode","1up");else if(t.mode==this.constMode2up)r.push("mode","2up");else{if(t.mode!=this.constModeThumb)throw"fragmentFromParams called with unknown mode "+t.mode;r.push("mode","thumb")}return t.search&&"hash"===n&&r.push("search",e.encodeURIComponentPlus(t.search)),r.join("/")},tn.prototype.queryStringFromParams=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"hash",r=new URLSearchParams(e);t.view?r.set("view",t.view):r.delete("view"),t.search&&"history"===n&&r.set("q",t.search);var i=r.toString();return i?"?"+i:""},tn.prototype.$=function(t){return this.refs.$br.find(t)},window.BookReader=tn}(),i=r.O(i)}();
|
2
|
+
!function(){var t,e={9860:function(t,e,n){"use strict";n.d(e,{RS:function(){return h},Tm:function(){return p},_z:function(){return f}}),n(278),n(228),n(6203),n(4338),n(2826),n(752),n(6265),n(9373),n(9903),n(9749),n(6544),n(9288),n(3964),n(4254),n(1694),n(8373),n(6793),n(7629),n(7509),n(8052),n(7522),n(4284),n(3374),n(9730),n(7049),n(4043);var r=n(5311);function i(t){return i="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},i(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||a(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(){u=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),s=new R(r||[]);return o(a,"_invoke",{value:T(t,n,s)}),a}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",v="suspendedYield",g="executing",m="completed",y={};function b(){}function w(){}function x(){}var _={};f(_,s,(function(){return this}));var S=Object.getPrototypeOf,k=S&&S(S(A([])));k&&k!==n&&r.call(k,s)&&(_=k);var P=x.prototype=b.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,a,s,u){var c=d(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,s,u)}),(function(t){n("throw",t,s,u)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return a=a?a.then(i,i):i()}})}function T(e,n,r){var i=p;return function(o,a){if(i===g)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=g;var c=d(e,n,r);if("normal"===c.type){if(i=r.done?m:v,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function C(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=d(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[s];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(i(e)+" is not iterable")}return w.prototype=x,o(P,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},E(O.prototype),f(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(h(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(P),f(P,l,"Generator"),f(P,s,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=A,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;M(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:A(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function c(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==i(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===i(o)?o:String(o)),r)}var o}var f=function(){function t(e,n){var i=n.isProtected,o=n.imageCache,a=n.loadingImage;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.page=e,this.imageCache=o,this.loadingImage=a,this.$container=r("<div />",{class:"BRpagecontainer ".concat(e?"pagediv".concat(e.index):"BRemptypage"),css:{position:"absolute"}}).attr("data-side",null==e?void 0:e.pageSide),i&&(this.$container.append(r('<div class="BRscreen" />')),this.$container.addClass("protected")),this.$img=null}var e,n;return e=t,n=[{key:"update",value:function(t){var e,n,i=t.dimensions,o=void 0===i?null:i,a=t.reduce,s=void 0===a?null:a;if(o&&this.$container.css(o),null!=s&&this.page){var l=this.imageCache.imageLoaded(this.page.index,s),f=!l&&this.imageCache.getBestLoadedReduce(this.page.index,s),h=this.imageCache.image(this.page.index,s);if((null===(e=this.$img)||void 0===e?void 0:e[0].src)==h[0].src)return this;null===(n=this.$img)||void 0===n||n.remove(),this.$img=h.prependTo(this.$container);var d=[];return l||(this.$container.addClass("BRpageloading"),d.push('url("'.concat(this.loadingImage,'") center/20px no-repeat'))),f&&d.push('url("'.concat(this.page.getURI(f,0),'") center/100% 100% no-repeat')),l||this.$img.css("background",d.join(",")).one("loadend",function(){var t,e=(t=u().mark((function t(e){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r(e.target).css({background:""}),r(e.target).parent().removeClass("BRpageloading");case 2:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){c(o,r,i,a,s,"next",t)}function s(t){c(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()),this}}}],n&&l(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function h(t,e){var n=document.createElement("div");return n.style.width="".concat(t.width,"px"),n.style.height="".concat(t.height,"px"),n.setAttribute("class","BRPageLayer ".concat(e)),n}function d(t){var e=t.l,n=t.r,r=t.b,i=t.t,o=document.createElementNS("http://www.w3.org/2000/svg","rect");return o.setAttribute("x",e.toString()),o.setAttribute("y",i.toString()),o.setAttribute("width",(n-e).toString()),o.setAttribute("height",(r-i).toString()),o.setAttribute("rx","4"),o.setAttribute("ry","4"),o}function p(t,e,n,i){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,u=i.querySelector(".".concat(t)),c=u||function(t,e){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");return n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("viewBox","0 0 ".concat(t.width," ").concat(t.height)),n.setAttribute("class","BRPageLayer ".concat(e)),n.setAttribute("preserveAspectRatio","none"),n}(n,t);if(!u){var l=i.querySelector(".BRpageimage");l?r(c).insertAfter(l):r(c).prependTo(i)}var f,h=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=a(t))){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}(e.entries());try{for(h.s();!(f=h.n()).done;){var p=o(f.value,2),v=p[0],g=d(p[1]);s&&g.setAttribute("class",s[v]),c.appendChild(g)}}catch(t){h.e(t)}finally{h.f()}}},5685:function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(){i=function(){return e};var t,e={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var i=e&&e.prototype instanceof b?e:b,o=Object.create(i.prototype),s=new R(r||[]);return a(o,"_invoke",{value:T(t,n,s)}),o}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",v="suspendedYield",g="executing",m="completed",y={};function b(){}function w(){}function x(){}var _={};f(_,u,(function(){return this}));var S=Object.getPrototypeOf,k=S&&S(S(A([])));k&&k!==n&&o.call(k,u)&&(_=k);var P=x.prototype=b.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,a,s,u){var c=d(t[i],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,s,u)}),(function(t){n("throw",t,s,u)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,n,r){var i=p;return function(o,a){if(i===g)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=g;var c=d(e,n,r);if("normal"===c.type){if(i=r.done?m:v,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function C(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=d(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i<e.length;)if(o.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(r(e)+" is not iterable")}return w.prototype=x,a(P,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},E(O.prototype),f(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(h(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(P),f(P,l,"Generator"),f(P,u,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=A,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;M(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:A(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function o(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var a=t.apply(e,n);function s(t){o(a,r,i,s,u,"next",t)}function u(t){o(a,r,i,s,u,"throw",t)}s(void 0)}))}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t){t.bind("mousedown",(function(){return!1})),t[0].onselectstart=function(){return!1}}function c(t,e,n){return Math.min(Math.max(t,e),n)}function l(t,e){return t/e*100+"%"}function f(t,e){return!e.includes(t)}function h(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t.activeElement;return e&&null!=n&&n.shadowRoot?h(n.shadowRoot,!0):n}function d(){var t=h(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document);return"INPUT"==(null==t?void 0:t.tagName)||"TEXTAREA"==(null==t?void 0:t.tagName)}function p(t){var e=t.contentWindow||t.contentDocument;return e.document||e}function v(t){return t.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<").replace(/"/g,""")}function g(t){return decodeURIComponent(t).replace(/\+/g," ")}function m(t){return encodeURIComponent(t).replace(/%20/g,"+")}function y(t,e,n){var r;return function(){var i=this,o=arguments,a=n&&!r;clearTimeout(r),r=setTimeout((function(){r=null,n||t.apply(i,o)}),e),a&&t.apply(i,o)}}function b(t,e,n){var r,i;return e||(e=250),n&&(r=+new Date),function(){var n=this,o=+new Date,a=arguments;r&&o<r+e?(clearTimeout(i),i=setTimeout((function(){r=o,t.apply(n,a)}),e)):(r=o,t.apply(n,a))}}function w(t){if("function"==typeof t.CustomEvent)return!1;t.CustomEvent=x}function x(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.bubbles,r=void 0!==n&&n,i=e.cancelable,o=void 0!==i&&i,a=e.detail,s=void 0===a?null:a,u=document.createEvent("CustomEvent");return u.initCustomEvent(t,r,o,s),u}function _(){var t=document.createElement("div");t.style.width="1in",document.body.appendChild(t);var e=t.offsetWidth;document.body.removeChild(t);var n=1.25*e;return 0==n?100:n}function S(t){return t.reduce((function(t,e){return t+e}),0)}function k(t){var e,n=[],r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;n.push(i)}}catch(t){r.e(t)}finally{r.f()}return n}function P(t,e){return t.length==e.length&&t.every((function(t,n){return t==e[n]}))}function E(t,e){return t&&e&&!P(t,e)}function O(t){return T.apply(this,arguments)}function T(){return(T=a(i().mark((function t(e){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){return setTimeout(t,e)})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function C(t){return j.apply(this,arguments)}function j(){return j=a(i().mark((function t(e){var n,r,o,a,s,u,c,l,f,h,d,p=arguments;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=(n=p.length>1&&void 0!==p[1]?p[1]:{}).step,o=void 0===r?50:r,a=n.timeout,s=void 0===a?500:a,u=n.until,c=void 0===u?function(t){return Boolean(t)}:u,l=n._sleep,f=void 0===l?O:l,h=Date.now();case 2:if(!(Date.now()-h<s)){t.next=10;break}if(d=e(),!c(d)){t.next=6;break}return t.abrupt("return",d);case 6:return t.next=8,f(o);case 8:t.next=2;break;case 10:case"end":return t.stop()}}),t)}))),j.apply(this,arguments)}function M(t,e){return new Promise((function(n){t.addEventListener(e,(function r(i){t.removeEventListener(e,r),n(i)}))}))}function R(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}n.r(e),n.d(e,{PolyfilledCustomEvent:function(){return x},arrChanged:function(){return E},arrEquals:function(){return P},calcScreenDPI:function(){return _},clamp:function(){return c},cssPercentage:function(){return l},debounce:function(){return y},decodeURIComponentPlus:function(){return g},disableSelect:function(){return u},encodeURIComponentPlus:function(){return m},escapeHTML:function(){return v},escapeRegExp:function(){return R},genToArray:function(){return k},getActiveElement:function(){return h},getIFrameDocument:function(){return p},isInputActive:function(){return d},notInArray:function(){return f},poll:function(){return C},polyfillCustomEvent:function(){return w},promisifyEvent:function(){return M},sleep:function(){return O},sum:function(){return S},throttle:function(){return b}}),n(6801),n(3843),n(4043),n(7267),n(278),n(228),n(3964),n(9730),n(2826),n(4284),n(7049),n(1694),n(9749),n(6544),n(4254),n(752),n(6265),n(8373),n(6793),n(7629),n(7509),n(8052),n(7522),n(3374)},7775:function(t,e,n){"use strict";function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:navigator.vendor;return/chrome/i.test(t)&&/google inc/i.test(e)}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/firefox/i.test(t)}function o(){return"ongesturestart"in window&&navigator.maxTouchPoints>0}function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/SamsungBrowser/i.test(t)}n.d(e,{Tv:function(){return a},gn:function(){return o},i7:function(){return r},vU:function(){return i}}),n(4043)},8496:function(t){t.exports=function(){var t={};Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(t){return!(!t||!t.Window)&&t instanceof t.Window};var e={};Object.defineProperty(e,"__esModule",{value:!0}),e.getWindow=function(e){return(0,t.default)(e)?e:(e.ownerDocument||e).defaultView||r.window},e.init=i,e.window=e.realWindow=void 0;var n=void 0;e.realWindow=n;var r=void 0;function i(t){e.realWindow=n=t;var i=t.document.createTextNode("");i.ownerDocument!==t.document&&"function"==typeof t.wrap&&t.wrap(i)===i&&(t=t.wrap(t)),e.window=r=t}e.window=r,"undefined"!=typeof window&&window&&i(window);var o={};function a(t){return a="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},a(t)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var s=function(t){return!!t&&"object"===a(t)},u=function(t){return"function"==typeof t},c={window:function(n){return n===e.window||(0,t.default)(n)},docFrag:function(t){return s(t)&&11===t.nodeType},object:s,func:u,number:function(t){return"number"==typeof t},bool:function(t){return"boolean"==typeof t},string:function(t){return"string"==typeof t},element:function(t){if(!t||"object"!==a(t))return!1;var n=e.getWindow(t)||e.window;return/object|function/.test("undefined"==typeof Element?"undefined":a(Element))?t instanceof Element||t instanceof n.Element:1===t.nodeType&&"string"==typeof t.nodeName},plainObject:function(t){return s(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return s(t)&&void 0!==t.length&&u(t.splice)}};o.default=c;var l={};function f(t){var e=t.interaction;if("drag"===e.prepared.name){var n=e.prepared.axis;"x"===n?(e.coords.cur.page.y=e.coords.start.page.y,e.coords.cur.client.y=e.coords.start.client.y,e.coords.velocity.client.y=0,e.coords.velocity.page.y=0):"y"===n&&(e.coords.cur.page.x=e.coords.start.page.x,e.coords.cur.client.x=e.coords.start.client.x,e.coords.velocity.client.x=0,e.coords.velocity.page.x=0)}}function h(t){var e=t.iEvent,n=t.interaction;if("drag"===n.prepared.name){var r=n.prepared.axis;if("x"===r||"y"===r){var i="x"===r?"y":"x";e.page[i]=n.coords.start.page[i],e.client[i]=n.coords.start.client[i],e.delta[i]=0}}}Object.defineProperty(l,"__esModule",{value:!0}),l.default=void 0;var d={id:"actions/drag",install:function(t){var e=t.actions,n=t.Interactable,r=t.defaults;n.prototype.draggable=d.draggable,e.map.drag=d,e.methodDict.drag="draggable",r.actions.drag=d.defaults},listeners:{"interactions:before-action-move":f,"interactions:action-resume":f,"interactions:action-move":h,"auto-start:check":function(t){var e=t.interaction,n=t.interactable,r=t.buttons,i=n.options.drag;if(i&&i.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||0!=(r&n.options.drag.mouseButtons)))return t.action={name:"drag",axis:"start"===i.lockAxis?i.startAxis:i.lockAxis},!1}},draggable:function(t){return o.default.object(t)?(this.options.drag.enabled=!1!==t.enabled,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):o.default.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:f,move:h,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"}},p=d;l.default=p;var v={};Object.defineProperty(v,"__esModule",{value:!0}),v.default=void 0;var g={init:function(t){var e=t;g.document=e.document,g.DocumentFragment=e.DocumentFragment||m,g.SVGElement=e.SVGElement||m,g.SVGSVGElement=e.SVGSVGElement||m,g.SVGElementInstance=e.SVGElementInstance||m,g.Element=e.Element||m,g.HTMLElement=e.HTMLElement||g.Element,g.Event=e.Event,g.Touch=e.Touch||m,g.PointerEvent=e.PointerEvent||e.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function m(){}var y=g;v.default=y;var b={};Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var w={init:function(t){var e=v.default.Element,n=t.navigator||{};w.supportsTouch="ontouchstart"in t||o.default.func(t.DocumentTouch)&&v.default.document instanceof t.DocumentTouch,w.supportsPointerEvent=!1!==n.pointerEnabled&&!!v.default.PointerEvent,w.isIOS=/iP(hone|od|ad)/.test(n.platform),w.isIOS7=/iP(hone|od|ad)/.test(n.platform)&&/OS 7[^\d]/.test(n.appVersion),w.isIe9=/MSIE 9/.test(n.userAgent),w.isOperaMobile="Opera"===n.appName&&w.supportsTouch&&/Presto/.test(n.userAgent),w.prefixedMatchesSelector="matches"in e.prototype?"matches":"webkitMatchesSelector"in e.prototype?"webkitMatchesSelector":"mozMatchesSelector"in e.prototype?"mozMatchesSelector":"oMatchesSelector"in e.prototype?"oMatchesSelector":"msMatchesSelector",w.pEventTypes=w.supportsPointerEvent?v.default.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,w.wheelEvent=v.default.document&&"onmousewheel"in v.default.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},x=w;b.default=x;var _={};function S(t){var e=t.parentNode;if(o.default.docFrag(e)){for(;(e=e.host)&&o.default.docFrag(e););return e}return e}function k(t,n){return e.window!==e.realWindow&&(n=n.replace(/\/deep\//g," ")),t[b.default.prefixedMatchesSelector](n)}Object.defineProperty(_,"__esModule",{value:!0}),_.closest=function(t,e){for(;o.default.element(t);){if(k(t,e))return t;t=S(t)}return null},_.getActualElement=function(t){return t.correspondingUseElement||t},_.getElementClientRect=T,_.getElementRect=function(t){var n=T(t);if(!b.default.isIOS7&&n){var r=O(e.getWindow(t));n.left+=r.x,n.right+=r.x,n.top+=r.y,n.bottom+=r.y}return n},_.getPath=function(t){for(var e=[];t;)e.push(t),t=S(t);return e},_.getScrollXY=O,_.indexOfDeepestElement=function(t){for(var n,r=[],i=0;i<t.length;i++){var o=t[i],a=t[n];if(o&&i!==n)if(a){var s=P(o),u=P(a);if(s!==o.ownerDocument)if(u!==o.ownerDocument)if(s!==u){r=r.length?r:E(a);var c=void 0;if(a instanceof v.default.HTMLElement&&o instanceof v.default.SVGElement&&!(o instanceof v.default.SVGSVGElement)){if(o===u)continue;c=o.ownerSVGElement}else c=o;for(var l=E(c,a.ownerDocument),f=0;l[f]&&l[f]===r[f];)f++;var h=[l[f-1],l[f],r[f]];if(h[0])for(var d=h[0].lastChild;d;){if(d===h[1]){n=i,r=l;break}if(d===h[2])break;d=d.previousSibling}}else p=o,g=a,(parseInt(e.getWindow(p).getComputedStyle(p).zIndex,10)||0)>=(parseInt(e.getWindow(g).getComputedStyle(g).zIndex,10)||0)&&(n=i);else n=i}else n=i}var p,g;return n},_.matchesSelector=k,_.matchesUpTo=function(t,e,n){for(;o.default.element(t);){if(k(t,e))return!0;if((t=S(t))===n)return k(t,e)}return!1},_.nodeContains=function(t,e){if(t.contains)return t.contains(e);for(;e;){if(e===t)return!0;e=e.parentNode}return!1},_.parentNode=S,_.trySelector=function(t){return!!o.default.string(t)&&(v.default.document.querySelector(t),!0)};var P=function(t){return t.parentNode||t.host};function E(t,e){for(var n,r=[],i=t;(n=P(i))&&i!==e&&n!==i.ownerDocument;)r.unshift(i),i=n;return r}function O(t){return{x:(t=t||e.window).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop}}function T(t){var e=t instanceof v.default.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return e&&{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top}}var C={};Object.defineProperty(C,"__esModule",{value:!0}),C.default=function(t,e){for(var n in e)t[n]=e[n];return t};var j={};function M(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function R(t,e,n){return"parent"===t?(0,_.parentNode)(n):"self"===t?e.getRect(n):(0,_.closest)(n,t)}Object.defineProperty(j,"__esModule",{value:!0}),j.addEdges=function(t,e,n){t.left&&(e.left+=n.x),t.right&&(e.right+=n.x),t.top&&(e.top+=n.y),t.bottom&&(e.bottom+=n.y),e.width=e.right-e.left,e.height=e.bottom-e.top},j.getStringOptionResult=R,j.rectToXY=function(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}},j.resolveRectLike=function(t,e,n,r){var i,a=t;return o.default.string(a)?a=R(a,e,n):o.default.func(a)&&(a=a.apply(void 0,function(t){if(Array.isArray(t))return M(t)}(i=r)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(i)||function(t,e){if(t){if("string"==typeof t)return M(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(t,e):void 0}}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),o.default.element(a)&&(a=(0,_.getElementRect)(a)),a},j.tlbrToXywh=function(t){return!t||"x"in t&&"y"in t||((t=(0,C.default)({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t},j.xywhToTlbr=function(t){return!t||"left"in t&&"top"in t||((t=(0,C.default)({},t)).left=t.x||0,t.top=t.y||0,t.right=t.right||t.left+t.width,t.bottom=t.bottom||t.top+t.height),t};var A={};Object.defineProperty(A,"__esModule",{value:!0}),A.default=function(t,e,n){var r=t.options[n],i=r&&r.origin||t.options.origin,o=(0,j.resolveRectLike)(i,t,e,[t&&e]);return(0,j.rectToXY)(o)||{x:0,y:0}};var I={};function L(t){return t.trim().split(/ +/)}Object.defineProperty(I,"__esModule",{value:!0}),I.default=function t(e,n,r){if(r=r||{},o.default.string(e)&&-1!==e.search(" ")&&(e=L(e)),o.default.array(e))return e.reduce((function(e,i){return(0,C.default)(e,t(i,n,r))}),r);if(o.default.object(e)&&(n=e,e=""),o.default.func(n))r[e]=r[e]||[],r[e].push(n);else if(o.default.array(n))for(var i=0;i<n.length;i++){var a;a=n[i],t(e,a,r)}else if(o.default.object(n))for(var s in n){var u=L(s).map((function(t){return"".concat(e).concat(t)}));t(u,n[s],r)}return r};var D={};Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0,D.default=function(t,e){return Math.sqrt(t*t+e*e)};var $={};Object.defineProperty($,"__esModule",{value:!0}),$.default=function(t,e){t.__set||(t.__set={});var n=function(n){"function"!=typeof t[n]&&"__set"!==n&&Object.defineProperty(t,n,{get:function(){return n in t.__set?t.__set[n]:t.__set[n]=e[n]},set:function(e){t.__set[n]=e},configurable:!0})};for(var r in e)n(r);return t};var N={};function F(t){return t instanceof v.default.Event||t instanceof v.default.Touch}function B(t,e,n){return t=t||"page",(n=n||{}).x=e[t+"X"],n.y=e[t+"Y"],n}function U(t,e){return e=e||{x:0,y:0},b.default.isOperaMobile&&F(t)?(B("screen",t,e),e.x+=window.scrollX,e.y+=window.scrollY):B("page",t,e),e}function z(t,e){return e=e||{},b.default.isOperaMobile&&F(t)?B("screen",t,e):B("client",t,e),e}function W(t){var e=[];return o.default.array(t)?(e[0]=t[0],e[1]=t[1]):"touchend"===t.type?1===t.touches.length?(e[0]=t.touches[0],e[1]=t.changedTouches[0]):0===t.touches.length&&(e[0]=t.changedTouches[0],e[1]=t.changedTouches[1]):(e[0]=t.touches[0],e[1]=t.touches[1]),e}function H(t){for(var e={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},n=0;n<t.length;n++){var r=t[n];for(var i in e)e[i]+=r[i]}for(var o in e)e[o]/=t.length;return e}Object.defineProperty(N,"__esModule",{value:!0}),N.coordsToEvent=function(t){return{coords:t,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}},N.copyCoords=function(t,e){t.page=t.page||{},t.page.x=e.page.x,t.page.y=e.page.y,t.client=t.client||{},t.client.x=e.client.x,t.client.y=e.client.y,t.timeStamp=e.timeStamp},N.getClientXY=z,N.getEventTargets=function(t){var e=o.default.func(t.composedPath)?t.composedPath():t.path;return[_.getActualElement(e?e[0]:t.target),_.getActualElement(t.currentTarget)]},N.getPageXY=U,N.getPointerId=function(t){return o.default.number(t.pointerId)?t.pointerId:t.identifier},N.getPointerType=function(t){return o.default.string(t.pointerType)?t.pointerType:o.default.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof v.default.Touch?"touch":"mouse"},N.getTouchPair=W,N.getXY=B,N.isNativePointer=F,N.newCoords=function(){return{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},N.pointerAverage=H,Object.defineProperty(N,"pointerExtend",{enumerable:!0,get:function(){return $.default}}),N.setCoordDeltas=function(t,e,n){t.page.x=n.page.x-e.page.x,t.page.y=n.page.y-e.page.y,t.client.x=n.client.x-e.client.x,t.client.y=n.client.y-e.client.y,t.timeStamp=n.timeStamp-e.timeStamp},N.setCoordVelocity=function(t,e){var n=Math.max(e.timeStamp/1e3,.001);t.page.x=e.page.x/n,t.page.y=e.page.y/n,t.client.x=e.client.x/n,t.client.y=e.client.y/n,t.timeStamp=n},N.setCoords=function(t,e,n){var r=e.length>1?H(e):e[0];U(r,t.page),z(r,t.client),t.timeStamp=n},N.setZeroCoords=function(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0},N.touchAngle=function(t,e){var n=e+"X",r=e+"Y",i=W(t),o=i[1][n]-i[0][n],a=i[1][r]-i[0][r];return 180*Math.atan2(a,o)/Math.PI},N.touchBBox=function(t){if(!t.length)return null;var e=W(t),n=Math.min(e[0].pageX,e[1].pageX),r=Math.min(e[0].pageY,e[1].pageY),i=Math.max(e[0].pageX,e[1].pageX),o=Math.max(e[0].pageY,e[1].pageY);return{x:n,y:r,left:n,top:r,right:i,bottom:o,width:i-n,height:o-r}},N.touchDistance=function(t,e){var n=e+"X",r=e+"Y",i=W(t),o=i[0][n]-i[1][n],a=i[0][r]-i[1][r];return(0,D.default)(o,a)};var V={};function G(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(V,"__esModule",{value:!0}),V.BaseEvent=void 0;var Y=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),G(this,"immediatePropagationStopped",!1),G(this,"propagationStopped",!1),this._interaction=e}var e,n;return e=t,(n=[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();V.BaseEvent=Y,Object.defineProperty(Y.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var X={};Object.defineProperty(X,"__esModule",{value:!0}),X.remove=X.merge=X.from=X.findIndex=X.find=X.contains=void 0,X.contains=function(t,e){return-1!==t.indexOf(e)},X.remove=function(t,e){return t.splice(t.indexOf(e),1)};var q=function(t,e){for(var n=0;n<e.length;n++){var r=e[n];t.push(r)}return t};X.merge=q,X.from=function(t){return q([],t)};var K=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return n;return-1};X.findIndex=K,X.find=function(t,e){return t[K(t,e)]};var Z={};function J(t){return J="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},J(t)}function Q(t,e){return Q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Q(t,e)}function tt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function et(t){return et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},et(t)}function nt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(Z,"__esModule",{value:!0}),Z.DropEvent=void 0;var rt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Q(t,e)}(a,t);var e,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=et(r);if(i){var n=et(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===J(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return tt(t)}(this,t)});function a(t,e,n){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),nt(tt(r=o.call(this,e._interaction)),"dropzone",void 0),nt(tt(r),"dragEvent",void 0),nt(tt(r),"relatedTarget",void 0),nt(tt(r),"draggable",void 0),nt(tt(r),"propagationStopped",!1),nt(tt(r),"immediatePropagationStopped",!1);var i="dragleave"===n?t.prev:t.cur,s=i.element,u=i.dropzone;return r.type=n,r.target=s,r.currentTarget=s,r.dropzone=u,r.dragEvent=e,r.relatedTarget=e.target,r.draggable=e.interactable,r.timeStamp=e.timeStamp,r}return e=a,(n=[{key:"reject",value:function(){var t=this,e=this._interaction.dropState;if("dropactivate"===this.type||this.dropzone&&e.cur.dropzone===this.dropzone&&e.cur.element===this.target)if(e.prev.dropzone=this.dropzone,e.prev.element=this.target,e.rejected=!0,e.events.enter=null,this.stopImmediatePropagation(),"dropactivate"===this.type){var n=e.activeDrops,r=X.findIndex(n,(function(e){var n=e.dropzone,r=e.element;return n===t.dropzone&&r===t.target}));e.activeDrops.splice(r,1);var i=new a(e,this.dragEvent,"dropdeactivate");i.dropzone=this.dropzone,i.target=this.target,this.dropzone.fire(i)}else this.dropzone.fire(new a(e,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(V.BaseEvent);Z.DropEvent=rt;var it={};function ot(t,e){for(var n=0;n<t.slice().length;n++){var r=t.slice()[n],i=r.dropzone,o=r.element;e.dropzone=i,e.target=o,i.fire(e),e.propagationStopped=e.immediatePropagationStopped=!1}}function at(t,e){for(var n=function(t,e){for(var n=t.interactables,r=[],i=0;i<n.list.length;i++){var a=n.list[i];if(a.options.drop.enabled){var s=a.options.drop.accept;if(!(o.default.element(s)&&s!==e||o.default.string(s)&&!_.matchesSelector(e,s)||o.default.func(s)&&!s({dropzone:a,draggableElement:e})))for(var u=o.default.string(a.target)?a._context.querySelectorAll(a.target):o.default.array(a.target)?a.target:[a.target],c=0;c<u.length;c++){var l=u[c];l!==e&&r.push({dropzone:a,element:l,rect:a.getRect(l)})}}}return r}(t,e),r=0;r<n.length;r++){var i=n[r];i.rect=i.dropzone.getRect(i.element)}return n}function st(t,e,n){for(var r=t.dropState,i=t.interactable,o=t.element,a=[],s=0;s<r.activeDrops.length;s++){var u=r.activeDrops[s],c=u.dropzone,l=u.element,f=u.rect;a.push(c.dropCheck(e,n,i,o,l,f)?l:null)}var h=_.indexOfDeepestElement(a);return r.activeDrops[h]||null}function ut(t,e,n){var r=t.dropState,i={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return"dragstart"===n.type&&(i.activate=new Z.DropEvent(r,n,"dropactivate"),i.activate.target=null,i.activate.dropzone=null),"dragend"===n.type&&(i.deactivate=new Z.DropEvent(r,n,"dropdeactivate"),i.deactivate.target=null,i.deactivate.dropzone=null),r.rejected||(r.cur.element!==r.prev.element&&(r.prev.dropzone&&(i.leave=new Z.DropEvent(r,n,"dragleave"),n.dragLeave=i.leave.target=r.prev.element,n.prevDropzone=i.leave.dropzone=r.prev.dropzone),r.cur.dropzone&&(i.enter=new Z.DropEvent(r,n,"dragenter"),n.dragEnter=r.cur.element,n.dropzone=r.cur.dropzone)),"dragend"===n.type&&r.cur.dropzone&&(i.drop=new Z.DropEvent(r,n,"drop"),n.dropzone=r.cur.dropzone,n.relatedTarget=r.cur.element),"dragmove"===n.type&&r.cur.dropzone&&(i.move=new Z.DropEvent(r,n,"dropmove"),i.move.dragmove=n,n.dropzone=r.cur.dropzone)),i}function ct(t,e){var n=t.dropState,r=n.activeDrops,i=n.cur,o=n.prev;e.leave&&o.dropzone.fire(e.leave),e.enter&&i.dropzone.fire(e.enter),e.move&&i.dropzone.fire(e.move),e.drop&&i.dropzone.fire(e.drop),e.deactivate&&ot(r,e.deactivate),n.prev.dropzone=i.dropzone,n.prev.element=i.element}function lt(t,e){var n=t.interaction,r=t.iEvent,i=t.event;if("dragmove"===r.type||"dragend"===r.type){var o=n.dropState;e.dynamicDrop&&(o.activeDrops=at(e,n.element));var a=r,s=st(n,a,i);o.rejected=o.rejected&&!!s&&s.dropzone===o.cur.dropzone&&s.element===o.cur.element,o.cur.dropzone=s&&s.dropzone,o.cur.element=s&&s.element,o.events=ut(n,0,a)}}Object.defineProperty(it,"__esModule",{value:!0}),it.default=void 0;var ft={id:"actions/drop",install:function(t){var e=t.actions,n=t.interactStatic,r=t.Interactable,i=t.defaults;t.usePlugin(l.default),r.prototype.dropzone=function(t){return function(t,e){if(o.default.object(e)){if(t.options.drop.enabled=!1!==e.enabled,e.listeners){var n=(0,I.default)(e.listeners),r=Object.keys(n).reduce((function(t,e){return t[/^(enter|leave)/.test(e)?"drag".concat(e):/^(activate|deactivate|move)/.test(e)?"drop".concat(e):e]=n[e],t}),{});t.off(t.options.drop.listeners),t.on(r),t.options.drop.listeners=r}return o.default.func(e.ondrop)&&t.on("drop",e.ondrop),o.default.func(e.ondropactivate)&&t.on("dropactivate",e.ondropactivate),o.default.func(e.ondropdeactivate)&&t.on("dropdeactivate",e.ondropdeactivate),o.default.func(e.ondragenter)&&t.on("dragenter",e.ondragenter),o.default.func(e.ondragleave)&&t.on("dragleave",e.ondragleave),o.default.func(e.ondropmove)&&t.on("dropmove",e.ondropmove),/^(pointer|center)$/.test(e.overlap)?t.options.drop.overlap=e.overlap:o.default.number(e.overlap)&&(t.options.drop.overlap=Math.max(Math.min(1,e.overlap),0)),"accept"in e&&(t.options.drop.accept=e.accept),"checker"in e&&(t.options.drop.checker=e.checker),t}return o.default.bool(e)?(t.options.drop.enabled=e,t):t.options.drop}(this,t)},r.prototype.dropCheck=function(t,e,n,r,i,a){return function(t,e,n,r,i,a,s){var u=!1;if(!(s=s||t.getRect(a)))return!!t.options.drop.checker&&t.options.drop.checker(e,n,u,t,a,r,i);var c=t.options.drop.overlap;if("pointer"===c){var l=(0,A.default)(r,i,"drag"),f=N.getPageXY(e);f.x+=l.x,f.y+=l.y;var h=f.x>s.left&&f.x<s.right,d=f.y>s.top&&f.y<s.bottom;u=h&&d}var p=r.getRect(i);if(p&&"center"===c){var v=p.left+p.width/2,g=p.top+p.height/2;u=v>=s.left&&v<=s.right&&g>=s.top&&g<=s.bottom}return p&&o.default.number(c)&&(u=Math.max(0,Math.min(s.right,p.right)-Math.max(s.left,p.left))*Math.max(0,Math.min(s.bottom,p.bottom)-Math.max(s.top,p.top))/(p.width*p.height)>=c),t.options.drop.checker&&(u=t.options.drop.checker(e,n,u,t,a,r,i)),u}(this,t,e,n,r,i,a)},n.dynamicDrop=function(e){return o.default.bool(e)?(t.dynamicDrop=e,n):t.dynamicDrop},(0,C.default)(e.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),e.methodDict.drop="dropzone",t.dynamicDrop=!1,i.actions.drop=ft.defaults},listeners:{"interactions:before-action-start":function(t){var e=t.interaction;"drag"===e.prepared.name&&(e.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,e){var n=t.interaction,r=(t.event,t.iEvent);if("drag"===n.prepared.name){var i=n.dropState;i.activeDrops=null,i.events=null,i.activeDrops=at(e,n.element),i.events=ut(n,0,r),i.events.activate&&(ot(i.activeDrops,i.events.activate),e.fire("actions/drop:start",{interaction:n,dragEvent:r}))}},"interactions:action-move":lt,"interactions:after-action-move":function(t,e){var n=t.interaction,r=t.iEvent;"drag"===n.prepared.name&&(ct(n,n.dropState.events),e.fire("actions/drop:move",{interaction:n,dragEvent:r}),n.dropState.events={})},"interactions:action-end":function(t,e){if("drag"===t.interaction.prepared.name){var n=t.interaction,r=t.iEvent;lt(t,e),ct(n,n.dropState.events),e.fire("actions/drop:end",{interaction:n,dragEvent:r})}},"interactions:stop":function(t){var e=t.interaction;if("drag"===e.prepared.name){var n=e.dropState;n&&(n.activeDrops=null,n.events=null,n.cur.dropzone=null,n.cur.element=null,n.prev.dropzone=null,n.prev.element=null,n.rejected=!1)}}},getActiveDrops:at,getDrop:st,getDropEvents:ut,fireDropEvents:ct,defaults:{enabled:!1,accept:null,overlap:"pointer"}},ht=ft;it.default=ht;var dt={};function pt(t){var e=t.interaction,n=t.iEvent,r=t.phase;if("gesture"===e.prepared.name){var i=e.pointers.map((function(t){return t.pointer})),a="start"===r,s="end"===r,u=e.interactable.options.deltaSource;if(n.touches=[i[0],i[1]],a)n.distance=N.touchDistance(i,u),n.box=N.touchBBox(i),n.scale=1,n.ds=0,n.angle=N.touchAngle(i,u),n.da=0,e.gesture.startDistance=n.distance,e.gesture.startAngle=n.angle;else if(s){var c=e.prevEvent;n.distance=c.distance,n.box=c.box,n.scale=c.scale,n.ds=0,n.angle=c.angle,n.da=0}else n.distance=N.touchDistance(i,u),n.box=N.touchBBox(i),n.scale=n.distance/e.gesture.startDistance,n.angle=N.touchAngle(i,u),n.ds=n.scale-e.gesture.scale,n.da=n.angle-e.gesture.angle;e.gesture.distance=n.distance,e.gesture.angle=n.angle,o.default.number(n.scale)&&n.scale!==1/0&&!isNaN(n.scale)&&(e.gesture.scale=n.scale)}}Object.defineProperty(dt,"__esModule",{value:!0}),dt.default=void 0;var vt={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var e=t.actions,n=t.Interactable,r=t.defaults;n.prototype.gesturable=function(t){return o.default.object(t)?(this.options.gesture.enabled=!1!==t.enabled,this.setPerAction("gesture",t),this.setOnEvents("gesture",t),this):o.default.bool(t)?(this.options.gesture.enabled=t,this):this.options.gesture},e.map.gesture=vt,e.methodDict.gesture="gesturable",r.actions.gesture=vt.defaults},listeners:{"interactions:action-start":pt,"interactions:action-move":pt,"interactions:action-end":pt,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var e=t.interactable.options.gesture;if(e&&e.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""}},gt=vt;dt.default=gt;var mt={};function yt(t,e,n,r,i,a,s){if(!e)return!1;if(!0===e){var u=o.default.number(a.width)?a.width:a.right-a.left,c=o.default.number(a.height)?a.height:a.bottom-a.top;if(s=Math.min(s,Math.abs(("left"===t||"right"===t?u:c)/2)),u<0&&("left"===t?t="right":"right"===t&&(t="left")),c<0&&("top"===t?t="bottom":"bottom"===t&&(t="top")),"left"===t){var l=u>=0?a.left:a.right;return n.x<l+s}if("top"===t){var f=c>=0?a.top:a.bottom;return n.y<f+s}if("right"===t)return n.x>(u>=0?a.right:a.left)-s;if("bottom"===t)return n.y>(c>=0?a.bottom:a.top)-s}return!!o.default.element(r)&&(o.default.element(e)?e===r:_.matchesUpTo(r,e,i))}function bt(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.resizeAxes){var r=e;n.interactable.options.resize.square?("y"===n.resizeAxes?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=n.resizeAxes,"x"===n.resizeAxes?r.delta.y=0:"y"===n.resizeAxes&&(r.delta.x=0))}}Object.defineProperty(mt,"__esModule",{value:!0}),mt.default=void 0;var wt={id:"actions/resize",before:["actions/drag"],install:function(t){var e=t.actions,n=t.browser,r=t.Interactable,i=t.defaults;wt.cursors=function(t){return t.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(n),wt.defaultMargin=n.supportsTouch||n.supportsPointerEvent?20:10,r.prototype.resizable=function(e){return function(t,e,n){return o.default.object(e)?(t.options.resize.enabled=!1!==e.enabled,t.setPerAction("resize",e),t.setOnEvents("resize",e),o.default.string(e.axis)&&/^x$|^y$|^xy$/.test(e.axis)?t.options.resize.axis=e.axis:null===e.axis&&(t.options.resize.axis=n.defaults.actions.resize.axis),o.default.bool(e.preserveAspectRatio)?t.options.resize.preserveAspectRatio=e.preserveAspectRatio:o.default.bool(e.square)&&(t.options.resize.square=e.square),t):o.default.bool(e)?(t.options.resize.enabled=e,t):t.options.resize}(this,e,t)},e.map.resize=wt,e.methodDict.resize="resizable",i.actions.resize=wt.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){!function(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var r=e,i=n.rect;n._rects={start:(0,C.default)({},i),corrected:(0,C.default)({},i),previous:(0,C.default)({},i),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},r.edges=n.prepared.edges,r.rect=n._rects.corrected,r.deltaRect=n._rects.delta}}(t),bt(t)},"interactions:action-move":function(t){!function(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var r=e,i=n.interactable.options.resize.invert,o="reposition"===i||"negate"===i,a=n.rect,s=n._rects,u=s.start,c=s.corrected,l=s.delta,f=s.previous;if((0,C.default)(f,c),o){if((0,C.default)(c,a),"reposition"===i){if(c.top>c.bottom){var h=c.top;c.top=c.bottom,c.bottom=h}if(c.left>c.right){var d=c.left;c.left=c.right,c.right=d}}}else c.top=Math.min(a.top,u.bottom),c.bottom=Math.max(a.bottom,u.top),c.left=Math.min(a.left,u.right),c.right=Math.max(a.right,u.left);for(var p in c.width=c.right-c.left,c.height=c.bottom-c.top,c)l[p]=c[p]-f[p];r.edges=n.prepared.edges,r.rect=c,r.deltaRect=l}}(t),bt(t)},"interactions:action-end":function(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var r=e;r.edges=n.prepared.edges,r.rect=n._rects.corrected,r.deltaRect=n._rects.delta}},"auto-start:check":function(t){var e=t.interaction,n=t.interactable,r=t.element,i=t.rect,a=t.buttons;if(i){var s=(0,C.default)({},e.coords.cur.page),u=n.options.resize;if(u&&u.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||0!=(a&u.mouseButtons))){if(o.default.object(u.edges)){var c={left:!1,right:!1,top:!1,bottom:!1};for(var l in c)c[l]=yt(l,u.edges[l],s,e._latestPointer.eventTarget,r,i,u.margin||wt.defaultMargin);c.left=c.left&&!c.right,c.top=c.top&&!c.bottom,(c.left||c.right||c.top||c.bottom)&&(t.action={name:"resize",edges:c})}else{var f="y"!==u.axis&&s.x>i.right-wt.defaultMargin,h="x"!==u.axis&&s.y>i.bottom-wt.defaultMargin;(f||h)&&(t.action={name:"resize",axes:(f?"x":"")+(h?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var e=t.edges,n=t.axis,r=t.name,i=wt.cursors,o=null;if(n)o=i[r+n];else if(e){for(var a="",s=["top","bottom","left","right"],u=0;u<s.length;u++){var c=s[u];e[c]&&(a+=c)}o=i[a]}return o},defaultMargin:null},xt=wt;mt.default=xt;var _t={};Object.defineProperty(_t,"__esModule",{value:!0}),_t.default=void 0;var St={id:"actions",install:function(t){t.usePlugin(dt.default),t.usePlugin(mt.default),t.usePlugin(l.default),t.usePlugin(it.default)}};_t.default=St;var kt={};Object.defineProperty(kt,"__esModule",{value:!0}),kt.default=void 0;var Pt,Et,Ot=0,Tt={request:function(t){return Pt(t)},cancel:function(t){return Et(t)},init:function(t){if(Pt=t.requestAnimationFrame,Et=t.cancelAnimationFrame,!Pt)for(var e=["ms","moz","webkit","o"],n=0;n<e.length;n++){var r=e[n];Pt=t["".concat(r,"RequestAnimationFrame")],Et=t["".concat(r,"CancelAnimationFrame")]||t["".concat(r,"CancelRequestAnimationFrame")]}Pt=Pt&&Pt.bind(t),Et=Et&&Et.bind(t),Pt||(Pt=function(e){var n=Date.now(),r=Math.max(0,16-(n-Ot)),i=t.setTimeout((function(){e(n+r)}),r);return Ot=n+r,i},Et=function(t){return clearTimeout(t)})}};kt.default=Tt;var Ct={};Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.default=void 0,Ct.getContainer=Mt,Ct.getScroll=Rt,Ct.getScrollSize=function(t){return o.default.window(t)&&(t=window.document.body),{x:t.scrollWidth,y:t.scrollHeight}},Ct.getScrollSizeDelta=function(t,e){var n=t.interaction,r=t.element,i=n&&n.interactable.options[n.prepared.name].autoScroll;if(!i||!i.enabled)return e(),{x:0,y:0};var o=Mt(i.container,n.interactable,r),a=Rt(o);e();var s=Rt(o);return{x:s.x-a.x,y:s.y-a.y}};var jt={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(t){jt.isScrolling=!0,kt.default.cancel(jt.i),t.autoScroll=jt,jt.interaction=t,jt.prevTime=jt.now(),jt.i=kt.default.request(jt.scroll)},stop:function(){jt.isScrolling=!1,jt.interaction&&(jt.interaction.autoScroll=null),kt.default.cancel(jt.i)},scroll:function(){var t=jt.interaction,e=t.interactable,n=t.element,r=t.prepared.name,i=e.options[r].autoScroll,a=Mt(i.container,e,n),s=jt.now(),u=(s-jt.prevTime)/1e3,c=i.speed*u;if(c>=1){var l={x:jt.x*c,y:jt.y*c};if(l.x||l.y){var f=Rt(a);o.default.window(a)?a.scrollBy(l.x,l.y):a&&(a.scrollLeft+=l.x,a.scrollTop+=l.y);var h=Rt(a),d={x:h.x-f.x,y:h.y-f.y};(d.x||d.y)&&e.fire({type:"autoscroll",target:n,interactable:e,delta:d,interaction:t,container:a})}jt.prevTime=s}jt.isScrolling&&(kt.default.cancel(jt.i),jt.i=kt.default.request(jt.scroll))},check:function(t,e){var n;return null==(n=t.options[e].autoScroll)?void 0:n.enabled},onInteractionMove:function(t){var e=t.interaction,n=t.pointer;if(e.interacting()&&jt.check(e.interactable,e.prepared.name))if(e.simulation)jt.x=jt.y=0;else{var r,i,a,s,u=e.interactable,c=e.element,l=e.prepared.name,f=u.options[l].autoScroll,h=Mt(f.container,u,c);if(o.default.window(h))s=n.clientX<jt.margin,r=n.clientY<jt.margin,i=n.clientX>h.innerWidth-jt.margin,a=n.clientY>h.innerHeight-jt.margin;else{var d=_.getElementClientRect(h);s=n.clientX<d.left+jt.margin,r=n.clientY<d.top+jt.margin,i=n.clientX>d.right-jt.margin,a=n.clientY>d.bottom-jt.margin}jt.x=i?1:s?-1:0,jt.y=a?1:r?-1:0,jt.isScrolling||(jt.margin=f.margin,jt.speed=f.speed,jt.start(e))}}};function Mt(t,n,r){return(o.default.string(t)?(0,j.getStringOptionResult)(t,n,r):t)||(0,e.getWindow)(r)}function Rt(t){return o.default.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var At={id:"auto-scroll",install:function(t){var e=t.defaults,n=t.actions;t.autoScroll=jt,jt.now=function(){return t.now()},n.phaselessTypes.autoscroll=!0,e.perAction.autoScroll=jt.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,jt.stop(),jt.interaction&&(jt.interaction=null)},"interactions:stop":jt.stop,"interactions:action-move":function(t){return jt.onInteractionMove(t)}}},It=At;Ct.default=It;var Lt={};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.copyAction=function(t,e){return t.name=e.name,t.axis=e.axis,t.edges=e.edges,t},Lt.sign=void 0,Lt.warnOnce=function(t,n){var r=!1;return function(){return r||(e.window.console.warn(n),r=!0),t.apply(this,arguments)}},Lt.sign=function(t){return t>=0?1:-1};var Dt={};function $t(t){return o.default.bool(t)?(this.options.styleCursor=t,this):null===t?(delete this.options.styleCursor,this):this.options.styleCursor}function Nt(t){return o.default.func(t)?(this.options.actionChecker=t,this):null===t?(delete this.options.actionChecker,this):this.options.actionChecker}Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.default=void 0;var Ft={id:"auto-start/interactableMethods",install:function(t){var e=t.Interactable;e.prototype.getAction=function(e,n,r,i){var o=function(t,e,n,r,i){var o=t.getRect(r),a={action:null,interactable:t,interaction:n,element:r,rect:o,buttons:e.buttons||{0:1,1:4,3:8,4:16}[e.button]};return i.fire("auto-start:check",a),a.action}(this,n,r,i,t);return this.options.actionChecker?this.options.actionChecker(e,n,o,this,i,r):o},e.prototype.ignoreFrom=(0,Lt.warnOnce)((function(t){return this._backCompatOption("ignoreFrom",t)}),"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),e.prototype.allowFrom=(0,Lt.warnOnce)((function(t){return this._backCompatOption("allowFrom",t)}),"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),e.prototype.actionChecker=Nt,e.prototype.styleCursor=$t}};Dt.default=Ft;var Bt={};function Ut(t,e,n,r,i){return e.testIgnoreAllow(e.options[t.name],n,r)&&e.options[t.name].enabled&&Vt(e,n,t,i)?t:null}function zt(t,e,n,r,i,o,a){for(var s=0,u=r.length;s<u;s++){var c=r[s],l=i[s],f=c.getAction(e,n,t,l);if(f){var h=Ut(f,c,l,o,a);if(h)return{action:h,interactable:c,element:l}}}return{action:null,interactable:null,element:null}}function Wt(t,e,n,r,i){var a=[],s=[],u=r;function c(t){a.push(t),s.push(u)}for(;o.default.element(u);){a=[],s=[],i.interactables.forEachMatch(u,c);var l=zt(t,e,n,a,s,r,i);if(l.action&&!l.interactable.options[l.action.name].manualStart)return l;u=_.parentNode(u)}return{action:null,interactable:null,element:null}}function Ht(t,e,n){var r=e.action,i=e.interactable,o=e.element;r=r||{name:null},t.interactable=i,t.element=o,(0,Lt.copyAction)(t.prepared,r),t.rect=i&&r.name?i.getRect(o):null,Xt(t,n),n.fire("autoStart:prepared",{interaction:t})}function Vt(t,e,n,r){var i=t.options,o=i[n.name].max,a=i[n.name].maxPerElement,s=r.autoStart.maxInteractions,u=0,c=0,l=0;if(!(o&&a&&s))return!1;for(var f=0;f<r.interactions.list.length;f++){var h=r.interactions.list[f],d=h.prepared.name;if(h.interacting()){if(++u>=s)return!1;if(h.interactable===t){if((c+=d===n.name?1:0)>=o)return!1;if(h.element===e&&(l++,d===n.name&&l>=a))return!1}}}return s>0}function Gt(t,e){return o.default.number(t)?(e.autoStart.maxInteractions=t,this):e.autoStart.maxInteractions}function Yt(t,e,n){var r=n.autoStart.cursorElement;r&&r!==t&&(r.style.cursor=""),t.ownerDocument.documentElement.style.cursor=e,t.style.cursor=e,n.autoStart.cursorElement=e?t:null}function Xt(t,e){var n=t.interactable,r=t.element,i=t.prepared;if("mouse"===t.pointerType&&n&&n.options.styleCursor){var a="";if(i.name){var s=n.options[i.name].cursorChecker;a=o.default.func(s)?s(i,n,r,t._interacting):e.actions.map[i.name].getCursor(i)}Yt(t.element,a||"",e)}else e.autoStart.cursorElement&&Yt(e.autoStart.cursorElement,"",e)}Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.default=void 0;var qt={id:"auto-start/base",before:["actions"],install:function(t){var e=t.interactStatic,n=t.defaults;t.usePlugin(Dt.default),n.base.actionChecker=null,n.base.styleCursor=!0,(0,C.default)(n.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),e.maxInteractions=function(e){return Gt(e,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:Vt,cursorElement:null}},listeners:{"interactions:down":function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;n.interacting()||Ht(n,Wt(n,r,i,o,e),e)},"interactions:move":function(t,e){!function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;"mouse"!==n.pointerType||n.pointerIsDown||n.interacting()||Ht(n,Wt(n,r,i,o,e),e)}(t,e),function(t,e){var n=t.interaction;if(n.pointerIsDown&&!n.interacting()&&n.pointerWasMoved&&n.prepared.name){e.fire("autoStart:before-start",t);var r=n.interactable,i=n.prepared.name;i&&r&&(r.options[i].manualStart||!Vt(r,n.element,n.prepared,e)?n.stop():(n.start(n.prepared,r,n.element),Xt(n,e)))}}(t,e)},"interactions:stop":function(t,e){var n=t.interaction,r=n.interactable;r&&r.options.styleCursor&&Yt(n.element,"",e)}},maxInteractions:Gt,withinInteractionLimit:Vt,validateAction:Ut},Kt=qt;Bt.default=Kt;var Zt={};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.default=void 0;var Jt={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,e){var n=t.interaction,r=t.eventTarget,i=t.dx,a=t.dy;if("drag"===n.prepared.name){var s=Math.abs(i),u=Math.abs(a),c=n.interactable.options.drag,l=c.startAxis,f=s>u?"x":s<u?"y":"xy";if(n.prepared.axis="start"===c.lockAxis?f[0]:c.lockAxis,"xy"!==f&&"xy"!==l&&l!==f){n.prepared.name=null;for(var h=r,d=function(t){if(t!==n.interactable){var i=n.interactable.options.drag;if(!i.manualStart&&t.testIgnoreAllow(i,h,r)){var o=t.getAction(n.downPointer,n.downEvent,n,h);if(o&&"drag"===o.name&&function(t,e){if(!e)return!1;var n=e.options.drag.startAxis;return"xy"===t||"xy"===n||n===t}(f,t)&&Bt.default.validateAction(o,t,h,r,e))return t}}};o.default.element(h);){var p=e.interactables.forEachMatch(h,d);if(p){n.prepared.name="drag",n.interactable=p,n.element=h;break}h=(0,_.parentNode)(h)}}}}}};Zt.default=Jt;var Qt={};function te(t){var e=t.prepared&&t.prepared.name;if(!e)return null;var n=t.interactable.options;return n[e].hold||n[e].delay}Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.default=void 0;var ee={id:"auto-start/hold",install:function(t){var e=t.defaults;t.usePlugin(Bt.default),e.perAction.hold=0,e.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var e=t.interaction,n=te(e);n>0&&(e.autoStartHoldTimer=setTimeout((function(){e.start(e.prepared,e.interactable,e.element)}),n))},"interactions:move":function(t){var e=t.interaction,n=t.duplicate;e.autoStartHoldTimer&&e.pointerWasMoved&&!n&&(clearTimeout(e.autoStartHoldTimer),e.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var e=t.interaction;te(e)>0&&(e.prepared.name=null)}},getHoldDuration:te},ne=ee;Qt.default=ne;var re={};Object.defineProperty(re,"__esModule",{value:!0}),re.default=void 0;var ie={id:"auto-start",install:function(t){t.usePlugin(Bt.default),t.usePlugin(Qt.default),t.usePlugin(Zt.default)}};re.default=ie;var oe={};function ae(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):o.default.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault}function se(t){var e=t.interaction,n=t.event;e.interactable&&e.interactable.checkAndPreventDefault(n)}function ue(t){var n=t.Interactable;n.prototype.preventDefault=ae,n.prototype.checkAndPreventDefault=function(n){return function(t,n,r){var i=t.options.preventDefault;if("never"!==i)if("always"!==i){if(n.events.supportsPassive&&/^touch(start|move)$/.test(r.type)){var a=(0,e.getWindow)(r.target).document,s=n.getDocOptions(a);if(!s||!s.events||!1!==s.events.passive)return}/^(mouse|pointer|touch)*(down|start)/i.test(r.type)||o.default.element(r.target)&&(0,_.matchesSelector)(r.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||r.preventDefault()}else r.preventDefault()}(this,t,n)},t.interactions.docEvents.push({type:"dragstart",listener:function(e){for(var n=0;n<t.interactions.list.length;n++){var r=t.interactions.list[n];if(r.element&&(r.element===e.target||(0,_.nodeContains)(r.element,e.target)))return void r.interactable.checkAndPreventDefault(e)}}})}Object.defineProperty(oe,"__esModule",{value:!0}),oe.default=void 0,oe.install=ue;var ce={id:"core/interactablePreventDefault",install:ue,listeners:["down","move","up","cancel"].reduce((function(t,e){return t["interactions:".concat(e)]=se,t}),{})};oe.default=ce;var le={};Object.defineProperty(le,"__esModule",{value:!0}),le.default=void 0,le.default={};var fe,he={};Object.defineProperty(he,"__esModule",{value:!0}),he.default=void 0,function(t){t.touchAction="touchAction",t.boxSizing="boxSizing",t.noListeners="noListeners"}(fe||(fe={})),fe.touchAction,fe.boxSizing,fe.noListeners;he.default={id:"dev-tools",install:function(){}};var de={};Object.defineProperty(de,"__esModule",{value:!0}),de.default=function t(e){var n={};for(var r in e){var i=e[r];o.default.plainObject(i)?n[r]=t(i):o.default.array(i)?n[r]=X.from(i):n[r]=i}return n};var pe={};function ve(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ge(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ge(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ge(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function me(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(pe,"__esModule",{value:!0}),pe.default=void 0,pe.getRectOffset=we;var ye=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),me(this,"states",[]),me(this,"startOffset",{left:0,right:0,top:0,bottom:0}),me(this,"startDelta",void 0),me(this,"result",void 0),me(this,"endResult",void 0),me(this,"startEdges",void 0),me(this,"edges",void 0),me(this,"interaction",void 0),this.interaction=e,this.result=be(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}var e,n;return e=t,(n=[{key:"start",value:function(t,e){var n=t.phase,r=this.interaction,i=function(t){var e=t.interactable.options[t.prepared.name],n=e.modifiers;return n&&n.length?n:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map((function(t){var n=e[t];return n&&n.enabled&&{options:n,methods:n._methods}})).filter((function(t){return!!t}))}(r);this.prepareStates(i),this.startEdges=(0,C.default)({},r.edges),this.edges=(0,C.default)({},this.startEdges),this.startOffset=we(r.rect,e),this.startDelta={x:0,y:0};var o=this.fillArg({phase:n,pageCoords:e,preEnd:!1});return this.result=be(),this.startAll(o),this.result=this.setAll(o)}},{key:"fillArg",value:function(t){var e=this.interaction;return t.interaction=e,t.interactable=e.interactable,t.element=e.element,t.rect||(t.rect=e.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var e=0;e<this.states.length;e++){var n=this.states[e];n.methods.start&&(t.state=n,n.methods.start(t))}}},{key:"setAll",value:function(t){var e=t.phase,n=t.preEnd,r=t.skipModifiers,i=t.rect,o=t.edges;t.coords=(0,C.default)({},t.pageCoords),t.rect=(0,C.default)({},i),t.edges=(0,C.default)({},o);for(var a=r?this.states.slice(r):this.states,s=be(t.coords,t.rect),u=0;u<a.length;u++){var c,l=a[u],f=l.options,h=(0,C.default)({},t.coords),d=null;null!=(c=l.methods)&&c.set&&this.shouldDo(f,n,e)&&(t.state=l,d=l.methods.set(t),j.addEdges(t.edges,t.rect,{x:t.coords.x-h.x,y:t.coords.y-h.y})),s.eventProps.push(d)}(0,C.default)(this.edges,t.edges),s.delta.x=t.coords.x-t.pageCoords.x,s.delta.y=t.coords.y-t.pageCoords.y,s.rectDelta.left=t.rect.left-i.left,s.rectDelta.right=t.rect.right-i.right,s.rectDelta.top=t.rect.top-i.top,s.rectDelta.bottom=t.rect.bottom-i.bottom;var p=this.result.coords,v=this.result.rect;if(p&&v){var g=s.rect.left!==v.left||s.rect.right!==v.right||s.rect.top!==v.top||s.rect.bottom!==v.bottom;s.changed=g||p.x!==s.coords.x||p.y!==s.coords.y}return s}},{key:"applyToInteraction",value:function(t){var e=this.interaction,n=t.phase,r=e.coords.cur,i=e.coords.start,o=this.result,a=this.startDelta,s=o.delta;"start"===n&&(0,C.default)(this.startDelta,o.delta);for(var u=0;u<2;u++){var c=ve([[i,a],[r,s]][u],2),l=c[0],f=c[1];l.page.x+=f.x,l.page.y+=f.y,l.client.x+=f.x,l.client.y+=f.y}var h=this.result.rectDelta,d=t.rect||e.rect;d.left+=h.left,d.right+=h.right,d.top+=h.top,d.bottom+=h.bottom,d.width=d.right-d.left,d.height=d.bottom-d.top}},{key:"setAndApply",value:function(t){var e=this.interaction,n=t.phase,r=t.preEnd,i=t.skipModifiers,o=this.setAll(this.fillArg({preEnd:r,phase:n,pageCoords:t.modifiedCoords||e.coords.cur.page}));if(this.result=o,!o.changed&&(!i||i<this.states.length)&&e.interacting())return!1;if(t.modifiedCoords){var a=e.coords.cur.page,s={x:t.modifiedCoords.x-a.x,y:t.modifiedCoords.y-a.y};o.coords.x+=s.x,o.coords.y+=s.y,o.delta.x+=s.x,o.delta.y+=s.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var e=t.interaction,n=t.event,r=this.states;if(r&&r.length){for(var i=!1,o=0;o<r.length;o++){var a=r[o];t.state=a;var s=a.options,u=a.methods,c=u.beforeEnd&&u.beforeEnd(t);if(c)return this.endResult=c,!1;i=i||!i&&this.shouldDo(s,!0,t.phase,!0)}i&&e.move({event:n,preEnd:!0})}}},{key:"stop",value:function(t){var e=t.interaction;if(this.states&&this.states.length){var n=(0,C.default)({states:this.states,interactable:e.interactable,element:e.element,rect:null},t);this.fillArg(n);for(var r=0;r<this.states.length;r++){var i=this.states[r];n.state=i,i.methods.stop&&i.methods.stop(n)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var e=0;e<t.length;e++){var n=t[e],r=n.options,i=n.methods,o=n.name;this.states.push({options:r,methods:i,index:e,name:o})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var e=t.interaction,n=e.coords,r=e.rect,i=e.modification;if(i.result){for(var o=i.startDelta,a=i.result,s=a.delta,u=a.rectDelta,c=[[n.start,o],[n.cur,s]],l=0;l<c.length;l++){var f=ve(c[l],2),h=f[0],d=f[1];h.page.x-=d.x,h.page.y-=d.y,h.client.x-=d.x,h.client.y-=d.y}r.left-=u.left,r.right-=u.right,r.top-=u.top,r.bottom-=u.bottom}}},{key:"shouldDo",value:function(t,e,n,r){return!(!t||!1===t.enabled||r&&!t.endOnly||t.endOnly&&!e||"start"===n&&!t.setStart)}},{key:"copyFrom",value:function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map((function(t){return(0,de.default)(t)})),this.result=be((0,C.default)({},t.result.coords),(0,C.default)({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function be(t,e){return{rect:e,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function we(t,e){return t?{left:e.x-t.left,top:e.y-t.top,right:t.right-e.x,bottom:t.bottom-e.y}:{left:0,top:0,right:0,bottom:0}}pe.default=ye;var xe={};function _e(t){var e=t.iEvent,n=t.interaction.modification.result;n&&(e.modifiers=n.eventProps)}Object.defineProperty(xe,"__esModule",{value:!0}),xe.addEventModifiers=_e,xe.default=void 0,xe.makeModifier=function(t,e){var n=t.defaults,r={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},i=function(t){var i=t||{};for(var o in i.enabled=!1!==i.enabled,n)o in i||(i[o]=n[o]);var a={options:i,methods:r,name:e,enable:function(){return i.enabled=!0,a},disable:function(){return i.enabled=!1,a}};return a};return e&&"string"==typeof e&&(i._defaults=n,i._methods=r),i};var Se={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var e=t.interaction;e.modification=new pe.default(e)},"interactions:before-action-start":function(t){var e=t.interaction,n=t.interaction.modification;n.start(t,e.coords.start.page),e.edges=n.edges,n.applyToInteraction(t)},"interactions:before-action-move":function(t){var e=t.interaction,n=e.modification,r=n.setAndApply(t);return e.edges=n.edges,r},"interactions:before-action-end":function(t){var e=t.interaction,n=e.modification,r=n.beforeEnd(t);return e.edges=n.startEdges,r},"interactions:action-start":_e,"interactions:action-move":_e,"interactions:action-end":_e,"interactions:after-action-start":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-move":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:stop":function(t){return t.interaction.modification.stop(t)}}},ke=Se;xe.default=ke;var Pe={};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.defaults=void 0,Pe.defaults={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}};var Ee={};function Oe(t){return Oe="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},Oe(t)}function Te(t,e){return Te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Te(t,e)}function Ce(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function je(t){return je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},je(t)}function Me(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.InteractEvent=void 0;var Re=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Te(t,e)}(a,t);var e,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=je(r);if(i){var n=je(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Oe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ce(t)}(this,t)});function a(t,e,n,r,i,s,u){var c;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),Me(Ce(c=o.call(this,t)),"relatedTarget",null),Me(Ce(c),"screenX",void 0),Me(Ce(c),"screenY",void 0),Me(Ce(c),"button",void 0),Me(Ce(c),"buttons",void 0),Me(Ce(c),"ctrlKey",void 0),Me(Ce(c),"shiftKey",void 0),Me(Ce(c),"altKey",void 0),Me(Ce(c),"metaKey",void 0),Me(Ce(c),"page",void 0),Me(Ce(c),"client",void 0),Me(Ce(c),"delta",void 0),Me(Ce(c),"rect",void 0),Me(Ce(c),"x0",void 0),Me(Ce(c),"y0",void 0),Me(Ce(c),"t0",void 0),Me(Ce(c),"dt",void 0),Me(Ce(c),"duration",void 0),Me(Ce(c),"clientX0",void 0),Me(Ce(c),"clientY0",void 0),Me(Ce(c),"velocity",void 0),Me(Ce(c),"speed",void 0),Me(Ce(c),"swipe",void 0),Me(Ce(c),"axes",void 0),Me(Ce(c),"preEnd",void 0),i=i||t.element;var l=t.interactable,f=(l&&l.options||Pe.defaults).deltaSource,h=(0,A.default)(l,i,n),d="start"===r,p="end"===r,v=d?Ce(c):t.prevEvent,g=d?t.coords.start:p?{page:v.page,client:v.client,timeStamp:t.coords.cur.timeStamp}:t.coords.cur;return c.page=(0,C.default)({},g.page),c.client=(0,C.default)({},g.client),c.rect=(0,C.default)({},t.rect),c.timeStamp=g.timeStamp,p||(c.page.x-=h.x,c.page.y-=h.y,c.client.x-=h.x,c.client.y-=h.y),c.ctrlKey=e.ctrlKey,c.altKey=e.altKey,c.shiftKey=e.shiftKey,c.metaKey=e.metaKey,c.button=e.button,c.buttons=e.buttons,c.target=i,c.currentTarget=i,c.preEnd=s,c.type=u||n+(r||""),c.interactable=l,c.t0=d?t.pointers[t.pointers.length-1].downTime:v.t0,c.x0=t.coords.start.page.x-h.x,c.y0=t.coords.start.page.y-h.y,c.clientX0=t.coords.start.client.x-h.x,c.clientY0=t.coords.start.client.y-h.y,c.delta=d||p?{x:0,y:0}:{x:c[f].x-v[f].x,y:c[f].y-v[f].y},c.dt=t.coords.delta.timeStamp,c.duration=c.timeStamp-c.t0,c.velocity=(0,C.default)({},t.coords.velocity[f]),c.speed=(0,D.default)(c.velocity.x,c.velocity.y),c.swipe=p||"inertiastart"===r?c.getSwipe():null,c}return e=a,(n=[{key:"getSwipe",value:function(){var t=this._interaction;if(t.prevEvent.speed<600||this.timeStamp-t.prevEvent.timeStamp>150)return null;var e=180*Math.atan2(t.prevEvent.velocityY,t.prevEvent.velocityX)/Math.PI;e<0&&(e+=360);var n=112.5<=e&&e<247.5,r=202.5<=e&&e<337.5;return{up:r,down:!r&&22.5<=e&&e<157.5,left:n,right:!n&&(292.5<=e||e<67.5),angle:e,speed:t.prevEvent.speed,velocity:{x:t.prevEvent.velocityX,y:t.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(V.BaseEvent);Ee.InteractEvent=Re,Object.defineProperties(Re.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var Ae={};function Ie(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Le(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.PointerInfo=void 0;var De=function(t,e,n){return e&&Ie(t.prototype,e),n&&Ie(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,n,r,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Le(this,"id",void 0),Le(this,"pointer",void 0),Le(this,"event",void 0),Le(this,"downTime",void 0),Le(this,"downTarget",void 0),this.id=e,this.pointer=n,this.event=r,this.downTime=i,this.downTarget=o}));Ae.PointerInfo=De;var $e,Ne,Fe={};function Be(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.Interaction=void 0,Object.defineProperty(Fe,"PointerInfo",{enumerable:!0,get:function(){return Ae.PointerInfo}}),Fe.default=Fe._ProxyValues=Fe._ProxyMethods=void 0,Fe._ProxyValues=$e,function(t){t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy=""}($e||(Fe._ProxyValues=$e={})),Fe._ProxyMethods=Ne,function(t){t.start="",t.move="",t.end="",t.stop="",t.interacting=""}(Ne||(Fe._ProxyMethods=Ne={}));var Ue=0,ze=function(){function t(e){var n=this,r=e.pointerType,i=e.scopeFire;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Be(this,"interactable",null),Be(this,"element",null),Be(this,"rect",null),Be(this,"_rects",void 0),Be(this,"edges",null),Be(this,"_scopeFire",void 0),Be(this,"prepared",{name:null,axis:null,edges:null}),Be(this,"pointerType",void 0),Be(this,"pointers",[]),Be(this,"downEvent",null),Be(this,"downPointer",{}),Be(this,"_latestPointer",{pointer:null,event:null,eventTarget:null}),Be(this,"prevEvent",null),Be(this,"pointerIsDown",!1),Be(this,"pointerWasMoved",!1),Be(this,"_interacting",!1),Be(this,"_ending",!1),Be(this,"_stopped",!0),Be(this,"_proxy",null),Be(this,"simulation",null),Be(this,"doMove",(0,Lt.warnOnce)((function(t){this.move(t)}),"The interaction.doMove() method has been renamed to interaction.move()")),Be(this,"coords",{start:N.newCoords(),prev:N.newCoords(),cur:N.newCoords(),delta:N.newCoords(),velocity:N.newCoords()}),Be(this,"_id",Ue++),this._scopeFire=i,this.pointerType=r;var o=this;this._proxy={};var a=function(t){Object.defineProperty(n._proxy,t,{get:function(){return o[t]}})};for(var s in $e)a(s);var u=function(t){Object.defineProperty(n._proxy,t,{value:function(){return o[t].apply(o,arguments)}})};for(var c in Ne)u(c);this._scopeFire("interactions:new",{interaction:this})}var e,n;return e=t,n=[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,e,n){var r=this.updatePointer(t,e,n,!0),i=this.pointers[r];this._scopeFire("interactions:down",{pointer:t,event:e,eventTarget:n,pointerIndex:r,pointerInfo:i,type:"down",interaction:this})}},{key:"start",value:function(t,e,n){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<("gesture"===t.name?2:1)||!e.options[t.name].enabled)&&((0,Lt.copyAction)(this.prepared,t),this.interactable=e,this.element=n,this.rect=e.getRect(n),this.edges=this.prepared.edges?(0,C.default)({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(t,e,n){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,e,n,!1);var r,i,o=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(r=this.coords.cur.client.x-this.coords.start.client.x,i=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=(0,D.default)(r,i)>this.pointerMoveTolerance);var a=this.getPointerIndex(t),s={pointer:t,pointerIndex:a,pointerInfo:this.pointers[a],event:e,type:"move",eventTarget:n,dx:r,dy:i,duplicate:o,interaction:this};o||N.setCoordVelocity(this.coords.velocity,this.coords.delta),this._scopeFire("interactions:move",s),o||this.simulation||(this.interacting()&&(s.type=null,this.move(s)),this.pointerWasMoved&&N.copyCoords(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||N.setZeroCoords(this.coords.delta),(t=(0,C.default)({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{})).phase="move",this._doPhase(t)}},{key:"pointerUp",value:function(t,e,n,r){var i=this.getPointerIndex(t);-1===i&&(i=this.updatePointer(t,e,n,!1));var o=/cancel$/i.test(e.type)?"cancel":"up";this._scopeFire("interactions:".concat(o),{pointer:t,pointerIndex:i,pointerInfo:this.pointers[i],event:e,eventTarget:n,type:o,curEventTarget:r,interaction:this}),this.simulation||this.end(e),this.removePointer(t,e)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var e;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(e=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,!0===e&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var e=N.getPointerId(t);return"mouse"===this.pointerType||"pen"===this.pointerType?this.pointers.length-1:X.findIndex(this.pointers,(function(t){return t.id===e}))}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,e,n,r){var i=N.getPointerId(t),o=this.getPointerIndex(t),a=this.pointers[o];return r=!1!==r&&(r||/(down|start)$/i.test(e.type)),a?a.pointer=t:(a=new Ae.PointerInfo(i,t,e,null,null),o=this.pointers.length,this.pointers.push(a)),N.setCoords(this.coords.cur,this.pointers.map((function(t){return t.pointer})),this._now()),N.setCoordDeltas(this.coords.delta,this.coords.prev,this.coords.cur),r&&(this.pointerIsDown=!0,a.downTime=this.coords.cur.timeStamp,a.downTarget=n,N.pointerExtend(this.downPointer,t),this.interacting()||(N.copyCoords(this.coords.start,this.coords.cur),N.copyCoords(this.coords.prev,this.coords.cur),this.downEvent=e,this.pointerWasMoved=!1)),this._updateLatestPointer(t,e,n),this._scopeFire("interactions:update-pointer",{pointer:t,event:e,eventTarget:n,down:r,pointerInfo:a,pointerIndex:o,interaction:this}),o}},{key:"removePointer",value:function(t,e){var n=this.getPointerIndex(t);if(-1!==n){var r=this.pointers[n];this._scopeFire("interactions:remove-pointer",{pointer:t,event:e,eventTarget:null,pointerIndex:n,pointerInfo:r,interaction:this}),this.pointers.splice(n,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,e,n){this._latestPointer.pointer=t,this._latestPointer.event=e,this._latestPointer.eventTarget=n}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,e,n,r){return new Ee.InteractEvent(this,t,this.prepared.name,e,this.element,n,r)}},{key:"_fireEvent",value:function(t){var e;null==(e=this.interactable)||e.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var e=t.event,n=t.phase,r=t.preEnd,i=t.type,o=this.rect;if(o&&"move"===n&&(j.addEdges(this.edges,o,this.coords.delta[this.interactable.options.deltaSource]),o.width=o.right-o.left,o.height=o.bottom-o.top),!1===this._scopeFire("interactions:before-action-".concat(n),t))return!1;var a=t.iEvent=this._createPreparedEvent(e,n,r,i);return this._scopeFire("interactions:action-".concat(n),t),"start"===n&&(this.prevEvent=a),this._fireEvent(a),this._scopeFire("interactions:after-action-".concat(n),t),!0}},{key:"_now",value:function(){return Date.now()}}],n&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();Fe.Interaction=ze;var We=ze;Fe.default=We;var He={};function Ve(t){t.pointerIsDown&&(qe(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}function Ge(t){Ye(t.interaction)}function Ye(t){if(!function(t){return!(!t.offset.pending.x&&!t.offset.pending.y)}(t))return!1;var e=t.offset.pending;return qe(t.coords.cur,e),qe(t.coords.delta,e),j.addEdges(t.edges,t.rect,e),e.x=0,e.y=0,!0}function Xe(t){var e=t.x,n=t.y;this.offset.pending.x+=e,this.offset.pending.y+=n,this.offset.total.x+=e,this.offset.total.y+=n}function qe(t,e){var n=t.page,r=t.client,i=e.x,o=e.y;n.x+=i,n.y+=o,r.x+=i,r.y+=o}Object.defineProperty(He,"__esModule",{value:!0}),He.addTotal=Ve,He.applyPending=Ye,He.default=void 0,Fe._ProxyMethods.offsetBy="";var Ke={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=Xe},listeners:{"interactions:new":function(t){t.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(t){return Ve(t.interaction)},"interactions:before-action-start":Ge,"interactions:before-action-move":Ge,"interactions:before-action-end":function(t){var e=t.interaction;if(Ye(e))return e.move({offset:!0}),e.end(),!1},"interactions:stop":function(t){var e=t.interaction;e.offset.total.x=0,e.offset.total.y=0,e.offset.pending.x=0,e.offset.pending.y=0}}},Ze=Ke;He.default=Ze;var Je={};function Qe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(Je,"__esModule",{value:!0}),Je.default=Je.InertiaState=void 0;var tn=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Qe(this,"active",!1),Qe(this,"isModified",!1),Qe(this,"smoothEnd",!1),Qe(this,"allowResume",!1),Qe(this,"modification",void 0),Qe(this,"modifierCount",0),Qe(this,"modifierArg",void 0),Qe(this,"startCoords",void 0),Qe(this,"t0",0),Qe(this,"v0",0),Qe(this,"te",0),Qe(this,"targetOffset",void 0),Qe(this,"modifiedOffset",void 0),Qe(this,"currentOffset",void 0),Qe(this,"lambda_v0",0),Qe(this,"one_ve_v0",0),Qe(this,"timeout",void 0),Qe(this,"interaction",void 0),this.interaction=e}var e,n;return e=t,(n=[{key:"start",value:function(t){var e=this.interaction,n=en(e);if(!n||!n.enabled)return!1;var r=e.coords.velocity.client,i=(0,D.default)(r.x,r.y),o=this.modification||(this.modification=new pe.default(e));if(o.copyFrom(e.modification),this.t0=e._now(),this.allowResume=n.allowResume,this.v0=i,this.currentOffset={x:0,y:0},this.startCoords=e.coords.cur.page,this.modifierArg=o.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-e.coords.cur.timeStamp<50&&i>n.minSpeed&&i>n.endSpeed)this.startInertia();else{if(o.result=o.setAll(this.modifierArg),!o.result.changed)return!1;this.startSmoothEnd()}return e.modification.result.rect=null,e.offsetBy(this.targetOffset),e._doPhase({interaction:e,event:t,phase:"inertiastart"}),e.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),e.modification.result.rect=null,this.active=!0,e.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,e=this.interaction.coords.velocity.client,n=en(this.interaction),r=n.resistance,i=-Math.log(n.endSpeed/this.v0)/r;this.targetOffset={x:(e.x-i)/r,y:(e.y-i)/r},this.te=i,this.lambda_v0=r/this.v0,this.one_ve_v0=1-n.endSpeed/this.v0;var o=this.modification,a=this.modifierArg;a.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},o.result=o.setAll(a),o.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+o.result.delta.x,y:this.targetOffset.y+o.result.delta.y}),this.onNextFrame((function(){return t.inertiaTick()}))}},{key:"startSmoothEnd",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame((function(){return t.smoothEndTick()}))}},{key:"onNextFrame",value:function(t){var e=this;this.timeout=kt.default.request((function(){e.active&&t()}))}},{key:"inertiaTick",value:function(){var t,e,n,r,i,o=this,a=this.interaction,s=en(a).resistance,u=(a._now()-this.t0)/1e3;if(u<this.te){var c,l=1-(Math.exp(-s*u)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=this.targetOffset.x,e=this.targetOffset.y,n=this.modifiedOffset.x,r=this.modifiedOffset.y,c={x:rn(i=l,0,t,n),y:rn(i,0,e,r)}):c={x:this.targetOffset.x*l,y:this.targetOffset.y*l};var f={x:c.x-this.currentOffset.x,y:c.y-this.currentOffset.y};this.currentOffset.x+=f.x,this.currentOffset.y+=f.y,a.offsetBy(f),a.move(),this.onNextFrame((function(){return o.inertiaTick()}))}else a.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,e=this.interaction,n=e._now()-this.t0,r=en(e).smoothEndDuration;if(n<r){var i={x:on(n,0,this.targetOffset.x,r),y:on(n,0,this.targetOffset.y,r)},o={x:i.x-this.currentOffset.x,y:i.y-this.currentOffset.y};this.currentOffset.x+=o.x,this.currentOffset.y+=o.y,e.offsetBy(o),e.move({skipModifiers:this.modifierCount}),this.onNextFrame((function(){return t.smoothEndTick()}))}else e.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var e=t.pointer,n=t.event,r=t.eventTarget,i=this.interaction;i.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),i.updatePointer(e,n,r,!0),i._doPhase({interaction:i,event:n,phase:"resume"}),(0,N.copyCoords)(i.coords.prev,i.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,kt.default.cancel(this.timeout)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function en(t){var e=t.interactable,n=t.prepared;return e&&e.options&&n.name&&e.options[n.name].inertia}Je.InertiaState=tn;var nn={id:"inertia",before:["modifiers","actions"],install:function(t){var e=t.defaults;t.usePlugin(He.default),t.usePlugin(xe.default),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,e.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(t){var e=t.interaction;e.inertia=new tn(e)},"interactions:before-action-end":function(t){var e=t.interaction,n=t.event;return(!e._interacting||e.simulation||!e.inertia.start(n))&&null},"interactions:down":function(t){var e=t.interaction,n=t.eventTarget,r=e.inertia;if(r.active)for(var i=n;o.default.element(i);){if(i===e.element){r.resume(t);break}i=_.parentNode(i)}},"interactions:stop":function(t){var e=t.interaction.inertia;e.active&&e.stop()},"interactions:before-action-resume":function(t){var e=t.interaction.modification;e.stop(t),e.start(t,t.interaction.coords.cur.page),e.applyToInteraction(t)},"interactions:before-action-inertiastart":function(t){return t.interaction.modification.setAndApply(t)},"interactions:action-resume":xe.addEventModifiers,"interactions:action-inertiastart":xe.addEventModifiers,"interactions:after-action-inertiastart":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-resume":function(t){return t.interaction.modification.restoreInteractionCoords(t)}}};function rn(t,e,n,r){var i=1-t;return i*i*e+2*i*t*n+t*t*r}function on(t,e,n,r){return-n*(t/=r)*(t-2)+e}var an=nn;Je.default=an;var sn={};function un(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cn(t,e){for(var n=0;n<e.length;n++){var r=e[n];if(t.immediatePropagationStopped)break;r(t)}}Object.defineProperty(sn,"__esModule",{value:!0}),sn.Eventable=void 0;var ln=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),un(this,"options",void 0),un(this,"types",{}),un(this,"propagationStopped",!1),un(this,"immediatePropagationStopped",!1),un(this,"global",void 0),this.options=(0,C.default)({},e||{})}var e,n;return e=t,(n=[{key:"fire",value:function(t){var e,n=this.global;(e=this.types[t.type])&&cn(t,e),!t.propagationStopped&&n&&(e=n[t.type])&&cn(t,e)}},{key:"on",value:function(t,e){var n=(0,I.default)(t,e);for(t in n)this.types[t]=X.merge(this.types[t]||[],n[t])}},{key:"off",value:function(t,e){var n=(0,I.default)(t,e);for(t in n){var r=this.types[t];if(r&&r.length)for(var i=0;i<n[t].length;i++){var o=n[t][i],a=r.indexOf(o);-1!==a&&r.splice(a,1)}}}},{key:"getRect",value:function(t){return null}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();sn.Eventable=ln;var fn={};Object.defineProperty(fn,"__esModule",{value:!0}),fn.default=function(t,e){if(e.phaselessTypes[t])return!0;for(var n in e.map)if(0===t.indexOf(n)&&t.substr(n.length)in e.phases)return!0;return!1};var hn={};Object.defineProperty(hn,"__esModule",{value:!0}),hn.createInteractStatic=function(t){var e=function e(n,r){var i=t.interactables.get(n,r);return i||((i=t.interactables.new(n,r)).events.global=e.globalEvents),i};return e.getPointerAverage=N.pointerAverage,e.getTouchBBox=N.touchBBox,e.getTouchDistance=N.touchDistance,e.getTouchAngle=N.touchAngle,e.getElementRect=_.getElementRect,e.getElementClientRect=_.getElementClientRect,e.matchesSelector=_.matchesSelector,e.closest=_.closest,e.globalEvents={},e.version="1.10.18",e.scope=t,e.use=function(t,e){return this.scope.usePlugin(t,e),this},e.isSet=function(t,e){return!!this.scope.interactables.get(t,e&&e.context)},e.on=(0,Lt.warnOnce)((function(t,e,n){if(o.default.string(t)&&-1!==t.search(" ")&&(t=t.trim().split(/ +/)),o.default.array(t)){for(var r=0;r<t.length;r++){var i=t[r];this.on(i,e,n)}return this}if(o.default.object(t)){for(var a in t)this.on(a,t[a],e);return this}return(0,fn.default)(t,this.scope.actions)?this.globalEvents[t]?this.globalEvents[t].push(e):this.globalEvents[t]=[e]:this.scope.events.add(this.scope.document,t,e,{options:n}),this}),"The interact.on() method is being deprecated"),e.off=(0,Lt.warnOnce)((function(t,e,n){if(o.default.string(t)&&-1!==t.search(" ")&&(t=t.trim().split(/ +/)),o.default.array(t)){for(var r=0;r<t.length;r++){var i=t[r];this.off(i,e,n)}return this}if(o.default.object(t)){for(var a in t)this.off(a,t[a],e);return this}var s;return(0,fn.default)(t,this.scope.actions)?t in this.globalEvents&&-1!==(s=this.globalEvents[t].indexOf(e))&&this.globalEvents[t].splice(s,1):this.scope.events.remove(this.scope.document,t,e,n),this}),"The interact.off() method is being deprecated"),e.debug=function(){return this.scope},e.supportsTouch=function(){return b.default.supportsTouch},e.supportsPointerEvent=function(){return b.default.supportsPointerEvent},e.stop=function(){for(var t=0;t<this.scope.interactions.list.length;t++)this.scope.interactions.list[t].stop();return this},e.pointerMoveTolerance=function(t){return o.default.number(t)?(this.scope.interactions.pointerMoveTolerance=t,this):this.scope.interactions.pointerMoveTolerance},e.addDocument=function(t,e){this.scope.addDocument(t,e)},e.removeDocument=function(t){this.scope.removeDocument(t)},e};var dn={};function pn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(dn,"__esModule",{value:!0}),dn.Interactable=void 0;var vn=function(){function t(n,r,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),pn(this,"options",void 0),pn(this,"_actions",void 0),pn(this,"target",void 0),pn(this,"events",new sn.Eventable),pn(this,"_context",void 0),pn(this,"_win",void 0),pn(this,"_doc",void 0),pn(this,"_scopeEvents",void 0),pn(this,"_rectChecker",void 0),this._actions=r.actions,this.target=n,this._context=r.context||i,this._win=(0,e.getWindow)((0,_.trySelector)(n)?this._context:n),this._doc=this._win.document,this._scopeEvents=o,this.set(r)}var n,r;return n=t,(r=[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,e){return o.default.func(e.onstart)&&this.on("".concat(t,"start"),e.onstart),o.default.func(e.onmove)&&this.on("".concat(t,"move"),e.onmove),o.default.func(e.onend)&&this.on("".concat(t,"end"),e.onend),o.default.func(e.oninertiastart)&&this.on("".concat(t,"inertiastart"),e.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,e,n){(o.default.array(e)||o.default.object(e))&&this.off(t,e),(o.default.array(n)||o.default.object(n))&&this.on(t,n)}},{key:"setPerAction",value:function(t,e){var n=this._defaults;for(var r in e){var i=r,a=this.options[t],s=e[i];"listeners"===i&&this.updatePerActionListeners(t,a.listeners,s),o.default.array(s)?a[i]=X.from(s):o.default.plainObject(s)?(a[i]=(0,C.default)(a[i]||{},(0,de.default)(s)),o.default.object(n.perAction[i])&&"enabled"in n.perAction[i]&&(a[i].enabled=!1!==s.enabled)):o.default.bool(s)&&o.default.object(n.perAction[i])?a[i].enabled=s:a[i]=s}}},{key:"getRect",value:function(t){return t=t||(o.default.element(this.target)?this.target:null),o.default.string(this.target)&&(t=t||this._context.querySelector(this.target)),(0,_.getElementRect)(t)}},{key:"rectChecker",value:function(t){var e=this;return o.default.func(t)?(this._rectChecker=t,this.getRect=function(t){var n=(0,C.default)({},e._rectChecker(t));return"width"in n||(n.width=n.right-n.left,n.height=n.bottom-n.top),n},this):null===t?(delete this.getRect,delete this._rectChecker,this):this.getRect}},{key:"_backCompatOption",value:function(t,e){if((0,_.trySelector)(e)||o.default.object(e)){for(var n in this.options[t]=e,this._actions.map)this.options[n][t]=e;return this}return this.options[t]}},{key:"origin",value:function(t){return this._backCompatOption("origin",t)}},{key:"deltaSource",value:function(t){return"page"===t||"client"===t?(this.options.deltaSource=t,this):this.options.deltaSource}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||(0,_.nodeContains)(this._context,t)}},{key:"testIgnoreAllow",value:function(t,e,n){return!this.testIgnore(t.ignoreFrom,e,n)&&this.testAllow(t.allowFrom,e,n)}},{key:"testAllow",value:function(t,e,n){return!t||!!o.default.element(n)&&(o.default.string(t)?(0,_.matchesUpTo)(n,t,e):!!o.default.element(t)&&(0,_.nodeContains)(t,n))}},{key:"testIgnore",value:function(t,e,n){return!(!t||!o.default.element(n))&&(o.default.string(t)?(0,_.matchesUpTo)(n,t,e):!!o.default.element(t)&&(0,_.nodeContains)(t,n))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,e,n,r){o.default.object(e)&&!o.default.array(e)&&(r=n,n=null);var i="on"===t?"add":"remove",a=(0,I.default)(e,n);for(var s in a){"wheel"===s&&(s=b.default.wheelEvent);for(var u=0;u<a[s].length;u++){var c=a[s][u];(0,fn.default)(s,this._actions)?this.events[t](s,c):o.default.string(this.target)?this._scopeEvents["".concat(i,"Delegate")](this.target,this._context,s,c,r):this._scopeEvents[i](this.target,s,c,r)}}return this}},{key:"on",value:function(t,e,n){return this._onOff("on",t,e,n)}},{key:"off",value:function(t,e,n){return this._onOff("off",t,e,n)}},{key:"set",value:function(t){var e=this._defaults;for(var n in o.default.object(t)||(t={}),this.options=(0,de.default)(e.base),this._actions.methodDict){var r=n,i=this._actions.methodDict[r];this.options[r]={},this.setPerAction(r,(0,C.default)((0,C.default)({},e.perAction),e.actions[r])),this[i](t[r])}for(var a in t)o.default.func(this[a])&&this[a](t[a]);return this}},{key:"unset",value:function(){if(o.default.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var e=this._scopeEvents.delegatedEvents[t],n=e.length-1;n>=0;n--){var r=e[n],i=r.selector,a=r.context,s=r.listeners;i===this.target&&a===this._context&&e.splice(n,1);for(var u=s.length-1;u>=0;u--)this._scopeEvents.removeDelegate(this.target,this._context,t,s[u][0],s[u][1])}else this._scopeEvents.remove(this.target,"all")}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();dn.Interactable=vn;var gn={};function mn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(gn,"__esModule",{value:!0}),gn.InteractableSet=void 0;var yn=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),mn(this,"list",[]),mn(this,"selectorMap",{}),mn(this,"scope",void 0),this.scope=e,e.addListeners({"interactable:unset":function(t){var e=t.interactable,r=e.target,i=e._context,a=o.default.string(r)?n.selectorMap[r]:r[n.scope.id],s=X.findIndex(a,(function(t){return t.context===i}));a[s]&&(a[s].context=null,a[s].interactable=null),a.splice(s,1)}})}var e,n;return e=t,(n=[{key:"new",value:function(t,e){e=(0,C.default)(e||{},{actions:this.scope.actions});var n=new this.scope.Interactable(t,e,this.scope.document,this.scope.events),r={context:n._context,interactable:n};return this.scope.addDocument(n._doc),this.list.push(n),o.default.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(r)):(n.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(r)),this.scope.fire("interactable:new",{target:t,options:e,interactable:n,win:this.scope._win}),n}},{key:"get",value:function(t,e){var n=e&&e.context||this.scope.document,r=o.default.string(t),i=r?this.selectorMap[t]:t[this.scope.id];if(!i)return null;var a=X.find(i,(function(e){return e.context===n&&(r||e.interactable.inContext(t))}));return a&&a.interactable}},{key:"forEachMatch",value:function(t,e){for(var n=0;n<this.list.length;n++){var r=this.list[n],i=void 0;if((o.default.string(r.target)?o.default.element(t)&&_.matchesSelector(t,r.target):t===r.target)&&r.inContext(t)&&(i=e(r)),void 0!==i)return i}}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();gn.InteractableSet=yn;var bn={};function wn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return _n(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_n(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}Object.defineProperty(bn,"__esModule",{value:!0}),bn.default=void 0;var Sn=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),wn(this,"currentTarget",void 0),wn(this,"originalEvent",void 0),wn(this,"type",void 0),this.originalEvent=e,(0,$.default)(this,e)}var e,n;return e=t,(n=[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function kn(t){if(!o.default.object(t))return{capture:!!t,passive:!1};var e=(0,C.default)({},t);return e.capture=!!t.capture,e.passive=!!t.passive,e}var Pn={id:"events",install:function(t){var e,n=[],r={},i=[],a={add:s,remove:u,addDelegate:function(t,e,n,o,a){var u=kn(a);if(!r[n]){r[n]=[];for(var f=0;f<i.length;f++){var h=i[f];s(h,n,c),s(h,n,l,!0)}}var d=r[n],p=X.find(d,(function(n){return n.selector===t&&n.context===e}));p||(p={selector:t,context:e,listeners:[]},d.push(p)),p.listeners.push([o,u])},removeDelegate:function(t,e,n,i,o){var a,s=kn(o),f=r[n],h=!1;if(f)for(a=f.length-1;a>=0;a--){var d=f[a];if(d.selector===t&&d.context===e){for(var p=d.listeners,v=p.length-1;v>=0;v--){var g=xn(p[v],2),m=g[0],y=g[1],b=y.capture,w=y.passive;if(m===i&&b===s.capture&&w===s.passive){p.splice(v,1),p.length||(f.splice(a,1),u(e,n,c),u(e,n,l,!0)),h=!0;break}}if(h)break}}},delegateListener:c,delegateUseCapture:l,delegatedEvents:r,documents:i,targets:n,supportsOptions:!1,supportsPassive:!1};function s(t,e,r,i){var o=kn(i),s=X.find(n,(function(e){return e.eventTarget===t}));s||(s={eventTarget:t,events:{}},n.push(s)),s.events[e]||(s.events[e]=[]),t.addEventListener&&!X.contains(s.events[e],r)&&(t.addEventListener(e,r,a.supportsOptions?o:o.capture),s.events[e].push(r))}function u(t,e,r,i){var o=kn(i),s=X.findIndex(n,(function(e){return e.eventTarget===t})),c=n[s];if(c&&c.events)if("all"!==e){var l=!1,f=c.events[e];if(f){if("all"===r){for(var h=f.length-1;h>=0;h--)u(t,e,f[h],o);return}for(var d=0;d<f.length;d++)if(f[d]===r){t.removeEventListener(e,r,a.supportsOptions?o:o.capture),f.splice(d,1),0===f.length&&(delete c.events[e],l=!0);break}}l&&!Object.keys(c.events).length&&n.splice(s,1)}else for(e in c.events)c.events.hasOwnProperty(e)&&u(t,e,"all")}function c(t,e){for(var n=kn(e),i=new Sn(t),a=r[t.type],s=xn(N.getEventTargets(t),1)[0],u=s;o.default.element(u);){for(var c=0;c<a.length;c++){var l=a[c],f=l.selector,h=l.context;if(_.matchesSelector(u,f)&&_.nodeContains(h,s)&&_.nodeContains(h,u)){var d=l.listeners;i.currentTarget=u;for(var p=0;p<d.length;p++){var v=xn(d[p],2),g=v[0],m=v[1],y=m.capture,b=m.passive;y===n.capture&&b===n.passive&&g(i)}}}u=_.parentNode(u)}}function l(t){return c(t,!0)}return null==(e=t.document)||e.createElement("div").addEventListener("test",null,{get capture(){return a.supportsOptions=!0},get passive(){return a.supportsPassive=!0}}),t.events=a,a}};bn.default=Pn;var En={};Object.defineProperty(En,"__esModule",{value:!0}),En.default=void 0;var On={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var e=0;e<On.methodOrder.length;e++){var n;n=On.methodOrder[e];var r=On[n](t);if(r)return r}return null},simulationResume:function(t){var e=t.pointerType,n=t.eventType,r=t.eventTarget,i=t.scope;if(!/down|start/i.test(n))return null;for(var o=0;o<i.interactions.list.length;o++){var a=i.interactions.list[o],s=r;if(a.simulation&&a.simulation.allowResume&&a.pointerType===e)for(;s;){if(s===a.element)return a;s=_.parentNode(s)}}return null},mouseOrPen:function(t){var e,n=t.pointerId,r=t.pointerType,i=t.eventType,o=t.scope;if("mouse"!==r&&"pen"!==r)return null;for(var a=0;a<o.interactions.list.length;a++){var s=o.interactions.list[a];if(s.pointerType===r){if(s.simulation&&!Tn(s,n))continue;if(s.interacting())return s;e||(e=s)}}if(e)return e;for(var u=0;u<o.interactions.list.length;u++){var c=o.interactions.list[u];if(!(c.pointerType!==r||/down/i.test(i)&&c.simulation))return c}return null},hasPointer:function(t){for(var e=t.pointerId,n=t.scope,r=0;r<n.interactions.list.length;r++){var i=n.interactions.list[r];if(Tn(i,e))return i}return null},idle:function(t){for(var e=t.pointerType,n=t.scope,r=0;r<n.interactions.list.length;r++){var i=n.interactions.list[r];if(1===i.pointers.length){var o=i.interactable;if(o&&(!o.options.gesture||!o.options.gesture.enabled))continue}else if(i.pointers.length>=2)continue;if(!i.interacting()&&e===i.pointerType)return i}return null}};function Tn(t,e){return t.pointers.some((function(t){return t.id===e}))}var Cn=On;En.default=Cn;var jn={};function Mn(t){return Mn="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},Mn(t)}function Rn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return An(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?An(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function An(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function In(t,e){return In=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},In(t,e)}function Ln(t){return Ln=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ln(t)}Object.defineProperty(jn,"__esModule",{value:!0}),jn.default=void 0;var Dn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function $n(t,e){return function(n){var r=e.interactions.list,i=N.getPointerType(n),o=Rn(N.getEventTargets(n),2),a=o[0],s=o[1],u=[];if(/^touch/.test(n.type)){e.prevTouchTime=e.now();for(var c=0;c<n.changedTouches.length;c++){var l=n.changedTouches[c],f={pointer:l,pointerId:N.getPointerId(l),pointerType:i,eventType:n.type,eventTarget:a,curEventTarget:s,scope:e},h=Nn(f);u.push([f.pointer,f.eventTarget,f.curEventTarget,h])}}else{var d=!1;if(!b.default.supportsPointerEvent&&/mouse/.test(n.type)){for(var p=0;p<r.length&&!d;p++)d="mouse"!==r[p].pointerType&&r[p].pointerIsDown;d=d||e.now()-e.prevTouchTime<500||0===n.timeStamp}if(!d){var v={pointer:n,pointerId:N.getPointerId(n),pointerType:i,eventType:n.type,curEventTarget:s,eventTarget:a,scope:e},g=Nn(v);u.push([v.pointer,v.eventTarget,v.curEventTarget,g])}}for(var m=0;m<u.length;m++){var y=Rn(u[m],4),w=y[0],x=y[1],_=y[2];y[3][t](w,n,x,_)}}}function Nn(t){var e=t.pointerType,n=t.scope,r={interaction:En.default.search(t),searchDetails:t};return n.fire("interactions:find",r),r.interaction||n.interactions.new({pointerType:e})}function Fn(t,e){var n=t.doc,r=t.scope,i=t.options,o=r.interactions.docEvents,a=r.events,s=a[e];for(var u in r.browser.isIOS&&!i.events&&(i.events={passive:!1}),a.delegatedEvents)s(n,u,a.delegateListener),s(n,u,a.delegateUseCapture,!0);for(var c=i&&i.events,l=0;l<o.length;l++){var f=o[l];s(n,f.type,f.listener,c)}}var Bn={id:"core/interactions",install:function(t){for(var e={},n=0;n<Dn.length;n++){var r=Dn[n];e[r]=$n(r,t)}var i,o=b.default.pEventTypes;function a(){for(var e=0;e<t.interactions.list.length;e++){var n=t.interactions.list[e];if(n.pointerIsDown&&"touch"===n.pointerType&&!n._interacting)for(var r=function(){var e=n.pointers[i];t.documents.some((function(t){var n=t.doc;return(0,_.nodeContains)(n,e.downTarget)}))||n.removePointer(e.pointer,e.event)},i=0;i<n.pointers.length;i++)r()}}(i=v.default.PointerEvent?[{type:o.down,listener:a},{type:o.down,listener:e.pointerDown},{type:o.move,listener:e.pointerMove},{type:o.up,listener:e.pointerUp},{type:o.cancel,listener:e.pointerUp}]:[{type:"mousedown",listener:e.pointerDown},{type:"mousemove",listener:e.pointerMove},{type:"mouseup",listener:e.pointerUp},{type:"touchstart",listener:a},{type:"touchstart",listener:e.pointerDown},{type:"touchmove",listener:e.pointerMove},{type:"touchend",listener:e.pointerUp},{type:"touchcancel",listener:e.pointerUp}]).push({type:"blur",listener:function(e){for(var n=0;n<t.interactions.list.length;n++)t.interactions.list[n].documentBlur(e)}}),t.prevTouchTime=0,t.Interaction=function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&In(t,e)}(s,e);var n,r,i,o,a=(i=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Ln(i);if(o){var n=Ln(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Mn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(r=[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(e){t.interactions.pointerMoveTolerance=e}},{key:"_now",value:function(){return t.now()}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),s}(Fe.default),t.interactions={list:[],new:function(e){e.scopeFire=function(e,n){return t.fire(e,n)};var n=new t.Interaction(e);return t.interactions.list.push(n),n},listeners:e,docEvents:i,pointerMoveTolerance:1},t.usePlugin(oe.default)},listeners:{"scope:add-document":function(t){return Fn(t,"add")},"scope:remove-document":function(t){return Fn(t,"remove")},"interactable:unset":function(t,e){for(var n=t.interactable,r=e.interactions.list.length-1;r>=0;r--){var i=e.interactions.list[r];i.interactable===n&&(i.stop(),e.fire("interactions:destroy",{interaction:i}),i.destroy(),e.interactions.list.length>2&&e.interactions.list.splice(r,1))}}},onDocSignal:Fn,doOnInteractions:$n,methodNames:Dn},Un=Bn;jn.default=Un;var zn={};function Wn(t){return Wn="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},Wn(t)}function Hn(){return Hn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Gn(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Hn.apply(this,arguments)}function Vn(t,e){return Vn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vn(t,e)}function Gn(t){return Gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gn(t)}function Yn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function qn(t,e,n){return e&&Xn(t.prototype,e),n&&Xn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Kn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(zn,"__esModule",{value:!0}),zn.Scope=void 0,zn.initScope=Jn;var Zn=function(){function t(){var e=this;Yn(this,t),Kn(this,"id","__interact_scope_".concat(Math.floor(100*Math.random()))),Kn(this,"isInitialized",!1),Kn(this,"listenerMaps",[]),Kn(this,"browser",b.default),Kn(this,"defaults",(0,de.default)(Pe.defaults)),Kn(this,"Eventable",sn.Eventable),Kn(this,"actions",{map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}}),Kn(this,"interactStatic",(0,hn.createInteractStatic)(this)),Kn(this,"InteractEvent",Ee.InteractEvent),Kn(this,"Interactable",void 0),Kn(this,"interactables",new gn.InteractableSet(this)),Kn(this,"_win",void 0),Kn(this,"document",void 0),Kn(this,"window",void 0),Kn(this,"documents",[]),Kn(this,"_plugins",{list:[],map:{}}),Kn(this,"onWindowUnload",(function(t){return e.removeDocument(t.target)}));var n=this;this.Interactable=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vn(t,e)}(o,t);var e,r,i=(e=o,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=Gn(e);if(r){var i=Gn(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return function(t,e){if(e&&("object"===Wn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function o(){return Yn(this,o),i.apply(this,arguments)}return qn(o,[{key:"_defaults",get:function(){return n.defaults}},{key:"set",value:function(t){return Hn(Gn(o.prototype),"set",this).call(this,t),n.fire("interactable:set",{options:t,interactable:this}),this}},{key:"unset",value:function(){Hn(Gn(o.prototype),"unset",this).call(this);var t=n.interactables.list.indexOf(this);t<0||(Hn(Gn(o.prototype),"unset",this).call(this),n.interactables.list.splice(t,1),n.fire("interactable:unset",{interactable:this}))}}]),o}(dn.Interactable)}return qn(t,[{key:"addListeners",value:function(t,e){this.listenerMaps.push({id:e,map:t})}},{key:"fire",value:function(t,e){for(var n=0;n<this.listenerMaps.length;n++){var r=this.listenerMaps[n].map[t];if(r&&!1===r(e,this,t))return!1}}},{key:"init",value:function(t){return this.isInitialized?this:Jn(this,t)}},{key:"pluginIsInstalled",value:function(t){return this._plugins.map[t.id]||-1!==this._plugins.list.indexOf(t)}},{key:"usePlugin",value:function(t,e){if(!this.isInitialized)return this;if(this.pluginIsInstalled(t))return this;if(t.id&&(this._plugins.map[t.id]=t),this._plugins.list.push(t),t.install&&t.install(this,e),t.listeners&&t.before){for(var n=0,r=this.listenerMaps.length,i=t.before.reduce((function(t,e){return t[e]=!0,t[Qn(e)]=!0,t}),{});n<r;n++){var o=this.listenerMaps[n].id;if(i[o]||i[Qn(o)])break}this.listenerMaps.splice(n,0,{id:t.id,map:t.listeners})}else t.listeners&&this.listenerMaps.push({id:t.id,map:t.listeners});return this}},{key:"addDocument",value:function(t,n){if(-1!==this.getDocIndex(t))return!1;var r=e.getWindow(t);n=n?(0,C.default)({},n):{},this.documents.push({doc:t,options:n}),this.events.documents.push(t),t!==this.document&&this.events.add(r,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:r,scope:this,options:n})}},{key:"removeDocument",value:function(t){var n=this.getDocIndex(t),r=e.getWindow(t),i=this.documents[n].options;this.events.remove(r,"unload",this.onWindowUnload),this.documents.splice(n,1),this.events.documents.splice(n,1),this.fire("scope:remove-document",{doc:t,window:r,scope:this,options:i})}},{key:"getDocIndex",value:function(t){for(var e=0;e<this.documents.length;e++)if(this.documents[e].doc===t)return e;return-1}},{key:"getDocOptions",value:function(t){var e=this.getDocIndex(t);return-1===e?null:this.documents[e].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),t}();function Jn(t,n){return t.isInitialized=!0,o.default.window(n)&&e.init(n),v.default.init(n),b.default.init(n),kt.default.init(n),t.window=n,t.document=n.document,t.usePlugin(jn.default),t.usePlugin(bn.default),t}function Qn(t){return t&&t.replace(/\/.*$/,"")}zn.Scope=Zn;var tr={};Object.defineProperty(tr,"__esModule",{value:!0}),tr.default=void 0;var er=new zn.Scope,nr=er.interactStatic;tr.default=nr;var rr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0;er.init(rr);var ir={};Object.defineProperty(ir,"__esModule",{value:!0}),ir.default=void 0,ir.default=function(){};var or={};Object.defineProperty(or,"__esModule",{value:!0}),or.default=void 0,or.default=function(){};var ar={};function sr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ur(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ur(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ur(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}Object.defineProperty(ar,"__esModule",{value:!0}),ar.default=void 0,ar.default=function(t){var e=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter((function(e){var n=sr(e,2),r=n[0],i=n[1];return r in t||i in t})),n=function(n,r){for(var i=t.range,o=t.limits,a=void 0===o?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:o,s=t.offset,u=void 0===s?{x:0,y:0}:s,c={range:i,grid:t,x:null,y:null},l=0;l<e.length;l++){var f=sr(e[l],2),h=f[0],d=f[1],p=Math.round((n-u.x)/t[h]),v=Math.round((r-u.y)/t[d]);c[h]=Math.max(a.left,Math.min(a.right,p*t[h]+u.x)),c[d]=Math.max(a.top,Math.min(a.bottom,v*t[d]+u.y))}return c};return n.grid=t,n.coordFields=e,n};var cr={};Object.defineProperty(cr,"__esModule",{value:!0}),Object.defineProperty(cr,"edgeTarget",{enumerable:!0,get:function(){return ir.default}}),Object.defineProperty(cr,"elements",{enumerable:!0,get:function(){return or.default}}),Object.defineProperty(cr,"grid",{enumerable:!0,get:function(){return ar.default}});var lr={};Object.defineProperty(lr,"__esModule",{value:!0}),lr.default=void 0;var fr={id:"snappers",install:function(t){var e=t.interactStatic;e.snappers=(0,C.default)(e.snappers||{},cr),e.createSnapGrid=e.snappers.grid}},hr=fr;lr.default=hr;var dr={};function pr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function vr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pr(Object(n),!0).forEach((function(e){gr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function gr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(dr,"__esModule",{value:!0}),dr.default=dr.aspectRatio=void 0;var mr={start:function(t){var e=t.state,n=t.rect,r=t.edges,i=t.pageCoords,o=e.options,a=o.ratio,s=o.enabled,u=e.options,c=u.equalDelta,l=u.modifiers;"preserve"===a&&(a=n.width/n.height),e.startCoords=(0,C.default)({},i),e.startRect=(0,C.default)({},n),e.ratio=a,e.equalDelta=c;var f=e.linkedEdges={top:r.top||r.left&&!r.bottom,left:r.left||r.top&&!r.right,bottom:r.bottom||r.right&&!r.top,right:r.right||r.bottom&&!r.left};if(e.xIsPrimaryAxis=!(!r.left&&!r.right),e.equalDelta){var h=(f.left?1:-1)*(f.top?1:-1);e.edgeSign={x:h,y:h}}else e.edgeSign={x:f.left?-1:1,y:f.top?-1:1};if(!1!==s&&(0,C.default)(r,f),null!=l&&l.length){var d=new pe.default(t.interaction);d.copyFrom(t.interaction.modification),d.prepareStates(l),e.subModification=d,d.startAll(vr({},t))}},set:function(t){var e=t.state,n=t.rect,r=t.coords,i=e.linkedEdges,o=(0,C.default)({},r),a=e.equalDelta?yr:br;if((0,C.default)(t.edges,i),a(e,e.xIsPrimaryAxis,r,n),!e.subModification)return null;var s=(0,C.default)({},n);(0,j.addEdges)(i,s,{x:r.x-o.x,y:r.y-o.y});var u=e.subModification.setAll(vr(vr({},t),{},{rect:s,edges:i,pageCoords:r,prevCoords:r,prevRect:s})),c=u.delta;return u.changed&&(a(e,Math.abs(c.x)>Math.abs(c.y),u.coords,u.rect),(0,C.default)(r,u.coords)),u.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function yr(t,e,n){var r=t.startCoords,i=t.edgeSign;e?n.y=r.y+(n.x-r.x)*i.y:n.x=r.x+(n.y-r.y)*i.x}function br(t,e,n,r){var i=t.startRect,o=t.startCoords,a=t.ratio,s=t.edgeSign;if(e){var u=r.width/a;n.y=o.y+(u-i.height)*s.y}else{var c=r.height*a;n.x=o.x+(c-i.width)*s.x}}dr.aspectRatio=mr;var wr=(0,xe.makeModifier)(mr,"aspectRatio");dr.default=wr;var xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.default=void 0;var _r=function(){};_r._defaults={};var Sr=_r;xr.default=Sr;var kr={};Object.defineProperty(kr,"__esModule",{value:!0}),Object.defineProperty(kr,"default",{enumerable:!0,get:function(){return xr.default}});var Pr={};function Er(t,e,n){return o.default.func(t)?j.resolveRectLike(t,e.interactable,e.element,[n.x,n.y,e]):j.resolveRectLike(t,e.interactable,e.element)}Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.default=void 0,Pr.getRestrictionRect=Er,Pr.restrict=void 0;var Or={start:function(t){var e=t.rect,n=t.startOffset,r=t.state,i=t.interaction,o=t.pageCoords,a=r.options,s=a.elementRect,u=(0,C.default)({left:0,top:0,right:0,bottom:0},a.offset||{});if(e&&s){var c=Er(a.restriction,i,o);if(c){var l=c.right-c.left-e.width,f=c.bottom-c.top-e.height;l<0&&(u.left+=l,u.right+=l),f<0&&(u.top+=f,u.bottom+=f)}u.left+=n.left-e.width*s.left,u.top+=n.top-e.height*s.top,u.right+=n.right-e.width*(1-s.right),u.bottom+=n.bottom-e.height*(1-s.bottom)}r.offset=u},set:function(t){var e=t.coords,n=t.interaction,r=t.state,i=r.options,o=r.offset,a=Er(i.restriction,n,e);if(a){var s=j.xywhToTlbr(a);e.x=Math.max(Math.min(s.right-o.right,e.x),s.left+o.left),e.y=Math.max(Math.min(s.bottom-o.bottom,e.y),s.top+o.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}};Pr.restrict=Or;var Tr=(0,xe.makeModifier)(Or,"restrict");Pr.default=Tr;var Cr={};Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.restrictEdges=Cr.default=void 0;var jr={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Mr={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Rr(t,e){for(var n=["top","left","bottom","right"],r=0;r<n.length;r++){var i=n[r];i in t||(t[i]=e[i])}return t}var Ar={noInner:jr,noOuter:Mr,start:function(t){var e,n=t.interaction,r=t.startOffset,i=t.state,o=i.options;if(o){var a=(0,Pr.getRestrictionRect)(o.offset,n,n.coords.start.page);e=j.rectToXY(a)}e=e||{x:0,y:0},i.offset={top:e.y+r.top,left:e.x+r.left,bottom:e.y-r.bottom,right:e.x-r.right}},set:function(t){var e=t.coords,n=t.edges,r=t.interaction,i=t.state,o=i.offset,a=i.options;if(n){var s=(0,C.default)({},e),u=(0,Pr.getRestrictionRect)(a.inner,r,s)||{},c=(0,Pr.getRestrictionRect)(a.outer,r,s)||{};Rr(u,jr),Rr(c,Mr),n.top?e.y=Math.min(Math.max(c.top+o.top,s.y),u.top+o.top):n.bottom&&(e.y=Math.max(Math.min(c.bottom+o.bottom,s.y),u.bottom+o.bottom)),n.left?e.x=Math.min(Math.max(c.left+o.left,s.x),u.left+o.left):n.right&&(e.x=Math.max(Math.min(c.right+o.right,s.x),u.right+o.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}};Cr.restrictEdges=Ar;var Ir=(0,xe.makeModifier)(Ar,"restrictEdges");Cr.default=Ir;var Lr={};Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.restrictRect=Lr.default=void 0;var Dr=(0,C.default)({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},Pr.restrict.defaults),$r={start:Pr.restrict.start,set:Pr.restrict.set,defaults:Dr};Lr.restrictRect=$r;var Nr=(0,xe.makeModifier)($r,"restrictRect");Lr.default=Nr;var Fr={};Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.restrictSize=Fr.default=void 0;var Br={width:-1/0,height:-1/0},Ur={width:1/0,height:1/0},zr={start:function(t){return Cr.restrictEdges.start(t)},set:function(t){var e=t.interaction,n=t.state,r=t.rect,i=t.edges,o=n.options;if(i){var a=j.tlbrToXywh((0,Pr.getRestrictionRect)(o.min,e,t.coords))||Br,s=j.tlbrToXywh((0,Pr.getRestrictionRect)(o.max,e,t.coords))||Ur;n.options={endOnly:o.endOnly,inner:(0,C.default)({},Cr.restrictEdges.noInner),outer:(0,C.default)({},Cr.restrictEdges.noOuter)},i.top?(n.options.inner.top=r.bottom-a.height,n.options.outer.top=r.bottom-s.height):i.bottom&&(n.options.inner.bottom=r.top+a.height,n.options.outer.bottom=r.top+s.height),i.left?(n.options.inner.left=r.right-a.width,n.options.outer.left=r.right-s.width):i.right&&(n.options.inner.right=r.left+a.width,n.options.outer.right=r.left+s.width),Cr.restrictEdges.set(t),n.options=o}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}};Fr.restrictSize=zr;var Wr=(0,xe.makeModifier)(zr,"restrictSize");Fr.default=Wr;var Hr={};Object.defineProperty(Hr,"__esModule",{value:!0}),Object.defineProperty(Hr,"default",{enumerable:!0,get:function(){return xr.default}});var Vr={};Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.snap=Vr.default=void 0;var Gr={start:function(t){var e,n=t.interaction,r=t.interactable,i=t.element,o=t.rect,a=t.state,s=t.startOffset,u=a.options,c=u.offsetWithOrigin?function(t){var e=t.interaction.element;return(0,j.rectToXY)((0,j.resolveRectLike)(t.state.options.origin,null,null,[e]))||(0,A.default)(t.interactable,e,t.interaction.prepared.name)}(t):{x:0,y:0};if("startCoords"===u.offset)e={x:n.coords.start.page.x,y:n.coords.start.page.y};else{var l=(0,j.resolveRectLike)(u.offset,r,i,[n]);(e=(0,j.rectToXY)(l)||{x:0,y:0}).x+=c.x,e.y+=c.y}var f=u.relativePoints;a.offsets=o&&f&&f.length?f.map((function(t,n){return{index:n,relativePoint:t,x:s.left-o.width*t.x+e.x,y:s.top-o.height*t.y+e.y}})):[{index:0,relativePoint:null,x:e.x,y:e.y}]},set:function(t){var e=t.interaction,n=t.coords,r=t.state,i=r.options,a=r.offsets,s=(0,A.default)(e.interactable,e.element,e.prepared.name),u=(0,C.default)({},n),c=[];i.offsetWithOrigin||(u.x-=s.x,u.y-=s.y);for(var l=0;l<a.length;l++)for(var f=a[l],h=u.x-f.x,d=u.y-f.y,p=0,v=i.targets.length;p<v;p++){var g,m=i.targets[p];(g=o.default.func(m)?m(h,d,e._proxy,f,p):m)&&c.push({x:(o.default.number(g.x)?g.x:h)+f.x,y:(o.default.number(g.y)?g.y:d)+f.y,range:o.default.number(g.range)?g.range:i.range,source:m,index:p,offset:f})}for(var y={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},b=0;b<c.length;b++){var w=c[b],x=w.range,_=w.x-u.x,S=w.y-u.y,k=(0,D.default)(_,S),P=k<=x;x===1/0&&y.inRange&&y.range!==1/0&&(P=!1),y.target&&!(P?y.inRange&&x!==1/0?k/x<y.distance/y.range:x===1/0&&y.range!==1/0||k<y.distance:!y.inRange&&k<y.distance)||(y.target=w,y.distance=k,y.range=x,y.inRange=P,y.delta.x=_,y.delta.y=S)}return y.inRange&&(n.x=y.target.x,n.y=y.target.y),r.closest=y,y},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}};Vr.snap=Gr;var Yr=(0,xe.makeModifier)(Gr,"snap");Vr.default=Yr;var Xr={};function qr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.snapSize=Xr.default=void 0;var Kr={start:function(t){var e=t.state,n=t.edges,r=e.options;if(!n)return null;t.state={options:{targets:null,relativePoints:[{x:n.left?0:1,y:n.top?0:1}],offset:r.offset||"self",origin:{x:0,y:0},range:r.range}},e.targetFields=e.targetFields||[["width","height"],["x","y"]],Vr.snap.start(t),e.offsets=t.state.offsets,t.state=e},set:function(t){var e,n=t.interaction,r=t.state,i=t.coords,a=r.options,s=r.offsets,u={x:i.x-s[0].x,y:i.y-s[0].y};r.options=(0,C.default)({},a),r.options.targets=[];for(var c=0;c<(a.targets||[]).length;c++){var l=(a.targets||[])[c],f=void 0;if(f=o.default.func(l)?l(u.x,u.y,n):l){for(var h=0;h<r.targetFields.length;h++){var d=(2,function(t){if(Array.isArray(t))return t}(e=r.targetFields[h])||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),2!==o.length);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e)||function(t,e){if(t){if("string"==typeof t)return qr(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qr(t,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),p=d[0],v=d[1];if(p in f||v in f){f.x=f[p],f.y=f[v];break}}r.options.targets.push(f)}}var g=Vr.snap.set(t);return r.options=a,g},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}};Xr.snapSize=Kr;var Zr=(0,xe.makeModifier)(Kr,"snapSize");Xr.default=Zr;var Jr={};Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.snapEdges=Jr.default=void 0;var Qr={start:function(t){var e=t.edges;return e?(t.state.targetFields=t.state.targetFields||[[e.left?"left":"right",e.top?"top":"bottom"]],Xr.snapSize.start(t)):null},set:Xr.snapSize.set,defaults:(0,C.default)((0,de.default)(Xr.snapSize.defaults),{targets:null,range:null,offset:{x:0,y:0}})};Jr.snapEdges=Qr;var ti=(0,xe.makeModifier)(Qr,"snapEdges");Jr.default=ti;var ei={};Object.defineProperty(ei,"__esModule",{value:!0}),Object.defineProperty(ei,"default",{enumerable:!0,get:function(){return xr.default}});var ni={};Object.defineProperty(ni,"__esModule",{value:!0}),Object.defineProperty(ni,"default",{enumerable:!0,get:function(){return xr.default}});var ri={};Object.defineProperty(ri,"__esModule",{value:!0}),ri.default=void 0;var ii={aspectRatio:dr.default,restrictEdges:Cr.default,restrict:Pr.default,restrictRect:Lr.default,restrictSize:Fr.default,snapEdges:Jr.default,snap:Vr.default,snapSize:Xr.default,spring:ei.default,avoid:kr.default,transform:ni.default,rubberband:Hr.default};ri.default=ii;var oi={};Object.defineProperty(oi,"__esModule",{value:!0}),oi.default=void 0;var ai={id:"modifiers",install:function(t){var e=t.interactStatic;for(var n in t.usePlugin(xe.default),t.usePlugin(lr.default),e.modifiers=ri.default,ri.default){var r=ri.default[n],i=r._defaults,o=r._methods;i._methods=o,t.defaults.perAction[n]=i}}},si=ai;oi.default=si;var ui={};function ci(t){return ci="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},ci(t)}function li(t,e){return li=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},li(t,e)}function fi(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function hi(t){return hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hi(t)}Object.defineProperty(ui,"__esModule",{value:!0}),ui.default=ui.PointerEvent=void 0;var di=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&li(t,e)}(a,t);var e,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=hi(r);if(i){var n=hi(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===ci(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return fi(t)}(this,t)});function a(t,e,n,r,i,s){var u;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),u=o.call(this,i),N.pointerExtend(fi(u),n),n!==e&&N.pointerExtend(fi(u),e),u.timeStamp=s,u.originalEvent=n,u.type=t,u.pointerId=N.getPointerId(e),u.pointerType=N.getPointerType(e),u.target=r,u.currentTarget=null,"tap"===t){var c=i.getPointerIndex(e);u.dt=u.timeStamp-i.pointers[c].downTime;var l=u.timeStamp-i.tapTime;u.double=!!i.prevTap&&"doubletap"!==i.prevTap.type&&i.prevTap.target===u.target&&l<500}else"doubletap"===t&&(u.dt=e.timeStamp-i.tapTime,u.double=!0);return u}return e=a,(n=[{key:"_subtractOrigin",value:function(t){var e=t.x,n=t.y;return this.pageX-=e,this.pageY-=n,this.clientX-=e,this.clientY-=n,this}},{key:"_addOrigin",value:function(t){var e=t.x,n=t.y;return this.pageX+=e,this.pageY+=n,this.clientX+=e,this.clientY+=n,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(V.BaseEvent);ui.PointerEvent=ui.default=di;var pi={};Object.defineProperty(pi,"__esModule",{value:!0}),pi.default=void 0;var vi={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=vi,t.defaults.actions.pointerEvents=vi.defaults,(0,C.default)(t.actions.phaselessTypes,vi.types)},listeners:{"interactions:new":function(t){var e=t.interaction;e.prevTap=null,e.tapTime=0},"interactions:update-pointer":function(t){var e=t.down,n=t.pointerInfo;!e&&n.hold||(n.hold={duration:1/0,timeout:null})},"interactions:move":function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;t.duplicate||n.pointerIsDown&&!n.pointerWasMoved||(n.pointerIsDown&&yi(t),gi({interaction:n,pointer:r,event:i,eventTarget:o,type:"move"},e))},"interactions:down":function(t,e){!function(t,e){for(var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget,a=t.pointerIndex,s=n.pointers[a].hold,u=_.getPath(o),c={interaction:n,pointer:r,event:i,eventTarget:o,type:"hold",targets:[],path:u,node:null},l=0;l<u.length;l++){var f=u[l];c.node=f,e.fire("pointerEvents:collect-targets",c)}if(c.targets.length){for(var h=1/0,d=0;d<c.targets.length;d++){var p=c.targets[d].eventable.options.holdDuration;p<h&&(h=p)}s.duration=h,s.timeout=setTimeout((function(){gi({interaction:n,eventTarget:o,pointer:r,event:i,type:"hold"},e)}),h)}}(t,e),gi(t,e)},"interactions:up":function(t,e){yi(t),gi(t,e),function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;n.pointerWasMoved||gi({interaction:n,eventTarget:o,pointer:r,event:i,type:"tap"},e)}(t,e)},"interactions:cancel":function(t,e){yi(t),gi(t,e)}},PointerEvent:ui.PointerEvent,fire:gi,collectEventTargets:mi,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function gi(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget,a=t.type,s=t.targets,u=void 0===s?mi(t,e):s,c=new ui.PointerEvent(a,r,i,o,n,e.now());e.fire("pointerEvents:new",{pointerEvent:c});for(var l={interaction:n,pointer:r,event:i,eventTarget:o,targets:u,type:a,pointerEvent:c},f=0;f<u.length;f++){var h=u[f];for(var d in h.props||{})c[d]=h.props[d];var p=(0,A.default)(h.eventable,h.node);if(c._subtractOrigin(p),c.eventable=h.eventable,c.currentTarget=h.node,h.eventable.fire(c),c._addOrigin(p),c.immediatePropagationStopped||c.propagationStopped&&f+1<u.length&&u[f+1].node!==c.currentTarget)break}if(e.fire("pointerEvents:fired",l),"tap"===a){var v=c.double?gi({interaction:n,pointer:r,event:i,eventTarget:o,type:"doubletap"},e):c;n.prevTap=v,n.tapTime=v.timeStamp}return c}function mi(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget,a=t.type,s=n.getPointerIndex(r),u=n.pointers[s];if("tap"===a&&(n.pointerWasMoved||!u||u.downTarget!==o))return[];for(var c=_.getPath(o),l={interaction:n,pointer:r,event:i,eventTarget:o,type:a,path:c,targets:[],node:null},f=0;f<c.length;f++){var h=c[f];l.node=h,e.fire("pointerEvents:collect-targets",l)}return"hold"===a&&(l.targets=l.targets.filter((function(t){var e;return t.eventable.options.holdDuration===(null==(e=n.pointers[s])?void 0:e.hold.duration)}))),l.targets}function yi(t){var e=t.interaction,n=t.pointerIndex,r=e.pointers[n].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var bi=vi;pi.default=bi;var wi={};function xi(t){var e=t.interaction;e.holdIntervalHandle&&(clearInterval(e.holdIntervalHandle),e.holdIntervalHandle=null)}Object.defineProperty(wi,"__esModule",{value:!0}),wi.default=void 0;var _i={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin(pi.default);var e=t.pointerEvents;e.defaults.holdRepeatInterval=0,e.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce((function(t,e){return t["pointerEvents:".concat(e)]=xi,t}),{"pointerEvents:new":function(t){var e=t.pointerEvent;"hold"===e.type&&(e.count=(e.count||0)+1)},"pointerEvents:fired":function(t,e){var n=t.interaction,r=t.pointerEvent,i=t.eventTarget,o=t.targets;if("hold"===r.type&&o.length){var a=o[0].eventable.options.holdRepeatInterval;a<=0||(n.holdIntervalHandle=setTimeout((function(){e.pointerEvents.fire({interaction:n,eventTarget:i,type:"hold",pointer:r,event:r},e)}),a))}}})},Si=_i;wi.default=Si;var ki={};function Pi(t){return(0,C.default)(this.events.options,t),this}Object.defineProperty(ki,"__esModule",{value:!0}),ki.default=void 0;var Ei={id:"pointer-events/interactableTargets",install:function(t){var e=t.Interactable;e.prototype.pointerEvents=Pi;var n=e.prototype._backCompatOption;e.prototype._backCompatOption=function(t,e){var r=n.call(this,t,e);return r===this&&(this.events.options[t]=e),r}},listeners:{"pointerEvents:collect-targets":function(t,e){var n=t.targets,r=t.node,i=t.type,o=t.eventTarget;e.interactables.forEachMatch(r,(function(t){var e=t.events,a=e.options;e.types[i]&&e.types[i].length&&t.testIgnoreAllow(a,r,o)&&n.push({node:r,eventable:e,props:{interactable:t}})}))},"interactable:new":function(t){var e=t.interactable;e.events.getRect=function(t){return e.getRect(t)}},"interactable:set":function(t,e){var n=t.interactable,r=t.options;(0,C.default)(n.events.options,e.pointerEvents.defaults),(0,C.default)(n.events.options,r.pointerEvents||{})}}},Oi=Ei;ki.default=Oi;var Ti={};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.default=void 0;var Ci={id:"pointer-events",install:function(t){t.usePlugin(pi),t.usePlugin(wi.default),t.usePlugin(ki.default)}},ji=Ci;Ti.default=ji;var Mi={};function Ri(t){var e=t.Interactable;t.actions.phases.reflow=!0,e.prototype.reflow=function(e){return function(t,e,n){for(var r=o.default.string(t.target)?X.from(t._context.querySelectorAll(t.target)):[t.target],i=n.window.Promise,a=i?[]:null,s=function(){var o=r[u],s=t.getRect(o);if(!s)return"break";var c=X.find(n.interactions.list,(function(n){return n.interacting()&&n.interactable===t&&n.element===o&&n.prepared.name===e.name})),l=void 0;if(c)c.move(),a&&(l=c._reflowPromise||new i((function(t){c._reflowResolve=t})));else{var f=(0,j.tlbrToXywh)(s),h={page:{x:f.x,y:f.y},client:{x:f.x,y:f.y},timeStamp:n.now()},d=N.coordsToEvent(h);l=function(t,e,n,r,i){var o=t.interactions.new({pointerType:"reflow"}),a={interaction:o,event:i,pointer:i,eventTarget:n,phase:"reflow"};o.interactable=e,o.element=n,o.prevEvent=i,o.updatePointer(i,i,n,!0),N.setZeroCoords(o.coords.delta),(0,Lt.copyAction)(o.prepared,r),o._doPhase(a);var s=t.window.Promise,u=s?new s((function(t){o._reflowResolve=t})):void 0;return o._reflowPromise=u,o.start(r,e,n),o._interacting?(o.move(a),o.end(i)):(o.stop(),o._reflowResolve()),o.removePointer(i,i),u}(n,t,o,e,d)}a&&a.push(l)},u=0;u<r.length&&"break"!==s();u++);return a&&i.all(a).then((function(){return t}))}(this,e,t)}}Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.default=void 0,Mi.install=Ri;var Ai={id:"reflow",install:Ri,listeners:{"interactions:stop":function(t,e){var n=t.interaction;"reflow"===n.pointerType&&(n._reflowResolve&&n._reflowResolve(),X.remove(e.interactions.list,n))}}},Ii=Ai;Mi.default=Ii;var Li={};Object.defineProperty(Li,"__esModule",{value:!0}),Li.default=void 0,tr.default.use(oe.default),tr.default.use(He.default),tr.default.use(Ti.default),tr.default.use(Je.default),tr.default.use(oi.default),tr.default.use(re.default),tr.default.use(_t.default),tr.default.use(Ct.default),tr.default.use(Mi.default);var Di=tr.default;Li.default=Di,tr.default.default=tr.default,_t.default,Ct.default,re.default,oe.default,he.default,Je.default,tr.default,oi.default,He.default,Ti.default,Mi.default;var $i={exports:{}};function Ni(t){return Ni="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},Ni(t)}Object.defineProperty($i.exports,"__esModule",{value:!0}),$i.exports.default=void 0;var Fi=Li.default;if($i.exports.default=Fi,"object"===Ni($i)&&$i)try{$i.exports=Li.default}catch(t){}return Li.default.default=Li.default,$i.exports}()},4581:function(t,e,n){!function(t,e,n){var r,i,o,a,s,u,c,l,f,h,d,p,v,g,m,y,b,w,x,_,S,k,P,E,O,T,C,j,M,R,A,I,L,D={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,n=t(this).data("cbox-img-attrs");return"object"==typeof n&&t.each(n,(function(t,n){e[t]=n})),e},createIframe:function(){var n=e.createElement("iframe"),r=t(this).data("cbox-iframe-attrs");return"object"==typeof r&&t.each(r,(function(t,e){n[t]=e})),"frameBorder"in n&&(n.frameBorder=0),"allowTransparency"in n&&(n.allowTransparency="true"),n.name=(new Date).getTime(),n.allowFullscreen=!0,n}},$="colorbox",N="cbox",F=N+"Element",B=N+"_open",U=N+"_load",z=N+"_complete",W=N+"_cleanup",H=N+"_closed",V=N+"_purge",G=t("<a/>"),Y="div",X=0,q={};function K(n,r,i){var o=e.createElement(n);return r&&(o.id=N+r),i&&(o.style.cssText=i),t(o)}function Z(){return n.innerHeight?n.innerHeight:t(n).height()}function J(e,n){n!==Object(n)&&(n={}),this.cache={},this.el=e,this.value=function(e){var r;return void 0===this.cache[e]&&(void 0!==(r=t(this.el).attr("data-cbox-"+e))?this.cache[e]=r:void 0!==n[e]?this.cache[e]=n[e]:void 0!==D[e]&&(this.cache[e]=D[e])),this.cache[e]},this.get=function(e){var n=this.value(e);return t.isFunction(n)?n.call(this.el,this):n}}function Q(t){var e=f.length,n=(T+t)%e;return n<0?e+n:n}function tt(t,e){return Math.round((/%/.test(t)?("x"===e?h.width():Z())/100:1)*parseInt(t,10))}function et(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function nt(t,e){return t.get("retinaUrl")&&n.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function rt(t){"contains"in i[0]&&!i[0].contains(t.target)&&t.target!==r[0]&&(t.stopPropagation(),i.focus())}function it(t){it.str!==t&&(i.add(r).removeClass(it.str).addClass(t),it.str=t)}function ot(n){t(e).trigger(n),G.triggerHandler(n)}var at=function(){var t,e,n=N+"Slideshow_",r="click."+N;function o(){clearTimeout(e)}function a(){(S.get("loop")||f[T+1])&&(o(),e=setTimeout(I.next,S.get("slideshowSpeed")))}function s(){y.html(S.get("slideshowStop")).unbind(r).one(r,u),G.bind(z,a).bind(U,o),i.removeClass(n+"off").addClass(n+"on")}function u(){o(),G.unbind(z,a).unbind(U,o),y.html(S.get("slideshowStart")).unbind(r).one(r,(function(){I.next(),s()})),i.removeClass(n+"on").addClass(n+"off")}function c(){t=!1,y.hide(),o(),G.unbind(z,a).unbind(U,o),i.removeClass(n+"off "+n+"on")}return function(){t?S.get("slideshow")||(G.unbind(W,c),c()):S.get("slideshow")&&f[1]&&(t=!0,G.one(W,c),S.get("slideshowAuto")?s():u(),y.show())}}();function st(o){var h,m;if(!R){if(h=t(o).data($),S=new J(o,h),m=S.get("rel"),T=0,m&&!1!==m&&"nofollow"!==m?(f=t("."+F).filter((function(){return new J(this,t.data(this,$)).get("rel")===m})),-1===(T=f.index(S.el))&&(f=f.add(S.el),T=f.length-1)):f=t(S.el),!j){j=M=!0,it(S.get("className")),i.css({visibility:"hidden",display:"block",opacity:""}),d=K(Y,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),a.css({width:"",height:""}).append(d),k=s.height()+l.height()+a.outerHeight(!0)-a.height(),P=u.width()+c.width()+a.outerWidth(!0)-a.width(),E=d.outerHeight(!0),O=d.outerWidth(!0);var y=tt(S.get("initialWidth"),"x"),b=tt(S.get("initialHeight"),"y"),w=S.get("maxWidth"),L=S.get("maxHeight");S.w=Math.max((!1!==w?Math.min(y,tt(w,"x")):y)-O-P,0),S.h=Math.max((!1!==L?Math.min(b,tt(L,"y")):b)-E-k,0),d.css({width:"",height:S.h}),I.position(),ot(B),S.get("onOpen"),_.add(g).hide(),i.focus(),S.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",rt,!0),G.one(H,(function(){e.removeEventListener("focus",rt,!0)}))),S.get("returnFocus")&&G.one(H,(function(){t(S.el).focus()}))}var D=parseFloat(S.get("opacity"));r.css({opacity:D==D?D:"",cursor:S.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),S.get("closeButton")?x.html(S.get("close")).appendTo(a):x.appendTo("<div/>"),function(){var e,r,i,o=I.prep,a=++X;if(M=!0,C=!1,ot(V),ot(U),S.get("onLoad"),S.h=S.get("height")?tt(S.get("height"),"y")-E-k:S.get("innerHeight")&&tt(S.get("innerHeight"),"y"),S.w=S.get("width")?tt(S.get("width"),"x")-O-P:S.get("innerWidth")&&tt(S.get("innerWidth"),"x"),S.mw=S.w,S.mh=S.h,S.get("maxWidth")&&(S.mw=tt(S.get("maxWidth"),"x")-O-P,S.mw=S.w&&S.w<S.mw?S.w:S.mw),S.get("maxHeight")&&(S.mh=tt(S.get("maxHeight"),"y")-E-k,S.mh=S.h&&S.h<S.mh?S.h:S.mh),e=S.get("href"),A=setTimeout((function(){v.show()}),100),S.get("inline")){var s=t(e).eq(0);i=t("<div>").hide().insertBefore(s),G.one(V,(function(){i.replaceWith(s)})),o(s)}else S.get("iframe")?o(" "):S.get("html")?o(S.get("html")):et(S,e)?(e=nt(S,e),C=S.get("createImg"),t(C).addClass(N+"Photo").bind("error."+N,(function(){o(K(Y,"Error").html(S.get("imgError")))})).one("load",(function(){a===X&&setTimeout((function(){var e;S.get("retinaImage")&&n.devicePixelRatio>1&&(C.height=C.height/n.devicePixelRatio,C.width=C.width/n.devicePixelRatio),S.get("scalePhotos")&&(r=function(){C.height-=C.height*e,C.width-=C.width*e},S.mw&&C.width>S.mw&&(e=(C.width-S.mw)/C.width,r()),S.mh&&C.height>S.mh&&(e=(C.height-S.mh)/C.height,r())),S.h&&(C.style.marginTop=Math.max(S.mh-C.height,0)/2+"px"),f[1]&&(S.get("loop")||f[T+1])&&(C.style.cursor="pointer",t(C).bind("click."+N,(function(){I.next()}))),C.style.width=C.width+"px",C.style.height=C.height+"px",o(C)}),1)})),C.src=e):e&&p.load(e,S.get("data"),(function(e,n){a===X&&o("error"===n?K(Y,"Error").html(S.get("xhrError")):t(this).contents())}))}()}}function ut(){i||(L=!1,h=t(n),i=K(Y).attr({id:$,class:!1===t.support.opacity?N+"IE":"",role:"dialog",tabindex:"-1"}).hide(),r=K(Y,"Overlay").hide(),v=t([K(Y,"LoadingOverlay")[0],K(Y,"LoadingGraphic")[0]]),o=K(Y,"Wrapper"),a=K(Y,"Content").append(g=K(Y,"Title"),m=K(Y,"Current"),w=t('<button type="button"/>').attr({id:N+"Previous"}),b=t('<button type="button"/>').attr({id:N+"Next"}),y=t('<button type="button"/>').attr({id:N+"Slideshow"}),v),x=t('<button type="button"/>').attr({id:N+"Close"}),o.append(K(Y).append(K(Y,"TopLeft"),s=K(Y,"TopCenter"),K(Y,"TopRight")),K(Y,!1,"clear:left").append(u=K(Y,"MiddleLeft"),a,c=K(Y,"MiddleRight")),K(Y,!1,"clear:left").append(K(Y,"BottomLeft"),l=K(Y,"BottomCenter"),K(Y,"BottomRight"))).find("div div").css({float:"left"}),p=K(Y,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),_=b.add(w).add(m).add(y)),e.body&&!i.parent().length&&t(e.body).append(r,i.append(o,p))}t[$]||(t(ut),(I=t.fn[$]=t[$]=function(n,o){var a=this;return n=n||{},t.isFunction(a)&&(a=t("<a/>"),n.open=!0),a[0]?(ut(),function(){function n(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),st(this))}return!!i&&(L||(L=!0,b.click((function(){I.next()})),w.click((function(){I.prev()})),x.click((function(){I.close()})),r.click((function(){S.get("overlayClose")&&I.close()})),t(e).bind("keydown."+N,(function(t){var e=t.keyCode;j&&S.get("escKey")&&27===e&&(t.preventDefault(),I.close()),j&&S.get("arrowKey")&&f[1]&&!t.altKey&&(37===e?(t.preventDefault(),w.click()):39===e&&(t.preventDefault(),b.click()))})),t.isFunction(t.fn.on)?t(e).on("click."+N,"."+F,n):t("."+F).live("click."+N,n)),!0)}()&&(o&&(n.onComplete=o),a.each((function(){var e=t.data(this,$)||{};t.data(this,$,t.extend(e,n))})).addClass(F),new J(a[0],n).get("open")&&st(a[0])),a):a}).position=function(e,n){var r,f,d,p=0,v=0,g=i.offset();function m(){s[0].style.width=l[0].style.width=a[0].style.width=parseInt(i[0].style.width,10)-P+"px",a[0].style.height=u[0].style.height=c[0].style.height=parseInt(i[0].style.height,10)-k+"px"}if(h.unbind("resize."+N),i.css({top:-9e4,left:-9e4}),f=h.scrollTop(),d=h.scrollLeft(),S.get("fixed")?(g.top-=f,g.left-=d,i.css({position:"fixed"})):(p=f,v=d,i.css({position:"absolute"})),!1!==S.get("right")?v+=Math.max(h.width()-S.w-O-P-tt(S.get("right"),"x"),0):!1!==S.get("left")?v+=tt(S.get("left"),"x"):v+=Math.round(Math.max(h.width()-S.w-O-P,0)/2),!1!==S.get("bottom")?p+=Math.max(Z()-S.h-E-k-tt(S.get("bottom"),"y"),0):!1!==S.get("top")?p+=tt(S.get("top"),"y"):p+=Math.round(Math.max(Z()-S.h-E-k,0)/2),i.css({top:g.top,left:g.left,visibility:"visible"}),o[0].style.width=o[0].style.height="9999px",r={width:S.w+O+P,height:S.h+E+k,top:p,left:v},e){var y=0;t.each(r,(function(t){r[t]===q[t]||(y=e)})),e=y}q=r,e||i.css(r),i.dequeue().animate(r,{duration:e||0,complete:function(){m(),M=!1,o[0].style.width=S.w+O+P+"px",o[0].style.height=S.h+E+k+"px",S.get("reposition")&&setTimeout((function(){h.bind("resize."+N,I.position)}),1),t.isFunction(n)&&n()},step:m})},I.resize=function(t){var e;j&&((t=t||{}).width&&(S.w=tt(t.width,"x")-O-P),t.innerWidth&&(S.w=tt(t.innerWidth,"x")),d.css({width:S.w}),t.height&&(S.h=tt(t.height,"y")-E-k),t.innerHeight&&(S.h=tt(t.innerHeight,"y")),t.innerHeight||t.height||(e=d.scrollTop(),d.css({height:"auto"}),S.h=d.height()),d.css({height:S.h}),e&&d.scrollTop(e),I.position("none"===S.get("transition")?0:S.get("speed")))},I.prep=function(n){if(j){var r,o="none"===S.get("transition")?0:S.get("speed");d.remove(),(d=K(Y,"LoadedContent").append(n)).hide().appendTo(p.show()).css({width:(S.w=S.w||d.width(),S.w=S.mw&&S.mw<S.w?S.mw:S.w,S.w),overflow:S.get("scrolling")?"auto":"hidden"}).css({height:(S.h=S.h||d.height(),S.h=S.mh&&S.mh<S.h?S.mh:S.h,S.h)}).prependTo(a),p.hide(),t(C).css({float:"none"}),it(S.get("className")),r=function(){var n,r,a=f.length;function s(){!1===t.support.opacity&&i[0].style.removeAttribute("filter")}j&&(r=function(){clearTimeout(A),v.hide(),ot(z),S.get("onComplete")},g.html(S.get("title")).show(),d.show(),a>1?("string"==typeof S.get("current")&&m.html(S.get("current").replace("{current}",T+1).replace("{total}",a)).show(),b[S.get("loop")||T<a-1?"show":"hide"]().html(S.get("next")),w[S.get("loop")||T?"show":"hide"]().html(S.get("previous")),at(),S.get("preloading")&&t.each([Q(-1),Q(1)],(function(){var n=f[this],r=new J(n,t.data(n,$)),i=r.get("href");i&&et(r,i)&&(i=nt(r,i),e.createElement("img").src=i)}))):_.hide(),S.get("iframe")?(n=S.get("createIframe"),S.get("scrolling")||(n.scrolling="no"),t(n).attr({src:S.get("href"),class:N+"Iframe"}).one("load",r).appendTo(d),G.one(V,(function(){n.src="//about:blank"})),S.get("fastIframe")&&t(n).trigger("load")):r(),"fade"===S.get("transition")?i.fadeTo(o,1,s):s())},"fade"===S.get("transition")?i.fadeTo(o,0,(function(){I.position(0,r)})):I.position(o,r)}},I.next=function(){!M&&f[1]&&(S.get("loop")||f[T+1])&&(T=Q(1),st(f[T]))},I.prev=function(){!M&&f[1]&&(S.get("loop")||T)&&(T=Q(-1),st(f[T]))},I.close=function(){j&&!R&&(R=!0,j=!1,ot(W),S.get("onCleanup"),h.unbind("."+N),r.fadeTo(S.get("fadeOut")||0,0),i.stop().fadeTo(S.get("fadeOut")||0,0,(function(){i.hide(),r.hide(),ot(V),d.remove(),setTimeout((function(){R=!1,ot(H),S.get("onClosed")}),1)})))},I.remove=function(){i&&(i.stop(),t[$].close(),i.stop(!1,!0).remove(),r.remove(),R=!1,i=null,t("."+F).removeData($).removeClass(F),t(e).unbind("click."+N).unbind("keydown."+N))},I.element=function(){return t(S.el)},I.settings=D)}(n(5311),document,window)},5557:function(t,e,n){!function(t){if(t.support.touch="ontouchend"in document,t.support.touch){var e,n=t.ui.mouse.prototype,r=n._mouseInit,i=n._mouseDestroy;n._touchStart=function(t){!e&&this._mouseCapture(t.originalEvent.changedTouches[0])&&(e=!0,this._touchMoved=!1,o(t,"mouseover"),o(t,"mousemove"),o(t,"mousedown"))},n._touchMove=function(t){e&&(this._touchMoved=!0,o(t,"mousemove"))},n._touchEnd=function(t){e&&(o(t,"mouseup"),o(t,"mouseout"),this._touchMoved||o(t,"click"),e=!1)},n._mouseInit=function(){var e=this;e.element.bind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),r.call(e)},n._mouseDestroy=function(){var e=this;e.element.unbind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),i.call(e)}}function o(t,e){if(!(t.originalEvent.touches.length>1)){t.preventDefault();var n=t.originalEvent.changedTouches[0],r=document.createEvent("MouseEvents");r.initMouseEvent(e,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(r)}}}(n(5311))},1870:function(t,e,n){var r,i,o;i=[n(5311),n(5592)],void 0===(o="function"==typeof(r=function(t){return t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase())})?r.apply(e,i):r)||(t.exports=o)},7053:function(t,e,n){var r,i,o;i=[n(5311),n(5592)],void 0===(o="function"==typeof(r=function(t){return t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}})?r.apply(e,i):r)||(t.exports=o)},5592:function(t,e,n){var r,i,o;i=[n(5311)],void 0===(o="function"==typeof(r=function(t){return t.ui=t.ui||{},t.ui.version="1.12.1"})?r.apply(e,i):r)||(t.exports=o)},6891:function(t,e,n){var r,i,o;i=[n(5311),n(5592)],r=function(t){var e,n=0,r=Array.prototype.slice;return t.cleanData=(e=t.cleanData,function(n){var r,i,o;for(o=0;null!=(i=n[o]);o++)try{(r=t._data(i,"events"))&&r.remove&&t(i).triggerHandler("remove")}catch(t){}e(n)}),t.widget=function(e,n,r){var i,o,a,s={},u=e.split(".")[0],c=u+"-"+(e=e.split(".")[1]);return r||(r=n,n=t.Widget),t.isArray(r)&&(r=t.extend.apply(null,[{}].concat(r))),t.expr[":"][c.toLowerCase()]=function(e){return!!t.data(e,c)},t[u]=t[u]||{},i=t[u][e],o=t[u][e]=function(t,e){if(!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},t.extend(o,i,{version:r.version,_proto:t.extend({},r),_childConstructors:[]}),(a=new n).options=t.widget.extend({},a.options),t.each(r,(function(e,r){t.isFunction(r)?s[e]=function(){function t(){return n.prototype[e].apply(this,arguments)}function i(t){return n.prototype[e].apply(this,t)}return function(){var e,n=this._super,o=this._superApply;return this._super=t,this._superApply=i,e=r.apply(this,arguments),this._super=n,this._superApply=o,e}}():s[e]=r})),o.prototype=t.widget.extend(a,{widgetEventPrefix:i&&a.widgetEventPrefix||e},s,{constructor:o,namespace:u,widgetName:e,widgetFullName:c}),i?(t.each(i._childConstructors,(function(e,n){var r=n.prototype;t.widget(r.namespace+"."+r.widgetName,o,n._proto)})),delete i._childConstructors):n._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var n,i,o=r.call(arguments,1),a=0,s=o.length;a<s;a++)for(n in o[a])i=o[a][n],o[a].hasOwnProperty(n)&&void 0!==i&&(t.isPlainObject(i)?e[n]=t.isPlainObject(e[n])?t.widget.extend({},e[n],i):t.widget.extend({},i):e[n]=i);return e},t.widget.bridge=function(e,n){var i=n.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,s=r.call(arguments,1),u=this;return a?this.length||"instance"!==o?this.each((function(){var n,r=t.data(this,i);return"instance"===o?(u=r,!1):r?t.isFunction(r[o])&&"_"!==o.charAt(0)?(n=r[o].apply(r,s))!==r&&void 0!==n?(u=n&&n.jquery?u.pushStack(n.get()):n,!1):void 0:t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+o+"'")})):u=void 0:(s.length&&(o=t.widget.extend.apply(null,[o].concat(s))),this.each((function(){var e=t.data(this,i);e?(e.option(o||{}),e._init&&e._init()):t.data(this,i,new n(o,this))}))),u}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,r){r=t(r||this.defaultElement||this)[0],this.element=t(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},r!==this&&(t.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===r&&this.destroy()}}),this.document=t(r.style?r.ownerDocument:r.document||r),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,(function(t,n){e._removeClass(n,t)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,n){var r,i,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},r=e.split("."),e=r.shift(),r.length){for(i=a[e]=t.widget.extend({},this.options[e]),o=0;o<r.length-1;o++)i[r[o]]=i[r[o]]||{},i=i[r[o]];if(e=r.pop(),1===arguments.length)return void 0===i[e]?null:i[e];i[e]=n}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=n}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var n,r,i;for(n in e)i=this.classesElementLookup[n],e[n]!==this.options.classes[n]&&i&&i.length&&(r=t(i.get()),this._removeClass(i,n),r.addClass(this._classes({element:r,keys:n,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){var n=[],r=this;function i(i,o){var a,s;for(s=0;s<i.length;s++)a=r.classesElementLookup[i[s]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),r.classesElementLookup[i[s]]=a,n.push(i[s]),o&&e.classes[i[s]]&&n.push(e.classes[i[s]])}return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(e){var n=this;t.each(n.classesElementLookup,(function(r,i){-1!==t.inArray(e.target,i)&&(n.classesElementLookup[r]=t(i.not(e.target).get()))}))},_removeClass:function(t,e,n){return this._toggleClass(t,e,n,!1)},_addClass:function(t,e,n){return this._toggleClass(t,e,n,!0)},_toggleClass:function(t,e,n,r){r="boolean"==typeof r?r:n;var i="string"==typeof t||null===t,o={extra:i?e:n,keys:i?t:e,element:i?this.element:t,add:r};return o.element.toggleClass(this._classes(o),r),this},_on:function(e,n,r){var i,o=this;"boolean"!=typeof e&&(r=n,n=e,e=!1),r?(n=i=t(n),this.bindings=this.bindings.add(n)):(r=n,n=this.element,i=this.widget()),t.each(r,(function(r,a){function s(){if(e||!0!==o.options.disabled&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof a?o[a]:a).apply(o,arguments)}"string"!=typeof a&&(s.guid=a.guid=a.guid||s.guid||t.guid++);var u=r.match(/^([\w:-]*)\s*(.*)$/),c=u[1]+o.eventNamespace,l=u[2];l?i.on(c,l,s):n.on(c,s)}))},_off:function(e,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(n).off(n),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){var n=this;return setTimeout((function(){return("string"==typeof t?n[t]:t).apply(n,arguments)}),e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,n,r){var i,o,a=this.options[e];if(r=r||{},(n=t.Event(n)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(i in o)i in n||(n[i]=o[i]);return this.element.trigger(n,r),!(t.isFunction(a)&&!1===a.apply(this.element[0],[n].concat(r))||n.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},(function(e,n){t.Widget.prototype["_"+e]=function(r,i,o){var a;"string"==typeof i&&(i={effect:i});var s=i?!0===i||"number"==typeof i?n:i.effect||n:e;"number"==typeof(i=i||{})&&(i={duration:i}),a=!t.isEmptyObject(i),i.complete=o,i.delay&&r.delay(i.delay),a&&t.effects&&t.effects.effect[s]?r[e](i):s!==e&&r[s]?r[s](i.duration,i.easing,o):r.queue((function(n){t(this)[e](),o&&o.call(r[0]),n()}))}})),t.widget},void 0===(o=r.apply(e,i))||(t.exports=o)},6177:function(t,e,n){var r,i,o;i=[n(5311),n(1870),n(5592),n(6891)],void 0===(o="function"==typeof(r=function(t){var e=!1;return t(document).on("mouseup",(function(){e=!1})),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,(function(t){return e._mouseDown(t)})).on("click."+this.widgetName,(function(n){if(!0===t.data(n.target,e.widgetName+".preventClickEvent"))return t.removeData(n.target,e.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1})),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(n){if(!e){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(n),this._mouseDownEvent=n;var r=this,i=1===n.which,o=!("string"!=typeof this.options.cancel||!n.target.nodeName)&&t(n.target).closest(this.options.cancel).length;return!(i&&!o&&this._mouseCapture(n)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){r.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(n)&&this._mouseDelayMet(n)&&(this._mouseStarted=!1!==this._mouseStart(n),!this._mouseStarted)?(n.preventDefault(),0):(!0===t.data(n.target,this.widgetName+".preventClickEvent")&&t.removeData(n.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return r._mouseMove(t)},this._mouseUpDelegate=function(t){return r._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),n.preventDefault(),e=!0,0)))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(n){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,n.target===this._mouseDownEvent.target&&t.data(n.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(n)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,e=!1,n.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})?r.apply(e,i):r)||(t.exports=o)},6227:function(t,e,n){var r,i,o;i=[n(5311),n(6177),n(7053),n(5592),n(6891)],r=function(t){return t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,n,r=this.options,i=this.element.find(".ui-slider-handle"),o=[];for(n=r.values&&r.values.length||1,i.length>n&&(i.slice(n).remove(),i=i.slice(0,n)),e=i.length;e<n;e++)o.push("<span tabindex='0'></span>");this.handles=i.add(t(o.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each((function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)}))},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==e.range&&"max"!==e.range||this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var n,r,i,o,a,s,u,c=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),n={x:e.pageX,y:e.pageY},r=this._normValueFromMouse(n),i=this._valueMax()-this._valueMin()+1,this.handles.each((function(e){var n=Math.abs(r-c.values(e));(i>n||i===n&&(e===c._lastChangedValue||c.values(e)===l.min))&&(i=n,o=t(this),a=e)})),!1!==this._start(e,a)&&(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),s=o.offset(),u=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=u?{left:0,top:0}:{left:e.pageX-s.left-o.width()/2,top:e.pageY-s.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,r),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},n=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,n),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,n,r,i,o;return"horizontal"===this.orientation?(e=this.elementSize.width,n=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,n=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),(r=n/e)>1&&(r=1),r<0&&(r=0),"vertical"===this.orientation&&(r=1-r),i=this._valueMax()-this._valueMin(),o=this._valueMin()+r*i,this._trimAlignValue(o)},_uiHash:function(t,e,n){var r={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(r.value=void 0!==e?e:this.values(t),r.values=n||this.values()),r},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,n){var r,i=this.value(),o=this.values();this._hasMultipleValues()&&(r=this.values(e?0:1),i=this.values(e),2===this.options.values.length&&!0===this.options.range&&(n=0===e?Math.min(r,n):Math.max(r,n)),o[e]=n),n!==i&&!1!==this._trigger("slide",t,this._uiHash(e,n,o))&&(this._hasMultipleValues()?this.values(e,n):this.value(n))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,n){var r,i,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(n),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(r=this.options.values,i=arguments[0],o=0;o<r.length;o+=1)r[o]=this._trimAlignValue(i[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,n){var r,i=0;switch("range"===e&&!0===this.options.range&&("min"===n?(this.options.value=this._values(0),this.options.values=null):"max"===n&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(i=this.options.values.length),this._super(e,n),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(n),this.handles.css("horizontal"===n?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),r=i-1;r>=0;r--)this._change(null,r);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return this._trimAlignValue(t)},_values:function(t){var e,n,r;if(arguments.length)return e=this.options.values[t],this._trimAlignValue(e);if(this._hasMultipleValues()){for(n=this.options.values.slice(),r=0;r<n.length;r+=1)n[r]=this._trimAlignValue(n[r]);return n}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,n=(t-this._valueMin())%e,r=t-n;return 2*Math.abs(n)>=e&&(r+=n>0?e:-e),parseFloat(r.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),n=this.options.step;(t=Math.round((t-e)/n)*n+e)>this.options.max&&(t-=n),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),n=e.indexOf(".");return-1===n?0:e.length-n-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,n,r,i,o,a=this.options.range,s=this.options,u=this,c=!this._animateOff&&s.animate,l={};this._hasMultipleValues()?this.handles.each((function(r){n=(u.values(r)-u._valueMin())/(u._valueMax()-u._valueMin())*100,l["horizontal"===u.orientation?"left":"bottom"]=n+"%",t(this).stop(1,1)[c?"animate":"css"](l,s.animate),!0===u.options.range&&("horizontal"===u.orientation?(0===r&&u.range.stop(1,1)[c?"animate":"css"]({left:n+"%"},s.animate),1===r&&u.range[c?"animate":"css"]({width:n-e+"%"},{queue:!1,duration:s.animate})):(0===r&&u.range.stop(1,1)[c?"animate":"css"]({bottom:n+"%"},s.animate),1===r&&u.range[c?"animate":"css"]({height:n-e+"%"},{queue:!1,duration:s.animate}))),e=n})):(r=this.value(),i=this._valueMin(),o=this._valueMax(),n=o!==i?(r-i)/(o-i)*100:0,l["horizontal"===this.orientation?"left":"bottom"]=n+"%",this.handle.stop(1,1)[c?"animate":"css"](l,s.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:n+"%"},s.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:100-n+"%"},s.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:n+"%"},s.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:100-n+"%"},s.animate))},_handleEvents:{keydown:function(e){var n,r,i,o=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),!1===this._start(e,o)))return}switch(i=this.options.step,n=r=this._hasMultipleValues()?this.values(o):this.value(),e.keyCode){case t.ui.keyCode.HOME:r=this._valueMin();break;case t.ui.keyCode.END:r=this._valueMax();break;case t.ui.keyCode.PAGE_UP:r=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:r=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;r=this._trimAlignValue(n+i);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;r=this._trimAlignValue(n-i)}this._slide(e,o,r)},keyup:function(e){var n=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,n),this._change(e,n),this._removeClass(t(e.target),null,"ui-state-active"))}}})},void 0===(o=r.apply(e,i))||(t.exports=o)},5311:function(t){"use strict";t.exports=jQuery},509:function(t,e,n){"use strict";var r=n(9985),i=n(3691),o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not a function")}},2655:function(t,e,n){"use strict";var r=n(9429),i=n(3691),o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not a constructor")}},3550:function(t,e,n){"use strict";var r=n(9985),i=String,o=TypeError;t.exports=function(t){if("object"==typeof t||r(t))return t;throw new o("Can't set "+i(t)+" as a prototype")}},7370:function(t,e,n){"use strict";var r=n(4201),i=n(5391),o=n(2560).f,a=r("unscopables"),s=Array.prototype;void 0===s[a]&&o(s,a,{configurable:!0,value:i(null)}),t.exports=function(t){s[a][t]=!0}},727:function(t,e,n){"use strict";var r=n(730).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},767:function(t,e,n){"use strict";var r=n(3622),i=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw new i("Incorrect invocation")}},5027:function(t,e,n){"use strict";var r=n(8999),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not an object")}},1655:function(t,e,n){"use strict";var r=n(3689);t.exports=r((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},2872:function(t,e,n){"use strict";var r=n(690),i=n(7578),o=n(6310);t.exports=function(t){for(var e=r(this),n=o(e),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>s;)e[s++]=t;return e}},7612:function(t,e,n){"use strict";var r=n(2960).forEach,i=n(6834)("forEach");t.exports=i?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},1055:function(t,e,n){"use strict";var r=n(4071),i=n(2615),o=n(690),a=n(1228),s=n(3292),u=n(9429),c=n(6310),l=n(6522),f=n(5185),h=n(1664),d=Array;t.exports=function(t){var e=o(t),n=u(this),p=arguments.length,v=p>1?arguments[1]:void 0,g=void 0!==v;g&&(v=r(v,p>2?arguments[2]:void 0));var m,y,b,w,x,_,S=h(e),k=0;if(!S||this===d&&s(S))for(m=c(e),y=n?new this(m):d(m);m>k;k++)_=g?v(e[k],k):e[k],l(y,k,_);else for(x=(w=f(e,S)).next,y=n?new this:[];!(b=i(x,w)).done;k++)_=g?a(w,v,[b.value,k],!0):b.value,l(y,k,_);return y.length=k,y}},4328:function(t,e,n){"use strict";var r=n(5290),i=n(7578),o=n(6310),a=function(t){return function(e,n,a){var s,u=r(e),c=o(u),l=i(a,c);if(t&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},2960:function(t,e,n){"use strict";var r=n(4071),i=n(8844),o=n(4413),a=n(690),s=n(6310),u=n(7120),c=i([].push),l=function(t){var e=1===t,n=2===t,i=3===t,l=4===t,f=6===t,h=7===t,d=5===t||f;return function(p,v,g,m){for(var y,b,w=a(p),x=o(w),_=r(v,g),S=s(x),k=0,P=m||u,E=e?P(p,S):n||h?P(p,0):void 0;S>k;k++)if((d||k in x)&&(b=_(y=x[k],k,w),t))if(e)E[k]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return k;case 2:c(E,y)}else switch(t){case 4:return!1;case 7:c(E,y)}return f?-1:i||l?l:E}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},9042:function(t,e,n){"use strict";var r=n(3689),i=n(4201),o=n(3615),a=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},6834:function(t,e,n){"use strict";var r=n(3689);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},8820:function(t,e,n){"use strict";var r=n(509),i=n(690),o=n(4413),a=n(6310),s=TypeError,u=function(t){return function(e,n,u,c){r(n);var l=i(e),f=o(l),h=a(l),d=t?h-1:0,p=t?-1:1;if(u<2)for(;;){if(d in f){c=f[d],d+=p;break}if(d+=p,t?d<0:h<=d)throw new s("Reduce of empty array with no initial value")}for(;t?d>=0:h>d;d+=p)d in f&&(c=n(c,f[d],d,l));return c}};t.exports={left:u(!1),right:u(!0)}},5649:function(t,e,n){"use strict";var r=n(7697),i=n(2297),o=TypeError,a=Object.getOwnPropertyDescriptor,s=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(i(t)&&!a(t,"length").writable)throw new o("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},9015:function(t,e,n){"use strict";var r=n(7578),i=n(6310),o=n(6522),a=Array,s=Math.max;t.exports=function(t,e,n){for(var u=i(t),c=r(e,u),l=r(void 0===n?u:n,u),f=a(s(l-c,0)),h=0;c<l;c++,h++)o(f,h,t[c]);return f.length=h,f}},6004:function(t,e,n){"use strict";var r=n(8844);t.exports=r([].slice)},382:function(t,e,n){"use strict";var r=n(9015),i=Math.floor,o=function(t,e){var n=t.length,u=i(n/2);return n<8?a(t,e):s(t,o(r(t,0,u),e),o(r(t,u),e),e)},a=function(t,e){for(var n,r,i=t.length,o=1;o<i;){for(r=o,n=t[o];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==o++&&(t[r]=n)}return t},s=function(t,e,n,r){for(var i=e.length,o=n.length,a=0,s=0;a<i||s<o;)t[a+s]=a<i&&s<o?r(e[a],n[s])<=0?e[a++]:n[s++]:a<i?e[a++]:n[s++];return t};t.exports=o},5271:function(t,e,n){"use strict";var r=n(2297),i=n(9429),o=n(8999),a=n(4201)("species"),s=Array;t.exports=function(t){var e;return r(t)&&(e=t.constructor,(i(e)&&(e===s||r(e.prototype))||o(e)&&null===(e=e[a]))&&(e=void 0)),void 0===e?s:e}},7120:function(t,e,n){"use strict";var r=n(5271);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},1228:function(t,e,n){"use strict";var r=n(5027),i=n(2125);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){i(t,"throw",e)}}},6431:function(t,e,n){"use strict";var r=n(4201)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){try{if(!e&&!i)return!1}catch(t){return!1}var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},6648:function(t,e,n){"use strict";var r=n(8844),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},926:function(t,e,n){"use strict";var r=n(3043),i=n(9985),o=n(6648),a=n(4201)("toStringTag"),s=Object,u="Arguments"===o(function(){return arguments}());t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=s(t),a))?n:u?o(e):"Object"===(r=o(e))&&i(e.callee)?"Arguments":r}},800:function(t,e,n){"use strict";var r=n(5391),i=n(2148),o=n(6045),a=n(4071),s=n(767),u=n(981),c=n(8734),l=n(1934),f=n(7807),h=n(4241),d=n(7697),p=n(5375).fastKey,v=n(618),g=v.set,m=v.getterFor;t.exports={getConstructor:function(t,e,n,l){var f=t((function(t,i){s(t,h),g(t,{type:e,index:r(null),first:void 0,last:void 0,size:0}),d||(t.size=0),u(i)||c(i,t[l],{that:t,AS_ENTRIES:n})})),h=f.prototype,v=m(e),y=function(t,e,n){var r,i,o=v(t),a=b(t,e);return a?a.value=n:(o.last=a={index:i=p(e,!0),key:e,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),d?o.size++:t.size++,"F"!==i&&(o.index[i]=a)),t},b=function(t,e){var n,r=v(t),i=p(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key===e)return n};return o(h,{clear:function(){for(var t=v(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,d?t.size=0:this.size=0},delete:function(t){var e=this,n=v(e),r=b(e,t);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first===r&&(n.first=i),n.last===r&&(n.last=o),d?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=v(this),r=a(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),o(h,n?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),d&&i(h,"size",{configurable:!0,get:function(){return v(this).size}}),f},setStrong:function(t,e,n){var r=e+" Iterator",i=m(e),o=m(r);l(t,e,(function(t,e){g(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?f("keys"===e?n.key:"values"===e?n.value:[n.key,n.value],!1):(t.target=void 0,f(void 0,!0))}),n?"entries":"values",!n,!0),h(e)}}},637:function(t,e,n){"use strict";var r=n(8844),i=n(6045),o=n(5375).getWeakData,a=n(767),s=n(5027),u=n(981),c=n(8999),l=n(8734),f=n(2960),h=n(6812),d=n(618),p=d.set,v=d.getterFor,g=f.find,m=f.findIndex,y=r([].splice),b=0,w=function(t){return t.frozen||(t.frozen=new x)},x=function(){this.entries=[]},_=function(t,e){return g(t.entries,(function(t){return t[0]===e}))};x.prototype={get:function(t){var e=_(this,t);if(e)return e[1]},has:function(t){return!!_(this,t)},set:function(t,e){var n=_(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=m(this.entries,(function(e){return e[0]===t}));return~e&&y(this.entries,e,1),!!~e}},t.exports={getConstructor:function(t,e,n,r){var f=t((function(t,i){a(t,d),p(t,{type:e,id:b++,frozen:void 0}),u(i)||l(i,t[r],{that:t,AS_ENTRIES:n})})),d=f.prototype,g=v(e),m=function(t,e,n){var r=g(t),i=o(s(e),!0);return!0===i?w(r).set(e,n):i[r.id]=n,t};return i(d,{delete:function(t){var e=g(this);if(!c(t))return!1;var n=o(t);return!0===n?w(e).delete(t):n&&h(n,e.id)&&delete n[e.id]},has:function(t){var e=g(this);if(!c(t))return!1;var n=o(t);return!0===n?w(e).has(t):n&&h(n,e.id)}}),i(d,n?{get:function(t){var e=g(this);if(c(t)){var n=o(t);return!0===n?w(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return m(this,t,e)}}:{add:function(t){return m(this,t,!0)}}),f}}},319:function(t,e,n){"use strict";var r=n(9989),i=n(9037),o=n(8844),a=n(5266),s=n(1880),u=n(5375),c=n(8734),l=n(767),f=n(9985),h=n(981),d=n(8999),p=n(3689),v=n(6431),g=n(5997),m=n(3457);t.exports=function(t,e,n){var y=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),w=y?"set":"add",x=i[t],_=x&&x.prototype,S=x,k={},P=function(t){var e=o(_[t]);s(_,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return b&&!d(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(a(t,!f(x)||!(b||_.forEach&&!p((function(){(new x).entries().next()})))))S=n.getConstructor(e,t,y,w),u.enable();else if(a(t,!0)){var E=new S,O=E[w](b?{}:-0,1)!==E,T=p((function(){E.has(1)})),C=v((function(t){new x(t)})),j=!b&&p((function(){for(var t=new x,e=5;e--;)t[w](e,e);return!t.has(-0)}));C||((S=e((function(t,e){l(t,_);var n=m(new x,t,S);return h(e)||c(e,n[w],{that:n,AS_ENTRIES:y}),n}))).prototype=_,_.constructor=S),(T||j)&&(P("delete"),P("has"),y&&P("get")),(j||O)&&P(w),b&&_.clear&&delete _.clear}return k[t]=S,r({global:!0,constructor:!0,forced:S!==x},k),g(S,t),b||n.setStrong(S,t,y),S}},8758:function(t,e,n){"use strict";var r=n(6812),i=n(9152),o=n(2474),a=n(2560);t.exports=function(t,e,n){for(var s=i(e),u=a.f,c=o.f,l=0;l<s.length;l++){var f=s[l];r(t,f)||n&&r(n,f)||u(t,f,c(e,f))}}},7413:function(t,e,n){"use strict";var r=n(4201)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},1748:function(t,e,n){"use strict";var r=n(3689);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},7807:function(t){"use strict";t.exports=function(t,e){return{value:t,done:e}}},5773:function(t,e,n){"use strict";var r=n(7697),i=n(2560),o=n(5684);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},5684:function(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6522:function(t,e,n){"use strict";var r=n(8360),i=n(2560),o=n(5684);t.exports=function(t,e,n){var a=r(e);a in t?i.f(t,a,o(0,n)):t[a]=n}},1797:function(t,e,n){"use strict";var r=n(5027),i=n(5899),o=TypeError;t.exports=function(t){if(r(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw new o("Incorrect hint");return i(this,t)}},2148:function(t,e,n){"use strict";var r=n(8702),i=n(2560);t.exports=function(t,e,n){return n.get&&r(n.get,e,{getter:!0}),n.set&&r(n.set,e,{setter:!0}),i.f(t,e,n)}},1880:function(t,e,n){"use strict";var r=n(9985),i=n(2560),o=n(8702),a=n(5014);t.exports=function(t,e,n,s){s||(s={});var u=s.enumerable,c=void 0!==s.name?s.name:e;if(r(n)&&o(n,c,s),s.global)u?t[e]=n:a(e,n);else{try{s.unsafe?t[e]&&(u=!0):delete t[e]}catch(t){}u?t[e]=n:i.f(t,e,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},6045:function(t,e,n){"use strict";var r=n(1880);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},5014:function(t,e,n){"use strict";var r=n(9037),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},8494:function(t,e,n){"use strict";var r=n(3691),i=TypeError;t.exports=function(t,e){if(!delete t[e])throw new i("Cannot delete property "+r(e)+" of "+r(t))}},7697:function(t,e,n){"use strict";var r=n(3689);t.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2659:function(t){"use strict";var e="object"==typeof document&&document.all,n=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:n}},6420:function(t,e,n){"use strict";var r=n(9037),i=n(8999),o=r.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},5565:function(t){"use strict";var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},6338:function(t){"use strict";t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},3265:function(t,e,n){"use strict";var r=n(6420)("span").classList,i=r&&r.constructor&&r.constructor.prototype;t.exports=i===Object.prototype?void 0:i},7365:function(t,e,n){"use strict";var r=n(71).match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},2532:function(t,e,n){"use strict";var r=n(8563),i=n(806);t.exports=!r&&!i&&"object"==typeof window&&"object"==typeof document},8563:function(t){"use strict";t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},7298:function(t,e,n){"use strict";var r=n(71);t.exports=/MSIE|Trident/.test(r)},3221:function(t,e,n){"use strict";var r=n(71);t.exports=/ipad|iphone|ipod/i.test(r)&&"undefined"!=typeof Pebble},4764:function(t,e,n){"use strict";var r=n(71);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},806:function(t,e,n){"use strict";var r=n(9037),i=n(6648);t.exports="process"===i(r.process)},7486:function(t,e,n){"use strict";var r=n(71);t.exports=/web0s(?!.*chrome)/i.test(r)},71:function(t){"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3615:function(t,e,n){"use strict";var r,i,o=n(9037),a=n(71),s=o.process,u=o.Deno,c=s&&s.versions||u&&u.version,l=c&&c.v8;l&&(i=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},7922:function(t,e,n){"use strict";var r=n(71).match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},2739:function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},9989:function(t,e,n){"use strict";var r=n(9037),i=n(2474).f,o=n(5773),a=n(1880),s=n(5014),u=n(8758),c=n(5266);t.exports=function(t,e){var n,l,f,h,d,p=t.target,v=t.global,g=t.stat;if(n=v?r:g?r[p]||s(p,{}):(r[p]||{}).prototype)for(l in e){if(h=e[l],f=t.dontCallGetSet?(d=i(n,l))&&d.value:n[l],!c(v?l:p+(g?".":"#")+l,t.forced)&&void 0!==f){if(typeof h==typeof f)continue;u(h,f)}(t.sham||f&&f.sham)&&o(h,"sham",!0),a(n,l,h,t)}}},3689:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},8678:function(t,e,n){"use strict";n(4043);var r=n(6576),i=n(1880),o=n(6308),a=n(3689),s=n(4201),u=n(5773),c=s("species"),l=RegExp.prototype;t.exports=function(t,e,n,f){var h=s(t),d=!a((function(){var e={};return e[h]=function(){return 7},7!==""[t](e)})),p=d&&!a((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return e=!0,null},n[h](""),!e}));if(!d||!p||n){var v=r(/./[h]),g=e(h,""[t],(function(t,e,n,i,a){var s=r(t),u=e.exec;return u===o||u===l.exec?d&&!a?{done:!0,value:v(e,n,i)}:{done:!0,value:s(n,e,i)}:{done:!1}}));i(String.prototype,t,g[0]),i(l,h,g[1])}f&&u(l[h],"sham",!0)}},7809:function(t,e,n){"use strict";var r=n(2297),i=n(6310),o=n(5565),a=n(4071),s=function(t,e,n,u,c,l,f,h){for(var d,p,v=c,g=0,m=!!f&&a(f,h);g<u;)g in n&&(d=m?m(n[g],g,e):n[g],l>0&&r(d)?(p=i(d),v=s(t,e,d,p,v,l-1)-1):(o(v+1),t[v]=d),v++),g++;return v};t.exports=s},1594:function(t,e,n){"use strict";var r=n(3689);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},1735:function(t,e,n){"use strict";var r=n(7215),i=Function.prototype,o=i.apply,a=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(o):function(){return a.apply(o,arguments)})},4071:function(t,e,n){"use strict";var r=n(6576),i=n(509),o=n(7215),a=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?a(t,e):function(){return t.apply(e,arguments)}}},7215:function(t,e,n){"use strict";var r=n(3689);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},6761:function(t,e,n){"use strict";var r=n(8844),i=n(509),o=n(8999),a=n(6812),s=n(6004),u=n(7215),c=Function,l=r([].concat),f=r([].join),h={};t.exports=u?c.bind:function(t){var e=i(this),n=e.prototype,r=s(arguments,1),u=function(){var n=l(r,s(arguments));return this instanceof u?function(t,e,n){if(!a(h,e)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";h[e]=c("C,a","return new C("+f(r,",")+")")}return h[e](t,n)}(e,n.length,n):e.apply(t,n)};return o(n)&&(u.prototype=n),u}},2615:function(t,e,n){"use strict";var r=n(7215),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},1236:function(t,e,n){"use strict";var r=n(7697),i=n(6812),o=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=i(o,"name"),u=s&&"something"===function(){}.name,c=s&&(!r||r&&a(o,"name").configurable);t.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},2743:function(t,e,n){"use strict";var r=n(8844),i=n(509);t.exports=function(t,e,n){try{return r(i(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},6576:function(t,e,n){"use strict";var r=n(6648),i=n(8844);t.exports=function(t){if("Function"===r(t))return i(t)}},8844:function(t,e,n){"use strict";var r=n(7215),i=Function.prototype,o=i.call,a=r&&i.bind.bind(o,o);t.exports=r?a:function(t){return function(){return o.apply(t,arguments)}}},6058:function(t,e,n){"use strict";var r=n(9037),i=n(9985);t.exports=function(t,e){return arguments.length<2?(n=r[t],i(n)?n:void 0):r[t]&&r[t][e];var n}},1664:function(t,e,n){"use strict";var r=n(926),i=n(4849),o=n(981),a=n(9478),s=n(4201)("iterator");t.exports=function(t){if(!o(t))return i(t,s)||i(t,"@@iterator")||a[r(t)]}},5185:function(t,e,n){"use strict";var r=n(2615),i=n(509),o=n(5027),a=n(3691),s=n(1664),u=TypeError;t.exports=function(t,e){var n=arguments.length<2?s(t):e;if(i(n))return o(r(n,t));throw new u(a(t)+" is not iterable")}},2643:function(t,e,n){"use strict";var r=n(8844),i=n(2297),o=n(9985),a=n(6648),s=n(4327),u=r([].push);t.exports=function(t){if(o(t))return t;if(i(t)){for(var e=t.length,n=[],r=0;r<e;r++){var c=t[r];"string"==typeof c?u(n,c):"number"!=typeof c&&"Number"!==a(c)&&"String"!==a(c)||u(n,s(c))}var l=n.length,f=!0;return function(t,e){if(f)return f=!1,e;if(i(this))return e;for(var r=0;r<l;r++)if(n[r]===t)return e}}}},4849:function(t,e,n){"use strict";var r=n(509),i=n(981);t.exports=function(t,e){var n=t[e];return i(n)?void 0:r(n)}},7017:function(t,e,n){"use strict";var r=n(8844),i=n(690),o=Math.floor,a=r("".charAt),s=r("".replace),u=r("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,r,f,h){var d=n+t.length,p=r.length,v=l;return void 0!==f&&(f=i(f),v=c),s(h,v,(function(i,s){var c;switch(a(s,0)){case"$":return"$";case"&":return t;case"`":return u(e,0,n);case"'":return u(e,d);case"<":c=f[u(s,1,-1)];break;default:var l=+s;if(0===l)return i;if(l>p){var h=o(l/10);return 0===h?i:h<=p?void 0===r[h-1]?a(s,1):r[h-1]+a(s,1):i}c=r[l-1]}return void 0===c?"":c}))}},9037:function(t,e,n){"use strict";var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},6812:function(t,e,n){"use strict";var r=n(8844),i=n(690),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},7248:function(t){"use strict";t.exports={}},920:function(t){"use strict";t.exports=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}},2688:function(t,e,n){"use strict";var r=n(6058);t.exports=r("document","documentElement")},8506:function(t,e,n){"use strict";var r=n(7697),i=n(3689),o=n(6420);t.exports=!r&&!i((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},4413:function(t,e,n){"use strict";var r=n(8844),i=n(3689),o=n(6648),a=Object,s=r("".split);t.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"===o(t)?s(t,""):a(t)}:a},3457:function(t,e,n){"use strict";var r=n(9985),i=n(8999),o=n(9385);t.exports=function(t,e,n){var a,s;return o&&r(a=e.constructor)&&a!==n&&i(s=a.prototype)&&s!==n.prototype&&o(t,s),t}},6738:function(t,e,n){"use strict";var r=n(8844),i=n(9985),o=n(4091),a=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return a(t)}),t.exports=o.inspectSource},5375:function(t,e,n){"use strict";var r=n(9989),i=n(8844),o=n(7248),a=n(8999),s=n(6812),u=n(2560).f,c=n(2741),l=n(6062),f=n(1129),h=n(4630),d=n(1594),p=!1,v=h("meta"),g=0,m=function(t){u(t,v,{value:{objectID:"O"+g++,weakData:{}}})},y=t.exports={enable:function(){y.enable=function(){},p=!0;var t=c.f,e=i([].splice),n={};n[v]=1,t(n).length&&(c.f=function(n){for(var r=t(n),i=0,o=r.length;i<o;i++)if(r[i]===v){e(r,i,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(t,e){if(!a(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!s(t,v)){if(!f(t))return"F";if(!e)return"E";m(t)}return t[v].objectID},getWeakData:function(t,e){if(!s(t,v)){if(!f(t))return!0;if(!e)return!1;m(t)}return t[v].weakData},onFreeze:function(t){return d&&p&&f(t)&&!s(t,v)&&m(t),t}};o[v]=!0},618:function(t,e,n){"use strict";var r,i,o,a=n(9834),s=n(9037),u=n(8999),c=n(5773),l=n(6812),f=n(4091),h=n(2713),d=n(7248),p="Object already initialized",v=s.TypeError,g=s.WeakMap;if(a||f.state){var m=f.state||(f.state=new g);m.get=m.get,m.has=m.has,m.set=m.set,r=function(t,e){if(m.has(t))throw new v(p);return e.facade=t,m.set(t,e),e},i=function(t){return m.get(t)||{}},o=function(t){return m.has(t)}}else{var y=h("state");d[y]=!0,r=function(t,e){if(l(t,y))throw new v(p);return e.facade=t,c(t,y,e),e},i=function(t){return l(t,y)?t[y]:{}},o=function(t){return l(t,y)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=i(e)).type!==t)throw new v("Incompatible receiver, "+t+" required");return n}}}},3292:function(t,e,n){"use strict";var r=n(4201),i=n(9478),o=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},2297:function(t,e,n){"use strict";var r=n(6648);t.exports=Array.isArray||function(t){return"Array"===r(t)}},9985:function(t,e,n){"use strict";var r=n(2659),i=r.all;t.exports=r.IS_HTMLDDA?function(t){return"function"==typeof t||t===i}:function(t){return"function"==typeof t}},9429:function(t,e,n){"use strict";var r=n(8844),i=n(3689),o=n(9985),a=n(926),s=n(6058),u=n(6738),c=function(){},l=[],f=s("Reflect","construct"),h=/^\s*(?:class|function)\b/,d=r(h.exec),p=!h.test(c),v=function(t){if(!o(t))return!1;try{return f(c,l,t),!0}catch(t){return!1}},g=function(t){if(!o(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!d(h,u(t))}catch(t){return!0}};g.sham=!0,t.exports=!f||i((function(){var t;return v(v.call)||!v(Object)||!v((function(){t=!0}))||t}))?g:v},6251:function(t,e,n){"use strict";var r=n(6812);t.exports=function(t){return void 0!==t&&(r(t,"value")||r(t,"writable"))}},5266:function(t,e,n){"use strict";var r=n(3689),i=n(9985),o=/#|\.prototype\./,a=function(t,e){var n=u[s(t)];return n===l||n!==c&&(i(e)?r(e):!!e)},s=a.normalize=function(t){return String(t).replace(o,".").toLowerCase()},u=a.data={},c=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},981:function(t){"use strict";t.exports=function(t){return null==t}},8999:function(t,e,n){"use strict";var r=n(9985),i=n(2659),o=i.all;t.exports=i.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:r(t)||t===o}:function(t){return"object"==typeof t?null!==t:r(t)}},3931:function(t){"use strict";t.exports=!1},1245:function(t,e,n){"use strict";var r=n(8999),i=n(6648),o=n(4201)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"===i(t))}},734:function(t,e,n){"use strict";var r=n(6058),i=n(9985),o=n(3622),a=n(9525),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,s(t))}},8734:function(t,e,n){"use strict";var r=n(4071),i=n(2615),o=n(5027),a=n(3691),s=n(3292),u=n(6310),c=n(3622),l=n(5185),f=n(1664),h=n(2125),d=TypeError,p=function(t,e){this.stopped=t,this.result=e},v=p.prototype;t.exports=function(t,e,n){var g,m,y,b,w,x,_,S=n&&n.that,k=!(!n||!n.AS_ENTRIES),P=!(!n||!n.IS_RECORD),E=!(!n||!n.IS_ITERATOR),O=!(!n||!n.INTERRUPTED),T=r(e,S),C=function(t){return g&&h(g,"normal",t),new p(!0,t)},j=function(t){return k?(o(t),O?T(t[0],t[1],C):T(t[0],t[1])):O?T(t,C):T(t)};if(P)g=t.iterator;else if(E)g=t;else{if(!(m=f(t)))throw new d(a(t)+" is not iterable");if(s(m)){for(y=0,b=u(t);b>y;y++)if((w=j(t[y]))&&c(v,w))return w;return new p(!1)}g=l(t,m)}for(x=P?t.next:g.next;!(_=i(x,g)).done;){try{w=j(_.value)}catch(t){h(g,"throw",t)}if("object"==typeof w&&w&&c(v,w))return w}return new p(!1)}},2125:function(t,e,n){"use strict";var r=n(2615),i=n(5027),o=n(4849);t.exports=function(t,e,n){var a,s;i(t);try{if(!(a=o(t,"return"))){if("throw"===e)throw n;return n}a=r(a,t)}catch(t){s=!0,a=t}if("throw"===e)throw n;if(s)throw a;return i(a),n}},974:function(t,e,n){"use strict";var r=n(2013).IteratorPrototype,i=n(5391),o=n(5684),a=n(5997),s=n(9478),u=function(){return this};t.exports=function(t,e,n,c){var l=e+" Iterator";return t.prototype=i(r,{next:o(+!c,n)}),a(t,l,!1,!0),s[l]=u,t}},1934:function(t,e,n){"use strict";var r=n(9989),i=n(2615),o=n(3931),a=n(1236),s=n(9985),u=n(974),c=n(1868),l=n(9385),f=n(5997),h=n(5773),d=n(1880),p=n(4201),v=n(9478),g=n(2013),m=a.PROPER,y=a.CONFIGURABLE,b=g.IteratorPrototype,w=g.BUGGY_SAFARI_ITERATORS,x=p("iterator"),_="keys",S="values",k="entries",P=function(){return this};t.exports=function(t,e,n,a,p,g,E){u(n,e,a);var O,T,C,j=function(t){if(t===p&&L)return L;if(!w&&t&&t in A)return A[t];switch(t){case _:case S:case k:return function(){return new n(this,t)}}return function(){return new n(this)}},M=e+" Iterator",R=!1,A=t.prototype,I=A[x]||A["@@iterator"]||p&&A[p],L=!w&&I||j(p),D="Array"===e&&A.entries||I;if(D&&(O=c(D.call(new t)))!==Object.prototype&&O.next&&(o||c(O)===b||(l?l(O,b):s(O[x])||d(O,x,P)),f(O,M,!0,!0),o&&(v[M]=P)),m&&p===S&&I&&I.name!==S&&(!o&&y?h(A,"name",S):(R=!0,L=function(){return i(I,this)})),p)if(T={values:j(S),keys:g?L:j(_),entries:j(k)},E)for(C in T)(w||R||!(C in A))&&d(A,C,T[C]);else r({target:e,proto:!0,forced:w||R},T);return o&&!E||A[x]===L||d(A,x,L,{name:p}),v[e]=L,T}},2013:function(t,e,n){"use strict";var r,i,o,a=n(3689),s=n(9985),u=n(8999),c=n(5391),l=n(1868),f=n(1880),h=n(4201),d=n(3931),p=h("iterator"),v=!1;[].keys&&("next"in(o=[].keys())?(i=l(l(o)))!==Object.prototype&&(r=i):v=!0),!u(r)||a((function(){var t={};return r[p].call(t)!==t}))?r={}:d&&(r=c(r)),s(r[p])||f(r,p,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:v}},9478:function(t){"use strict";t.exports={}},6310:function(t,e,n){"use strict";var r=n(3126);t.exports=function(t){return r(t.length)}},8702:function(t,e,n){"use strict";var r=n(8844),i=n(3689),o=n(9985),a=n(6812),s=n(7697),u=n(1236).CONFIGURABLE,c=n(6738),l=n(618),f=l.enforce,h=l.get,d=String,p=Object.defineProperty,v=r("".slice),g=r("".replace),m=r([].join),y=s&&!i((function(){return 8!==p((function(){}),"length",{value:8}).length})),b=String(String).split("String"),w=t.exports=function(t,e,n){"Symbol("===v(d(e),0,7)&&(e="["+g(d(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!a(t,"name")||u&&t.name!==e)&&(s?p(t,"name",{value:e,configurable:!0}):t.name=e),y&&n&&a(n,"arity")&&t.length!==n.arity&&p(t,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?s&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=f(t);return a(r,"source")||(r.source=m(b,"string"==typeof e?e:"")),t};Function.prototype.toString=w((function(){return o(this)&&h(this).source||c(this)}),"toString")},5680:function(t){"use strict";t.exports=Math.sign||function(t){var e=+t;return 0===e||e!=e?e:e<0?-1:1}},8828:function(t){"use strict";var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},231:function(t,e,n){"use strict";var r,i,o,a,s,u=n(9037),c=n(4071),l=n(2474).f,f=n(9886).set,h=n(4410),d=n(4764),p=n(3221),v=n(7486),g=n(806),m=u.MutationObserver||u.WebKitMutationObserver,y=u.document,b=u.process,w=u.Promise,x=l(u,"queueMicrotask"),_=x&&x.value;if(!_){var S=new h,k=function(){var t,e;for(g&&(t=b.domain)&&t.exit();e=S.get();)try{e()}catch(t){throw S.head&&r(),t}t&&t.enter()};d||g||v||!m||!y?!p&&w&&w.resolve?((a=w.resolve(void 0)).constructor=w,s=c(a.then,a),r=function(){s(k)}):g?r=function(){b.nextTick(k)}:(f=c(f,u),r=function(){f(k)}):(i=!0,o=y.createTextNode(""),new m(k).observe(o,{characterData:!0}),r=function(){o.data=i=!i}),_=function(t){S.head||r(),S.add(t)}}t.exports=_},8742:function(t,e,n){"use strict";var r=n(509),i=TypeError,o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw new i("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},2124:function(t,e,n){"use strict";var r=n(1245),i=TypeError;t.exports=function(t){if(r(t))throw new i("The method doesn't accept regular expressions");return t}},7897:function(t,e,n){"use strict";var r=n(9037),i=n(3689),o=n(8844),a=n(4327),s=n(1435).trim,u=n(6350),c=r.parseInt,l=r.Symbol,f=l&&l.iterator,h=/^[+-]?0x/i,d=o(h.exec),p=8!==c(u+"08")||22!==c(u+"0x16")||f&&!i((function(){c(Object(f))}));t.exports=p?function(t,e){var n=s(a(t));return c(n,e>>>0||(d(h,n)?16:10))}:c},5394:function(t,e,n){"use strict";var r=n(7697),i=n(8844),o=n(2615),a=n(3689),s=n(300),u=n(7518),c=n(9556),l=n(690),f=n(4413),h=Object.assign,d=Object.defineProperty,p=i([].concat);t.exports=!h||a((function(){if(r&&1!==h({b:1},h(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach((function(t){e[t]=t})),7!==h({},t)[n]||s(h({},e)).join("")!==i}))?function(t,e){for(var n=l(t),i=arguments.length,a=1,h=u.f,d=c.f;i>a;)for(var v,g=f(arguments[a++]),m=h?p(s(g),h(g)):s(g),y=m.length,b=0;y>b;)v=m[b++],r&&!o(d,g,v)||(n[v]=g[v]);return n}:h},5391:function(t,e,n){"use strict";var r,i=n(5027),o=n(8920),a=n(2739),s=n(7248),u=n(2688),c=n(6420),l=n(2713),f="prototype",h="script",d=l("IE_PROTO"),p=function(){},v=function(t){return"<"+h+">"+t+"</"+h+">"},g=function(t){t.write(v("")),t.close();var e=t.parentWindow.Object;return t=null,e},m=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;m="undefined"!=typeof document?document.domain&&r?g(r):(e=c("iframe"),n="java"+h+":",e.style.display="none",u.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(v("document.F=Object")),t.close(),t.F):g(r);for(var i=a.length;i--;)delete m[f][a[i]];return m()};s[d]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(p[f]=i(t),n=new p,p[f]=null,n[d]=t):n=m(),void 0===e?n:o.f(n,e)}},8920:function(t,e,n){"use strict";var r=n(7697),i=n(5648),o=n(2560),a=n(5027),s=n(5290),u=n(300);e.f=r&&!i?Object.defineProperties:function(t,e){a(t);for(var n,r=s(e),i=u(e),c=i.length,l=0;c>l;)o.f(t,n=i[l++],r[n]);return t}},2560:function(t,e,n){"use strict";var r=n(7697),i=n(8506),o=n(5648),a=n(5027),s=n(8360),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",d="writable";e.f=r?o?function(t,e,n){if(a(t),e=s(e),a(n),"function"==typeof t&&"prototype"===e&&"value"in n&&d in n&&!n[d]){var r=l(t,e);r&&r[d]&&(t[e]=n.value,n={configurable:h in n?n[h]:r[h],enumerable:f in n?n[f]:r[f],writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(a(t),e=s(e),a(n),i)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new u("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},2474:function(t,e,n){"use strict";var r=n(7697),i=n(2615),o=n(9556),a=n(5684),s=n(5290),u=n(8360),c=n(6812),l=n(8506),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=s(t),e=u(e),l)try{return f(t,e)}catch(t){}if(c(t,e))return a(!i(o.f,t,e),t[e])}},6062:function(t,e,n){"use strict";var r=n(6648),i=n(5290),o=n(2741).f,a=n(9015),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"Window"===r(t)?function(t){try{return o(t)}catch(t){return a(s)}}(t):o(i(t))}},2741:function(t,e,n){"use strict";var r=n(4948),i=n(2739).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},7518:function(t,e){"use strict";e.f=Object.getOwnPropertySymbols},1868:function(t,e,n){"use strict";var r=n(6812),i=n(9985),o=n(690),a=n(2713),s=n(1748),u=a("IE_PROTO"),c=Object,l=c.prototype;t.exports=s?c.getPrototypeOf:function(t){var e=o(t);if(r(e,u))return e[u];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof c?l:null}},1129:function(t,e,n){"use strict";var r=n(3689),i=n(8999),o=n(6648),a=n(1655),s=Object.isExtensible,u=r((function(){s(1)}));t.exports=u||a?function(t){return!!i(t)&&(!a||"ArrayBuffer"!==o(t))&&(!s||s(t))}:s},3622:function(t,e,n){"use strict";var r=n(8844);t.exports=r({}.isPrototypeOf)},4948:function(t,e,n){"use strict";var r=n(8844),i=n(6812),o=n(5290),a=n(4328).indexOf,s=n(7248),u=r([].push);t.exports=function(t,e){var n,r=o(t),c=0,l=[];for(n in r)!i(s,n)&&i(r,n)&&u(l,n);for(;e.length>c;)i(r,n=e[c++])&&(~a(l,n)||u(l,n));return l}},300:function(t,e,n){"use strict";var r=n(4948),i=n(2739);t.exports=Object.keys||function(t){return r(t,i)}},9556:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},9385:function(t,e,n){"use strict";var r=n(2743),i=n(5027),o=n(3550);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return i(n),o(r),e?t(n,r):n.__proto__=r,n}}():void 0)},9419:function(t,e,n){"use strict";var r=n(7697),i=n(3689),o=n(8844),a=n(1868),s=n(300),u=n(5290),c=o(n(9556).f),l=o([].push),f=r&&i((function(){var t=Object.create(null);return t[2]=2,!c(t,2)})),h=function(t){return function(e){for(var n,i=u(e),o=s(i),h=f&&null===a(i),d=o.length,p=0,v=[];d>p;)n=o[p++],r&&!(h?n in i:c(i,n))||l(v,t?[n,i[n]]:i[n]);return v}};t.exports={entries:h(!0),values:h(!1)}},5073:function(t,e,n){"use strict";var r=n(3043),i=n(926);t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},5899:function(t,e,n){"use strict";var r=n(2615),i=n(9985),o=n(8999),a=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&i(n=t.toString)&&!o(s=r(n,t)))return s;if(i(n=t.valueOf)&&!o(s=r(n,t)))return s;if("string"!==e&&i(n=t.toString)&&!o(s=r(n,t)))return s;throw new a("Can't convert object to primitive value")}},9152:function(t,e,n){"use strict";var r=n(6058),i=n(8844),o=n(2741),a=n(7518),s=n(5027),u=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(s(t)),n=a.f;return n?u(e,n(t)):e}},496:function(t,e,n){"use strict";var r=n(9037);t.exports=r},9302:function(t){"use strict";t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},7073:function(t,e,n){"use strict";var r=n(9037),i=n(7919),o=n(9985),a=n(5266),s=n(6738),u=n(4201),c=n(2532),l=n(8563),f=n(3931),h=n(3615),d=i&&i.prototype,p=u("species"),v=!1,g=o(r.PromiseRejectionEvent),m=a("Promise",(function(){var t=s(i),e=t!==String(i);if(!e&&66===h)return!0;if(f&&(!d.catch||!d.finally))return!0;if(!h||h<51||!/native code/.test(t)){var n=new i((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[p]=r,!(v=n.then((function(){}))instanceof r))return!0}return!e&&(c||l)&&!g}));t.exports={CONSTRUCTOR:m,REJECTION_EVENT:g,SUBCLASSING:v}},7919:function(t,e,n){"use strict";var r=n(9037);t.exports=r.Promise},2945:function(t,e,n){"use strict";var r=n(5027),i=n(8999),o=n(8742);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},562:function(t,e,n){"use strict";var r=n(7919),i=n(6431),o=n(7073).CONSTRUCTOR;t.exports=o||!i((function(t){r.all(t).then(void 0,(function(){}))}))},8055:function(t,e,n){"use strict";var r=n(2560).f;t.exports=function(t,e,n){n in t||r(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},4410:function(t){"use strict";var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=e},6100:function(t,e,n){"use strict";var r=n(2615),i=n(5027),o=n(9985),a=n(6648),s=n(6308),u=TypeError;t.exports=function(t,e){var n=t.exec;if(o(n)){var c=r(n,t,e);return null!==c&&i(c),c}if("RegExp"===a(t))return r(s,t,e);throw new u("RegExp#exec called on incompatible receiver")}},6308:function(t,e,n){"use strict";var r,i,o=n(2615),a=n(8844),s=n(4327),u=n(9633),c=n(7901),l=n(3430),f=n(5391),h=n(618).get,d=n(2100),p=n(6422),v=l("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,m=g,y=a("".charAt),b=a("".indexOf),w=a("".replace),x=a("".slice),_=(i=/b*/g,o(g,r=/a/,"a"),o(g,i,"a"),0!==r.lastIndex||0!==i.lastIndex),S=c.BROKEN_CARET,k=void 0!==/()??/.exec("")[1];(_||k||S||d||p)&&(m=function(t){var e,n,r,i,a,c,l,d=this,p=h(d),P=s(t),E=p.raw;if(E)return E.lastIndex=d.lastIndex,e=o(m,E,P),d.lastIndex=E.lastIndex,e;var O=p.groups,T=S&&d.sticky,C=o(u,d),j=d.source,M=0,R=P;if(T&&(C=w(C,"y",""),-1===b(C,"g")&&(C+="g"),R=x(P,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==y(P,d.lastIndex-1))&&(j="(?: "+j+")",R=" "+R,M++),n=new RegExp("^(?:"+j+")",C)),k&&(n=new RegExp("^"+j+"$(?!\\s)",C)),_&&(r=d.lastIndex),i=o(g,T?n:d,R),T?i?(i.input=x(i.input,M),i[0]=x(i[0],M),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:_&&i&&(d.lastIndex=d.global?i.index+i[0].length:r),k&&i&&i.length>1&&o(v,i[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&O)for(i.groups=c=f(null),a=0;a<O.length;a++)c[(l=O[a])[0]]=i[l[1]];return i}),t.exports=m},9633:function(t,e,n){"use strict";var r=n(5027);t.exports=function(){var t=r(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},3477:function(t,e,n){"use strict";var r=n(2615),i=n(6812),o=n(3622),a=n(9633),s=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in s||i(t,"flags")||!o(s,t)?e:r(a,t)}},7901:function(t,e,n){"use strict";var r=n(3689),i=n(9037).RegExp,o=r((function(){var t=i("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),a=o||r((function(){return!i("a","y").sticky})),s=o||r((function(){var t=i("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));t.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:o}},2100:function(t,e,n){"use strict";var r=n(3689),i=n(9037).RegExp;t.exports=r((function(){var t=i(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))},6422:function(t,e,n){"use strict";var r=n(3689),i=n(9037).RegExp;t.exports=r((function(){var t=i("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},4684:function(t,e,n){"use strict";var r=n(981),i=TypeError;t.exports=function(t){if(r(t))throw new i("Can't call method on "+t);return t}},953:function(t){"use strict";t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},4241:function(t,e,n){"use strict";var r=n(6058),i=n(2148),o=n(4201),a=n(7697),s=o("species");t.exports=function(t){var e=r(t);a&&e&&!e[s]&&i(e,s,{configurable:!0,get:function(){return this}})}},5997:function(t,e,n){"use strict";var r=n(2560).f,i=n(6812),o=n(4201)("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!i(t,o)&&r(t,o,{configurable:!0,value:e})}},2713:function(t,e,n){"use strict";var r=n(3430),i=n(4630),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},4091:function(t,e,n){"use strict";var r=n(9037),i=n(5014),o="__core-js_shared__",a=r[o]||i(o,{});t.exports=a},3430:function(t,e,n){"use strict";var r=n(3931),i=n(4091);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.33.3",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE",source:"https://github.com/zloirock/core-js"})},6373:function(t,e,n){"use strict";var r=n(5027),i=n(2655),o=n(981),a=n(4201)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||o(n=r(s)[a])?e:i(n)}},730:function(t,e,n){"use strict";var r=n(8844),i=n(8700),o=n(4327),a=n(4684),s=r("".charAt),u=r("".charCodeAt),c=r("".slice),l=function(t){return function(e,n){var r,l,f=o(a(e)),h=i(n),d=f.length;return h<0||h>=d?t?"":void 0:(r=u(f,h))<55296||r>56319||h+1===d||(l=u(f,h+1))<56320||l>57343?t?s(f,h):r:t?c(f,h,h+2):l-56320+(r-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},1435:function(t,e,n){"use strict";var r=n(8844),i=n(4684),o=n(4327),a=n(6350),s=r("".replace),u=RegExp("^["+a+"]+"),c=RegExp("(^|[^"+a+"])["+a+"]+$"),l=function(t){return function(e){var n=o(i(e));return 1&t&&(n=s(n,u,"")),2&t&&(n=s(n,c,"$1")),n}};t.exports={start:l(1),end:l(2),trim:l(3)}},146:function(t,e,n){"use strict";var r=n(3615),i=n(3689),o=n(9037).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3032:function(t,e,n){"use strict";var r=n(2615),i=n(6058),o=n(4201),a=n(1880);t.exports=function(){var t=i("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,s=o("toPrimitive");e&&!e[s]&&a(e,s,(function(t){return r(n,this)}),{arity:1})}},6549:function(t,e,n){"use strict";var r=n(146);t.exports=r&&!!Symbol.for&&!!Symbol.keyFor},9886:function(t,e,n){"use strict";var r,i,o,a,s=n(9037),u=n(1735),c=n(4071),l=n(9985),f=n(6812),h=n(3689),d=n(2688),p=n(6004),v=n(6420),g=n(1500),m=n(4764),y=n(806),b=s.setImmediate,w=s.clearImmediate,x=s.process,_=s.Dispatch,S=s.Function,k=s.MessageChannel,P=s.String,E=0,O={},T="onreadystatechange";h((function(){r=s.location}));var C=function(t){if(f(O,t)){var e=O[t];delete O[t],e()}},j=function(t){return function(){C(t)}},M=function(t){C(t.data)},R=function(t){s.postMessage(P(t),r.protocol+"//"+r.host)};b&&w||(b=function(t){g(arguments.length,1);var e=l(t)?t:S(t),n=p(arguments,1);return O[++E]=function(){u(e,void 0,n)},i(E),E},w=function(t){delete O[t]},y?i=function(t){x.nextTick(j(t))}:_&&_.now?i=function(t){_.now(j(t))}:k&&!m?(a=(o=new k).port2,o.port1.onmessage=M,i=c(a.postMessage,a)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&r&&"file:"!==r.protocol&&!h(R)?(i=R,s.addEventListener("message",M,!1)):i=T in v("script")?function(t){d.appendChild(v("script"))[T]=function(){d.removeChild(this),C(t)}}:function(t){setTimeout(j(t),0)}),t.exports={set:b,clear:w}},3648:function(t,e,n){"use strict";var r=n(8844);t.exports=r(1..valueOf)},7578:function(t,e,n){"use strict";var r=n(8700),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},5290:function(t,e,n){"use strict";var r=n(4413),i=n(4684);t.exports=function(t){return r(i(t))}},8700:function(t,e,n){"use strict";var r=n(8828);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},3126:function(t,e,n){"use strict";var r=n(8700),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},690:function(t,e,n){"use strict";var r=n(4684),i=Object;t.exports=function(t){return i(r(t))}},8732:function(t,e,n){"use strict";var r=n(2615),i=n(8999),o=n(734),a=n(4849),s=n(5899),u=n(4201),c=TypeError,l=u("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var n,u=a(t,l);if(u){if(void 0===e&&(e="default"),n=r(u,t,e),!i(n)||o(n))return n;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},8360:function(t,e,n){"use strict";var r=n(8732),i=n(734);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},3043:function(t,e,n){"use strict";var r={};r[n(4201)("toStringTag")]="z",t.exports="[object z]"===String(r)},4327:function(t,e,n){"use strict";var r=n(926),i=String;t.exports=function(t){if("Symbol"===r(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},3691:function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},4630:function(t,e,n){"use strict";var r=n(8844),i=0,o=Math.random(),a=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++i+o,36)}},6837:function(t,e,n){"use strict";var r=n(3689),i=n(4201),o=n(7697),a=n(3931),s=i("iterator");t.exports=!r((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),n.delete("a",2),n.delete("b",void 0),a&&(!t.toJSON||!n.has("a",1)||n.has("a",2)||!n.has("a",void 0)||n.has("b"))||!e.size&&(a||!o)||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host}))},9525:function(t,e,n){"use strict";var r=n(146);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5648:function(t,e,n){"use strict";var r=n(7697),i=n(3689);t.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1500:function(t){"use strict";var e=TypeError;t.exports=function(t,n){if(t<n)throw new e("Not enough arguments");return t}},9834:function(t,e,n){"use strict";var r=n(9037),i=n(9985),o=r.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},5405:function(t,e,n){"use strict";var r=n(496),i=n(6812),o=n(6145),a=n(2560).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||a(e,t,{value:o.f(t)})}},6145:function(t,e,n){"use strict";var r=n(4201);e.f=r},4201:function(t,e,n){"use strict";var r=n(9037),i=n(3430),o=n(6812),a=n(4630),s=n(146),u=n(9525),c=r.Symbol,l=i("wks"),f=u?c.for||c:c&&c.withoutSetter||a;t.exports=function(t){return o(l,t)||(l[t]=s&&o(c,t)?c[t]:f("Symbol."+t)),l[t]}},6350:function(t){"use strict";t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},4338:function(t,e,n){"use strict";var r=n(9989),i=n(3689),o=n(2297),a=n(8999),s=n(690),u=n(6310),c=n(5565),l=n(6522),f=n(7120),h=n(9042),d=n(4201),p=n(3615),v=d("isConcatSpreadable"),g=p>=51||!i((function(){var t=[];return t[v]=!1,t.concat()[0]!==t})),m=function(t){if(!a(t))return!1;var e=t[v];return void 0!==e?!!e:o(t)};r({target:"Array",proto:!0,arity:1,forced:!g||!h("concat")},{concat:function(t){var e,n,r,i,o,a=s(this),h=f(a,0),d=0;for(e=-1,r=arguments.length;e<r;e++)if(m(o=-1===e?a:arguments[e]))for(i=u(o),c(d+i),n=0;n<i;n++,d++)n in o&&l(h,d,o[n]);else c(d+1),l(h,d++,o);return h.length=d,h}})},7895:function(t,e,n){"use strict";var r=n(9989),i=n(2872),o=n(7370);r({target:"Array",proto:!0},{fill:i}),o("fill")},8077:function(t,e,n){"use strict";var r=n(9989),i=n(2960).filter;r({target:"Array",proto:!0,forced:!n(9042)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},9772:function(t,e,n){"use strict";var r=n(9989),i=n(2960).findIndex,o=n(7370),a="findIndex",s=!0;a in[]&&Array(1)[a]((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(a)},5728:function(t,e,n){"use strict";var r=n(9989),i=n(2960).find,o=n(7370),a="find",s=!0;a in[]&&Array(1)[a]((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(a)},4564:function(t,e,n){"use strict";var r=n(9989),i=n(7809),o=n(509),a=n(690),s=n(6310),u=n(7120);r({target:"Array",proto:!0},{flatMap:function(t){var e,n=a(this),r=s(n);return o(t),(e=u(n,0)).length=i(e,n,n,r,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},2795:function(t,e,n){"use strict";var r=n(9989),i=n(7809),o=n(690),a=n(6310),s=n(8700),u=n(7120);r({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=o(this),n=a(e),r=u(e,0);return r.length=i(r,e,e,n,0,void 0===t?1:s(t)),r}})},7049:function(t,e,n){"use strict";var r=n(9989),i=n(1055);r({target:"Array",stat:!0,forced:!n(6431)((function(t){Array.from(t)}))},{from:i})},6801:function(t,e,n){"use strict";var r=n(9989),i=n(4328).includes,o=n(3689),a=n(7370);r({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a("includes")},752:function(t,e,n){"use strict";var r=n(5290),i=n(7370),o=n(9478),a=n(618),s=n(2560).f,u=n(1934),c=n(7807),l=n(3931),f=n(7697),h="Array Iterator",d=a.set,p=a.getterFor(h);t.exports=u(Array,"Array",(function(t,e){d(this,{type:h,target:r(t),index:0,kind:e})}),(function(){var t=p(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=void 0,c(void 0,!0);switch(t.kind){case"keys":return c(n,!1);case"values":return c(e[n],!1)}return c([n,e[n]],!1)}),"values");var v=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!l&&f&&"values"!==v.name)try{s(v,"name",{value:"values"})}catch(t){}},6203:function(t,e,n){"use strict";var r=n(9989),i=n(8844),o=n(4413),a=n(5290),s=n(6834),u=i([].join);r({target:"Array",proto:!0,forced:o!==Object||!s("join",",")},{join:function(t){return u(a(this),void 0===t?",":t)}})},886:function(t,e,n){"use strict";var r=n(9989),i=n(2960).map;r({target:"Array",proto:!0,forced:!n(9042)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},278:function(t,e,n){"use strict";var r=n(9989),i=n(8820).left,o=n(6834),a=n(3615);r({target:"Array",proto:!0,forced:!n(806)&&a>79&&a<83||!o("reduce")},{reduce:function(t){var e=arguments.length;return i(this,t,e,e>1?arguments[1]:void 0)}})},3374:function(t,e,n){"use strict";var r=n(9989),i=n(8844),o=n(2297),a=i([].reverse),s=[1,2];r({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return o(this)&&(this.length=this.length),a(this)}})},9730:function(t,e,n){"use strict";var r=n(9989),i=n(2297),o=n(9429),a=n(8999),s=n(7578),u=n(6310),c=n(5290),l=n(6522),f=n(4201),h=n(9042),d=n(6004),p=h("slice"),v=f("species"),g=Array,m=Math.max;r({target:"Array",proto:!0,forced:!p},{slice:function(t,e){var n,r,f,h=c(this),p=u(h),y=s(t,p),b=s(void 0===e?p:e,p);if(i(h)&&(n=h.constructor,(o(n)&&(n===g||i(n.prototype))||a(n)&&null===(n=n[v]))&&(n=void 0),n===g||void 0===n))return d(h,y,b);for(r=new(void 0===n?g:n)(m(b-y,0)),f=0;y<b;y++,f++)y in h&&l(r,f,h[y]);return r.length=f,r}})},5137:function(t,e,n){"use strict";var r=n(9989),i=n(8844),o=n(509),a=n(690),s=n(6310),u=n(8494),c=n(4327),l=n(3689),f=n(382),h=n(6834),d=n(7365),p=n(7298),v=n(3615),g=n(7922),m=[],y=i(m.sort),b=i(m.push),w=l((function(){m.sort(void 0)})),x=l((function(){m.sort(null)})),_=h("sort"),S=!l((function(){if(v)return v<70;if(!(d&&d>3)){if(p)return!0;if(g)return g<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)m.push({k:e+r,v:n})}for(m.sort((function(t,e){return e.v-t.v})),r=0;r<m.length;r++)e=m[r].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}}));r({target:"Array",proto:!0,forced:w||!x||!_||!S},{sort:function(t){void 0!==t&&o(t);var e=a(this);if(S)return void 0===t?y(e):y(e,t);var n,r,i=[],l=s(e);for(r=0;r<l;r++)r in e&&b(i,e[r]);for(f(i,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:c(e)>c(n)?1:-1}}(t)),n=s(i),r=0;r<n;)e[r]=i[r++];for(;r<l;)u(e,r++);return e}})},2506:function(t,e,n){"use strict";var r=n(9989),i=n(690),o=n(7578),a=n(8700),s=n(6310),u=n(5649),c=n(5565),l=n(7120),f=n(6522),h=n(8494),d=n(9042)("splice"),p=Math.max,v=Math.min;r({target:"Array",proto:!0,forced:!d},{splice:function(t,e){var n,r,d,g,m,y,b=i(this),w=s(b),x=o(t,w),_=arguments.length;for(0===_?n=r=0:1===_?(n=0,r=w-x):(n=_-2,r=v(p(a(e),0),w-x)),c(w+n-r),d=l(b,r),g=0;g<r;g++)(m=x+g)in b&&f(d,g,b[m]);if(d.length=r,n<r){for(g=x;g<w-r;g++)y=g+n,(m=g+r)in b?b[y]=b[m]:h(b,y);for(g=w;g>w-r+n;g--)h(b,g-1)}else if(n>r)for(g=w-r;g>x;g--)y=g+n-1,(m=g+r-1)in b?b[y]=b[m]:h(b,y);for(g=0;g<n;g++)b[g+x]=arguments[g+2];return u(b,w-r+n),d}})},385:function(t,e,n){"use strict";n(7370)("flatMap")},3383:function(t,e,n){"use strict";n(7370)("flat")},9903:function(t,e,n){"use strict";var r=n(6812),i=n(1880),o=n(1797),a=n(4201)("toPrimitive"),s=Date.prototype;r(s,a)||i(s,a,o)},4284:function(t,e,n){"use strict";var r=n(7697),i=n(1236).EXISTS,o=n(8844),a=n(2148),s=Function.prototype,u=o(s.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=o(c.exec);r&&!i&&a(s,"name",{configurable:!0,get:function(){try{return l(c,u(this))[1]}catch(t){return""}}})},5398:function(t,e,n){"use strict";var r=n(9989),i=n(9037);r({global:!0,forced:i.globalThis!==i},{globalThis:i})},8324:function(t,e,n){"use strict";var r=n(9989),i=n(6058),o=n(1735),a=n(2615),s=n(8844),u=n(3689),c=n(9985),l=n(734),f=n(6004),h=n(2643),d=n(146),p=String,v=i("JSON","stringify"),g=s(/./.exec),m=s("".charAt),y=s("".charCodeAt),b=s("".replace),w=s(1..toString),x=/[\uD800-\uDFFF]/g,_=/^[\uD800-\uDBFF]$/,S=/^[\uDC00-\uDFFF]$/,k=!d||u((function(){var t=i("Symbol")("stringify detection");return"[null]"!==v([t])||"{}"!==v({a:t})||"{}"!==v(Object(t))})),P=u((function(){return'"\\udf06\\ud834"'!==v("\udf06\ud834")||'"\\udead"'!==v("\udead")})),E=function(t,e){var n=f(arguments),r=h(e);if(c(r)||void 0!==t&&!l(t))return n[1]=function(t,e){if(c(r)&&(e=a(r,this,p(t),e)),!l(e))return e},o(v,null,n)},O=function(t,e,n){var r=m(n,e-1),i=m(n,e+1);return g(_,t)&&!g(S,i)||g(S,t)&&!g(_,r)?"\\u"+w(y(t,0),16):t};v&&r({target:"JSON",stat:!0,arity:3,forced:k||P},{stringify:function(t,e,n){var r=f(arguments),i=o(k?E:v,null,r);return P&&"string"==typeof i?b(i,x,O):i}})},7629:function(t,e,n){"use strict";var r=n(9037);n(5997)(r.JSON,"JSON",!0)},9322:function(t,e,n){"use strict";n(319)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(800))},6646:function(t,e,n){"use strict";n(9322)},8813:function(t,e,n){"use strict";var r=n(9989),i=Math.log,o=Math.LN2;r({target:"Math",stat:!0},{log2:function(t){return i(t)/o}})},6976:function(t,e,n){"use strict";n(9989)({target:"Math",stat:!0},{sign:n(5680)})},7509:function(t,e,n){"use strict";n(5997)(Math,"Math",!0)},9288:function(t,e,n){"use strict";var r=n(9989),i=n(3931),o=n(7697),a=n(9037),s=n(496),u=n(8844),c=n(5266),l=n(6812),f=n(3457),h=n(3622),d=n(734),p=n(8732),v=n(3689),g=n(2741).f,m=n(2474).f,y=n(2560).f,b=n(3648),w=n(1435).trim,x="Number",_=a[x],S=s[x],k=_.prototype,P=a.TypeError,E=u("".slice),O=u("".charCodeAt),T=c(x,!_(" 0o1")||!_("0b1")||_("+0x1")),C=function(t){var e,n=arguments.length<1?0:_(function(t){var e=p(t,"number");return"bigint"==typeof e?e:function(t){var e,n,r,i,o,a,s,u,c=p(t,"number");if(d(c))throw new P("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=w(c),43===(e=O(c,0))||45===e){if(88===(n=O(c,2))||120===n)return NaN}else if(48===e){switch(O(c,1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(a=(o=E(c,2)).length,s=0;s<a;s++)if((u=O(o,s))<48||u>i)return NaN;return parseInt(o,r)}return+c}(e)}(t));return h(k,e=this)&&v((function(){b(e)}))?f(Object(n),this,C):n};C.prototype=k,T&&!i&&(k.constructor=C),r({global:!0,constructor:!0,wrap:!0,forced:T},{Number:C});var j=function(t,e){for(var n,r=o?g(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0;r.length>i;i++)l(e,n=r[i])&&!l(t,n)&&y(t,n,m(e,n))};i&&S&&j(s[x],S),(T||i)&&j(s[x],_)},429:function(t,e,n){"use strict";var r=n(9989),i=n(5394);r({target:"Object",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},1830:function(t,e,n){"use strict";var r=n(9989),i=n(1594),o=n(3689),a=n(8999),s=n(5375).onFreeze,u=Object.freeze;r({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!i},{freeze:function(t){return u&&a(t)?u(s(t)):t}})},1919:function(t,e,n){"use strict";var r=n(9989),i=n(3689),o=n(5290),a=n(2474).f,s=n(7697);r({target:"Object",stat:!0,forced:!s||i((function(){a(1)})),sham:!s},{getOwnPropertyDescriptor:function(t,e){return a(o(t),e)}})},9474:function(t,e,n){"use strict";var r=n(9989),i=n(7697),o=n(9152),a=n(5290),s=n(2474),u=n(6522);r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),i=s.f,c=o(r),l={},f=0;c.length>f;)void 0!==(n=i(r,e=c[f++]))&&u(l,e,n);return l}})},9997:function(t,e,n){"use strict";var r=n(9989),i=n(3689),o=n(6062).f;r({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:o})},9434:function(t,e,n){"use strict";var r=n(9989),i=n(146),o=n(3689),a=n(7518),s=n(690);r({target:"Object",stat:!0,forced:!i||o((function(){a.f(1)}))},{getOwnPropertySymbols:function(t){var e=a.f;return e?e(s(t)):[]}})},8052:function(t,e,n){"use strict";var r=n(9989),i=n(3689),o=n(690),a=n(1868),s=n(1748);r({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!s},{getPrototypeOf:function(t){return a(o(t))}})},9358:function(t,e,n){"use strict";var r=n(9989),i=n(690),o=n(300);r({target:"Object",stat:!0,forced:n(3689)((function(){o(1)}))},{keys:function(t){return o(i(t))}})},228:function(t,e,n){"use strict";var r=n(3043),i=n(1880),o=n(5073);r||i(Object.prototype,"toString",o,{unsafe:!0})},6466:function(t,e,n){"use strict";var r=n(9989),i=n(9419).values;r({target:"Object",stat:!0},{values:function(t){return i(t)}})},2320:function(t,e,n){"use strict";var r=n(9989),i=n(7897);r({global:!0,forced:parseInt!==i},{parseInt:i})},1692:function(t,e,n){"use strict";var r=n(9989),i=n(2615),o=n(509),a=n(8742),s=n(9302),u=n(8734);r({target:"Promise",stat:!0,forced:n(562)},{all:function(t){var e=this,n=a.f(e),r=n.resolve,c=n.reject,l=s((function(){var n=o(e.resolve),a=[],s=0,l=1;u(t,(function(t){var o=s++,u=!1;l++,i(n,e,t).then((function(t){u||(u=!0,a[o]=t,--l||r(a))}),c)})),--l||r(a)}));return l.error&&c(l.value),n.promise}})},5089:function(t,e,n){"use strict";var r=n(9989),i=n(3931),o=n(7073).CONSTRUCTOR,a=n(7919),s=n(6058),u=n(9985),c=n(1880),l=a&&a.prototype;if(r({target:"Promise",proto:!0,forced:o,real:!0},{catch:function(t){return this.then(void 0,t)}}),!i&&u(a)){var f=s("Promise").prototype.catch;l.catch!==f&&c(l,"catch",f,{unsafe:!0})}},6697:function(t,e,n){"use strict";var r,i,o,a=n(9989),s=n(3931),u=n(806),c=n(9037),l=n(2615),f=n(1880),h=n(9385),d=n(5997),p=n(4241),v=n(509),g=n(9985),m=n(8999),y=n(767),b=n(6373),w=n(9886).set,x=n(231),_=n(920),S=n(9302),k=n(4410),P=n(618),E=n(7919),O=n(7073),T=n(8742),C="Promise",j=O.CONSTRUCTOR,M=O.REJECTION_EVENT,R=O.SUBCLASSING,A=P.getterFor(C),I=P.set,L=E&&E.prototype,D=E,$=L,N=c.TypeError,F=c.document,B=c.process,U=T.f,z=U,W=!!(F&&F.createEvent&&c.dispatchEvent),H="unhandledrejection",V=function(t){var e;return!(!m(t)||!g(e=t.then))&&e},G=function(t,e){var n,r,i,o=e.value,a=1===e.state,s=a?t.ok:t.fail,u=t.resolve,c=t.reject,f=t.domain;try{s?(a||(2===e.rejection&&Z(e),e.rejection=1),!0===s?n=o:(f&&f.enter(),n=s(o),f&&(f.exit(),i=!0)),n===t.promise?c(new N("Promise-chain cycle")):(r=V(n))?l(r,n,u,c):u(n)):c(o)}catch(t){f&&!i&&f.exit(),c(t)}},Y=function(t,e){t.notified||(t.notified=!0,x((function(){for(var n,r=t.reactions;n=r.get();)G(n,t);t.notified=!1,e&&!t.rejection&&q(t)})))},X=function(t,e,n){var r,i;W?((r=F.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),c.dispatchEvent(r)):r={promise:e,reason:n},!M&&(i=c["on"+t])?i(r):t===H&&_("Unhandled promise rejection",n)},q=function(t){l(w,c,(function(){var e,n=t.facade,r=t.value;if(K(t)&&(e=S((function(){u?B.emit("unhandledRejection",r,n):X(H,n,r)})),t.rejection=u||K(t)?2:1,e.error))throw e.value}))},K=function(t){return 1!==t.rejection&&!t.parent},Z=function(t){l(w,c,(function(){var e=t.facade;u?B.emit("rejectionHandled",e):X("rejectionhandled",e,t.value)}))},J=function(t,e,n){return function(r){t(e,r,n)}},Q=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,Y(t,!0))},tt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new N("Promise can't be resolved itself");var r=V(e);r?x((function(){var n={done:!1};try{l(r,e,J(tt,n,t),J(Q,n,t))}catch(e){Q(n,e,t)}})):(t.value=e,t.state=1,Y(t,!1))}catch(e){Q({done:!1},e,t)}}};if(j&&($=(D=function(t){y(this,$),v(t),l(r,this);var e=A(this);try{t(J(tt,e),J(Q,e))}catch(t){Q(e,t)}}).prototype,(r=function(t){I(this,{type:C,done:!1,notified:!1,parent:!1,reactions:new k,rejection:!1,state:0,value:void 0})}).prototype=f($,"then",(function(t,e){var n=A(this),r=U(b(this,D));return n.parent=!0,r.ok=!g(t)||t,r.fail=g(e)&&e,r.domain=u?B.domain:void 0,0===n.state?n.reactions.add(r):x((function(){G(r,n)})),r.promise})),i=function(){var t=new r,e=A(t);this.promise=t,this.resolve=J(tt,e),this.reject=J(Q,e)},T.f=U=function(t){return t===D||void 0===t?new i(t):z(t)},!s&&g(E)&&L!==Object.prototype)){o=L.then,R||f(L,"then",(function(t,e){var n=this;return new D((function(t,e){l(o,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete L.constructor}catch(t){}h&&h(L,$)}a({global:!0,constructor:!0,wrap:!0,forced:j},{Promise:D}),d(D,C,!1,!0),p(C)},3964:function(t,e,n){"use strict";n(6697),n(1692),n(5089),n(8829),n(2092),n(7905)},8829:function(t,e,n){"use strict";var r=n(9989),i=n(2615),o=n(509),a=n(8742),s=n(9302),u=n(8734);r({target:"Promise",stat:!0,forced:n(562)},{race:function(t){var e=this,n=a.f(e),r=n.reject,c=s((function(){var a=o(e.resolve);u(t,(function(t){i(a,e,t).then(n.resolve,r)}))}));return c.error&&r(c.value),n.promise}})},2092:function(t,e,n){"use strict";var r=n(9989),i=n(2615),o=n(8742);r({target:"Promise",stat:!0,forced:n(7073).CONSTRUCTOR},{reject:function(t){var e=o.f(this);return i(e.reject,void 0,t),e.promise}})},7905:function(t,e,n){"use strict";var r=n(9989),i=n(6058),o=n(3931),a=n(7919),s=n(7073).CONSTRUCTOR,u=n(2945),c=i("Promise"),l=o&&!s;r({target:"Promise",stat:!0,forced:o||s},{resolve:function(t){return u(l&&this===c?a:this,t)}})},50:function(t,e,n){"use strict";var r=n(9989),i=n(6058),o=n(1735),a=n(6761),s=n(2655),u=n(5027),c=n(8999),l=n(5391),f=n(3689),h=i("Reflect","construct"),d=Object.prototype,p=[].push,v=f((function(){function t(){}return!(h((function(){}),[],t)instanceof t)})),g=!f((function(){h((function(){}))})),m=v||g;r({target:"Reflect",stat:!0,forced:m,sham:m},{construct:function(t,e){s(t),u(e);var n=arguments.length<3?t:s(arguments[2]);if(g&&!v)return h(t,e,n);if(t===n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return o(p,r,e),new(o(a,t,r))}var i=n.prototype,f=l(c(i)?i:d),m=o(t,f,e);return c(m)?m:f}})},2349:function(t,e,n){"use strict";var r=n(9989),i=n(2615),o=n(8999),a=n(5027),s=n(6251),u=n(2474),c=n(1868);r({target:"Reflect",stat:!0},{get:function t(e,n){var r,l,f=arguments.length<3?e:arguments[2];return a(e)===f?e[n]:(r=u.f(e,n))?s(r)?r.value:void 0===r.get?void 0:i(r.get,f):o(l=c(e))?t(l,n,f):void 0}})},2003:function(t,e,n){"use strict";var r=n(7697),i=n(9037),o=n(8844),a=n(5266),s=n(3457),u=n(5773),c=n(2741).f,l=n(3622),f=n(1245),h=n(4327),d=n(3477),p=n(7901),v=n(8055),g=n(1880),m=n(3689),y=n(6812),b=n(618).enforce,w=n(4241),x=n(4201),_=n(2100),S=n(6422),k=x("match"),P=i.RegExp,E=P.prototype,O=i.SyntaxError,T=o(E.exec),C=o("".charAt),j=o("".replace),M=o("".indexOf),R=o("".slice),A=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,I=/a/g,L=/a/g,D=new P(I)!==I,$=p.MISSED_STICKY,N=p.UNSUPPORTED_Y;if(a("RegExp",r&&(!D||$||_||S||m((function(){return L[k]=!1,P(I)!==I||P(L)===L||"/a/i"!==String(P(I,"i"))}))))){for(var F=function(t,e){var n,r,i,o,a,c,p=l(E,this),v=f(t),g=void 0===e,m=[],w=t;if(!p&&v&&g&&t.constructor===F)return t;if((v||l(E,t))&&(t=t.source,g&&(e=d(w))),t=void 0===t?"":h(t),e=void 0===e?"":h(e),w=t,_&&"dotAll"in I&&(r=!!e&&M(e,"s")>-1)&&(e=j(e,/s/g,"")),n=e,$&&"sticky"in I&&(i=!!e&&M(e,"y")>-1)&&N&&(e=j(e,/y/g,"")),S&&(o=function(t){for(var e,n=t.length,r=0,i="",o=[],a={},s=!1,u=!1,c=0,l="";r<=n;r++){if("\\"===(e=C(t,r)))e+=C(t,++r);else if("]"===e)s=!1;else if(!s)switch(!0){case"["===e:s=!0;break;case"("===e:T(A,R(t,r+1))&&(r+=2,u=!0),i+=e,c++;continue;case">"===e&&u:if(""===l||y(a,l))throw new O("Invalid capture group name");a[l]=!0,o[o.length]=[l,c],u=!1,l="";continue}u?l+=e:i+=e}return[i,o]}(t),t=o[0],m=o[1]),a=s(P(t,e),p?this:E,F),(r||i||m.length)&&(c=b(a),r&&(c.dotAll=!0,c.raw=F(function(t){for(var e,n=t.length,r=0,i="",o=!1;r<=n;r++)"\\"!==(e=C(t,r))?o||"."!==e?("["===e?o=!0:"]"===e&&(o=!1),i+=e):i+="[\\s\\S]":i+=e+C(t,++r);return i}(t),n)),i&&(c.sticky=!0),m.length&&(c.groups=m)),t!==w)try{u(a,"source",""===w?"(?:)":w)}catch(t){}return a},B=c(P),U=0;B.length>U;)v(F,P,B[U++]);E.constructor=F,F.prototype=E,g(i,"RegExp",F,{constructor:!0})}w("RegExp")},4043:function(t,e,n){"use strict";var r=n(9989),i=n(6308);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},2826:function(t,e,n){"use strict";var r=n(1236).PROPER,i=n(1880),o=n(5027),a=n(4327),s=n(3689),u=n(3477),c="toString",l=RegExp.prototype[c],f=s((function(){return"/a/b"!==l.call({source:"a",flags:"b"})})),h=r&&l.name!==c;(f||h)&&i(RegExp.prototype,c,(function(){var t=o(this);return"/"+a(t.source)+"/"+a(u(t))}),{unsafe:!0})},7985:function(t,e,n){"use strict";n(319)("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(800))},9649:function(t,e,n){"use strict";n(7985)},2918:function(t,e,n){"use strict";var r,i=n(9989),o=n(6576),a=n(2474).f,s=n(3126),u=n(4327),c=n(2124),l=n(4684),f=n(7413),h=n(3931),d=o("".endsWith),p=o("".slice),v=Math.min,g=f("endsWith");i({target:"String",proto:!0,forced:!(!h&&!g&&(r=a(String.prototype,"endsWith"),r&&!r.writable)||g)},{endsWith:function(t){var e=u(l(this));c(t);var n=arguments.length>1?arguments[1]:void 0,r=e.length,i=void 0===n?r:v(s(n),r),o=u(t);return d?d(e,o,i):p(e,i-o.length,i)===o}})},3843:function(t,e,n){"use strict";var r=n(9989),i=n(8844),o=n(2124),a=n(4684),s=n(4327),u=n(7413),c=i("".indexOf);r({target:"String",proto:!0,forced:!u("includes")},{includes:function(t){return!!~c(s(a(this)),s(o(t)),arguments.length>1?arguments[1]:void 0)}})},1694:function(t,e,n){"use strict";var r=n(730).charAt,i=n(4327),o=n(618),a=n(1934),s=n(7807),u="String Iterator",c=o.set,l=o.getterFor(u);a(String,"String",(function(t){c(this,{type:u,string:i(t),index:0})}),(function(){var t,e=l(this),n=e.string,i=e.index;return i>=n.length?s(void 0,!0):(t=r(n,i),e.index+=t.length,s(t,!1))}))},2462:function(t,e,n){"use strict";var r=n(2615),i=n(8678),o=n(5027),a=n(981),s=n(3126),u=n(4327),c=n(4684),l=n(4849),f=n(727),h=n(6100);i("match",(function(t,e,n){return[function(e){var n=c(this),i=a(e)?void 0:l(e,t);return i?r(i,e,n):new RegExp(e)[t](u(n))},function(t){var r=o(this),i=u(t),a=n(e,r,i);if(a.done)return a.value;if(!r.global)return h(r,i);var c=r.unicode;r.lastIndex=0;for(var l,d=[],p=0;null!==(l=h(r,i));){var v=u(l[0]);d[p]=v,""===v&&(r.lastIndex=f(i,s(r.lastIndex),c)),p++}return 0===p?null:d}]}))},7267:function(t,e,n){"use strict";var r=n(1735),i=n(2615),o=n(8844),a=n(8678),s=n(3689),u=n(5027),c=n(9985),l=n(981),f=n(8700),h=n(3126),d=n(4327),p=n(4684),v=n(727),g=n(4849),m=n(7017),y=n(6100),b=n(4201)("replace"),w=Math.max,x=Math.min,_=o([].concat),S=o([].push),k=o("".indexOf),P=o("".slice),E="$0"==="a".replace(/./,"$0"),O=!!/./[b]&&""===/./[b]("a","$0");a("replace",(function(t,e,n){var o=O?"$":"$0";return[function(t,n){var r=p(this),o=l(t)?void 0:g(t,b);return o?i(o,t,r,n):i(e,d(r),t,n)},function(t,i){var a=u(this),s=d(t);if("string"==typeof i&&-1===k(i,o)&&-1===k(i,"$<")){var l=n(e,a,s,i);if(l.done)return l.value}var p=c(i);p||(i=d(i));var g,b=a.global;b&&(g=a.unicode,a.lastIndex=0);for(var E,O=[];null!==(E=y(a,s))&&(S(O,E),b);)""===d(E[0])&&(a.lastIndex=v(s,h(a.lastIndex),g));for(var T,C="",j=0,M=0;M<O.length;M++){for(var R,A=d((E=O[M])[0]),I=w(x(f(E.index),s.length),0),L=[],D=1;D<E.length;D++)S(L,void 0===(T=E[D])?T:String(T));var $=E.groups;if(p){var N=_([A],L,I,s);void 0!==$&&S(N,$),R=d(r(i,void 0,N))}else R=m(A,s,I,L,$,i);I>=j&&(C+=P(s,j,I)+R,j=I+A.length)}return C+P(s,j)}]}),!!s((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!E||O)},1514:function(t,e,n){"use strict";var r=n(2615),i=n(8678),o=n(5027),a=n(981),s=n(4684),u=n(953),c=n(4327),l=n(4849),f=n(6100);i("search",(function(t,e,n){return[function(e){var n=s(this),i=a(e)?void 0:l(e,t);return i?r(i,e,n):new RegExp(e)[t](c(n))},function(t){var r=o(this),i=c(t),a=n(e,r,i);if(a.done)return a.value;var s=r.lastIndex;u(s,0)||(r.lastIndex=0);var l=f(r,i);return u(r.lastIndex,s)||(r.lastIndex=s),null===l?-1:l.index}]}))},9873:function(t,e,n){"use strict";var r=n(1735),i=n(2615),o=n(8844),a=n(8678),s=n(5027),u=n(981),c=n(1245),l=n(4684),f=n(6373),h=n(727),d=n(3126),p=n(4327),v=n(4849),g=n(9015),m=n(6100),y=n(6308),b=n(7901),w=n(3689),x=b.UNSUPPORTED_Y,_=4294967295,S=Math.min,k=[].push,P=o(/./.exec),E=o(k),O=o("".slice),T=!w((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));a("split",(function(t,e,n){var o;return o="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var o=p(l(this)),a=void 0===n?_:n>>>0;if(0===a)return[];if(void 0===t)return[o];if(!c(t))return i(e,o,t,a);for(var s,u,f,h=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,m=new RegExp(t.source,d+"g");(s=i(y,m,o))&&!((u=m.lastIndex)>v&&(E(h,O(o,v,s.index)),s.length>1&&s.index<o.length&&r(k,h,g(s,1)),f=s[0].length,v=u,h.length>=a));)m.lastIndex===s.index&&m.lastIndex++;return v===o.length?!f&&P(m,"")||E(h,""):E(h,O(o,v)),h.length>a?g(h,0,a):h}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:i(e,this,t,n)}:e,[function(e,n){var r=l(this),a=u(e)?void 0:v(e,t);return a?i(a,e,r,n):i(o,p(r),e,n)},function(t,r){var i=s(this),a=p(t),u=n(o,i,a,r,o!==e);if(u.done)return u.value;var c=f(i,RegExp),l=i.unicode,v=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(x?"g":"y"),g=new c(x?"^(?:"+i.source+")":i,v),y=void 0===r?_:r>>>0;if(0===y)return[];if(0===a.length)return null===m(g,a)?[a]:[];for(var b=0,w=0,k=[];w<a.length;){g.lastIndex=x?0:w;var P,T=m(g,x?O(a,w):a);if(null===T||(P=S(d(g.lastIndex+(x?w:0)),a.length))===b)w=h(a,w,l);else{if(E(k,O(a,b,w)),k.length===y)return k;for(var C=1;C<=T.length-1;C++)if(E(k,T[C]),k.length===y)return k;w=b=P}}return E(k,O(a,b)),k}]}),!T,x)},268:function(t,e,n){"use strict";var r,i=n(9989),o=n(6576),a=n(2474).f,s=n(3126),u=n(4327),c=n(2124),l=n(4684),f=n(7413),h=n(3931),d=o("".startsWith),p=o("".slice),v=Math.min,g=f("startsWith");i({target:"String",proto:!0,forced:!(!h&&!g&&(r=a(String.prototype,"startsWith"),r&&!r.writable)||g)},{startsWith:function(t){var e=u(l(this));c(t);var n=s(v(arguments.length>1?arguments[1]:void 0,e.length)),r=u(t);return d?d(e,r,n):p(e,n,n+r.length)===r}})},8373:function(t,e,n){"use strict";n(5405)("asyncIterator")},7855:function(t,e,n){"use strict";var r=n(9989),i=n(9037),o=n(2615),a=n(8844),s=n(3931),u=n(7697),c=n(146),l=n(3689),f=n(6812),h=n(3622),d=n(5027),p=n(5290),v=n(8360),g=n(4327),m=n(5684),y=n(5391),b=n(300),w=n(2741),x=n(6062),_=n(7518),S=n(2474),k=n(2560),P=n(8920),E=n(9556),O=n(1880),T=n(2148),C=n(3430),j=n(2713),M=n(7248),R=n(4630),A=n(4201),I=n(6145),L=n(5405),D=n(3032),$=n(5997),N=n(618),F=n(2960).forEach,B=j("hidden"),U="Symbol",z="prototype",W=N.set,H=N.getterFor(U),V=Object[z],G=i.Symbol,Y=G&&G[z],X=i.RangeError,q=i.TypeError,K=i.QObject,Z=S.f,J=k.f,Q=x.f,tt=E.f,et=a([].push),nt=C("symbols"),rt=C("op-symbols"),it=C("wks"),ot=!K||!K[z]||!K[z].findChild,at=function(t,e,n){var r=Z(V,e);r&&delete V[e],J(t,e,n),r&&t!==V&&J(V,e,r)},st=u&&l((function(){return 7!==y(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a}))?at:J,ut=function(t,e){var n=nt[t]=y(Y);return W(n,{type:U,tag:t,description:e}),u||(n.description=e),n},ct=function(t,e,n){t===V&&ct(rt,e,n),d(t);var r=v(e);return d(n),f(nt,r)?(n.enumerable?(f(t,B)&&t[B][r]&&(t[B][r]=!1),n=y(n,{enumerable:m(0,!1)})):(f(t,B)||J(t,B,m(1,{})),t[B][r]=!0),st(t,r,n)):J(t,r,n)},lt=function(t,e){d(t);var n=p(e),r=b(n).concat(pt(n));return F(r,(function(e){u&&!o(ft,n,e)||ct(t,e,n[e])})),t},ft=function(t){var e=v(t),n=o(tt,this,e);return!(this===V&&f(nt,e)&&!f(rt,e))&&(!(n||!f(this,e)||!f(nt,e)||f(this,B)&&this[B][e])||n)},ht=function(t,e){var n=p(t),r=v(e);if(n!==V||!f(nt,r)||f(rt,r)){var i=Z(n,r);return!i||!f(nt,r)||f(n,B)&&n[B][r]||(i.enumerable=!0),i}},dt=function(t){var e=Q(p(t)),n=[];return F(e,(function(t){f(nt,t)||f(M,t)||et(n,t)})),n},pt=function(t){var e=t===V,n=Q(e?rt:p(t)),r=[];return F(n,(function(t){!f(nt,t)||e&&!f(V,t)||et(r,nt[t])})),r};c||(G=function(){if(h(Y,this))throw new q("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,e=R(t),n=function(t){var r=void 0===this?i:this;r===V&&o(n,rt,t),f(r,B)&&f(r[B],e)&&(r[B][e]=!1);var a=m(1,t);try{st(r,e,a)}catch(t){if(!(t instanceof X))throw t;at(r,e,a)}};return u&&ot&&st(V,e,{configurable:!0,set:n}),ut(e,t)},O(Y=G[z],"toString",(function(){return H(this).tag})),O(G,"withoutSetter",(function(t){return ut(R(t),t)})),E.f=ft,k.f=ct,P.f=lt,S.f=ht,w.f=x.f=dt,_.f=pt,I.f=function(t){return ut(A(t),t)},u&&(T(Y,"description",{configurable:!0,get:function(){return H(this).description}}),s||O(V,"propertyIsEnumerable",ft,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:G}),F(b(it),(function(t){L(t)})),r({target:U,stat:!0,forced:!c},{useSetter:function(){ot=!0},useSimple:function(){ot=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(t,e){return void 0===e?y(t):lt(y(t),e)},defineProperty:ct,defineProperties:lt,getOwnPropertyDescriptor:ht}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:dt}),D(),$(G,U),M[B]=!0},6544:function(t,e,n){"use strict";var r=n(9989),i=n(7697),o=n(9037),a=n(8844),s=n(6812),u=n(9985),c=n(3622),l=n(4327),f=n(2148),h=n(8758),d=o.Symbol,p=d&&d.prototype;if(i&&u(d)&&(!("description"in p)||void 0!==d().description)){var v={},g=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),e=c(p,this)?new d(t):void 0===t?d():d(t);return""===t&&(v[e]=!0),e};h(g,d),g.prototype=p,p.constructor=g;var m="Symbol(description detection)"===String(d("description detection")),y=a(p.valueOf),b=a(p.toString),w=/^Symbol\((.*)\)[^)]+$/,x=a("".replace),_=a("".slice);f(p,"description",{configurable:!0,get:function(){var t=y(this);if(s(v,t))return"";var e=b(t),n=m?_(e,7,-1):x(e,w,"$1");return""===n?void 0:n}}),r({global:!0,constructor:!0,forced:!0},{Symbol:g})}},3975:function(t,e,n){"use strict";var r=n(9989),i=n(6058),o=n(6812),a=n(4327),s=n(3430),u=n(6549),c=s("string-to-symbol-registry"),l=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!u},{for:function(t){var e=a(t);if(o(c,e))return c[e];var n=i("Symbol")(e);return c[e]=n,l[n]=e,n}})},4254:function(t,e,n){"use strict";n(5405)("iterator")},9749:function(t,e,n){"use strict";n(7855),n(3975),n(1445),n(8324),n(9434)},1445:function(t,e,n){"use strict";var r=n(9989),i=n(6812),o=n(734),a=n(3691),s=n(3430),u=n(6549),c=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!u},{keyFor:function(t){if(!o(t))throw new TypeError(a(t)+" is not a symbol");if(i(c,t))return c[t]}})},9373:function(t,e,n){"use strict";var r=n(5405),i=n(3032);r("toPrimitive"),i()},6793:function(t,e,n){"use strict";var r=n(6058),i=n(5405),o=n(5997);i("toStringTag"),o(r("Symbol"),"Symbol")},5164:function(t,e,n){"use strict";var r,i=n(1594),o=n(9037),a=n(8844),s=n(6045),u=n(5375),c=n(319),l=n(637),f=n(8999),h=n(618).enforce,d=n(3689),p=n(9834),v=Object,g=Array.isArray,m=v.isExtensible,y=v.isFrozen,b=v.isSealed,w=v.freeze,x=v.seal,_={},S={},k=!o.ActiveXObject&&"ActiveXObject"in o,P=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},E=c("WeakMap",P,l),O=E.prototype,T=a(O.set);if(p)if(k){r=l.getConstructor(P,"WeakMap",!0),u.enable();var C=a(O.delete),j=a(O.has),M=a(O.get);s(O,{delete:function(t){if(f(t)&&!m(t)){var e=h(this);return e.frozen||(e.frozen=new r),C(this,t)||e.frozen.delete(t)}return C(this,t)},has:function(t){if(f(t)&&!m(t)){var e=h(this);return e.frozen||(e.frozen=new r),j(this,t)||e.frozen.has(t)}return j(this,t)},get:function(t){if(f(t)&&!m(t)){var e=h(this);return e.frozen||(e.frozen=new r),j(this,t)?M(this,t):e.frozen.get(t)}return M(this,t)},set:function(t,e){if(f(t)&&!m(t)){var n=h(this);n.frozen||(n.frozen=new r),j(this,t)?T(this,t,e):n.frozen.set(t,e)}else T(this,t,e);return this}})}else i&&d((function(){var t=w([]);return T(new E,t,1),!y(t)}))&&s(O,{set:function(t,e){var n;return g(t)&&(y(t)?n=_:b(t)&&(n=S)),T(this,t,e),n===_&&w(t),n===S&&x(t),this}})},1090:function(t,e,n){"use strict";n(5164)},8832:function(t,e,n){"use strict";n(5398)},7522:function(t,e,n){"use strict";var r=n(9037),i=n(6338),o=n(3265),a=n(7612),s=n(5773),u=function(t){if(t&&t.forEach!==a)try{s(t,"forEach",a)}catch(e){t.forEach=a}};for(var c in i)i[c]&&u(r[c]&&r[c].prototype);u(o)},6265:function(t,e,n){"use strict";var r=n(9037),i=n(6338),o=n(3265),a=n(752),s=n(5773),u=n(4201),c=u("iterator"),l=u("toStringTag"),f=a.values,h=function(t,e){if(t){if(t[c]!==f)try{s(t,c,f)}catch(e){t[c]=f}if(t[l]||s(t,l,e),i[e])for(var n in a)if(t[n]!==a[n])try{s(t,n,a[n])}catch(e){t[n]=a[n]}}};for(var d in i)h(r[d]&&r[d].prototype,d);h(o,"DOMTokenList")},2625:function(t,e,n){"use strict";n(752);var r=n(9989),i=n(9037),o=n(2615),a=n(8844),s=n(7697),u=n(6837),c=n(1880),l=n(2148),f=n(6045),h=n(5997),d=n(974),p=n(618),v=n(767),g=n(9985),m=n(6812),y=n(4071),b=n(926),w=n(5027),x=n(8999),_=n(4327),S=n(5391),k=n(5684),P=n(5185),E=n(1664),O=n(7807),T=n(1500),C=n(4201),j=n(382),M=C("iterator"),R="URLSearchParams",A=R+"Iterator",I=p.set,L=p.getterFor(R),D=p.getterFor(A),$=Object.getOwnPropertyDescriptor,N=function(t){if(!s)return i[t];var e=$(i,t);return e&&e.value},F=N("fetch"),B=N("Request"),U=N("Headers"),z=B&&B.prototype,W=U&&U.prototype,H=i.RegExp,V=i.TypeError,G=i.decodeURIComponent,Y=i.encodeURIComponent,X=a("".charAt),q=a([].join),K=a([].push),Z=a("".replace),J=a([].shift),Q=a([].splice),tt=a("".split),et=a("".slice),nt=/\+/g,rt=Array(4),it=function(t){return rt[t-1]||(rt[t-1]=H("((?:%[\\da-f]{2}){"+t+"})","gi"))},ot=function(t){try{return G(t)}catch(e){return t}},at=function(t){var e=Z(t,nt," "),n=4;try{return G(e)}catch(t){for(;n;)e=Z(e,it(n--),ot);return e}},st=/[!'()~]|%20/g,ut={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ct=function(t){return ut[t]},lt=function(t){return Z(Y(t),st,ct)},ft=d((function(t,e){I(this,{type:A,target:L(t).entries,index:0,kind:e})}),R,(function(){var t=D(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=void 0,O(void 0,!0);var r=e[n];switch(t.kind){case"keys":return O(r.key,!1);case"values":return O(r.value,!1)}return O([r.key,r.value],!1)}),!0),ht=function(t){this.entries=[],this.url=null,void 0!==t&&(x(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===X(t,0)?et(t,1):t:_(t)))};ht.prototype={type:R,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,r,i,a,s,u,c=this.entries,l=E(t);if(l)for(n=(e=P(t,l)).next;!(r=o(n,e)).done;){if(a=(i=P(w(r.value))).next,(s=o(a,i)).done||(u=o(a,i)).done||!o(a,i).done)throw new V("Expected sequence with length 2");K(c,{key:_(s.value),value:_(u.value)})}else for(var f in t)m(t,f)&&K(c,{key:f,value:_(t[f])})},parseQuery:function(t){if(t)for(var e,n,r=this.entries,i=tt(t,"&"),o=0;o<i.length;)(e=i[o++]).length&&(n=tt(e,"="),K(r,{key:at(J(n)),value:at(q(n,"="))}))},serialize:function(){for(var t,e=this.entries,n=[],r=0;r<e.length;)t=e[r++],K(n,lt(t.key)+"="+lt(t.value));return q(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var dt=function(){v(this,pt);var t=I(this,new ht(arguments.length>0?arguments[0]:void 0));s||(this.size=t.entries.length)},pt=dt.prototype;if(f(pt,{append:function(t,e){var n=L(this);T(arguments.length,2),K(n.entries,{key:_(t),value:_(e)}),s||this.length++,n.updateURL()},delete:function(t){for(var e=L(this),n=T(arguments.length,1),r=e.entries,i=_(t),o=n<2?void 0:arguments[1],a=void 0===o?o:_(o),u=0;u<r.length;){var c=r[u];if(c.key!==i||void 0!==a&&c.value!==a)u++;else if(Q(r,u,1),void 0!==a)break}s||(this.size=r.length),e.updateURL()},get:function(t){var e=L(this).entries;T(arguments.length,1);for(var n=_(t),r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){var e=L(this).entries;T(arguments.length,1);for(var n=_(t),r=[],i=0;i<e.length;i++)e[i].key===n&&K(r,e[i].value);return r},has:function(t){for(var e=L(this).entries,n=T(arguments.length,1),r=_(t),i=n<2?void 0:arguments[1],o=void 0===i?i:_(i),a=0;a<e.length;){var s=e[a++];if(s.key===r&&(void 0===o||s.value===o))return!0}return!1},set:function(t,e){var n=L(this);T(arguments.length,1);for(var r,i=n.entries,o=!1,a=_(t),u=_(e),c=0;c<i.length;c++)(r=i[c]).key===a&&(o?Q(i,c--,1):(o=!0,r.value=u));o||K(i,{key:a,value:u}),s||(this.size=i.length),n.updateURL()},sort:function(){var t=L(this);j(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,n=L(this).entries,r=y(t,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((e=n[i++]).value,e.key,this)},keys:function(){return new ft(this,"keys")},values:function(){return new ft(this,"values")},entries:function(){return new ft(this,"entries")}},{enumerable:!0}),c(pt,M,pt.entries,{name:"entries"}),c(pt,"toString",(function(){return L(this).serialize()}),{enumerable:!0}),s&&l(pt,"size",{get:function(){return L(this).entries.length},configurable:!0,enumerable:!0}),h(dt,R),r({global:!0,constructor:!0,forced:!u},{URLSearchParams:dt}),!u&&g(U)){var vt=a(W.has),gt=a(W.set),mt=function(t){if(x(t)){var e,n=t.body;if(b(n)===R)return e=t.headers?new U(t.headers):new U,vt(e,"content-type")||gt(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),S(t,{body:k(0,_(n)),headers:k(0,e)})}return t};if(g(F)&&r({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return F(t,arguments.length>1?mt(arguments[1]):{})}}),g(B)){var yt=function(t){return v(this,z),new B(t,arguments.length>1?mt(arguments[1]):{})};z.constructor=yt,yt.prototype=z,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:yt})}}t.exports={URLSearchParams:dt,getState:L}},9307:function(t,e,n){"use strict";n(2625)},5756:function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}n.d(e,{XM:function(){return s},Xe:function(){return u},pX:function(){return a}}),n(9373),n(9903),n(9749),n(6544),n(228),n(9288),n(4254),n(752),n(1694),n(6265),n(7049),n(9730),n(2826),n(4284),n(4043);var a={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},s=function(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return{_$litDirective$:t,values:n}}},u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AT",value:function(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}},{key:"_$AS",value:function(t,e){return this.update(t,e)}},{key:"update",value:function(t,e){return this.render.apply(this,function(t){if(Array.isArray(t))return i(t)}(n=e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());var n}}],n&&o(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()},4817:function(t,e,n){"use strict";var r;function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=s(t);if(e){var i=s(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=c(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function c(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==p(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===p(i)?i:String(i)),r)}var i}function d(t,e,n){return e&&h(t.prototype,e),n&&h(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t){return p="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},p(t)}n.d(e,{Al:function(){return tt},Jb:function(){return N},Ld:function(){return F},YP:function(){return $},dy:function(){return D},sY:function(){return nt}}),n(9730),n(4254),n(752),n(228),n(1694),n(6265),n(9749),n(6544),n(2003),n(4043),n(2826),n(4338),n(1090),n(268),n(2918),n(9873),n(4284),n(7895),n(9373),n(9903),n(9288),n(7049),n(8052),n(50);var v=window,g=v.trustedTypes,m=g?g.createPolicy("lit-html",{createHTML:function(t){return t}}):void 0,y="$lit$",b="lit$".concat((Math.random()+"").slice(9),"$"),w="?"+b,x="<".concat(w,">"),_=document,S=function(){return _.createComment("")},k=function(t){return null===t||"object"!=p(t)&&"function"!=typeof t},P=Array.isArray,E=function(t){return P(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator])},O="[ \t\n\f\r]",T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,C=/-->/g,j=/>/g,M=RegExp(">|".concat(O,"(?:([^\\s\"'>=/]+)(").concat(O,"*=").concat(O,"*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)"),"g"),R=/'/g,A=/"/g,I=/^(?:script|style|textarea|title)$/i,L=function(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return{_$litType$:t,strings:e,values:r}}},D=L(1),$=L(2),N=Symbol.for("lit-noChange"),F=Symbol.for("lit-nothing"),B=new WeakMap,U=_.createTreeWalker(_,129,null,!1);function z(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==m?m.createHTML(e):e}var W=function(t,e){for(var n,r=t.length-1,i=[],o=2===e?"<svg>":"",a=T,s=0;s<r;s++){for(var u=t[s],c=void 0,l=void 0,f=-1,h=0;h<u.length&&(a.lastIndex=h,null!==(l=a.exec(u)));)h=a.lastIndex,a===T?"!--"===l[1]?a=C:void 0!==l[1]?a=j:void 0!==l[2]?(I.test(l[2])&&(n=RegExp("</"+l[2],"g")),a=M):void 0!==l[3]&&(a=M):a===M?">"===l[0]?(a=null!=n?n:T,f=-1):void 0===l[1]?f=-2:(f=a.lastIndex-l[2].length,c=l[1],a=void 0===l[3]?M:'"'===l[3]?A:R):a===A||a===R?a=M:a===C||a===j?a=T:(a=M,n=void 0);var d=a===M&&t[s+1].startsWith("/>")?" ":"";o+=a===T?u+x:f>=0?(i.push(c),u.slice(0,f)+y+u.slice(f)+b+d):u+b+(-2===f?(i.push(void 0),s):d)}return[z(t,o+(t[r]||"<?>")+(2===e?"</svg>":"")),i]},H=function(){function t(e,n){var r,i=e.strings,o=e._$litType$;f(this,t),this.parts=[];var a,s=0,h=0,d=i.length-1,p=this.parts,v=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||c(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(W(i,o),2),m=v[0],x=v[1];if(this.el=t.createElement(m,n),U.currentNode=this.el.content,2===o){var _=this.el.content,k=_.firstChild;k.remove(),_.append.apply(_,function(t){if(Array.isArray(t))return l(t)}(a=k.childNodes)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(a)||c(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}for(;null!==(r=U.nextNode())&&p.length<d;){if(1===r.nodeType){if(r.hasAttributes()){var P,E=[],O=u(r.getAttributeNames());try{for(O.s();!(P=O.n()).done;){var T=P.value;if(T.endsWith(y)||T.startsWith(b)){var C=x[h++];if(E.push(T),void 0!==C){var j=r.getAttribute(C.toLowerCase()+y).split(b),M=/([.?@])?(.*)/.exec(C);p.push({type:1,index:s,name:M[2],strings:j,ctor:"."===M[1]?q:"?"===M[1]?Z:"@"===M[1]?J:X})}else p.push({type:6,index:s})}}}catch(t){O.e(t)}finally{O.f()}for(var R=0,A=E;R<A.length;R++){var L=A[R];r.removeAttribute(L)}}if(I.test(r.tagName)){var D=r.textContent.split(b),$=D.length-1;if($>0){r.textContent=g?g.emptyScript:"";for(var N=0;N<$;N++)r.append(D[N],S()),U.nextNode(),p.push({type:2,index:++s});r.append(D[$],S())}}}else if(8===r.nodeType)if(r.data===w)p.push({type:2,index:s});else for(var F=-1;-1!==(F=r.data.indexOf(b,F+1));)p.push({type:7,index:s}),F+=b.length-1;s++}}return d(t,null,[{key:"createElement",value:function(t,e){var n=_.createElement("template");return n.innerHTML=t,n}}]),t}();function V(t,e){var n,r,i,o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,s=arguments.length>3?arguments[3]:void 0;if(e===N)return e;var u=void 0!==s?null===(n=a._$Co)||void 0===n?void 0:n[s]:a._$Cl,c=k(e)?void 0:e._$litDirective$;return(null==u?void 0:u.constructor)!==c&&(null===(r=null==u?void 0:u._$AO)||void 0===r||r.call(u,!1),void 0===c?u=void 0:(u=new c(t))._$AT(t,a,s),void 0!==s?(null!==(i=(o=a)._$Co)&&void 0!==i?i:o._$Co=[])[s]=u:a._$Cl=u),void 0!==u&&(e=V(t,u._$AS(t,e.values),u,s)),e}var G=function(){function t(e,n){f(this,t),this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}return d(t,[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"u",value:function(t){var e,n=this._$AD,r=n.el.content,i=n.parts,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:_).importNode(r,!0);U.currentNode=o;for(var a=U.nextNode(),s=0,u=0,c=i[0];void 0!==c;){if(s===c.index){var l=void 0;2===c.type?l=new Y(a,a.nextSibling,this,t):1===c.type?l=new c.ctor(a,c.name,c.strings,this,t):6===c.type&&(l=new Q(a,this,t)),this._$AV.push(l),c=i[++u]}s!==(null==c?void 0:c.index)&&(a=U.nextNode(),s++)}return U.currentNode=_,o}},{key:"v",value:function(t){var e,n=0,r=u(this._$AV);try{for(r.s();!(e=r.n()).done;){var i=e.value;void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,n),n+=i.strings.length-2):i._$AI(t[n])),n++}}catch(t){r.e(t)}finally{r.f()}}}]),t}(),Y=function(){function t(e,n,r,i){var o;f(this,t),this.type=2,this._$AH=F,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=r,this.options=i,this._$Cp=null===(o=null==i?void 0:i.isConnected)||void 0===o||o}return d(t,[{key:"_$AU",get:function(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}},{key:"parentNode",get:function(){var t=this._$AA.parentNode,e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(t){t=V(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),k(t)?t===F||null==t||""===t?(this._$AH!==F&&this._$AR(),this._$AH=F):t!==this._$AH&&t!==N&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):E(t)?this.T(t):this._(t)}},{key:"k",value:function(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}},{key:"$",value:function(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}},{key:"_",value:function(t){this._$AH!==F&&k(this._$AH)?this._$AA.nextSibling.data=t:this.$(_.createTextNode(t)),this._$AH=t}},{key:"g",value:function(t){var e,n=t.values,r=t._$litType$,i="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=H.createElement(z(r.h,r.h[0]),this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.v(n);else{var o=new G(i,this),a=o.u(this.options);o.v(n),this.$(a),this._$AH=o}}},{key:"_$AC",value:function(t){var e=B.get(t.strings);return void 0===e&&B.set(t.strings,e=new H(t)),e}},{key:"T",value:function(e){P(this._$AH)||(this._$AH=[],this._$AR());var n,r,i=this._$AH,o=0,a=u(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;o===i.length?i.push(n=new t(this.k(S()),this.k(S()),this,this.options)):n=i[o],n._$AI(s),o++}}catch(t){a.e(t)}finally{a.f()}o<i.length&&(this._$AR(n&&n._$AB.nextSibling,o),i.length=o)}},{key:"_$AR",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,n=arguments.length>1?arguments[1]:void 0;for(null===(t=this._$AP)||void 0===t||t.call(this,!1,!0,n);e&&e!==this._$AB;){var r=e.nextSibling;e.remove(),e=r}}},{key:"setConnected",value:function(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}]),t}(),X=function(){function t(e,n,r,i,o){f(this,t),this.type=1,this._$AH=F,this._$AN=void 0,this.element=e,this.name=n,this._$AM=i,this.options=o,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=F}return d(t,[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=this.strings,o=!1;if(void 0===i)t=V(this,t,e,0),(o=!k(t)||t!==this._$AH&&t!==N)&&(this._$AH=t);else{var a,s,u=t;for(t=i[0],a=0;a<i.length-1;a++)(s=V(this,u[n+a],e,a))===N&&(s=this._$AH[a]),o||(o=!k(s)||s!==this._$AH[a]),s===F?t=F:t!==F&&(t+=(null!=s?s:"")+i[a+1]),this._$AH[a]=s}o&&!r&&this.j(t)}},{key:"j",value:function(t){t===F?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}]),t}(),q=function(t){i(n,t);var e=a(n);function n(){var t;return f(this,n),(t=e.apply(this,arguments)).type=3,t}return d(n,[{key:"j",value:function(t){this.element[this.name]=t===F?void 0:t}}]),n}(X),K=g?g.emptyScript:"",Z=function(t){i(n,t);var e=a(n);function n(){var t;return f(this,n),(t=e.apply(this,arguments)).type=4,t}return d(n,[{key:"j",value:function(t){t&&t!==F?this.element.setAttribute(this.name,K):this.element.removeAttribute(this.name)}}]),n}(X),J=function(t){i(n,t);var e=a(n);function n(t,r,i,o,a){var s;return f(this,n),(s=e.call(this,t,r,i,o,a)).type=5,s}return d(n,[{key:"_$AI",value:function(t){var e;if((t=null!==(e=V(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,0))&&void 0!==e?e:F)!==N){var n=this._$AH,r=t===F&&n!==F||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==F&&(n===F||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}}},{key:"handleEvent",value:function(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}]),n}(X),Q=function(){function t(e,n,r){f(this,t),this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}return d(t,[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){V(this,t)}}]),t}(),tt={O:y,P:b,A:w,C:1,M:W,L:G,R:E,D:V,I:Y,V:X,H:Z,N:J,U:q,F:Q},et=v.litHtmlPolyfillSupport;null==et||et(H,Y),(null!==(r=v.litHtmlVersions)&&void 0!==r?r:v.litHtmlVersions=[]).push("2.8.0");var nt=function(t,e,n){var r,i,o=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:e,a=o._$litPart$;if(void 0===a){var s=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:null;o._$litPart$=a=new Y(e.insertBefore(S(),s),s,void 0,null!=n?n:{})}return a._$AI(t),a}},9089:function(t,e,n){"use strict";n.d(e,{Mo:function(){return r},Cb:function(){return c},IO:function(){return w},SB:function(){return d}});var r=function(t){return function(e){return"function"==typeof e?function(t,e){return customElements.define(t,e),e}(t,e):function(t,e){return{kind:e.kind,elements:e.elements,finisher:function(e){customElements.define(t,e)}}}(t,e)}};function i(t){return i="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},i(t)}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){var r,o,a;r=t,o=e,a=n[e],(o=function(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===i(e)?e:String(e)}(o))in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}n(9749),n(6544),n(228),n(9373),n(9903),n(9288),n(9358),n(8077),n(1919),n(7522),n(9474),n(4254),n(752),n(1694),n(6265);var s=function(t,e){return"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?a(a({},e),{},{finisher:function(n){n.createProperty(e.key,t)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer:function(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher:function(n){n.createProperty(e.key,t)}}},u=function(t,e,n){e.constructor.createProperty(n,t)};function c(t){return function(e,n){return void 0!==n?u(t,e,n):s(t,e)}}function l(t){return l="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},l(t)}function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){var r,i,o;r=t,i=e,o=n[e],(i=function(t){var e=function(t,e){if("object"!==l(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===l(e)?e:String(e)}(i))in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function d(t){return c(h(h({},t),{},{state:!0}))}function p(t){return p="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},p(t)}function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?v(Object(n),!0).forEach((function(e){var r,i,o;r=t,i=e,o=n[e],(i=function(t){var e=function(t,e){if("object"!==p(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===p(e)?e:String(e)}(i))in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}n(429);var m,y=function(t){var e=t.finisher,n=t.descriptor;return function(t,r){var i;if(void 0===r){var o=null!==(i=t.originalKey)&&void 0!==i?i:t.key,a=null!=n?{kind:"method",placement:"prototype",key:o,descriptor:n(t.key)}:g(g({},t),{},{key:o});return null!=e&&(a.finisher=function(t){e(t,o)}),a}var s=t.constructor;void 0!==n&&Object.defineProperty(t,r,n(r)),null==e||e(s,r)}};function b(t){return b="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},b(t)}function w(t,e){return y({descriptor:function(n){var r={get:function(){var e,n;return null!==(n=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==n?n:null},enumerable:!0,configurable:!0};if(e){var i="symbol"==b(n)?Symbol():"__"+n;r.get=function(){var e,n;return void 0===this[i]&&(this[i]=null!==(n=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==n?n:null),this[i]}}return r}})}n(3964),n(8373),n(6793),n(7629),n(7509),n(8052),n(4284),n(3374),n(9730),null===(m=window.HTMLSlotElement)||void 0===m||m.prototype.assignedElements},1312:function(t,e,n){"use strict";n.d(e,{V:function(){return d}}),n(4284),n(278),n(228),n(9358),n(4338),n(6801),n(3843),n(4043),n(7267),n(752),n(9649),n(1694),n(6265),n(7522),n(2918),n(9730),n(8052),n(50),n(9373),n(9903),n(9749),n(6544),n(9288),n(4254),n(2826),n(7049);var r=n(4817),i=n(5756);function o(t){return o="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},o(t)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==o(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===o(i)?i:String(i)),r)}var i}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function c(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}var f="important",h=" !"+f,d=(0,i.XM)(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(v,t);var e,n,o,d,p=(o=v,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(o);if(d){var n=l(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return c(this,t)});function v(t){var e,n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,v),e=p.call(this,t),t.type!==i.pX.ATTRIBUTE||"style"!==t.name||(null===(n=t.strings)||void 0===n?void 0:n.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");return c(e)}return e=v,(n=[{key:"render",value:function(t){return Object.keys(t).reduce((function(e,n){var r=t[n];return null==r?e:e+"".concat(n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase(),":").concat(r,";")}),"")}},{key:"update",value:function(t,e){var n=this,i=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,1)[0],o=t.element.style;if(void 0===this.ht){for(var s in this.ht=new Set,i)this.ht.add(s);return this.render(i)}for(var u in this.ht.forEach((function(t){null==i[t]&&(n.ht.delete(t),t.includes("-")?o.removeProperty(t):o[t]="")})),i){var c=i[u];if(null!=c){this.ht.add(u);var l="string"==typeof c&&c.endsWith(h);u.includes("-")||l?o.setProperty(u,l?c.slice(0,-11):c,l?f:""):o[u]=c}}return r.Jb}}])&&s(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),v}(i.Xe))},8318:function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}n.d(e,{oi:function(){return V},iv:function(){return h},dy:function(){return N.dy},Ld:function(){return N.Ld},sY:function(){return N.sY},YP:function(){return N.YP}}),n(9288),n(9358),n(752),n(6646),n(228),n(1694),n(6265),n(3964),n(7522),n(2506),n(9749),n(6544),n(8052),n(4338),n(9997),n(9649),n(3374),n(2795),n(3383),n(2826),n(50),n(9373),n(9903),n(4254),n(8373),n(6793),n(7629),n(7509),n(4284),n(9730),n(7049),n(4043),n(1090),n(278),n(886);var a,s=window,u=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,c=Symbol(),l=new WeakMap,f=function(){function t(e,n,r){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._$cssResult$=!0,r!==c)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}var e,n;return e=t,n=[{key:"styleSheet",get:function(){var t=this.o,e=this.t;if(u&&void 0===t){var n=void 0!==e&&1===e.length;n&&(t=l.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&l.set(e,t))}return t}},{key:"toString",value:function(){return this.cssText}}],n&&o(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),h=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=1===t.length?t[0]:n.reduce((function(e,n,r){return e+function(t){if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")}(n)+t[r+1]}),t[0]);return new f(i,t,c)},d=u?function(t){return t}:function(t){return t instanceof CSSStyleSheet?function(t){var e,n="",r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}(t.cssRules);try{for(r.s();!(e=r.n()).done;)n+=e.value.cssText}catch(t){r.e(t)}finally{r.f()}return function(t){return new f("string"==typeof t?t:t+"",void 0,c)}(n)}(t):t};function p(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=g(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function v(t){return function(t){if(Array.isArray(t))return m(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||g(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e){if(t){if("string"==typeof t)return m(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(t,e):void 0}}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function y(t){return y="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},y(t)}function b(){b=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new R(r||[]);return i(a,"_invoke",{value:T(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",g={};function m(){}function w(){}function x(){}var _={};c(_,a,(function(){return this}));var S=Object.getPrototypeOf,k=S&&S(S(A([])));k&&k!==n&&r.call(k,a)&&(_=k);var P=x.prototype=m.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==y(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,n,r){var i=h;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?v:d,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=v,r.method="throw",r.arg=c.arg)}}}function C(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(y(e)+" is not iterable")}return w.prototype=x,i(P,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:w,configurable:!0}),w.displayName=c(x,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,c(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},E(O.prototype),c(O.prototype,s,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(P),c(P,u,"Generator"),c(P,a,(function(){return this})),c(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=A,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;M(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:A(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function w(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function x(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==y(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===y(i)?i:String(i)),r)}var i}function _(t){var e="function"==typeof Map?new Map:void 0;return _=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return S(t,arguments,E(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),P(n,t)},_(t)}function S(t,e,n){return S=k()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&P(i,n.prototype),i},S.apply(null,arguments)}function k(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function P(t,e){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},P(t,e)}function E(t){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(t)}var O=window,T=O.trustedTypes,C=T?T.emptyScript:"",j=O.reactiveElementPolyfillSupport,M={toAttribute:function(t,e){switch(e){case Boolean:t=t?C:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute:function(t,e){var n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},R=function(t,e){return e!==t&&(e==e||t==t)},A={attribute:!0,type:String,converter:M,reflect:!1,hasChanged:R},I="finalized",L=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&P(t,e)}(f,t);var e,n,r,i,o,a,c,l=(a=f,c=k(),function(){var t,e=E(a);if(c){var n=E(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function f(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),(t=l.call(this))._$Ei=new Map,t.isUpdatePending=!1,t.hasUpdated=!1,t._$El=null,t._$Eu(),t}return e=f,n=[{key:"_$Eu",value:function(){var t,e=this;this._$E_=new Promise((function(t){return e.enableUpdating=t})),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((function(t){return t(e)}))}},{key:"addController",value:function(t){var e,n;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}},{key:"removeController",value:function(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}},{key:"_$Eg",value:function(){var t=this;this.constructor.elementProperties.forEach((function(e,n){t.hasOwnProperty(n)&&(t._$Ei.set(n,t[n]),delete t[n])}))}},{key:"createRenderRoot",value:function(){var t,e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return function(t,e){u?t.adoptedStyleSheets=e.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet})):e.forEach((function(e){var n=document.createElement("style"),r=s.litNonce;void 0!==r&&n.setAttribute("nonce",r),n.textContent=e.cssText,t.appendChild(n)}))}(e,this.constructor.elementStyles),e}},{key:"connectedCallback",value:function(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}},{key:"enableUpdating",value:function(t){}},{key:"disconnectedCallback",value:function(){var t;null===(t=this._$ES)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}},{key:"attributeChangedCallback",value:function(t,e,n){this._$AK(t,n)}},{key:"_$EO",value:function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A,i=this.constructor._$Ep(t,r);if(void 0!==i&&!0===r.reflect){var o=(void 0!==(null===(n=r.converter)||void 0===n?void 0:n.toAttribute)?r.converter:M).toAttribute(e,r.type);this._$El=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$El=null}}},{key:"_$AK",value:function(t,e){var n,r=this.constructor,i=r._$Ev.get(t);if(void 0!==i&&this._$El!==i){var o=r.getPropertyOptions(i),a="function"==typeof o.converter?{fromAttribute:o.converter}:void 0!==(null===(n=o.converter)||void 0===n?void 0:n.fromAttribute)?o.converter:M;this._$El=i,this[i]=a.fromAttribute(e,o.type),this._$El=null}}},{key:"requestUpdate",value:function(t,e,n){var r=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||R)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,n))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}},{key:"_$Ej",value:(i=b().mark((function t(){var e;return b().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.isUpdatePending=!0,t.prev=1,t.next=4,this._$E_;case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),Promise.reject(t.t0);case 9:if(e=this.scheduleUpdate(),t.t1=null!=e,!t.t1){t.next=14;break}return t.next=14,e;case 14:return t.abrupt("return",!this.isUpdatePending);case 15:case"end":return t.stop()}}),t,this,[[1,6]])})),o=function(){var t=this,e=arguments;return new Promise((function(n,r){var o=i.apply(t,e);function a(t){w(o,n,r,a,s,"next",t)}function s(t){w(o,n,r,a,s,"throw",t)}a(void 0)}))},function(){return o.apply(this,arguments)})},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){var t,e=this;if(this.isUpdatePending){this.hasUpdated,this._$Ei&&(this._$Ei.forEach((function(t,n){return e[n]=t})),this._$Ei=void 0);var n=!1,r=this._$AL;try{(n=this.shouldUpdate(r))?(this.willUpdate(r),null===(t=this._$ES)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(r)):this._$Ek()}catch(t){throw n=!1,this._$Ek(),t}n&&this._$AE(r)}}},{key:"willUpdate",value:function(t){}},{key:"_$AE",value:function(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((function(t){var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}},{key:"_$Ek",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$E_}},{key:"shouldUpdate",value:function(t){return!0}},{key:"update",value:function(t){var e=this;void 0!==this._$EC&&(this._$EC.forEach((function(t,n){return e._$EO(n,e[n],t)})),this._$EC=void 0),this._$Ek()}},{key:"updated",value:function(t){}},{key:"firstUpdated",value:function(t){}}],r=[{key:"addInitializer",value:function(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}},{key:"observedAttributes",get:function(){var t=this;this.finalize();var e=[];return this.elementProperties.forEach((function(n,r){var i=t._$Ep(r,n);void 0!==i&&(t._$Ev.set(i,r),e.push(i))})),e}},{key:"createProperty",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A;if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){var n="symbol"==y(t)?Symbol():"__"+t,r=this.getPropertyDescriptor(t,n,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}},{key:"getPropertyDescriptor",value:function(t,e,n){return{get:function(){return this[e]},set:function(r){var i=this[t];this[e]=r,this.requestUpdate(t,i,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(t){return this.elementProperties.get(t)||A}},{key:"finalize",value:function(){if(this.hasOwnProperty(I))return!1;this[I]=!0;var t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=v(t.h)),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){var e,n=this.properties,r=p([].concat(v(Object.getOwnPropertyNames(n)),v(Object.getOwnPropertySymbols(n))));try{for(r.s();!(e=r.n()).done;){var i=e.value;this.createProperty(i,n[i])}}catch(t){r.e(t)}finally{r.f()}}return this.elementStyles=this.finalizeStyles(this.styles),!0}},{key:"finalizeStyles",value:function(t){var e=[];if(Array.isArray(t)){var n,r=p(new Set(t.flat(1/0).reverse()));try{for(r.s();!(n=r.n()).done;){var i=n.value;e.unshift(d(i))}}catch(t){r.e(t)}finally{r.f()}}else void 0!==t&&e.push(d(t));return e}},{key:"_$Ep",value:function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}}],n&&x(e.prototype,n),r&&x(e,r),Object.defineProperty(e,"prototype",{writable:!1}),f}(_(HTMLElement));L[I]=!0,L.elementProperties=new Map,L.elementStyles=[],L.shadowRootOptions={mode:"open"},null==j||j({ReactiveElement:L}),(null!==(a=O.reactiveElementVersions)&&void 0!==a?a:O.reactiveElementVersions=[]).push("1.6.3");var D,$,N=n(4817);function F(t){return F="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},F(t)}function B(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==F(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==F(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===F(i)?i:String(i)),r)}var i}function U(){return U="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=H(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},U.apply(this,arguments)}function z(t,e){return z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},z(t,e)}function W(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function H(t){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},H(t)}n(8832),n(2349),n(1919);var V=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&z(t,e)}(a,t);var e,n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=H(r);if(i){var n=H(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===F(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return W(t)}(this,t)});function a(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.apply(this,arguments)).renderOptions={host:W(t)},t._$Do=void 0,t}return e=a,n=[{key:"createRenderRoot",value:function(){var t,e,n=U(H(a.prototype),"createRenderRoot",this).call(this);return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=n.firstChild),n}},{key:"update",value:function(t){var e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),U(H(a.prototype),"update",this).call(this,t),this._$Do=(0,N.sY)(e,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function(){var t;U(H(a.prototype),"connectedCallback",this).call(this),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}},{key:"disconnectedCallback",value:function(){var t;U(H(a.prototype),"disconnectedCallback",this).call(this),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}},{key:"render",value:function(){return N.Jb}}],n&&B(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(L);V.finalized=!0,V._$litElement$=!0,null===(D=globalThis.litElementHydrateSupport)||void 0===D||D.call(globalThis,{LitElement:V});var G=globalThis.litElementPolyfillSupport;null==G||G({LitElement:V}),(null!==($=globalThis.litElementVersions)&&void 0!==$?$:globalThis.litElementVersions=[]).push("3.3.3")}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={id:t,loaded:!1,exports:{}};return e[t].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.m=e,t=[],r.O=function(e,n,i,o){if(!n){var a=1/0;for(l=0;l<t.length;l++){n=t[l][0],i=t[l][1],o=t[l][2];for(var s=!0,u=0;u<n.length;u++)(!1&o||a>=o)&&Object.keys(r.O).every((function(t){return r.O[t](n[u])}))?n.splice(u--,1):(s=!1,o<a&&(a=o));if(s){t.splice(l--,1);var c=i();void 0!==c&&(e=c)}}return e}o=o||0;for(var l=t.length;l>0&&t[l-1][2]>o;l--)t[l]=t[l-1];t[l]=[n,i,o]},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){var t={898:0};r.O.j=function(e){return 0===t[e]};var e=function(e,n){var i,o,a=n[0],s=n[1],u=n[2],c=0;if(a.some((function(e){return 0!==t[e]}))){for(i in s)r.o(s,i)&&(r.m[i]=s[i]);if(u)var l=u(r)}for(e&&e(n);c<a.length;c++)o=a[c],r.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return r.O(l)},n=self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}();var i={};!function(){"use strict";r(278),r(228),r(4338),r(886),r(6466),r(3964),r(8077),r(9358),r(4043),r(752),r(1694),r(6265),r(9307),r(1514),r(9730),r(7522),r(5728),r(6801),r(3843),r(2320),r(6203),r(2826),r(9749),r(6544),r(4254),r(7049),r(4284),r(8373),r(6793),r(7629),r(7509),r(8052),r(3374),r(6891),r(6177),r(5557);var t=r(5685);r(9373),r(9903),r(9288),r(6227);var e={fragmentChange:"fragmentChange",pageChanged:"pageChanged",PostInit:"PostInit",stop:"stop",resize:"resize",userAction:"userAction",fullscreenToggled:"fullscreenToggled",zoomOut:"zoomOut",zoomIn:"zoomIn","1PageViewSelected":"1PageViewSelected","2PageViewSelected":"2PageViewSelected","3PageViewSelected":"3PageViewSelected"},n=r(5311);function i(t){return i="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},i(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==i(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===i(o)?o:String(o)),r)}var o}var a=function(){function r(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),this.br=e,this.$root=null,this.$nav=null,this.maxPageNum=null,this.minimumControls=["viewmode"],this.maximumControls=["book_left","book_right","zoom_in","zoom_out","onepg","twopg","thumb"],this.updateNavIndexThrottled=(0,t.throttle)(this.updateNavIndex.bind(this),250,!1)}var i,a;return i=r,(a=[{key:"controlFor",value:function(t){var e=this.br.options.controls[t];return e.visible?e.template?"<li>".concat(e.template(this.br),"</li>"):'<li>\n <button class="BRicon '.concat(e.className,'" title="').concat(e.label,'">\n <div class="icon icon-').concat(e.iconClassName,'"></div>\n <span class="BRtooltip">').concat(e.label,"</span>\n </button>\n </li>"):""}},{key:"_renderControls",value:function(){var t=this;return["bookLeft","bookRight","onePage","twoPage","thumbnail","viewmode","zoomOut","zoomIn","fullScreen"].map((function(e){return t.controlFor(e)})).join("")}},{key:"_bindViewModeButton",value:function(){var t=this,r=this.br,i=r.options.controls.viewmode,o=[{mode:r.constMode1up,className:"onepg",title:"One-page view"},{mode:r.constMode2up,className:"twopg",title:"Two-page view"},{mode:r.constModeThumb,className:"thumb",title:"Thumbnail view"}].filter((function(t){return!i.excludedModes.includes(t.mode)})),a=o.map((function(t){return t.mode}));i.excludedModes.includes(r.mode)&&r.switchMode(a[0]);for(var s=a.indexOf(r.mode),u=0;u<=s;u++)a.push(a.shift());o.length<2&&this.$nav.find(".".concat(i.className)).remove(),this.br.bind(e.PostInit,(function(){var e=t.$nav.find(".".concat(i.className)).off(".bindNavigationHandlers").on("click",(function(e){var i=a.shift(),s=o.find((function(t){return t.mode===i})),u=o.find((function(t){return t.mode===a[0]}));a.push(i),r.viewModeOrder=a,t.updateViewModeButton(n(e.currentTarget),u.className,u.title),r.switchMode(s.mode)})),s=o.find((function(t){return t.mode===a[0]}));t.updateViewModeButton(e,s.className,s.title)}))}},{key:"updateViewModeButton",value:function(t,e,n){t.attr("title",n).find(".icon").removeClass().addClass("icon icon-".concat(e)).end().find(".BRtooltip").text(n)}},{key:"switchNavbarControls",value:function(){"linerNotes"!==this.br.options.bookType&&(this.br.refs.$brContainer.prop("clientWidth")<640?this.showMinimumNavbarControls():this.showMaximumNavbarControls())}},{key:"showMinimumNavbarControls",value:function(){this.minimumControls.forEach((function(t){var e=document.querySelector(".controls .".concat(t));e&&e.classList.remove("hide")})),this.maximumControls.forEach((function(t){var e=document.querySelector(".controls .".concat(t));e&&e.classList.add("hide")}))}},{key:"showMaximumNavbarControls",value:function(){this.maximumControls.forEach((function(t){var e=document.querySelector(".controls .".concat(t));e&&e.classList.remove("hide")})),this.minimumControls.forEach((function(t){var e=document.querySelector(".controls .".concat(t));e&&e.classList.add("hide")}))}},{key:"init",value:function(){var t=this,e=this.br,r=e.options.navbarTitle,i="rl"===e.pageProgression,o=i?"book_flip_next":"book_flip_prev",a=i?"book_flip_prev":"book_flip_next";this.br.options.controls.bookLeft.className="book_left ".concat(o),this.br.options.controls.bookRight.className="book_right ".concat(a),e.refs.$BRfooter=this.$root=n('<div class="BRfooter"></div>'),e.refs.$BRnav=this.$nav=n('<div class="BRnav BRnavDesktop">\n '.concat(r?'<div class="BRnavTitle">'.concat(r,"</div>"):"",'\n <nav class="BRcontrols">\n <ul class="controls">\n <li class="scrubber">\n <div class="BRnavpos">\n <div class="BRpager"></div>\n <div class="BRnavline"></div>\n </div>\n <p><span class=\'BRcurrentpage\'></span></p>\n </li>\n ').concat(this._renderControls(),"\n </ul>\n </nav>\n </div>")),this.$root.append(this.$nav),e.refs.$br.append(this.$root);var s=this.$root.find(".BRpager").slider({animate:!0,min:0,max:e.book.getNumLeafs()-1,value:e.currentIndex(),range:"min"});return s.on("slide",(function(e,n){return t.updateNavPageNum(n.value),!0})),s.on("slidechange",(function(n,r){return t.updateNavPageNum(r.value),s.data("swallowchange")?s.data("swallowchange",!1):e.jumpToIndex(r.value),!0})),e.options.controls.viewmode.visible&&this._bindViewModeButton(),this.updateNavPageNum(e.currentIndex()),this.$nav}},{key:"getNavPageNumString",value:function(t){var e=this.br,n=e.book.getPageNum(t),r=(e.book.getPageProp(t,"pageType"),e.book.getNumLeafs());if(!this.maxPageNum){for(var i,o=0,a=0;a<r;a++)i=e.book.getPageNum(a),!isNaN(i)&&i>o&&(o=i);this.maxPageNum=o}return function(t,e,n,r,i){if(!("n"!=n[0]))return"(".concat(t+1," of ").concat(e,")");var o=i?" of ".concat(i):"";return"".concat(n).concat(o)}(t,r,n,0,this.maxPageNum)}},{key:"updateNavPageNum",value:function(t){this.$root.find(".BRcurrentpage").html(this.getNavPageNumString(t))}},{key:"updateNavIndex",value:function(t){t=void 0!==t?t:this.br.currentIndex(),this.$root.find(".BRpager").data("swallowchange",!0).slider("value",t)}}])&&o(i.prototype,a),Object.defineProperty(i,"prototype",{writable:!1}),r}();function s(t){return s="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},s(t)}function u(t){var e="function"==typeof Map?new Map:void 0;return u=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return c(t,arguments,h(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,t)},u(t)}function c(t,e,n){return c=l()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&f(i,n.prototype),i},c.apply(null,arguments)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}r(50),r(6646);var d={defaults:null,padding:10,ui:"full",uiAutoHide:!1,thumbRowBuffer:1,thumbColumns:6,thumbMaxLoading:4,thumbPadding:10,thumbMinZoomColumns:2,thumbMaxZoomColumns:8,flipSpeed:400,showToolbar:!0,showNavbar:!0,navBarTitle:"",showLogo:!0,logoURL:"https://archive.org",imagesBaseURL:"/BookReader/images/",reduceSet:"pow2",reductionFactors:[{reduce:.25,autofit:null},{reduce:.5,autofit:null},{reduce:1,autofit:null},{reduce:2,autofit:null},{reduce:3,autofit:null},{reduce:4,autofit:null},{reduce:6,autofit:null}],onePage:{autofit:"auto"},twoPage:{coverInternalPadding:0,coverExternalPadding:0,bookSpineDivWidth:64,autofit:"auto"},onePageMinBreakpoint:800,bookTitle:"",bookUrl:null,bookUrlText:null,bookUrlTitle:null,enableBookTitleLink:!0,bookLanguage:null,metadata:[],thumbnail:null,bookUrlMoreInfo:null,enableExperimentalControls:!1,el:"#BookReader",pageProgression:"lr",ppi:500,protected:!1,plugins:{textSelection:null},vars:{},data:[],table_of_contents:null,getNumLeafs:null,getPageWidth:null,getPageHeight:null,getPageURI:null,getPageSide:null,getSpreadIndices:null,getPageNum:null,getPageProp:null,leafNumToIndex:null,getEmbedCode:null,controls:{bookLeft:{visible:!0,label:"Flip left",className:"book_left",iconClassName:"left-arrow"},bookRight:{visible:!0,label:"Flip right",className:"book_right",iconClassName:"left-arrow hflip"},onePage:{visible:!0,label:"One-page view",className:"onepg",iconClassName:"onepg"},twoPage:{visible:!0,label:"Two-page view",className:"twopg",iconClassName:"twopg"},thumbnail:{visible:!0,label:"Thumbnail view",className:"thumb",iconClassName:"thumb"},viewmode:{visible:!0,className:"viewmode",excludedModes:[]},zoomOut:{visible:!0,label:"Zoom out",className:"zoom_out",iconClassName:"magnify"},zoomIn:{visible:!0,label:"Zoom in",className:"zoom_in",iconClassName:"magnify plus"},fullScreen:{visible:!0,label:"Toggle fullscreen",className:"full",iconClassName:"fullscreen"}},startFullscreen:!1,enableFSLogoShortcut:!1,autoResize:!0,useSrcSet:!1},p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(o,t);var e,n,r,i=(n=o,r=l(),function(){var t,e=h(n);if(r){var i=h(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function o(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.apply(this,arguments)}return e=o,Object.defineProperty(e,"prototype",{writable:!1}),e}(u(Error)),v=(r(7267),r(4581),r(5311));function g(t){return g="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(t)}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==g(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===g(i)?i:String(i)),r)}var i}var b=function(){function n(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.br=t}var r,i;return r=n,(i=[{key:"buildToolbarElement",value:function(){var t=this.br,e=t.showLogo?'\n <span class="BRtoolbarSection BRtoolbarSectionLogo">\n <a class="logo" href="'.concat(t.logoURL,'"></a>\n </span>'):"";t.refs.$BRtoolbar=v('\n <div class="BRtoolbar header">\n <div class="BRtoolbarbuttons">\n <div class="BRtoolbarLeft">\n '.concat(e,'\n <span class="BRtoolbarSection BRtoolbarSectionTitle"></span>\n </div>\n <div class="BRtoolbarRight">\n <span class="BRtoolbarSection BRtoolbarSectionInfo">\n <button class="BRpill info js-tooltip">Info</button>\n <button class="BRpill share js-tooltip">Share</button>\n </span>\n </div>\n </div>\n </div>'));var n=t.refs.$BRtoolbar.find(".BRtoolbarSectionTitle");return t.bookUrl&&t.options.enableBookTitleLink?n.append(v("<a>").attr({href:t.bookUrl,title:t.bookUrlTitle}).addClass("BRreturn").html(t.bookUrlText||t.bookTitle)):t.bookTitle&&n.append(t.bookUrlText||t.bookTitle),t.refs.$BRtoolbar}},{key:"initToolbar",value:function(t,n){var r=this.br;r.refs.$br.append(this.buildToolbarElement()),r.$(".BRnavCntl").addClass("BRup"),r.$(".pause").hide(),r.refs.$BRtoolbar.append(),r.canSwitchToMode(r.constMode2up)||r.$(".two_page_mode, .play, .pause").hide(),r.canSwitchToMode(r.constModeThumb)||r.$(".thumbnail_mode").hide(),r.canSwitchToMode(r.constMode2up)||r.canSwitchToMode(r.constModeThumb)||r.$(".one_page_mode").hide(),v('<div style="display: none;"></div>').append(v('\n <div class="BRfloat BRshare">\n <div class="BRfloatHead">\n Share\n <button class="floatShut" href="javascript:;" onclick="$.fn.colorbox.close();"><span class="br-colorbox-shift">Close</span></button>\n </div>\n </div>')).append(v('\n <div class="BRfloat BRinfo">\n <div class="BRfloatHead">About this book\n <button class="floatShut" href="javascript:;" onclick="$.fn.colorbox.close();"><span class="br-colorbox-shift">Close</span></button>\n </div>\n <div class="BRfloatBody">\n <div class="BRfloatCover"></div>\n <div class="BRfloatMeta">\n <div class="BRfloatTitle">\n <h2><a /></h2>\n </div>\n </div>\n </div>\n <div class="BRfloatFoot">\n <a href="https://openlibrary.org/dev/docs/bookreader">About the BookReader</a>\n </div>\n </div>')).appendTo(r.refs.$br),r.$(".BRinfo .BRfloatTitle a").attr({href:r.bookUrl}).text(r.bookTitle).addClass("title"),this.buildInfoDiv(r.$(".BRinfo")),this.buildShareDiv(r.$(".BRshare")),r.$(".share").colorbox({inline:!0,opacity:"0.5",href:r.$(".BRshare"),onLoad:function(){r.trigger(e.stop),r.$(".BRpageviewValue").val(window.location.href)}}),r.$(".info").colorbox({inline:!0,opacity:"0.5",href:r.$(".BRinfo"),onLoad:function(){r.trigger(e.stop)}})}},{key:"buildShareDiv",value:function(t){var e=this,n=this.br,r=document.location+"",i=(r+"").replace(/#.*/,""),o=n.getEmbedCode?'\n <div class="share-embed">\n <p class="share-embed-prompt">Copy and paste one of these options to share this book elsewhere.</p>\n <form method="post" action="">\n <fieldset class="fieldset-share-pageview">\n <label for="pageview">Link to this page view</label>\n <input type="text" name="pageview" class="BRpageviewValue" value="'.concat(r,'"/>\n </fieldset>\n <fieldset class="fieldset-share-book-link">\n <label for="booklink">Link to the book</label>\n <input type="text" name="booklink" class="booklink" value="').concat(i,'"/>\n </fieldset>\n <fieldset class="fieldset-embed">\n <label for="iframe">Embed a mini Book Reader</label>\n <fieldset class="sub">\n <label class="sub">\n <input type="radio" name="pages" value="').concat(n.constMode1up,'" checked="checked"/>\n 1 page\n </label>\n <label class="sub">\n <input type="radio" name="pages" value="').concat(n.constMode2up,'"/>\n 2 pages\n </label>\n <label class="sub">\n <input type="checkbox" name="thispage" value="thispage"/>\n Open to this page?\n </label>\n </fieldset>\n <textarea cols="30" rows="4" name="iframe" class="BRframeEmbed"></textarea>\n </fieldset>\n </form>\n </div>'):"",a=v('\n <div class="share-title">Share this book</div>\n <div class="share-social">\n <label class="sub open-to-this-page">\n <input class="thispage-social" type="checkbox" />\n Open to this page?\n </label>\n <div><button class="BRaction share facebook-share-button"><i class="BRicon fb" /> Facebook</button></div>\n <div><button class="BRaction share twitter-share-button"><i class="BRicon twitter" /> Twitter</button></div>\n <div><button class="BRaction share email-share-button"><i class="BRicon email" /> Email</button></div>\n </div>\n '.concat(o,'\n <div class="BRfloatFoot">\n <button class="share-finished" type="button" onclick="$.fn.colorbox.close();">Finished</button>\n </div>'));a.appendTo(t),a.find(".fieldset-embed input").on("change",(function(t){var e=v(t.target).parents("form").first(),r={};r.mode=v(e.find(".fieldset-embed input[name=pages]:checked")).val(),e.find(".fieldset-embed input[name=thispage]").prop("checked")&&(r.page=n.book.getPageNum(n.currentIndex())),n.getEmbedCode&&e.find(".BRframeEmbed").val(n.getEmbedCode("480px","430px",r))})),a.find("input, textarea").on("focus",(function(t){return t.target.select()})),a.find(".facebook-share-button").on("click",(function(){w("https://www.facebook.com/sharer.php?"+v.param({u:e._getSocialShareUrl()}),600,400,"Share")})),a.find(".twitter-share-button").on("click",(function(){w("https://twitter.com/intent/tweet?"+v.param({url:e._getSocialShareUrl(),text:n.bookTitle}),600,400,"Share")})),a.find(".email-share-button").on("click",(function(){var t="".concat(n.bookTitle,"\n\n").concat(e._getSocialShareUrl());window.location.href="mailto:?subject=".concat(encodeURI(n.bookTitle),"&body=").concat(encodeURI(t))})),a.find("input[name=thispage]").trigger("change"),a.appendTo(t)}},{key:"_getSocialShareUrl",value:function(){return this.br.$(".thispage-social").prop("checked")?window.location.href:"".concat(document.location.protocol,"//").concat(window.location.hostname).concat(window.location.pathname)}},{key:"buildInfoDiv",value:function(e){var n=this.br;e.find(".BRfloatBody, .BRfloatCover, .BRfloatFoot").remove();var r=v('<div class="BRinfoLeftCol"></div>');n.thumbnail&&r.append(v('\n <div class="BRimageW">\n <img src="'.concat(n.thumbnail,'" alt="').concat((0,t.escapeHTML)(n.bookTitle),'" />\n </div>')));var i,o=v('<div class="BRinfoRightCol">'),a=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return m(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(n.metadata);try{for(a.s();!(i=a.n()).done;){var s=i.value,u=s.extraValueClass,c=void 0===u?"":u,l=s.label,f=s.value,h="Title"===l?(0,t.escapeHTML)(f):f;o.append(v('\n <div class="BRinfoValueWrapper">\n <div class="BRinfoLabel">'.concat(l,'</div>\n <div class="BRinfoValue ').concat(c,'">').concat(h,"</div>\n </div>")))}}catch(t){a.e(t)}finally{a.f()}var d=n.bookUrlMoreInfo?n.bookUrlMoreInfo:n.bookTitle;d&&n.bookUrl&&o.append(v('\n <div class="BRinfoValueWrapper">\n <div class="BRinfoMoreInfoWrapper">\n <a class="BRinfoMoreInfo" href="'.concat(n.bookUrl,'">\n ').concat((0,t.escapeHTML)(d),"\n </a>\n </div>\n </div>")));var p=v('<div class="BRfloatFoot BRinfoFooter"></div>'),g=v('<div class="BRinfoW mv20-lg">').append([r,o,v('<br style="clear:both"/>')]);e.append(g,p).addClass("wide")}},{key:"getToolBarHeight",value:function(){var t=this.br.refs.$BRtoolbar;return t&&"block"===t.css("display")?t.outerHeight()+parseInt(t.css("top")):0}}])&&y(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),n}();function w(t,e,n,r){var i=null!=window.screenLeft?window.screenLeft:screen.left,o=null!=window.screenTop?window.screenTop:screen.top,a=(window.innerWidth||document.documentElement.clientWidth||screen.width)/2-e/2+i,s=(window.innerHeight||document.documentElement.clientHeight||screen.height)/2-n/2+o,u="status=1,width=".concat(e,",height=").concat(n,",top=").concat(s,",left=").concat(a);window.open(t,r,u)}function x(t){return x="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},x(t)}function _(){_=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new R(r||[]);return i(a,"_invoke",{value:T(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",g={};function m(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var S=Object.getPrototypeOf,k=S&&S(S(A([])));k&&k!==n&&r.call(k,a)&&(w=k);var P=b.prototype=m.prototype=Object.create(w);function E(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==x(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,n,r){var i=h;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?v:d,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=v,r.method="throw",r.arg=c.arg)}}}function C(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(x(e)+" is not iterable")}return y.prototype=b,i(P,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},E(O.prototype),c(O.prototype,s,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(P),c(P,u,"Generator"),c(P,a,(function(){return this})),c(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=A,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;M(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:A(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function S(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return k(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function P(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function E(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==x(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==x(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===x(i)?i:String(i)),r)}var i}function O(t,e,n){return e&&E(t.prototype,e),n&&E(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}r(5137),r(9772),r(4564),r(385);var T=function(){function e(t){var n,r,i,o;P(this,e),this.br=t,this.reduceSet=t.reduceSet,this.ppi=null!==(n=null===(r=t.options)||void 0===r?void 0:r.ppi)&&void 0!==n?n:d.ppi,this.pageProgression=null!==(i=null===(o=t.options)||void 0===o?void 0:o.pageProgression)&&void 0!==i?i:d.pageProgression,this._medianPageSize=null,this._getDataFlattenedCached=null}return O(e,[{key:"getMedianPageSizeInches",value:function(){if(this._medianPageSize)return this._medianPageSize;var t,e=[],n=[],r=S(this.pagesIterator());try{for(r.s();!(t=r.n()).done;){var i=t.value;e.push(i.widthInches),n.push(i.heightInches)}}catch(t){r.e(t)}finally{r.f()}return e.sort((function(t,e){return t-e})),n.sort((function(t,e){return t-e})),this._medianPageSize={width:e[Math.floor(e.length/2)],height:n[Math.floor(n.length/2)]},this._medianPageSize}},{key:"_getPageWidth",value:function(e){return e=(0,t.clamp)(e,0,this.getNumLeafs()-1),this.getPageWidth(e)}},{key:"_getPageHeight",value:function(e){var n=(0,t.clamp)(e,0,this.getNumLeafs()-1);return this.getPageHeight(n)}},{key:"getPageIndex",value:function(t){var e=this.getPageIndices(t);return e.length?e[e.length-1]:void 0}},{key:"getPageIndices",value:function(t){var e=[];if("n"==t.slice(0,1))try{var n=t.slice(1,t.length),r=parseInt(n);return e.push(r),e}catch(t){}for(var i=0;i<this.getNumLeafs();i++)this.getPageNum(i)==t&&e.push(i);return e}},{key:"getPageName",value:function(t){return"Page "+this.getPageNum(t)}},{key:"getNumLeafs",value:function(){return void 0!==this.br.numLeafs?this.br.numLeafs:this._getDataFlattened().length}},{key:"getPageWidth",value:function(t){return this.getPageProp(t,"width")}},{key:"getPageHeight",value:function(t){return this.getPageProp(t,"height")}},{key:"getPageURI",value:function(t,e,n){return this.getPageProp(t,"viewable",!0)?this.getPageProp(t,"uri"):"/bookreader/static/preview-default.png"}},{key:"getPageSide",value:function(t){return this.getPageProp(t,"pageSide")||(t%2==0?"R":"L")}},{key:"getPageNum",value:function(t){var e=this.getPageProp(t,"pageNum");return void 0===e?"n".concat(t):e}},{key:"getPageProp",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return this._getDataProp(t,e,n)}},{key:"getSpreadIndices",value:function(t){return"rl"==this.pageProgression?"R"==this.getPageSide(t)?[t+1,t]:[t,t-1]:"L"==this.getPageSide(t)?[t,t+1]:[t-1,t]}},{key:"leafNumToIndex",value:function(t){var e=this._getDataFlattened().findIndex((function(e){return e.leafNum==t}));return e>-1?e:t}},{key:"parsePageString",value:function(t){var e,n=/^leaf(\d+)/.exec(t);return n?null===(e=this.leafNumToIndex(parseInt(n[1],10)))&&(e=void 0):e=this.getPageIndex(t),e}},{key:"getPage",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.getNumLeafs();if(e||!(t<0||t>=n))return t<0&&t>=-n&&(t+=n),new C(this,t%=n)}},{key:"pagesIterator",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.start,r=void 0===n?0:n,i=e.end,o=void 0===i?1/0:i,a=e.combineConsecutiveUnviewables,s=void 0!==a&&a;return _().mark((function e(){var n,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Math.max(0,r),o=Math.min(o,t.getNumLeafs()),n=r;case 3:if(!(n<o)){e.next=12;break}if(i=t.getPage(n),!s||!i.isConsecutiveUnviewable){e.next=7;break}return e.abrupt("continue",9);case 7:return e.next=9,i;case 9:n++,e.next=3;break;case 12:case"end":return e.stop()}}),e)}))()}},{key:"_getDataFlattened",value:function(){if(this._getDataFlattenedCached&&this._getDataFlattenedCached[1]===this.br.data.length)return this._getDataFlattenedCached[0];var t=null,e=null,n=0,r=this.br.data.flatMap((function(r){return r.map((function(i){return i.pageSide||(i.pageSide=null===t?2===r.length?"L":"R":"L"===t?"R":"L"),t=i.pageSide,!1===i.viewable?i.unviewablesStart=null===e?e=n:e:e=null,n++,i}))}));return this._getDataFlattenedCached=[r,this.br.data.length],r}},{key:"_getDataProp",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this._getDataFlattened();return isNaN(t)||t<0||t>=r.length||void 0===r[t][e]?n:r[t][e]}}]),e}(),C=function(){function t(e,n){P(this,t);var r=e._getDataProp(n,"ppi",e.ppi);this.ppi=Math.max(r<10?e.ppi:r,10),this.book=e,this.index=n,this.width=e.getPageWidth(n),this.widthInches=this.width/this.ppi,this.height=e.getPageHeight(n),this.heightInches=this.height/this.ppi,this.pageSide=e.getPageSide(n),this.leafNum=e._getDataProp(n,"leafNum",this.index),this.isViewable=e._getDataProp(n,"viewable",!0),this.unviewablesStart=e._getDataProp(n,"unviewablesStart")||null,this.isConsecutiveUnviewable=!this.isViewable&&this.unviewablesStart!=this.index,this._rawData=this.book._getDataFlattened()[this.index]}return O(t,[{key:"makeViewable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.isViewable!=t)if(t){this._rawData.viewable=!0,delete this._rawData.unviewablesStart;var e,n=S(this.book.pagesIterator({start:this.index+1}));try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.isViewable)break;r._rawData.unviewablesStart=this.index+1}}catch(t){n.e(t)}finally{n.f()}}else{this._rawData.viewable=!1,this._rawData.unviewablesStart=this.prev&&!this.prev.isViewable?this.prev.unviewablesStart:this.index;var i,o=S(this.book.pagesIterator({start:this.index+1}));try{for(o.s();!(i=o.n()).done;){var a=i.value;if(!a.isViewable)break;a._rawData.unviewablesStart=this._rawData.unviewablesStart}}catch(t){o.e(t)}finally{o.f()}}}},{key:"prev",get:function(){return this.findPrev()}},{key:"next",get:function(){return this.findNext()}},{key:"left",get:function(){return"lr"===this.book.pageProgression?this.prev:this.next}},{key:"right",get:function(){return"lr"===this.book.pageProgression?this.next:this.prev}},{key:"spread",get:function(){return{left:"L"===this.pageSide?this:this.left,right:"R"===this.pageSide?this:this.right}}},{key:"goLeft",value:function(t){var e="lr"===this.book.pageProgression?this.index-t:this.index+t;return this.book.getPage(e)}},{key:"goRight",value:function(t){var e="lr"===this.book.pageProgression?this.index+t:this.index-t;return this.book.getPage(e)}},{key:"getURI",value:function(t,e){return this.book.getPageURI(this.index,t,e)}},{key:"getURISrcSet",value:function(t){for(var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.book.reduceSet,i=r.floor(t),o=[],a=r.decr(i);a>=1;a=r.decr(a))o.push(a);return o.map((function(t){return"".concat(e.getURI(t,n)," ").concat(i/t,"x")})).join(", ")}},{key:"findNext",value:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).combineConsecutiveUnviewables,e=void 0!==t&&t;return this.book.pagesIterator({start:this.index+1,combineConsecutiveUnviewables:e}).next().value}},{key:"findPrev",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).combineConsecutiveUnviewables,n=void 0!==e&&e;if(0!=this.index){if(n){if(this.isConsecutiveUnviewable)return this.book.getPage(this.unviewablesStart);var r=new t(this.book,this.index-1);return r.isViewable?r:r.findPrev({combineConsecutiveUnviewables:n})}return new t(this.book,this.index-1)}}},{key:"findLeft",value:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).combineConsecutiveUnviewables,e=void 0!==t&&t;return"lr"===this.book.pageProgression?this.findPrev({combineConsecutiveUnviewables:e}):this.findNext({combineConsecutiveUnviewables:e})}},{key:"findRight",value:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).combineConsecutiveUnviewables,e=void 0!==t&&t;return"lr"===this.book.pageProgression?this.findNext({combineConsecutiveUnviewables:e}):this.findPrev({combineConsecutiveUnviewables:e})}}]),t}(),j=(r(2349),r(1919),r(2506),r(429),r(1830),r(9089)),M=r(8318),R=r(1312),A=(r(6976),r(8496)),I=r.n(A),L=r(7775);function D(t){return 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},D(t)}function $(){$=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:E(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",g={};function m(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(M([])));_&&_!==n&&r.call(_,a)&&(w=_);var S=b.prototype=m.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==D(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function E(e,n,r){var i=h;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=O(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?v:d,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=v,r.method="throw",r.arg=c.arg)}}}function O(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(D(e)+" is not iterable")}return y.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(P.prototype),c(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new P(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=M,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:M(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function N(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function F(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){N(o,r,i,a,s,"next",t)}function s(t){N(o,r,i,a,s,"throw",t)}a(void 0)}))}}function B(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function U(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,H(r.key),r)}}function z(t,e,n){return e&&U(t.prototype,e),n&&U(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function W(t,e,n){return(e=H(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function H(t){var e=function(t,e){if("object"!==D(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==D(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===D(e)?e:String(e)}var V=function(){function e(n){var r=this;B(this,e),W(this,"scaleCenter",{x:.5,y:.5}),W(this,"_preventEvent",(function(t){return t.preventDefault(),!1})),W(this,"_pinchStart",F($().mark((function e(){var n,i;return $().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.pinching){e.next=2;break}return e.abrupt("return");case 2:if(!(0,L.gn)()){e.next=7;break}return e.next=5,(0,t.sleep)(0);case 5:if(!(r.touchesMonitor.touches<2)){e.next=7;break}return e.abrupt("return");case 7:r.pinching=!0,r.oldScale=1,r.mode.$visibleWorld.classList.add("BRsmooth-zooming"),r.mode.$visibleWorld.style.willChange="transform",r.mode.autoFit="none",r.detachCtrlZoom(),null===(n=(i=r.mode).detachScrollListeners)||void 0===n||n.call(i),r.interact.gesturable({listeners:{start:r._pinchStart,move:r._pinchMove,end:r._pinchEnd}});case 15:case"end":return e.stop()}}),e)})))),W(this,"_pinchMove",function(){var t=F($().mark((function t(e){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.pinching){t.next=2;break}return t.abrupt("return");case 2:r.lastEvent={scale:e.scale,clientX:e.clientX,clientY:e.clientY},r.pinchMoveFrame||(r.pinchMoveFrame=r.bufferFn(r._drawPinchZoomFrame));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),W(this,"_pinchEnd",F($().mark((function t(){var e,n;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.pinching){t.next=2;break}return t.abrupt("return");case 2:return r.pinching=!1,r.interact.gesturable({listeners:{start:r._pinchStart,end:r._pinchEnd}}),t.next=6,r.pinchMoveFramePromise;case 6:r.scaleCenter={x:.5,y:.5},r.oldScale=1,r.mode.$visibleWorld.classList.remove("BRsmooth-zooming"),r.mode.$visibleWorld.style.willChange="auto",r.attachCtrlZoom(),null===(e=(n=r.mode).attachScrollListeners)||void 0===e||e.call(n);case 12:case"end":return t.stop()}}),t)})))),W(this,"_drawPinchZoomFrame",F($().mark((function t(){var e,n;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.pinching){t.next=3;break}return r.pinchMoveFrame=null,t.abrupt("return");case 3:if(r.mode.$container.style.overflow="hidden",r.pinchMoveFramePromiseRes=null,r.pinchMoveFramePromise=new Promise((function(t){return r.pinchMoveFramePromiseRes=t})),r.updateScaleCenter({clientX:r.lastEvent.clientX,clientY:r.lastEvent.clientY}),e=r.mode.scale,n=e*r.lastEvent.scale/r.oldScale,e==n){t.next=13;break}return r.mode.scale=n,t.next=13,r.pinchMoveFramePromise;case 13:r.mode.$container.style.overflow="auto",r.oldScale=r.lastEvent.scale,r.pinchMoveFrame=null;case 16:case"end":return t.stop()}}),t)})))),W(this,"_dragMove",function(){var t=F($().mark((function t(e){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r.pinching){t.next=3;break}return t.next=3,r._pinchEnd();case 3:r.mode.$container.scrollTop-=e.dy,r.mode.$container.scrollLeft-=e.dx;case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),W(this,"_handleCtrlWheel",(function(t){if(t.ctrlKey){t.preventDefault();var e=/Mac/i.test(navigator.platform)?.045:.03;r.updateScaleCenter(t),r.mode.autoFit="none",r.mode.scale*=1-Math.sign(t.deltaY)*e}})),this.mode=n,this.pinching=!1,this.pinchMoveFrame=null,this.pinchMoveFramePromise=Promise.resolve(),this.oldScale=1,this.lastEvent=null,this.attached=!1,this.bufferFn=window.requestAnimationFrame.bind(window)}return z(e,[{key:"attach",value:function(){this.attached||(this.attachCtrlZoom(),this.mode.$container.addEventListener("gesturestart",this._pinchStart),this.mode.$container.addEventListener("gesturechange",this._preventEvent),this.mode.$container.addEventListener("gestureend",this._pinchEnd),(0,L.gn)()&&(this.touchesMonitor=new G(this.mode.$container),this.touchesMonitor.attach()),this.mode.$container.style.touchAction="pan-x pan-y",this.interact=I()(this.mode.$container),this.interact.gesturable({listeners:{start:this._pinchStart,end:this._pinchEnd}}),(0,L.Tv)()&&(this.mode.$container.style.touchAction="none",this.interact.draggable({inertia:{resistance:2,minSpeed:100,allowResume:!0},listeners:{move:this._dragMove}})),this.attached=!0)}},{key:"detach",value:function(){var t,e;this.detachCtrlZoom(),this.mode.$container.removeEventListener("gesturestart",this._pinchStart),this.mode.$container.removeEventListener("gesturechange",this._preventEvent),this.mode.$container.removeEventListener("gestureend",this._pinchEnd),null===(t=this.touchesMonitor)||void 0===t||null===(e=t.detach)||void 0===e||e.call(t),this.interact.unset(),I().removeDocument(document),this.attached=!1}},{key:"attachCtrlZoom",value:function(){window.addEventListener("wheel",this._handleCtrlWheel,{passive:!1})}},{key:"detachCtrlZoom",value:function(){window.removeEventListener("wheel",this._handleCtrlWheel)}},{key:"updateScaleCenter",value:function(t){var e=t.clientX,n=t.clientY,r=this.mode.htmlDimensionsCacher.boundingClientRect;this.scaleCenter={x:(e-r.left)/this.mode.htmlDimensionsCacher.clientWidth,y:(n-r.top)/this.mode.htmlDimensionsCacher.clientHeight}}},{key:"updateViewportOnZoom",value:function(t,e){var n,r=this.mode.$container,i=r.scrollTop,o=r.scrollLeft,a=this.mode.htmlDimensionsCacher.clientWidth,s=this.mode.htmlDimensionsCacher.clientHeight,u=t/e,c=this.scaleCenter.x,l=this.scaleCenter.y,f=u*(o+c*a),h=u*(i+l*s);r.scrollTop=h-l*s,r.scrollLeft=f-c*a,null===(n=this.pinchMoveFramePromiseRes)||void 0===n||n.call(this)}}]),e}(),G=function(){function t(e){var n=this;B(this,t),W(this,"_updateTouchCount",(function(t){n.touches=t.touches.length})),this.container=e,this.touches=0}return z(t,[{key:"attach",value:function(){this.container.addEventListener("touchstart",this._updateTouchCount),this.container.addEventListener("touchend",this._updateTouchCount)}},{key:"detach",value:function(){this.container.removeEventListener("touchstart",this._updateTouchCount),this.container.removeEventListener("touchend",this._updateTouchCount)}}]),t}();function Y(t){return Y="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},Y(t)}function X(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,K(r.key),r)}}function q(t,e,n){return(e=K(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function K(t){var e=function(t,e){if("object"!==Y(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Y(e)?e:String(e)}var Z=function(){function e(n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),q(this,"clientWidth",100),q(this,"clientHeight",100),q(this,"boundingClientRect",{top:0,left:0}),q(this,"updateClientSizes",(function(){var t=r.element.getBoundingClientRect();r.clientWidth=r.element.clientWidth,r.clientHeight=r.element.clientHeight,r.boundingClientRect.top=t.top,r.boundingClientRect.left=t.left})),q(this,"debouncedUpdateClientSizes",(0,t.debounce)(this.updateClientSizes,150,!1)),this.element=n}var n,r;return n=e,r=[{key:"attachResizeListener",value:function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).addEventListener("resize",this.debouncedUpdateClientSizes)}},{key:"detachResizeListener",value:function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).removeEventListener("resize",this.debouncedUpdateClientSizes)}}],r&&X(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),e}();function J(t){return J="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},J(t)}function Q(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,tt(r.key),r)}}function tt(t){var e=function(t,e){if("object"!==J(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==J(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===J(e)?e:String(e)}var et=function(){function t(e,n){var r,i,o,a=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,o=function(){a.element.classList.add(a.className),clearTimeout(a.timeout),a.timeout=setTimeout((function(){a.element.classList.remove(a.className)}),600)},(i=tt(i="onScroll"))in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o,this.element=e,this.className=n,this.timeout=null}var e,n;return e=t,(n=[{key:"attach",value:function(){this.element.addEventListener("scroll",this.onScroll)}},{key:"detach",value:function(){this.element.removeEventListener("scroll",this.onScroll)}}])&&Q(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function nt(t){return nt="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},nt(t)}function rt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,at(r.key),r)}}function it(t,e,n){return e&&rt(t.prototype,e),n&&rt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ot(t,e,n){return(e=at(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function at(t){var e=function(t,e){if("object"!==nt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==nt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===nt(e)?e:String(e)}var st,ut=it((function e(n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),ot(this,"screenDPI",(0,t.calcScreenDPI)()),ot(this,"worldUnitsToRenderedPixels",(function(t){return t*r.screenDPI})),ot(this,"renderedPixelsToWorldUnits",(function(t){return t/r.screenDPI})),ot(this,"renderedPixelsToVisiblePixels",(function(t){return t*r.mode.scale})),ot(this,"visiblePixelsToRenderedPixels",(function(t){return t/r.mode.scale})),ot(this,"worldUnitsToVisiblePixels",(function(t){return r.renderedPixelsToVisiblePixels(r.worldUnitsToRenderedPixels(t))})),ot(this,"visiblePixelsToWorldUnits",(function(t){return r.renderedPixelsToWorldUnits(r.visiblePixelsToRenderedPixels(t))})),this.mode=n}));function ct(t){return ct="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},ct(t)}function lt(t){return function(t){if(Array.isArray(t))return xt(t)}(t)||_t(t)||wt(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ft(t,e){return ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ft(t,e)}function ht(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dt(){dt=function(){return t};var t={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(t,e){["method","field"].forEach((function(n){e.forEach((function(e){e.kind===n&&"own"===e.placement&&this.defineClassElement(t,e)}),this)}),this)},initializeClassElements:function(t,e){var n=t.prototype;["method","field"].forEach((function(r){e.forEach((function(e){var i=e.placement;if(e.kind===r&&("static"===i||"prototype"===i)){var o="static"===i?t:n;this.defineClassElement(o,e)}}),this)}),this)},defineClassElement:function(t,e){var n=e.descriptor;if("field"===e.kind){var r=e.initializer;n={enumerable:n.enumerable,writable:n.writable,configurable:n.configurable,value:void 0===r?void 0:r.call(t)}}Object.defineProperty(t,e.key,n)},decorateClass:function(t,e){var n=[],r=[],i={static:[],prototype:[],own:[]};if(t.forEach((function(t){this.addElementPlacement(t,i)}),this),t.forEach((function(t){if(!gt(t))return n.push(t);var e=this.decorateElement(t,i);n.push(e.element),n.push.apply(n,e.extras),r.push.apply(r,e.finishers)}),this),!e)return{elements:n,finishers:r};var o=this.decorateConstructor(n,e);return r.push.apply(r,o.finishers),o.finishers=r,o},addElementPlacement:function(t,e,n){var r=e[t.placement];if(!n&&-1!==r.indexOf(t.key))throw new TypeError("Duplicated element ("+t.key+")");r.push(t.key)},decorateElement:function(t,e){for(var n=[],r=[],i=t.decorators,o=i.length-1;o>=0;o--){var a=e[t.placement];a.splice(a.indexOf(t.key),1);var s=this.fromElementDescriptor(t),u=this.toElementFinisherExtras((0,i[o])(s)||s);t=u.element,this.addElementPlacement(t,e),u.finisher&&r.push(u.finisher);var c=u.extras;if(c){for(var l=0;l<c.length;l++)this.addElementPlacement(c[l],e);n.push.apply(n,c)}}return{element:t,finishers:r,extras:n}},decorateConstructor:function(t,e){for(var n=[],r=e.length-1;r>=0;r--){var i=this.fromClassDescriptor(t),o=this.toClassDescriptor((0,e[r])(i)||i);if(void 0!==o.finisher&&n.push(o.finisher),void 0!==o.elements){t=o.elements;for(var a=0;a<t.length-1;a++)for(var s=a+1;s<t.length;s++)if(t[a].key===t[s].key&&t[a].placement===t[s].placement)throw new TypeError("Duplicated element ("+t[a].key+")")}}return{elements:t,finishers:n}},fromElementDescriptor:function(t){var e={kind:t.kind,key:t.key,placement:t.placement,descriptor:t.descriptor};return Object.defineProperty(e,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===t.kind&&(e.initializer=t.initializer),e},toElementDescriptors:function(t){var e;if(void 0!==t)return(e=t,function(t){if(Array.isArray(t))return t}(e)||_t(e)||wt(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(t){var e=this.toElementDescriptor(t);return this.disallowProperty(t,"finisher","An element descriptor"),this.disallowProperty(t,"extras","An element descriptor"),e}),this)},toElementDescriptor:function(t){var e=String(t.kind);if("method"!==e&&"field"!==e)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+e+'"');var n=bt(t.key),r=String(t.placement);if("static"!==r&&"prototype"!==r&&"own"!==r)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+r+'"');var i=t.descriptor;this.disallowProperty(t,"elements","An element descriptor");var o={kind:e,key:n,placement:r,descriptor:Object.assign({},i)};return"field"!==e?this.disallowProperty(t,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=t.initializer),o},toElementFinisherExtras:function(t){return{element:this.toElementDescriptor(t),finisher:yt(t,"finisher"),extras:this.toElementDescriptors(t.extras)}},fromClassDescriptor:function(t){var e={kind:"class",elements:t.map(this.fromElementDescriptor,this)};return Object.defineProperty(e,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),e},toClassDescriptor:function(t){var e=String(t.kind);if("class"!==e)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+e+'"');this.disallowProperty(t,"key","A class descriptor"),this.disallowProperty(t,"placement","A class descriptor"),this.disallowProperty(t,"descriptor","A class descriptor"),this.disallowProperty(t,"initializer","A class descriptor"),this.disallowProperty(t,"extras","A class descriptor");var n=yt(t,"finisher");return{elements:this.toElementDescriptors(t.elements),finisher:n}},runClassFinishers:function(t,e){for(var n=0;n<e.length;n++){var r=(0,e[n])(t);if(void 0!==r){if("function"!=typeof r)throw new TypeError("Finishers must return a constructor.");t=r}}return t},disallowProperty:function(t,e,n){if(void 0!==t[e])throw new TypeError(n+" can't have a ."+e+" property.")}};return t}function pt(t){var e,n=bt(t.key);"method"===t.kind?e={value:t.value,writable:!0,configurable:!0,enumerable:!1}:"get"===t.kind?e={get:t.value,configurable:!0,enumerable:!1}:"set"===t.kind?e={set:t.value,configurable:!0,enumerable:!1}:"field"===t.kind&&(e={configurable:!0,writable:!0,enumerable:!0});var r={kind:"field"===t.kind?"field":"method",key:n,placement:t.static?"static":"field"===t.kind?"own":"prototype",descriptor:e};return t.decorators&&(r.decorators=t.decorators),"field"===t.kind&&(r.initializer=t.value),r}function vt(t,e){void 0!==t.descriptor.get?e.descriptor.get=t.descriptor.get:e.descriptor.set=t.descriptor.set}function gt(t){return t.decorators&&t.decorators.length}function mt(t){return void 0!==t&&!(void 0===t.value&&void 0===t.writable)}function yt(t,e){var n=t[e];if(void 0!==n&&"function"!=typeof n)throw new TypeError("Expected '"+e+"' to be a function");return n}function bt(t){var e=function(t,e){if("object"!==ct(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==ct(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===ct(e)?e:String(e)}function wt(t,e){if(t){if("string"==typeof t)return xt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xt(t,e):void 0}}function xt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _t(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function St(){return St="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=kt(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},St.apply(this,arguments)}function kt(t){return kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},kt(t)}var Pt=function(t,e,n,r){var i=dt(),o=e((function(t){i.initializeInstanceElements(t,a.elements)}),n),a=i.decorateClass(function(t){for(var e=[],n=function(t){return"method"===t.kind&&t.key===o.key&&t.placement===o.placement},r=0;r<t.length;r++){var i,o=t[r];if("method"===o.kind&&(i=e.find(n)))if(mt(o.descriptor)||mt(i.descriptor)){if(gt(o)||gt(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(gt(o)){if(gt(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}vt(o,i)}else e.push(o)}return e}(o.d.map(pt)),t);return i.initializeClassElements(o.F,a.elements),i.runClassFinishers(o.F,a.finishers)}([(0,j.Mo)("br-mode-1up")],(function(e,n){var r=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ft(t,e)}(a,t);var n,r,i,o=(r=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=kt(r);if(i){var n=kt(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===ct(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ht(t)}(this,t)});function a(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),r=o.call(this),e(ht(r)),r.book=t,r.br=n,r}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(n);return{F:r,d:[{kind:"field",key:"br",value:void 0},{kind:"field",decorators:[(0,j.Cb)({type:Object})],key:"book",value:void 0},{kind:"field",decorators:[(0,j.Cb)({type:Array})],key:"pages",value:function(){return[]}},{kind:"field",decorators:[(0,j.Cb)({type:Object})],key:"pageTops",value:function(){return{}}},{kind:"field",key:"coordSpace",value:function(){return new ut(this)}},{kind:"field",decorators:[(0,j.Cb)({type:Number})],key:"scale",value:function(){return 1}},{kind:"field",decorators:[(0,j.Cb)({type:Object})],key:"visibleRegion",value:function(){return{top:0,left:0,width:100,height:100}}},{kind:"field",decorators:[(0,j.Cb)({type:Array,hasChanged:t.arrChanged})],key:"visiblePages",value:function(){return[]}},{kind:"field",decorators:[(0,j.Cb)({type:Array})],key:"renderedPages",value:function(){return[]}},{kind:"field",key:"pageContainerCache",value:function(){return{}}},{kind:"field",decorators:[(0,j.IO)(".br-mode-1up__world")],key:"$world",value:void 0},{kind:"field",key:"worldDimensions",value:function(){return{width:100,height:100}}},{kind:"get",key:"worldStyle",value:function(){var t=this.coordSpace.worldUnitsToRenderedPixels;return{width:t(this.worldDimensions.width)+"px",height:t(this.worldDimensions.height)+"px"}}},{kind:"get",key:"$container",value:function(){return this}},{kind:"field",decorators:[(0,j.IO)(".br-mode-1up__visible-world")],key:"$visibleWorld",value:void 0},{kind:"field",key:"htmlDimensionsCacher",value:function(){return new Z(this)}},{kind:"field",key:"smoothZoomer",value:function(){return new V(this)}},{kind:"field",key:"scrollClassAdder",value:function(){return new et(this,"BRscrolling-active")}},{kind:"field",key:"SPACING_IN",value:function(){return.2}},{kind:"field",key:"ZOOM_FACTOR",value:function(){return 1.1}},{kind:"method",key:"jumpToIndex",value:function(t){var e=this,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).smooth,r=void 0!==n&&n;r&&(this.style.scrollBehavior="smooth"),this.scrollTop=this.coordSpace.worldUnitsToVisiblePixels(this.pageTops[t]-this.SPACING_IN/2),r&&setTimeout((function(){return e.style.scrollBehavior=""}),100)}},{kind:"method",key:"zoomIn",value:function(){this.scale*=this.ZOOM_FACTOR}},{kind:"method",key:"zoomOut",value:function(){this.scale*=1/this.ZOOM_FACTOR}},{kind:"method",key:"firstUpdated",value:function(t){St(kt(r.prototype),"firstUpdated",this).call(this,t),this.htmlDimensionsCacher.updateClientSizes(),this.smoothZoomer.attach()}},{kind:"method",key:"initFirstRender",value:function(t){var e=this.book.getPage(t);this.scale=this.computeDefaultScale(e)}},{kind:"method",key:"updated",value:function(t){if(t.has("book")&&this.updatePages(),t.has("pages")&&(this.worldDimensions=this.computeWorldDimensions(),this.pageTops=this.computePageTops(this.pages,this.SPACING_IN)),t.has("visibleRegion")&&(this.visiblePages=this.computeVisiblePages()),t.has("visiblePages")&&(this.throttledUpdateRenderedPages(),this.visiblePages.length&&(this.br.displayedIndices=this.visiblePages.map((function(t){return t.index})),this.br.updateFirstIndex(this.br.displayedIndices[0]),this.br._components.navbar.updateNavIndexThrottled())),t.has("scale")){var e=t.get("scale");this.$visibleWorld.style.transform="scale(".concat(this.scale,")"),this.smoothZoomer.updateViewportOnZoom(this.scale,e),this.updateVisibleRegion(),this.$world.style.transform="scale(".concat(this.scale,")")}}},{kind:"method",key:"updatePages",value:function(){this.pages=(0,t.genToArray)(this.book.pagesIterator({combineConsecutiveUnviewables:!0}))}},{kind:"method",key:"connectedCallback",value:function(){St(kt(r.prototype),"connectedCallback",this).call(this),this.htmlDimensionsCacher.attachResizeListener(),this.attachScrollListeners(),this.smoothZoomer.attach()}},{kind:"method",key:"disconnectedCallback",value:function(){this.htmlDimensionsCacher.detachResizeListener(),this.detachScrollListeners(),this.smoothZoomer.detach(),St(kt(r.prototype),"disconnectedCallback",this).call(this)}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"method",key:"render",value:function(){var t,e,n=this;return(0,M.dy)(st||(t=['\n <div class="br-mode-1up__world" style=','></div>\n <div class="br-mode-1up__visible-world">\n ',"\n </div>"],e||(e=t.slice(0)),st=Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))),(0,R.V)(this.worldStyle),this.renderedPages.map((function(t){return n.renderPage(t)})))}},{kind:"field",key:"createPageContainer",value:function(){var t=this;return function(e){return t.pageContainerCache[e.index]||(t.pageContainerCache[e.index]=t.br._createPageContainer(e.index))}}},{kind:"field",key:"renderPage",value:function(){var t=this;return function(e){var n=t.coordSpace.worldUnitsToRenderedPixels,r=t.coordSpace.worldUnitsToVisiblePixels,i=t.coordSpace.visiblePixelsToWorldUnits(t.htmlDimensionsCacher.clientWidth),o=n(e.widthInches),a=n(e.heightInches),s=Math.max(t.SPACING_IN,(i-e.widthInches)/2),u=t.pageTops[e.index],c="translate(".concat(n(s),"px, ").concat(n(u),"px)"),l=t.createPageContainer(e).update({dimensions:{width:o,height:a,top:0,left:0},reduce:e.width/r(e.widthInches)}).$container[0];return l.style.transform=c,l.classList.toggle("BRpage-visible",t.visiblePages.includes(e)),l}}},{kind:"field",key:"updateVisibleRegion",value:function(){var t=this;return function(){var e=t.scrollTop,n=t.scrollLeft,r=t.htmlDimensionsCacher.clientWidth,i=t.htmlDimensionsCacher.clientHeight,o=t.coordSpace.visiblePixelsToWorldUnits;t.visibleRegion={top:o(e),height:o(i),left:o(n),width:o(r)}}}},{kind:"method",key:"computeRenderedPages",value:function(){var t,e;return[null===(t=this.visiblePages[0])||void 0===t?void 0:t.prev].concat(lt(this.visiblePages),[null===(e=this.visiblePages[this.visiblePages.length-1])||void 0===e?void 0:e.next]).filter((function(t){return t})).slice(0,10)}},{kind:"field",key:"throttledUpdateRenderedPages",value:function(){var e=this;return(0,t.throttle)((function(){e.renderedPages=e.computeRenderedPages(),e.requestUpdate()}),100,null)}},{kind:"method",key:"computePageTops",value:function(t,e){var n,r={},i=e,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=wt(t))){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;r[a.index]=i,i+=a.heightInches+e}}catch(t){o.e(t)}finally{o.f()}return r}},{kind:"method",key:"computeDefaultScale",value:function(t){var e=this.coordSpace.renderedPixelsToWorldUnits(this.clientWidth);return Math.min(1,e/(t.widthInches+2*this.SPACING_IN))||1}},{kind:"method",key:"computeWorldDimensions",value:function(){return{width:Math.max.apply(Math,lt(this.pages.map((function(t){return t.widthInches}))))+2*this.SPACING_IN,height:(0,t.sum)(this.pages.map((function(t){return t.heightInches})))+(this.pages.length+1)*this.SPACING_IN}}},{kind:"method",key:"computeVisiblePages",value:function(){var t=this;return this.pages.filter((function(e){var n=t.pageTops[e.index],r=n+e.heightInches,i=t.visibleRegion.top;return n<=i+t.visibleRegion.height&&r>=i}))}},{kind:"field",key:"attachScrollListeners",value:function(){var t=this;return function(){t.addEventListener("scroll",t.updateVisibleRegion),t.scrollClassAdder.attach()}}},{kind:"field",key:"detachScrollListeners",value:function(){var t=this;return function(){t.removeEventListener("scroll",t.updateVisibleRegion),t.scrollClassAdder.detach()}}}]}}),M.oi),Et=r(5311);function Ot(t){return Ot="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},Ot(t)}function Tt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,jt(r.key),r)}}function Ct(t,e,n){return(e=jt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function jt(t){var e=function(t,e){if("object"!==Ot(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Ot(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Ot(e)?e:String(e)}function Mt(t,e){return t.split(" ").map((function(t){return t+e})).join(" ")}function Rt(t){var e,n;return void 0!==t.clientX?(e=t.clientX,n=t.clientY):void 0!==t.screenX?(e=t.screenX,n=t.screenY):void 0!==t.targetTouches?(e=t.targetTouches[0].pageX,n=t.targetTouches[0].pageY):void 0===t.originalEvent?console.error("don't understand x and y for "+t.type,t):void 0!==t.originalEvent.clientX?(e=t.originalEvent.clientX,n=t.originalEvent.clientY):void 0!==t.originalEvent.screenX?(e=t.originalEvent.screenX,n=t.originalEvent.screenY):void 0!==t.originalEvent.targetTouches&&(e=t.originalEvent.targetTouches[0].pageX,n=t.originalEvent.targetTouches[0].pageY),{left:e,top:n}}var At={dragSelector:">:first",acceptPropagatedEvent:!0,preventDefault:!0,dragstart:"mousedown touchstart",dragcontinue:"mousemove touchmove",dragend:"mouseup touchend",dragMinDistance:5,namespace:".ds",scrollWindow:!1},It=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Ct(this,"_dragStartHandler",(function(t){return!!n._shouldAbort()||!(t.which>1||!n.settings.acceptPropagatedEvent&&t.target!=n.handling_element[0])&&(n.lastCoord=n.firstCoord=Rt(t),n.handling_element.on(n.settings.dragcontinue,n._dragContinueHandler),n.settings.dragend.split(" ").forEach((function(t){n.handling_element[0].addEventListener(t,n._dragEndHandler,!0)})),n.settings.preventDefault?(t.preventDefault(),!1):void 0)})),Ct(this,"_dragContinueHandler",(function(t){if(n._shouldAbort())return!0;var e=Rt(t),r=e.left-n.lastCoord.left,i=e.top-n.lastCoord.top,o=n.settings.scrollWindow?Et(window):n.handling_element;return o.scrollLeft(o.scrollLeft()-r),o.scrollTop(o.scrollTop()-i),n.lastCoord=e,n.settings.preventDefault?(t.preventDefault(),!1):void 0})),Ct(this,"_dragEndHandler",(function(t){if(n._shouldAbort())return!0;n.handling_element.off(n.settings.dragcontinue).off(n.settings.dragend),n.settings.dragend.split(" ").forEach((function(t){n.handling_element[0].removeEventListener(t,n._dragEndHandler,!0)}));var e={left:Math.abs(n.lastCoord.left-n.firstCoord.left),top:Math.abs(n.lastCoord.top-n.firstCoord.top)},r=Math.max(e.left,e.top);return n.settings.preventDefault&&r>n.settings.dragMinDistance?(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),!1):void 0})),this.handling_element=Et(e),this.settings=Et.extend({},At,r||{}),this.firstCoord={left:0,top:0},this.lastCoord={left:0,top:0},this.settings.dragstart=Mt(this.settings.dragstart,this.settings.namespace),this.settings.dragcontinue=Mt(this.settings.dragcontinue,this.settings.namespace),this.handling_element.find(this.settings.dragSelector).on(this.settings.dragstart,this._dragStartHandler)}var e,n;return e=t,(n=[{key:"_shouldAbort",value:function(){return!!("ontouchstart"in window)||!!("msmaxtouchpoints"in window.navigator)}}])&&Tt(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Lt=r(5311);function Dt(t){return Dt="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},Dt(t)}function $t(){$t=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:E(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",g={};function m(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(M([])));_&&_!==n&&r.call(_,a)&&(w=_);var S=b.prototype=m.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Dt(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function E(e,n,r){var i=h;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=O(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?v:d,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=v,r.method="throw",r.arg=c.arg)}}}function O(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(Dt(e)+" is not iterable")}return y.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(P.prototype),c(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new P(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=M,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:M(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Nt(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Ft(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Nt(o,r,i,a,s,"next",t)}function s(t){Nt(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Bt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Dt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Dt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Dt(i)?i:String(i)),r)}var i}var Ut,zt,Wt,Ht,Vt,Gt,Yt,Xt,qt=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.br=e,this.book=n,this.mode1UpLit=new Pt(n,e),this.$el=Lt(this.mode1UpLit).addClass("br-mode-1up__root BRmode1up"),this.everShown=!1}var e,n;return e=t,(n=[{key:"$brContainer",get:function(){return this.br.refs.$brContainer}},{key:"prepare",value:function(){var t=this,e=this.br.currentIndex();this.$brContainer.empty().css({overflow:"hidden"}).append(this.$el),setTimeout(Ft($t().mark((function n(){return $t().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.everShown){n.next=7;break}return t.mode1UpLit.initFirstRender(e),t.everShown=!0,t.mode1UpLit.requestUpdate(),n.next=6,t.mode1UpLit.updateComplete;case 6:new It(t.mode1UpLit,{preventDefault:!0,dragSelector:".br-mode-1up__visible-world",dragstart:"mousedown",dragcontinue:"mousemove",dragend:"mouseup"});case 7:t.mode1UpLit.jumpToIndex(e),setTimeout((function(){t.mode1UpLit.updateVisibleRegion()}));case 9:case"end":return n.stop()}}),n)})))),this.br.updateBrClasses()}},{key:"jumpToIndex",value:function(t,e,n,r){var i=Math.abs(this.br.currentIndex()-t),o=!r&&i>0&&i<=4;this.mode1UpLit.jumpToIndex(t,{smooth:o})}},{key:"zoom",value:function(t){switch(t){case"in":this.mode1UpLit.zoomIn();break;case"out":this.mode1UpLit.zoomOut();break;default:console.error("Unsupported direction: ".concat(t))}}},{key:"resizePageView",value:function(){this.mode1UpLit.htmlDimensionsCacher.updateClientSizes(),this.mode1UpLit.requestUpdate()}}])&&Bt(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Kt=(r(2462),r(5311));function Zt(t){return Zt="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},Zt(t)}function Jt(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function Qt(){Qt=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:E(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",g={};function m(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(M([])));_&&_!==n&&r.call(_,a)&&(w=_);var S=b.prototype=m.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Zt(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function E(e,n,r){var i=h;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=O(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?v:d,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=v,r.method="throw",r.arg=c.arg)}}}function O(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(Zt(e)+" is not iterable")}return y.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(P.prototype),c(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new P(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=M,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:M(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function te(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function ee(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){te(o,r,i,a,s,"next",t)}function s(t){te(o,r,i,a,s,"throw",t)}a(void 0)}))}}function ne(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ge(r.key),r)}}function re(t,e,n){return e&&ne(t.prototype,e),n&&ne(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ie(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function oe(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ae(t,e)}function ae(t,e){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ae(t,e)}function se(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=xe(t);if(e){var i=xe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Zt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ue(t)}(this,n)}}function ue(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ce(t,e,n,r){var i=le();if(r)for(var o=0;o<r.length;o++)i=r[o](i);var a=e((function(t){i.initializeInstanceElements(t,s.elements)}),n),s=i.decorateClass(function(t){for(var e=[],n=function(t){return"method"===t.kind&&t.key===o.key&&t.placement===o.placement},r=0;r<t.length;r++){var i,o=t[r];if("method"===o.kind&&(i=e.find(n)))if(pe(o.descriptor)||pe(i.descriptor)){if(de(o)||de(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(de(o)){if(de(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}he(o,i)}else e.push(o)}return e}(a.d.map(fe)),t);return i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}function le(){le=function(){return t};var t={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(t,e){["method","field"].forEach((function(n){e.forEach((function(e){e.kind===n&&"own"===e.placement&&this.defineClassElement(t,e)}),this)}),this)},initializeClassElements:function(t,e){var n=t.prototype;["method","field"].forEach((function(r){e.forEach((function(e){var i=e.placement;if(e.kind===r&&("static"===i||"prototype"===i)){var o="static"===i?t:n;this.defineClassElement(o,e)}}),this)}),this)},defineClassElement:function(t,e){var n=e.descriptor;if("field"===e.kind){var r=e.initializer;n={enumerable:n.enumerable,writable:n.writable,configurable:n.configurable,value:void 0===r?void 0:r.call(t)}}Object.defineProperty(t,e.key,n)},decorateClass:function(t,e){var n=[],r=[],i={static:[],prototype:[],own:[]};if(t.forEach((function(t){this.addElementPlacement(t,i)}),this),t.forEach((function(t){if(!de(t))return n.push(t);var e=this.decorateElement(t,i);n.push(e.element),n.push.apply(n,e.extras),r.push.apply(r,e.finishers)}),this),!e)return{elements:n,finishers:r};var o=this.decorateConstructor(n,e);return r.push.apply(r,o.finishers),o.finishers=r,o},addElementPlacement:function(t,e,n){var r=e[t.placement];if(!n&&-1!==r.indexOf(t.key))throw new TypeError("Duplicated element ("+t.key+")");r.push(t.key)},decorateElement:function(t,e){for(var n=[],r=[],i=t.decorators,o=i.length-1;o>=0;o--){var a=e[t.placement];a.splice(a.indexOf(t.key),1);var s=this.fromElementDescriptor(t),u=this.toElementFinisherExtras((0,i[o])(s)||s);t=u.element,this.addElementPlacement(t,e),u.finisher&&r.push(u.finisher);var c=u.extras;if(c){for(var l=0;l<c.length;l++)this.addElementPlacement(c[l],e);n.push.apply(n,c)}}return{element:t,finishers:r,extras:n}},decorateConstructor:function(t,e){for(var n=[],r=e.length-1;r>=0;r--){var i=this.fromClassDescriptor(t),o=this.toClassDescriptor((0,e[r])(i)||i);if(void 0!==o.finisher&&n.push(o.finisher),void 0!==o.elements){t=o.elements;for(var a=0;a<t.length-1;a++)for(var s=a+1;s<t.length;s++)if(t[a].key===t[s].key&&t[a].placement===t[s].placement)throw new TypeError("Duplicated element ("+t[a].key+")")}}return{elements:t,finishers:n}},fromElementDescriptor:function(t){var e={kind:t.kind,key:t.key,placement:t.placement,descriptor:t.descriptor};return Object.defineProperty(e,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===t.kind&&(e.initializer=t.initializer),e},toElementDescriptors:function(t){var e;if(void 0!==t)return(e=t,function(t){if(Array.isArray(t))return t}(e)||be(e)||me(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(t){var e=this.toElementDescriptor(t);return this.disallowProperty(t,"finisher","An element descriptor"),this.disallowProperty(t,"extras","An element descriptor"),e}),this)},toElementDescriptor:function(t){var e=String(t.kind);if("method"!==e&&"field"!==e)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+e+'"');var n=ge(t.key),r=String(t.placement);if("static"!==r&&"prototype"!==r&&"own"!==r)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+r+'"');var i=t.descriptor;this.disallowProperty(t,"elements","An element descriptor");var o={kind:e,key:n,placement:r,descriptor:Object.assign({},i)};return"field"!==e?this.disallowProperty(t,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=t.initializer),o},toElementFinisherExtras:function(t){return{element:this.toElementDescriptor(t),finisher:ve(t,"finisher"),extras:this.toElementDescriptors(t.extras)}},fromClassDescriptor:function(t){var e={kind:"class",elements:t.map(this.fromElementDescriptor,this)};return Object.defineProperty(e,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),e},toClassDescriptor:function(t){var e=String(t.kind);if("class"!==e)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+e+'"');this.disallowProperty(t,"key","A class descriptor"),this.disallowProperty(t,"placement","A class descriptor"),this.disallowProperty(t,"descriptor","A class descriptor"),this.disallowProperty(t,"initializer","A class descriptor"),this.disallowProperty(t,"extras","A class descriptor");var n=ve(t,"finisher");return{elements:this.toElementDescriptors(t.elements),finisher:n}},runClassFinishers:function(t,e){for(var n=0;n<e.length;n++){var r=(0,e[n])(t);if(void 0!==r){if("function"!=typeof r)throw new TypeError("Finishers must return a constructor.");t=r}}return t},disallowProperty:function(t,e,n){if(void 0!==t[e])throw new TypeError(n+" can't have a ."+e+" property.")}};return t}function fe(t){var e,n=ge(t.key);"method"===t.kind?e={value:t.value,writable:!0,configurable:!0,enumerable:!1}:"get"===t.kind?e={get:t.value,configurable:!0,enumerable:!1}:"set"===t.kind?e={set:t.value,configurable:!0,enumerable:!1}:"field"===t.kind&&(e={configurable:!0,writable:!0,enumerable:!0});var r={kind:"field"===t.kind?"field":"method",key:n,placement:t.static?"static":"field"===t.kind?"own":"prototype",descriptor:e};return t.decorators&&(r.decorators=t.decorators),"field"===t.kind&&(r.initializer=t.value),r}function he(t,e){void 0!==t.descriptor.get?e.descriptor.get=t.descriptor.get:e.descriptor.set=t.descriptor.set}function de(t){return t.decorators&&t.decorators.length}function pe(t){return void 0!==t&&!(void 0===t.value&&void 0===t.writable)}function ve(t,e){var n=t[e];if(void 0!==n&&"function"!=typeof n)throw new TypeError("Expected '"+e+"' to be a function");return n}function ge(t){var e=function(t,e){if("object"!==Zt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Zt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Zt(e)?e:String(e)}function me(t,e){if(t){if("string"==typeof t)return ye(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ye(t,e):void 0}}function ye(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function be(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function we(){return we="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=xe(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},we.apply(this,arguments)}function xe(t){return xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xe(t)}var _e=ce([(0,j.Mo)("br-mode-2up")],(function(e,n){var r,i,o=function(t){oe(r,t);var n=se(r);function r(t,i){var o;return ie(this,r),o=n.call(this),e(ue(o)),o.book=t,o.br=i,o}return re(r)}(n);return{F:o,d:[{kind:"field",key:"br",value:void 0},{kind:"field",decorators:[(0,j.Cb)({type:Object})],key:"book",value:void 0},{kind:"field",key:"coordSpace",value:function(){return new ut(this)}},{kind:"field",decorators:[(0,j.Cb)({type:Number})],key:"scale",value:function(){return 1}},{kind:"field",key:"initialScale",value:function(){return 1}},{kind:"field",decorators:[(0,j.Cb)({type:String})],key:"autoFit",value:function(){return"auto"}},{kind:"field",key:"flipSpeed",value:function(){return 400}},{kind:"field",decorators:[(0,j.IO)(".br-mode-2up__leafs--flipping")],key:"$flippingEdges",value:void 0},{kind:"field",decorators:[(0,j.Cb)({type:Array,hasChanged:t.arrChanged})],key:"visiblePages",value:function(){return[]}},{kind:"get",key:"pageLeft",value:function(){return this.visiblePages.find((function(t){return"L"==t.pageSide}))}},{kind:"get",key:"pageRight",value:function(){return this.visiblePages.find((function(t){return"R"==t.pageSide}))}},{kind:"field",decorators:[(0,j.Cb)({type:Array})],key:"renderedPages",value:function(){return[]}},{kind:"field",key:"pageContainerCache",value:function(){return{}}},{kind:"field",key:"activeFlip",value:function(){return null}},{kind:"field",key:"_leftCoverWidth",value:function(){return 0}},{kind:"get",key:"$container",value:function(){return this}},{kind:"get",key:"$visibleWorld",value:function(){return this.$book}},{kind:"field",decorators:[(0,j.IO)(".br-mode-2up__book")],key:"$book",value:void 0},{kind:"get",key:"positions",value:function(){return this.computePositions(this.pageLeft,this.pageRight)}},{kind:"method",key:"computePageHeight",value:function(t){return this.book.getMedianPageSizeInches().height}},{kind:"method",key:"computePageWidth",value:function(t){return t.widthInches*this.computePageHeight(t)/t.heightInches}},{kind:"method",key:"computePositions",value:function(t,e){var n,r,i,o,a=this.computePageWidth.bind(this),s=this.book.getNumLeafs(),u=this.activeFlip?Math.ceil(this.activeFlip.pagesFlippingCount/2)*this.PAGE_THICKNESS_IN:0,c="lr"==this.book.pageProgression?null!==(n=null==t?void 0:t.index)&&void 0!==n?n:0:t?s-t.index:0,l=this._leftCoverWidth+c*this.PAGE_THICKNESS_IN,f=l,h=a(t||e.right),d=l-h,p=d,v="left"!=(null===(r=this.activeFlip)||void 0===r?void 0:r.direction)?0:u,g=Math.ceil(c/2)*this.PAGE_THICKNESS_IN-v,m=v+g,y=p-v,b=y-g,w=l,x=e?a(e):0,_=w+x,S="lr"==this.book.pageProgression?e?s-e.index:0:null!==(i=null==e?void 0:e.index)&&void 0!==i?i:0,k=_,P="right"!=(null===(o=this.activeFlip)||void 0===o?void 0:o.direction)?0:u,E=k+P,O=Math.ceil(S/2)*this.PAGE_THICKNESS_IN-P,T=k+O+P;return{leafEdgesLeftStart:b,leafEdgesLeftMainWidth:g,leafEdgesLeftMovingStart:y,leafEdgesLeftMovingWidth:v,leafEdgesLeftEnd:p,leafEdgesLeftFullWidth:m,pageLeftStart:d,pageLeftWidth:h,pageLeftEnd:f,gutter:l,pageRightStart:w,pageRightWidth:x,pageRightEnd:_,leafEdgesRightStart:k,leafEdgesRightMovingWidth:P,leafEdgesRightMainStart:E,leafEdgesRightMainWidth:O,leafEdgesRightEnd:T,leafEdgesRightFullWidth:P+O,spreadWidth:_-d,bookWidth:T-b}}},{kind:"field",key:"htmlDimensionsCacher",value:function(){return new Z(this)}},{kind:"field",key:"smoothZoomer",value:function(){return new V(this)}},{kind:"field",key:"ZOOM_FACTOR",value:function(){return 1.1}},{kind:"field",key:"PAGE_THICKNESS_IN",value:function(){return.002}},{kind:"method",key:"jumpToIndex",value:(i=ee(Qt().mark((function t(e){var n,r,i=arguments;return Qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(i.length>1&&void 0!==i[1]?i[1]:{}).smooth,r=void 0===n||n,t.next=3,this.flipAnimation(e,{animate:r});case 3:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{kind:"method",key:"zoomIn",value:function(){this.scale*=this.ZOOM_FACTOR}},{kind:"method",key:"zoomOut",value:function(){this.scale*=1/this.ZOOM_FACTOR}},{kind:"method",key:"firstUpdated",value:function(t){we(xe(o.prototype),"firstUpdated",this).call(this,t),this.htmlDimensionsCacher.updateClientSizes(),this.smoothZoomer.attach()}},{kind:"method",key:"connectedCallback",value:function(){we(xe(o.prototype),"connectedCallback",this).call(this),this.htmlDimensionsCacher.attachResizeListener(),this.smoothZoomer.attach()}},{kind:"method",key:"disconnectedCallback",value:function(){this.htmlDimensionsCacher.detachResizeListener(),this.smoothZoomer.detach(),we(xe(o.prototype),"disconnectedCallback",this).call(this)}},{kind:"method",key:"updated",value:function(t){if(t.has("book")&&(this._leftCoverWidth=this.computePageWidth(this.book.getPage("lr"==this.book.pageProgression?0:-1))),t.has("visiblePages")&&(this.renderedPages=this.computeRenderedPages(),this.br.displayedIndices=this.visiblePages.map((function(t){return t.index})),this.br.updateFirstIndex(this.br.displayedIndices[0]),this.br._components.navbar.updateNavIndexThrottled()),t.has("autoFit")&&"none"!=this.autoFit&&this.resizeViaAutofit(),t.has("scale")){var e=t.get("scale");this.recenter(),this.smoothZoomer.updateViewportOnZoom(this.scale,e)}}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"method",key:"render",value:function(){var t=this;return(0,M.dy)(Ut||(Ut=Jt(['\n <div class="br-mode-2up__book" @mouseup=',">\n ","\n ","\n ","\n </div>"])),this.handlePageClick,this.renderLeafEdges("left"),this.renderedPages.map((function(e){return t.renderPage(e)})),this.renderLeafEdges("right"))}},{kind:"field",key:"createPageContainer",value:function(){var t=this;return function(e){return t.pageContainerCache[e.index]||(t.pageContainerCache[e.index]=t.br._createPageContainer(e.index))}}},{kind:"method",key:"initFirstRender",value:function(t){var e=this.book.getPage(t),n=e.spread;this.visiblePages=("lr"==this.book.pageProgression?[n.left,n.right]:[n.right,n.left]).filter((function(t){return t})),this.htmlDimensionsCacher.updateClientSizes(),this.resizeViaAutofit(e),this.initialScale=this.scale}},{kind:"field",key:"renderPage",value:function(){var t=this;return function(e){var n=t.coordSpace.worldUnitsToRenderedPixels,r=t.coordSpace.worldUnitsToVisiblePixels,i=n(t.computePageWidth(e)),o=n(t.computePageHeight(e)),a=t.visiblePages.map((function(t){return t.index})).includes(e.index),s=t.computePositions(e.spread.left,e.spread.right),u=t.createPageContainer(e).update({dimensions:{width:i,height:o,top:0,left:n("L"==e.pageSide?s.pageLeftStart:s.pageLeftEnd)},reduce:e.width/r(t.computePageWidth(e))}).$container[0];return u.classList.toggle("BRpage-visible",a),u}}},{kind:"field",key:"renderLeafEdges",value:function(){var t=this;return function(e){var n;if(!t.visiblePages.length)return(0,M.dy)(zt||(zt=Jt([""])));if(!("left"==e?t.positions.leafEdgesLeftFullWidth:t.positions.leafEdgesRightFullWidth))return(0,M.dy)(Wt||(Wt=Jt([""])));var r=t.coordSpace.worldUnitsToRenderedPixels,i=r(t.computePageHeight(t.visiblePages[0])),o=(null===(n=t.activeFlip)||void 0===n?void 0:n.direction)==e,a=t.book.getPage("lr"==t.book.pageProgression?0:t.book.getNumLeafs()-1),s=t.book.getPage("lr"==t.book.pageProgression?t.book.getNumLeafs()-1:0),u=o?t.activeFlip.pagesFlippingCount:0,c="left"==e?[a.index,t.pageLeft.goLeft(u).index]:[t.pageRight.goRight(u).index,s.index],l={width:"".concat(r("left"==e?t.positions.leafEdgesLeftMainWidth:t.positions.leafEdgesRightMainWidth),"px"),height:"".concat(i,"px"),left:"".concat(r("left"==e?t.positions.leafEdgesLeftStart:t.positions.leafEdgesRightMainStart),"px")},f=(0,M.dy)(Ht||(Ht=Jt(["\n <br-leaf-edges\n leftIndex=","\n rightIndex=","\n .book=","\n .pageClickHandler=","\n side=",'\n class="br-mode-2up__leafs br-mode-2up__leafs--','"\n style=',"\n ></br-leaf-edges>\n "])),c[0],c[1],t.book,(function(e){return t.br.jumpToIndex(e)}),e,e,(0,R.V)(l));if(o){var h=r("left"==e?t.positions.leafEdgesLeftMovingWidth:t.positions.leafEdgesRightMovingWidth),d={width:"".concat(h,"px"),height:"".concat(i,"px"),left:"".concat(r("left"==e?t.positions.leafEdgesLeftMovingStart:t.positions.leafEdgesRightStart),"px"),pointerEvents:"none",transformOrigin:"".concat(r("left"==e?t.positions.pageLeftWidth:-t.positions.pageRightWidth)+h/2,"px 0")},p=(0,M.dy)(Vt||(Vt=Jt(["\n <br-leaf-edges\n leftIndex=","\n rightIndex=","\n .book=","\n side=",'\n class="br-mode-2up__leafs br-mode-2up__leafs--',' br-mode-2up__leafs--flipping"\n style=',"\n ></br-leaf-edges>\n "])),t.activeFlip.pagesFlipping[0],t.activeFlip.pagesFlipping[1],t.book,e,e,(0,R.V)(d));return"left"==e?(0,M.dy)(Gt||(Gt=Jt(["","",""])),f,p):(0,M.dy)(Yt||(Yt=Jt(["","",""])),p,f)}return f}}},{kind:"method",key:"resizeViaAutofit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.visiblePages[0];this.scale=this.computeScale(t,this.autoFit)}},{kind:"method",key:"recenter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.visiblePages[0],e=this.computeTranslate(t,this.scale);this.$book.style.transform="translateX(".concat(e.x,"px) translateY(").concat(e.y,"px) scale(").concat(this.scale,")")}},{kind:"method",key:"computeRenderedPages",value:function(){var t,e,n,r,i;return[null===(t=this.visiblePages[0])||void 0===t||null===(t=t.prev)||void 0===t?void 0:t.prev,null===(e=this.visiblePages[0])||void 0===e?void 0:e.prev].concat((i=this.visiblePages,function(t){if(Array.isArray(t))return ye(t)}(i)||be(i)||me(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[null===(n=this.visiblePages[this.visiblePages.length-1])||void 0===n?void 0:n.next,null===(r=this.visiblePages[this.visiblePages.length-1])||void 0===r||null===(r=r.next)||void 0===r?void 0:r.next]).filter((function(t){return t})).slice(0,10)}},{kind:"method",key:"computeScale",value:function(t,e){if(!t)return 1;var n=t.spread,r=this.computePositions(n.left,n.right).bookWidth,i=this.computePageHeight(n.left||n.right),o=this.scale;this.scale=1;var a=this.coordSpace.renderedPixelsToWorldUnits(this.htmlDimensionsCacher.clientWidth-20)/r,s=this.coordSpace.renderedPixelsToWorldUnits(this.htmlDimensionsCacher.clientHeight-20)/i;this.scale=o;var u=1;if("width"==e)u=a;else if("height"==e)u=s;else if("auto"==e)u=Math.min(a,s);else{if("none"!=e)throw new Error("Invalid autoFit value: ".concat(e));u=this.scale}return u}},{kind:"method",key:"computeTranslate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scale;if(!t)return{x:0,y:0};var n=t.spread,r=this.computePositions(n.left,n.right),i=r.bookWidth,o=this.computePageHeight(n.left||n.right),a=this.coordSpace.worldUnitsToRenderedPixels(i)*e,s=this.coordSpace.worldUnitsToRenderedPixels(o)*e,u=this.coordSpace.worldUnitsToRenderedPixels(-r.leafEdgesLeftStart)*e,c=(this.htmlDimensionsCacher.clientWidth-a)/2+u,l=(this.htmlDimensionsCacher.clientHeight-s)/2;return{x:Math.max(u,c),y:Math.max(0,l)}}},{kind:"method",key:"flipAnimation",value:(r=ee(Qt().mark((function e(n){var r,i,o,a,s,u,c,l,f,h,d,p,v,g,m,y,b,w,x,_,S,k,P,E,O,T,C,j,M,R=this,A=arguments;return Qt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=(A.length>1&&void 0!==A[1]?A[1]:{}).animate,c=void 0===u||u,l=null===(r=this.pageLeft||this.pageRight)||void 0===r?void 0:r.spread){e.next=4;break}return e.abrupt("return");case 4:if(n=this.parseNextSpread(n),!this.activeFlip&&n){e.next=7;break}return e.abrupt("return");case 7:if(f=this.book.pageProgression,h=null!==(i=null===(o=l.left)||void 0===o?void 0:o.index)&&void 0!==i?i:"lr"==f?-1:this.book.getNumLeafs(),d=null!==(a=null===(s=n.left)||void 0===s?void 0:s.index)&&void 0!==a?a:"lr"==f?-1:this.book.getNumLeafs(),h!=d){e.next=12;break}return e.abrupt("return");case 12:p=this.renderedPages.map((function(t){return t.index})),v=[],g=0,m=[n.left,n.right];case 15:if(!(g<m.length)){e.next=24;break}if(y=m[g]){e.next=19;break}return e.abrupt("continue",21);case 19:v.push(this.createPageContainer(y)),p.includes(y.index)||this.renderedPages.push(y);case 21:g++,e.next=15;break;case 24:if(b=this.computeTranslate(l.left||l.right,this.scale),w=this.computeTranslate(n.left||n.right,this.scale),x=Math.sqrt(Math.pow(w.x-b.x,2)+Math.pow(w.y-b.y,2)),_="translate(".concat(w.x,"px, ").concat(w.y,"px)"),x<50&&(k=null===(S=this.$book.style.transform.match(/translate\([^)]+\)/))||void 0===S?void 0:S[0])&&(_=k),P="".concat(_," scale(").concat(this.scale,")"),!c||!("animate"in Element.prototype)){e.next=57;break}return E="lr"==f?d>h?"right":"left":d>h?"left":"right",this.activeFlip={direction:E,pagesFlipping:[h,d],pagesFlippingCount:Math.abs(d-h)},this.classList.add("br-mode-2up--flipping-".concat(E)),this.classList.add("BRpageFlipping"),this.requestUpdate(),e.next=38,this.updateComplete;case 38:return this.visiblePages.map((function(t){return R.pageContainerCache[t.index].$container})).forEach((function(t){return t.addClass("BRpage-exiting")})),v.forEach((function(t){return t.$container.addClass("BRpage-entering")})),O={duration:this.flipSpeed+this.activeFlip.pagesFlippingCount,easing:"ease-in",fill:"none"},T=this.$book.animate([{transform:P}],O),C=this.$flippingEdges.animate([{transform:"rotateY(0deg)"},{transform:"left"==E?"rotateY(-180deg)":"rotateY(180deg)"}],O),j="left"==E?this.querySelector(".BRpage-exiting[data-side=L]").animate([{transform:"rotateY(0deg)"},{transform:"rotateY(180deg)"}],O):this.querySelector(".BRpage-exiting[data-side=R]").animate([{transform:"rotateY(0deg)"},{transform:"rotateY(-180deg)"}],O),M="left"==E?this.querySelector(".BRpage-entering[data-side=R]").animate([{transform:"rotateY(-180deg)"},{transform:"rotateY(0deg)"}],O):this.querySelector(".BRpage-entering[data-side=L]").animate([{transform:"rotateY(180deg)"},{transform:"rotateY(0deg)"}],O),T.play(),C.play(),j.play(),M.play(),v.forEach((function(t){return t.$container.addClass("BRpage-visible")})),e.next=52,Promise.race([(0,t.promisifyEvent)(T,"finish"),(0,t.promisifyEvent)(C,"finish"),(0,t.promisifyEvent)(j,"finish"),(0,t.promisifyEvent)(M,"finish")]);case 52:this.classList.remove("br-mode-2up--flipping-".concat(E)),this.classList.remove("BRpageFlipping"),this.visiblePages.map((function(t){return R.pageContainerCache[t.index].$container})).forEach((function(t){return t.removeClass("BRpage-exiting BRpage-visible")})),v.forEach((function(t){return t.$container.removeClass("BRpage-entering")})),this.activeFlip=null;case 57:this.$book.style.transform=P,this.visiblePages=("lr"==f?[n.left,n.right]:[n.right,n.left]).filter((function(t){return t}));case 59:case"end":return e.stop()}}),e,this)}))),function(t){return r.apply(this,arguments)})},{kind:"method",key:"parseNextSpread",value:function(t){"next"==t?t="lr"==this.book.pageProgression?"right":"left":"prev"==t&&(t="lr"==this.book.pageProgression?"left":"right");var e,n=(this.pageLeft||this.pageRight).spread;if("left"==t)t=null===(e=n.left)||void 0===e||null===(e=e.findLeft({combineConsecutiveUnviewables:!0}))||void 0===e?void 0:e.spread;else if("right"==t){var r;t=null===(r=n.right)||void 0===r||null===(r=r.findRight({combineConsecutiveUnviewables:!0}))||void 0===r?void 0:r.spread}return"number"==typeof t&&(t=this.book.getPage(t).spread),t instanceof C&&(t=t.spread),t}},{kind:"field",key:"handlePageClick",value:function(){var t=this;return function(e){if(3==e.which&&t.br.protected)return!1;if(1==e.which){var n=Kt(e.target).closest(".BRpagecontainer");n.length&&("L"==n.data("side")?t.flipAnimation("left"):"R"==n.data("side")&&t.flipAnimation("right"))}}}}]}}),M.oi),Se=(ce([(0,j.Mo)("br-leaf-edges")],(function(t,e){var n=function(e){oe(r,e);var n=se(r);function r(){var e;ie(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=n.call.apply(n,[this].concat(o)),t(ue(e)),e}return re(r)}(e);return{F:n,d:[{kind:"field",decorators:[(0,j.Cb)({type:Number})],key:"leftIndex",value:function(){return 0}},{kind:"field",decorators:[(0,j.Cb)({type:Number})],key:"rightIndex",value:function(){return 0}},{kind:"field",decorators:[(0,j.Cb)({type:String})],key:"side",value:function(){return"left"}},{kind:"field",decorators:[(0,j.Cb)({attribute:!1})],key:"book",value:function(){return null}},{kind:"field",decorators:[(0,j.Cb)({attribute:!1,type:Function})],key:"pageClickHandler",value:function(){return null}},{kind:"field",decorators:[(0,j.IO)(".br-leaf-edges__bar")],key:"$hoverBar",value:void 0},{kind:"field",decorators:[(0,j.IO)(".br-leaf-edges__label")],key:"$hoverLabel",value:void 0},{kind:"get",key:"pageWidthPercent",value:function(){return 100/(this.rightIndex-this.leftIndex+1)}},{kind:"method",key:"render",value:function(){return(0,M.dy)(Xt||(Xt=Jt(['\n <div\n class="br-leaf-edges__bar"\n style="','"\n ></div>\n <div class="br-leaf-edges__label">Page</div>'])),(0,R.V)({width:"".concat(this.pageWidthPercent,"%")}))}},{kind:"method",key:"connectedCallback",value:function(){we(xe(n.prototype),"connectedCallback",this).call(this),this.addEventListener("mouseenter",this.onMouseEnter),this.addEventListener("mouseleave",this.onMouseLeave),this.addEventListener("click",this.onClick)}},{kind:"method",key:"disconnectedCallback",value:function(){we(xe(n.prototype),"disconnectedCallback",this).call(this),this.addEventListener("mouseenter",this.onMouseEnter),this.removeEventListener("mousemove",this.onMouseMove),this.removeEventListener("mouseleave",this.onMouseLeave)}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"field",key:"onMouseEnter",value:function(){var t=this;return function(e){t.addEventListener("mousemove",t.onMouseMove),t.$hoverBar.style.display="block",t.$hoverLabel.style.display="block"}}},{kind:"field",key:"onMouseMove",value:function(){var t=this;return function(e){t.$hoverBar.style.left="".concat(e.offsetX,"px"),"right"==t.side?t.$hoverLabel.style.left="".concat(e.offsetX,"px"):t.$hoverLabel.style.right="".concat(t.offsetWidth-e.offsetX,"px"),t.$hoverLabel.style.top="".concat(e.offsetY,"px");var n=t.mouseEventToPageIndex(e);t.$hoverLabel.textContent=t.book.getPageName(n)}}},{kind:"field",key:"onMouseLeave",value:function(){var t=this;return function(e){t.removeEventListener("mousemove",t.onMouseMove),t.$hoverBar.style.display="none",t.$hoverLabel.style.display="none"}}},{kind:"field",key:"onClick",value:function(){var t=this;return function(e){t.pageClickHandler(t.mouseEventToPageIndex(e))}}},{kind:"method",key:"mouseEventToPageIndex",value:function(t){return Math.floor(this.leftIndex+t.offsetX/this.offsetWidth*(this.rightIndex-this.leftIndex+1))}}]}}),M.oi),r(5311));function ke(t){return ke="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},ke(t)}function Pe(){Pe=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:E(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",g={};function m(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(M([])));_&&_!==n&&r.call(_,a)&&(w=_);var S=b.prototype=m.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==ke(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function E(e,n,r){var i=h;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=O(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?v:d,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=v,r.method="throw",r.arg=c.arg)}}}function O(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(ke(e)+" is not iterable")}return y.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(P.prototype),c(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new P(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=M,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:M(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Ee(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Oe(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Ee(o,r,i,a,s,"next",t)}function s(t){Ee(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Te(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==ke(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==ke(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===ke(i)?i:String(i)),r)}var i}var Ce=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.br=e,this.book=n,this.mode2UpLit=new _e(n,e),this.mode2UpLit.flipSpeed=e.flipSpeed,this.$el=Se(this.mode2UpLit).attr("autoFit",this.br.options.twoPage.autofit).addClass("br-mode-2up__root BRmode2up"),this.everShown=!1}var e,n;return e=t,(n=[{key:"prepare",value:function(){var t=this,e=this.br.currentIndex();this.br.refs.$brContainer.empty().css({overflow:"hidden"}).append(this.$el),this.mode2UpLit.style.opacity="0",setTimeout(Oe(Pe().mark((function n(){return Pe().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.everShown){n.next=9;break}return t.mode2UpLit.initFirstRender(e),t.everShown=!0,t.mode2UpLit.requestUpdate(),n.next=6,t.mode2UpLit.updateComplete;case 6:new It(t.mode2UpLit,{preventDefault:!0,dragSelector:".br-mode-2up__book",dragstart:"mousedown",dragcontinue:"mousemove",dragend:"mouseup"}),n.next=12;break;case 9:return n.next=11,t.mode2UpLit.jumpToIndex(e,{smooth:!1});case 11:t.resizePageView();case 12:t.mode2UpLit.style.opacity="1";case 13:case"end":return n.stop()}}),n)})))),this.br.updateBrClasses()}},{key:"jumpToIndex",value:function(t,e,n,r){this.mode2UpLit.jumpToIndex(t)}},{key:"zoom",value:function(t){switch(t){case"in":this.mode2UpLit.zoomIn();break;case"out":this.mode2UpLit.zoomOut();break;default:console.error("Unsupported direction: ".concat(t))}}},{key:"resizePageView",value:function(){this.mode2UpLit.htmlDimensionsCacher.updateClientSizes(),this.mode2UpLit.scale<this.mode2UpLit.initialScale&&"none"==this.mode2UpLit.autoFit&&(this.mode2UpLit.autoFit="auto"),"none"!=this.mode2UpLit.autoFit&&this.mode2UpLit.resizeViaAutofit(),this.mode2UpLit.recenter()}}])&&Te(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),je=r(5311);function Me(t){return Me="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},Me(t)}function Re(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Ae(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ae(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ae(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ie(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Me(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Me(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Me(i)?i:String(i)),r)}var i}var Le=function(){function n(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.br=t,this.book=e}var r,i;return r=n,(i=[{key:"drawLeafs",value:function(n){var r,i,o,a=this,s=Math.floor,u=this.book,c=this.br.refs.$brContainer.prop("scrollWidth")-20,l=0,f=0,h=0,d=0,p=0,v=[],g=Re(u.pagesIterator({combineConsecutiveUnviewables:!0}));try{for(g.s();!(o=g.n()).done;){var m=o.value,y=this.br.thumbWidth;l+(y+this.br.thumbPadding)>c&&(d++,l=0,p=0),v[d]||(v[d]={}),v[d].leafs||(v[d].leafs=[],v[d].height=0,v[d].top=0),v[d].leafs[p]={num:m.index,left:l},(r=s(m.height*this.br.thumbWidth/m.width))>v[d].height&&(v[d].height=r),0===p&&(f+=this.br.thumbPadding+v[d].height),(l+=y+this.br.thumbPadding)>h&&(h=l),p++,m.index==n&&(i=f-this.br.thumbPadding-v[d].height)}}catch(t){g.e(t)}finally{g.f()}this.br.refs.$brPageViewEl.height(f);var b=s((this.br.refs.$brContainer.prop("scrollWidth")-h)/2)-14;void 0!==i&&this.br.refs.$brContainer.scrollTop(i);for(var w=this.br.refs.$brContainer.prop("scrollTop"),x=w+this.br.refs.$brContainer.height(),_=0,S=0,k=[],P=[],E=u.getNumLeafs()-1,O=0,T=0;T<v.length;T++)v[T]&&(S+=this.br.thumbPadding+v[T].height,(_>=w&&_<=x||S>=w&&S<=x||_<=w&&S>=x)&&(k.push(T),v[T].leafs[0].num<E&&(E=v[T].leafs[0].num),v[T].leafs[v[T].leafs.length-1].num>O&&(O=v[T].leafs[v[T].leafs.length-1].num)),_>v[T].top&&(v[T].top=_),_=S);for(var C=k[0],j=k[k.length-1],M=1;M<this.br.thumbRowBuffer+1;M++)j+M<v.length&&k.push(j+M);for(var R=1;R<this.br.thumbRowBuffer;R++)C-R>=0&&k.push(C-R);k.sort((function(t,e){return t-e}));for(var A=0,I=k;A<I.length;A++){var L=I[A];if((0,t.notInArray)(L,this.br.displayedRows)){if(!v[L])continue;var D,$=Re(v[L].leafs);try{var N=function(){var t=D.value,n=t.num,r=t.left,i=a.br.thumbWidth,o=s(u.getPageHeight(n)*a.br.thumbWidth/u.getPageWidth(n)),l=v[L].top,f=r+b;"rl"==a.br.pageProgression&&(f=c-i-f),f+=a.br.thumbPadding,P.push(n);var h=s(u.getPageWidth(n)/a.br.thumbWidth),d=2*Math.round(h/2),p=a.br._createPageContainer(n).update({dimensions:{width:i,height:o,top:l,left:f},reduce:d});p.$container.data("leaf",n).on("mouseup",(function(t){a.br.updateFirstIndex(n,{suppressFragmentChange:!0}),a.br.switchMode(a.br.constMode1up,{suppressFragmentChange:!0});var r=a.br.viewModeOrder.shift();a.br.viewModeOrder.push(r),a.br._components.navbar.updateViewModeButton(je(".viewmode"),"twopg","Two-page view"),a.br.trigger(e.fragmentChange),t.stopPropagation()})),a.br.refs.$brPageViewEl.append(p.$container)};for($.s();!(D=$.n()).done;)N()}catch(t){$.e(t)}finally{$.f()}}}var F,B=Re(this.br.displayedRows);try{for(B.s();!(F=B.n()).done;){var U=F.value;if((0,t.notInArray)(U,k)){var z,W,H=Re(null===(z=v[U])||void 0===z?void 0:z.leafs);try{for(H.s();!(W=H.n()).done;){var V,G=W.value.num;null!=P&&P.includes(G)||null===(V=this.br.$(".pagediv".concat(G)))||void 0===V||V.remove()}}catch(t){H.e(t)}finally{H.f()}}}}catch(t){B.e(t)}finally{B.f()}var Y=this.br.currentIndex();Y<E?this.br.updateFirstIndex(E):Y>O&&this.br.updateFirstIndex(O),this.br.displayedRows=k.slice(),this.br.$(".BRpagedivthumb_highlight").removeClass("BRpagedivthumb_highlight"),this.br.$(".pagediv"+this.br.currentIndex()).addClass("BRpagedivthumb_highlight")}},{key:"lazyLoadImage",value:function(t){var e=je(t).data("leaf"),n=je(t).data("reduce"),r=this.br.imageCache.image(e,n),i=je(t).parent();je(i).append(r),je(t).remove()}},{key:"zoom",value:function(e){var n=this.br.thumbColumns;switch(e){case"in":this.br.thumbColumns-=1;break;case"out":this.br.thumbColumns+=1;break;default:console.error("Unsupported direction: ".concat(e))}this.br.thumbColumns=(0,t.clamp)(this.br.thumbColumns,this.br.options.thumbMinZoomColumns,this.br.options.thumbMaxZoomColumns),this.br.thumbColumns!=n&&(this.br.displayedRows=[],this.prepare())}},{key:"getThumbnailWidth",value:function(t){var e=(t+1)*this.br.thumbPadding,n=(this.br.refs.$brPageViewEl.width()-e)/(t+.5),r=Math.floor(n);return r>0?r:100}},{key:"prepare",value:function(){this.br.refs.$brContainer.empty(),this.br.refs.$brContainer.css({overflowY:"scroll",overflowX:"auto"}),this.br.refs.$brPageViewEl=je("<div class='BRpageview'></div>"),this.br.refs.$brContainer.append(this.br.refs.$brPageViewEl),this.dragScrollable=this.dragScrollable||new It(this.br.refs.$brContainer[0],{preventDefault:!0}),this.br.bindGestures(this.br.refs.$brContainer),this.br.thumbWidth=this.getThumbnailWidth(this.br.thumbColumns),this.br.reduce=this.book.getPageWidth(0)/this.br.thumbWidth,this.br.displayedRows=[],this.drawLeafs(this.br.currentIndex()),this.br.updateBrClasses()}},{key:"jumpToIndex",value:function(t){for(var e=this,n=Math.floor,r=this.book,i=this.br.refs.$brContainer.prop("scrollWidth")-20,o=this.br.thumbWidth,a=0,s=0,u=0,c=0,l=0,f=0;f<=t;f++){s+(o+this.br.thumbPadding)>i&&(s=0,c=0,l=0);var h=n(r.getPageHeight(l)*this.br.thumbWidth/r.getPageWidth(l));h>c&&(c=h),0==l&&(a=u,u+=this.br.thumbPadding+c),s+=o+this.br.thumbPadding,l++}this.br.updateFirstIndex(t),this.br.refs.$brContainer.prop("scrollTop")==a?this.br.drawLeafs():(this.br.animating=!0,this.br.refs.$brContainer.stop(!0).animate({scrollTop:a},"fast",(function(){e.br.animating=!1})))}}])&&Ie(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),n}(),De=(r(8813),{floor:Math.floor,decr:function(t){return t-1}}),$e={floor:function(t){return Math.pow(2,Math.floor(Math.log2(Math.max(1,t))))},decr:function(t){return Math.pow(2,Math.log2(t)-1)}},Ne={pow2:$e,integer:De},Fe=r(5311);function Be(t){return Be="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},Be(t)}function Ue(t){return function(t){if(Array.isArray(t))return ze(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ze(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ze(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ze(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function We(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==Be(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Be(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Be(i)?i:String(i)),r)}var i}var He=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.useSrcSet,i=void 0!==r&&r,o=n.reduceSet,a=void 0===o?$e:o;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.book=e,this.useSrcSet=i,this.reduceSet=a,this.cache={},this.defaultScale=8}var e,n;return e=t,n=[{key:"image",value:function(t,e){var n=(this.cache[t]||[]).filter((function(t){return t.loaded&&t.reduce<=e}));if(n.length){var r=Math.max.apply(Math,Ue(n.map((function(t){return t.reduce}))));return this._serveImageElement(t,r)}return this._serveImageElement(t,e)}},{key:"imageLoaded",value:function(t,e){var n,r,i=null===(n=this.cache[t])||void 0===n?void 0:n.find((function(t){return t.reduce<=e}));return null!==(r=null==i?void 0:i.loaded)&&void 0!==r&&r}},{key:"getBestLoadedReduce",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,r=(null===(e=this.cache[t])||void 0===e?void 0:e.filter((function(t){return t.loaded})))||[];if(!r.length)return null;var i=r.filter((function(t){return t.reduce>=n}));if(i.length)return Math.min.apply(Math,Ue(i.map((function(t){return t.reduce}))));var o=r.filter((function(t){return t.reduce<n}));return Math.max.apply(Math,Ue(o.map((function(t){return t.reduce}))))}},{key:"_serveImageElement",value:function(t,e){var n,r=this.reduceSet.floor(e),i=null===(n=this.cache[t])||void 0===n?void 0:n.find((function(t){return t.reduce==r}));i||(i={reduce:r,loaded:!1},(this.cache[t]||(this.cache[t]=[])).push(i));var o=this.book.getPage(t),a=Fe("<img />",{class:"BRpageimage",alt:"Book page image",src:o.getURI(r,0)}).data("reduce",r);return this.useSrcSet&&a.attr("srcset",o.getURISrcSet(r)),i.loaded||a.one("load",(function(){return i.loaded=!0})),a}}],n&&We(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Ve=r(9860),Ge=r(5311),Ye=r(5311);function Xe(t){return Xe="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},Xe(t)}function qe(){qe=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new j(r||[]);return i(a,"_invoke",{value:E(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",p="executing",v="completed",g={};function m(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(M([])));_&&_!==n&&r.call(_,a)&&(w=_);var S=b.prototype=m.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Xe(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function E(e,n,r){var i=h;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=O(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?v:d,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=v,r.method="throw",r.arg=c.arg)}}}function O(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(Xe(e)+" is not iterable")}return y.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},k(P.prototype),c(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new P(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(S),c(S,u,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=M,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:M(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function Ke(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Ze(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Ke(o,r,i,a,s,"next",t)}function s(t){Ke(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Je(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Qe(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Ge.extend(!0,{},Qe.defaultOptions,t,Qe.optionOverrides);this.setup(e)}function tn(t,e,n){var r,i,o,a,s,u,c,l;i=n,o=function(t){return t.br},a=Qe,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n,u=function(t){return t._overrideable[e]},c=(r=t).prototype[i],l=function(){return c.apply(u(this),arguments)},Object.defineProperty(a.prototype,s,{get:function(){return l},set:function(t){r.prototype[i]=function(){var e=this instanceof r?o(this):this;return t.apply(e,arguments)},l=t}})}Qe.version="5.0.0-78",Qe.constMode1up=1,Qe.constMode2up=2,Qe.constModeThumb=3,Qe.imageCache=null,Qe.constNavAnimationDuration=300,Qe.constResizeAnimationDuration=100,Qe.eventNames=e,Qe.defaultOptions=d,Qe.optionOverrides={},Qe.prototype.setup=function(t){this.options=t,this.numLeafs=void 0,this.enableSearch=!1,this.viewModeOrder=[],this.suppressFragmentChange=!1,this.animationFinishedCallback=null,this.constMode1up=Qe.constMode1up,this.constMode2up=Qe.constMode2up,this.constModeThumb=Qe.constModeThumb,this.reduce=8,this.defaults=t.defaults,this.padding=t.padding,this.reduceSet=Ne[t.reduceSet],this.reduceSet||(console.warn("Invalid reduceSet ".concat(t.reduceSet,". Ignoring.")),this.reduceSet=Ne[d.reduceSet]),this.mode=null,this.prevReadMode=null,this.ui=t.ui,this.uiAutoHide=t.uiAutoHide,this.thumbWidth=100,this.thumbRowBuffer=t.thumbRowBuffer,this.thumbColumns=t.thumbColumns,this.thumbMaxLoading=t.thumbMaxLoading,this.thumbPadding=t.thumbPadding,this.displayedRows=[],this.displayedIndices=[],this.animating=!1,this.flipSpeed="number"==typeof t.flipSpeed?t.flipSpeed:{fast:200,slow:600}[t.flipSpeed]||400,this.flipDelay=t.flipDelay,this.firstIndex=null,this.isFullscreenActive=t.startFullscreen||!1,this.lastScroll=null,this.showLogo=t.showLogo,this.logoURL=t.logoURL,this.imagesBaseURL=t.imagesBaseURL,this.reductionFactors=t.reductionFactors,this.onePage=t.onePage,this.twoPage=t.twoPage,this.onePageMinBreakpoint=t.onePageMinBreakpoint,this.bookTitle=t.bookTitle,this.bookUrl=t.bookUrl,this.bookUrlText=t.bookUrlText,this.bookUrlTitle=t.bookUrlTitle,this.titleLeaf=t.titleLeaf,this.metadata=t.metadata,this.thumbnail=t.thumbnail,this.bookUrlMoreInfo=t.bookUrlMoreInfo,this.enableExperimentalControls=t.enableExperimentalControls,this.el=t.el,this.pageProgression=t.pageProgression,this.protected=t.protected,this.getEmbedCode=t.getEmbedCode,this.popup=null,this.data=t.data,this.refs={},this.book=new T(this),t.getNumLeafs&&(this.book.getNumLeafs=t.getNumLeafs.bind(this)),t.getPageWidth&&(this.book.getPageWidth=t.getPageWidth.bind(this)),t.getPageHeight&&(this.book.getPageHeight=t.getPageHeight.bind(this)),t.getPageURI&&(this.book.getPageURI=t.getPageURI.bind(this)),t.getPageSide&&(this.book.getPageSide=t.getPageSide.bind(this)),t.getPageNum&&(this.book.getPageNum=t.getPageNum.bind(this)),t.getPageProp&&(this.book.getPageProp=t.getPageProp.bind(this)),t.getSpreadIndices&&(this.book.getSpreadIndices=t.getSpreadIndices.bind(this)),t.leafNumToIndex&&(this.book.leafNumToIndex=t.leafNumToIndex.bind(this)),this._components={navbar:new a(this),toolbar:new b(this)},this._modes={mode1Up:new qt(this,this.book),mode2Up:new Ce(this,this.book),modeThumb:new Le(this,this.book)},this._overrideable={book:this.book,"_components.navbar":this._components.navbar,"_components.toolbar":this._components.toolbar,"_modes.mode1Up":this._modes.mode1Up,"_modes.mode2Up":this._modes.mode2Up,"_modes.modeThumb":this._modes.modeThumb},this.imageCache=new He(this.book,{useSrcSet:this.options.useSrcSet,reduceSet:this.reduceSet}),this.hasKeyFocus=!0},Qe.prototype.getActivePageContainerElements=function(){var t=Object.values(this._modes.mode2Up.mode2UpLit.pageContainerCache).map((function(t){return t.$container[0]})).concat(Object.values(this._modes.mode1Up.mode1UpLit.pageContainerCache).map((function(t){return t.$container[0]})));return this.mode==this.constModeThumb&&(t=t.concat(this.$(".BRpagecontainer").toArray())),t},Qe.prototype.getActivePageContainerElementsForIndex=function(t){var e,n,r;return[null===(e=this._modes.mode2Up.mode2UpLit.pageContainerCache[t])||void 0===e||null===(e=e.$container)||void 0===e?void 0:e[0],null===(n=this._modes.mode1Up.mode1UpLit.pageContainerCache[t])||void 0===n||null===(n=n.$container)||void 0===n?void 0:n[0]].concat((r=this.mode==this.constModeThumb?this.$(".pagediv".concat(t)).toArray():[],function(t){if(Array.isArray(t))return Je(t)}(r)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||function(t,e){if(t){if("string"==typeof t)return Je(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Je(t,e):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())).filter((function(t){return t}))},Object.defineProperty(Qe.prototype,"activeMode",{get:function(){return{1:this._modes.mode1Up,2:this._modes.mode2Up,3:this._modes.modeThumb}[this.mode]}}),Qe.util=t,Qe.prototype.extendParams=function(t,e){var n=Ye.extend({},e);if(void 0!==n.page){var r=this.book.parsePageString(n.page);isNaN(r)||(n.index=r),delete n.page}Ye.extend(t,n)},Qe.prototype.initParams=function(){var e={init:!0,pageFound:!1,fragmentChange:!1};if(void 0!==this.titleLeaf&&this.book.getNumLeafs()>2?e.index=this.book.leafNumToIndex(this.titleLeaf):e.index=0,this.defaults){var n=this.paramsFromFragment(this.defaults);void 0!==n.page&&(e.pageFound=!0),this.extendParams(e,n)}if(this.options.enablePageResume){var r=this.getResumeValue();null!==r&&(e.index!==r&&(e.fragmentChange=!0),e.index=r)}if(this.options.enableUrlPlugin){var i=this.paramsFromFragment(this.urlReadFragment());!Object.keys(i).length&&this.urlReadHashFragment()&&"history"===this.options.urlMode&&(i=this.paramsFromFragment(this.urlReadHashFragment())),Object.keys(i).length&&(void 0!==i.page&&(e.pageFound=!0),this.extendParams(e,i),e.fragmentChange=!0)}if(this.options.enableSearch&&(this.options.goToFirstResult=!e.pageFound,!this.options.initialSearchTerm))if(e.search)this.options.initialSearchTerm=e.search,this.searchTerm=e.search;else{var o=new URLSearchParams(this.readQueryString()).get("q");o&&(this.options.initialSearchTerm=t.decodeURIComponentPlus(o))}return this.suppressFragmentChange=!e.fragmentChange,e},Qe.prototype.getLocationSearch=function(){return window.location.search},Qe.prototype.getLocationHash=function(){return window.location.hash},Qe.prototype.readQueryString=function(){var t=this.getLocationSearch();if(t)return t;var e=this.getLocationHash(),n=e.search(/\?\w+=/);return n>-1?e.slice(n):""},Qe.prototype.getInitialMode=function(t){var e,n=Ye(window).width(),r=n&&n<=this.onePageMinBreakpoint;if(e=t.mode?t.mode:r?this.constMode1up:this.constMode2up,this.canSwitchToMode(e)||(e=this.constMode1up),this.options.defaults)try{e=function(t){var e={"mode/1up":1,"mode/2up":2,"mode/thumb":3};if(!(t in e))throw new p("Invalid mode string: ".concat(t));return e[t]}(this.options.defaults)}catch(t){}return e},Qe.prototype.init=function(){this.init.initComplete=!1,this.pageScale=this.reduce;var t=this.initParams();this.firstIndex=t.index?t.index:0,this.isTouchDevice=!!("ontouchstart"in window)||!!("msmaxtouchpoints"in window.navigator),this.refs.$br=Ye(this.el).empty().removeClass().addClass("ui-"+this.ui).addClass("br-ui-"+this.ui).addClass("BookReader"),this.isTouchDevice?this.refs.$br.addClass("touch"):this.refs.$br.addClass("no-touch"),this.refs.$brContainer=Ye("<div class='BRcontainer' dir='ltr'></div>"),this.refs.$br.append(this.refs.$brContainer),t.mode=this.getInitialMode(t),this.mode=t.mode,this.options.showToolbar&&this.initToolbar(this.mode,this.ui),this.options.showNavbar&&this.initNavbar(),this._components.navbar.switchNavbarControls(),this.resizeBRcontainer(),this.updateFromParams(t),this.initUIStrings(),this.bindNavigationHandlers(),this.setupKeyListeners(),this.lastScroll=(new Date).getTime(),this.refs.$brContainer.on("scroll",this,(function(t){t.data.lastScroll=(new Date).getTime(),t.data.constModeThumb==t.data.mode&&t.data.drawLeafsThrottled()})),this.options.autoResize&&(Ye(window).on("resize",this,(function(t){t.data.resize()})),Ye(window).on("orientationchange",this,function(t){t.data.resize()}.bind(this))),this.protected&&this.$(".BRicon.share").hide(),this.options.initialSearchTerm||(this.suppressFragmentChange=!1),this.options.startFullscreen&&this.enterFullscreen(!0),this.init.initComplete=!0,this.trigger(Qe.eventNames.PostInit)},Qe.prototype.trigger=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,r="BookReader:"+e;t.polyfillCustomEvent(window),window.dispatchEvent(new CustomEvent(r,{bubbles:!0,composed:!0,detail:{props:n}})),Ye(document).trigger(r,n)},Qe.prototype.bind=function(t,e){Ye(document).on("BookReader:"+t,e)},Qe.prototype.unbind=function(t,e){Ye(document).off("BookReader:"+t,e)},Qe.prototype.resize=function(){this.init.initComplete&&(this.resizeBRcontainer(),this._components.navbar.switchNavbarControls(),this.constMode1up==this.mode?"none"!=this.onePage.autofit?(this._modes.mode1Up.resizePageView(),this.centerPageView()):(this.centerPageView(),this.displayedIndices=[],this.drawLeafsThrottled()):this.constModeThumb==this.mode?this._modes.modeThumb.prepare():this._modes.mode2Up.resizePageView(),this.trigger(Qe.eventNames.resize))},Qe.prototype.setupKeyListeners=function(){var e=this;window.IntersectionObserver&&new IntersectionObserver((function(t){t.forEach((function(t){0===t.intersectionRatio?e.hasKeyFocus=!1:e.hasKeyFocus=!0}))}),{root:null,rootMargin:"0px",threshold:[0,.05,1]}).observe(this.refs.$br[0]),document.addEventListener("keydown",(function(n){if(e.hasKeyFocus&&!(n.getModifierState("Control")||n.getModifierState("Alt")||n.getModifierState("Meta")||n.getModifierState("Win")||t.isInputActive()))switch(n.key){case"Home":n.preventDefault(),e.first();break;case"End":n.preventDefault(),e.last();break;case"ArrowDown":case"PageDown":case"Down":e.constMode2up===e.mode&&(n.preventDefault(),e.next());break;case"ArrowUp":case"PageUp":case"Up":e.constMode2up===e.mode&&(n.preventDefault(),e.prev());break;case"ArrowLeft":case"Left":e.constModeThumb!=e.mode&&(n.preventDefault(),e.left());break;case"ArrowRight":case"Right":e.constModeThumb!=e.mode&&(n.preventDefault(),e.right());break;case"-":case"Subtract":n.preventDefault(),e.zoom(-1);break;case"+":case"=":case"Add":n.preventDefault(),e.zoom(1);break;case"F":case"f":n.preventDefault(),e.toggleFullscreen()}}))},Qe.prototype.drawLeafs=function(){this.constMode1up!=this.mode&&this.activeMode.drawLeafs()},Qe.prototype._createPageContainer=function(t){return new Ve._z(this.book.getPage(t,!1),{isProtected:this.protected,imageCache:this.imageCache,loadingImage:this.imagesBaseURL+"loading.gif"})},Qe.prototype.bindGestures=function(t){var e=this,n=1;t.unbind("touchmove").bind("touchmove",(function(t){t.originalEvent.cancelable&&(n=t.originalEvent.touches.length),t.stopPropagation()})),t.unbind("gesturechange").bind("gesturechange",(function(t){t.preventDefault(),2!==n||(new Date).getTime()-e.lastScroll<500||(t.originalEvent.scale>1.5?e.zoom(1):t.originalEvent.scale<.6&&e.zoom(-1))}))},Qe.prototype.drawLeafsThrottled=t.throttle(Qe.prototype.drawLeafs,250),Qe.prototype.zoom=function(t){var e;1==t?this.activeMode.zoom("in"):this.activeMode.zoom("out"),null===(e=this.textSelectionPlugin)||void 0===e||e.stopPageFlip(this.refs.$brContainer)},Qe.prototype.resizeBRcontainer=function(t){t?this.refs.$brContainer.animate({top:this.getToolBarHeight(),bottom:this.getFooterHeight()},this.constResizeAnimationDuration,"linear"):this.refs.$brContainer.css({top:this.getToolBarHeight(),bottom:this.getFooterHeight()})},Qe.prototype.centerPageView=function(){var t=this.refs.$brContainer.prop("scrollWidth"),e=this.refs.$brContainer.prop("clientWidth");t>e&&this.refs.$brContainer.prop("scrollLeft",(t-e)/2)},Qe.prototype.quantizeReduce=function(t,e){for(var n=e[0].reduce,r=Math.abs(t-n),i=1;i<e.length;i++){var o=Math.abs(t-e[i].reduce);o<r&&(r=o,n=e[i].reduce)}return n},Qe.prototype.nextReduce=function(t,e,n){if("in"===e){for(var r=0,i=1;i<n.length;i++)n[i].reduce<t&&(r=i);return n[r]}if("out"===e){for(var o=n.length-1,a=o,s=o;s>=0;s--)n[s].reduce>t&&(a=s);return n[a]}if("auto"===e){var u=n.find((function(t){return"auto"==t.autofit}));if(u)return u;for(var c=n.filter((function(t){var e=t.autofit;return"height"==e||"width"==e})),l=null,f=0;f<c.length;f++)(null===l||l.reduce<c[f].reduce)&&(l=c[f]);if(l)return l}else if("height"===e||"width"===e){var h=n.find((function(t){return t.autofit==e}));if(h)return h}return n[0]},Qe.prototype._reduceSort=function(t,e){return t.reduce-e.reduce},Qe.prototype.jumpToPage=function(t){var e=this.book.parsePageString(t);return void 0!==e&&(this.jumpToIndex(e),!0)},Qe.prototype._isIndexDisplayed=function(t){return this.displayedIndices?this.displayedIndices.includes(t):this.currentIndex()==t},Qe.prototype.jumpToIndex=function(t,e,n,r){var i=this.book.getPage(t);if(!i.isViewable&&i.unviewablesStart!=i.index){var o=this._isIndexDisplayed(i.unviewablesStart)?i.findNext({combineConsecutiveUnviewables:!0}).index:i.unviewablesStart;return this.jumpToIndex(o,e,n,r)}this.trigger(Qe.eventNames.stop),this.activeMode.jumpToIndex(t,e,n,r)},Qe.prototype.getPrevReadMode=function(t){return t===Qe.constMode1up||t===Qe.constMode2up?t:null===this.prevReadMode?Qe.constMode1up:void 0},Qe.prototype.switchMode=function(t){var e,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.suppressFragmentChange,a=void 0!==o&&o;if(i.init,i.pageFound,this.init.initComplete){if(t===this.mode)return;if(!this.canSwitchToMode(t))return}this.trigger(Qe.eventNames.stop),this.prevReadMode=this.getPrevReadMode(this.mode),this.mode!=t&&(null===(n=(r=this.activeMode).unprepare)||void 0===n||n.call(r)),this.mode=t,this.pageScale!==this.reduce&&(this.reduce=this.pageScale),this.constMode1up==t?this._modes.mode1Up.prepare():this.constModeThumb==t?(this.reduce=this.quantizeReduce(this.reduce,this.reductionFactors),this._modes.modeThumb.prepare()):this._modes.mode2Up.prepare(),this.suppressFragmentChange||a||this.trigger(Qe.eventNames.fragmentChange);var s=t+"PageViewSelected";this.trigger(Qe.eventNames[s]),null===(e=this.textSelectionPlugin)||void 0===e||e.stopPageFlip(this.refs.$brContainer)},Qe.prototype.updateBrClasses=function(){var t={};t[this.constMode1up]="BRmode1up",t[this.constMode2up]="BRmode2up",t[this.constModeThumb]="BRmodeThumb",this.refs.$br.removeClass("BRmode1up BRmode2up BRmodeThumb").addClass(t[this.mode]),this.isFullscreen()?(this.refs.$br.addClass("fullscreenActive"),Ye(document.body).addClass("BRfullscreenActive")):(this.refs.$br.removeClass("fullscreenActive"),Ye(document.body).removeClass("BRfullscreenActive"))},Qe.prototype.isFullscreen=function(){return this.isFullscreenActive},Qe.prototype.toggleFullscreen=Ze(qe().mark((function t(){var e,n=arguments;return qe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=!(n.length>0&&void 0!==n[0])||n[0],!this.isFullscreen()){t.next=6;break}return t.next=4,this.exitFullScreen();case 4:t.next=8;break;case 6:return t.next=8,this.enterFullscreen(e);case 8:case"end":return t.stop()}}),t,this)}))),Qe.prototype.enterFullscreen=Ze(qe().mark((function t(){var e,n,r,i=this,o=arguments;return qe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=!(o.length>0&&void 0!==o[0])||o[0],this.refs.$br.addClass("BRfullscreenAnimation"),r=this.currentIndex(),n&&(this._fullscreenCloseHandler=function(t){27===t.keyCode&&i.toggleFullscreen()},Ye(document).on("keyup",this._fullscreenCloseHandler)),Ye(window).width()<=this.onePageMinBreakpoint&&this.switchMode(this.constMode1up),this.isFullscreenActive=!0,this.updateBrClasses(),!(this.activeMode instanceof qt)){t.next=13;break}return this.activeMode.mode1UpLit.scale=this.activeMode.mode1UpLit.computeDefaultScale(this.book.getPage(r)),this.activeMode.mode1UpLit.requestUpdate(),t.next=13,this.activeMode.mode1UpLit.updateComplete;case 13:return this.jumpToIndex(r),null===(e=this.textSelectionPlugin)||void 0===e||e.stopPageFlip(this.refs.$brContainer),this.trigger(Qe.eventNames.fragmentChange),this.trigger(Qe.eventNames.fullscreenToggled),t.next=19,new Promise((function(t){return setTimeout(t,0)}));case 19:this.resize(),this.refs.$br.removeClass("BRfullscreenAnimation");case 21:case"end":return t.stop()}}),t,this)}))),Qe.prototype.exitFullScreen=Ze(qe().mark((function t(){var e,n;return qe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.refs.$br.addClass("BRfullscreenAnimation"),Ye(document).off("keyup",this._fullscreenCloseHandler),n=Ye(window).width(),this.options.controls.twoPage.visible&&n<=this.onePageMinBreakpoint&&this.switchMode(this.constMode2up),this.isFullscreenActive=!1,this.trigger(Qe.eventNames.fullscreenToggled),this.updateBrClasses(),t.next=10,new Promise((function(t){return setTimeout(t,0)}));case 10:if(this.resize(),!(this.activeMode instanceof qt)){t.next=16;break}return this.activeMode.mode1UpLit.scale=this.activeMode.mode1UpLit.computeDefaultScale(this.book.getPage(this.currentIndex())),this.activeMode.mode1UpLit.requestUpdate(),t.next=16,this.activeMode.mode1UpLit.updateComplete;case 16:null===(e=this.textSelectionPlugin)||void 0===e||e.stopPageFlip(this.refs.$brContainer),this.trigger(Qe.eventNames.fragmentChange),this.refs.$br.removeClass("BRfullscreenAnimation");case 19:case"end":return t.stop()}}),t,this)}))),Qe.prototype.currentIndex=function(){if(this.mode==this.constMode1up||this.mode==this.constModeThumb)return this.firstIndex;if(this.mode==this.constMode2up)return t.clamp(this.firstIndex,0,this.book.getNumLeafs()-1);throw"currentIndex called for unimplemented mode "+this.mode},Qe.prototype.updateFirstIndex=function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).suppressFragmentChange,n=void 0!==e&&e;this.firstIndex!==t&&(this.firstIndex=t,this.suppressFragmentChange||n||this.trigger(Qe.eventNames.fragmentChange),this.options.initialSearchTerm&&!n&&(this.suppressFragmentChange=!1),this.trigger(Qe.eventNames.pageChanged),this.trigger(Qe.eventNames.userAction),this._components.navbar.updateNavIndexThrottled(t))},Qe.prototype.right=function(){"rl"!=this.pageProgression?this.next():this.prev()},Qe.prototype.rightmost=function(){"rl"!=this.pageProgression?this.last():this.first()},Qe.prototype.left=function(){"rl"!=this.pageProgression?this.prev():this.next()},Qe.prototype.leftmost=function(){"rl"!=this.pageProgression?this.first():this.last()},Qe.prototype.next=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).triggerStop,e=void 0===t||t;this.constMode2up==this.mode?(e&&this.trigger(Qe.eventNames.stop),this._modes.mode2Up.mode2UpLit.flipAnimation("next")):this.firstIndex<this.book.getNumLeafs()-1&&this.jumpToIndex(this.firstIndex+1)},Qe.prototype.prev=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).triggerStop,e=void 0===t||t;this.firstIndex<1||(this.constMode2up==this.mode?(e&&this.trigger(Qe.eventNames.stop),this._modes.mode2Up.mode2UpLit.flipAnimation("prev")):this.firstIndex>=1&&this.jumpToIndex(this.firstIndex-1))},Qe.prototype.first=function(){this.jumpToIndex(0)},Qe.prototype.last=function(){this.jumpToIndex(this.book.getNumLeafs()-1)},Qe.prototype.initNavbar=a.prototype.init,tn(a,"_components.navbar","init","initNavbar"),Qe.prototype.buildToolbarElement=b.prototype.buildToolbarElement,tn(b,"_components.toolbar","buildToolbarElement"),Qe.prototype.initToolbar=b.prototype.initToolbar,tn(b,"_components.toolbar","initToolbar"),Qe.prototype.buildShareDiv=b.prototype.buildShareDiv,tn(b,"_components.toolbar","buildShareDiv"),Qe.prototype.buildInfoDiv=b.prototype.buildInfoDiv,tn(b,"_components.toolbar","buildInfoDiv"),Qe.prototype.getToolBarHeight=b.prototype.getToolBarHeight,tn(b,"_components.toolbar","getToolBarHeight"),Qe.prototype.bindNavigationHandlers=function(){var t=this,e=this,n=this.$(".BRicon"),r={book_left:function(){t.trigger(Qe.eventNames.stop),t.left()},book_right:function(){t.trigger(Qe.eventNames.stop),t.right()},book_top:this.first.bind(this),book_bottom:this.last.bind(this),book_leftmost:this.leftmost.bind(this),book_rightmost:this.rightmost.bind(this),onepg:function(){t.switchMode(e.constMode1up)},thumb:function(){t.switchMode(e.constModeThumb)},twopg:function(){t.switchMode(e.constMode2up)},zoom_in:function(){t.trigger(Qe.eventNames.stop),t.zoom(1),t.trigger(Qe.eventNames.zoomIn)},zoom_out:function(){t.trigger(Qe.eventNames.stop),t.zoom(-1),t.trigger(Qe.eventNames.zoomOut)},full:function(){if("embed"==t.ui){var e=t.$(".BRembedreturn a").attr("href");window.open(e)}else t.toggleFullscreen()}};this.$("nav.BRcontrols li button").on("click",(function(){t.trigger(Qe.eventNames.userAction)}));var i=function(t){n.filter(".".concat(t)).on("click.bindNavigationHandlers",(function(){return r[t](),!1}))};for(var o in r)i(o);var a=this.$(".BRnavCntlBtm"),s=this.$(".BRnavCntlTop");this.$(".BRnavCntl").click((function(){var t=[];a.hasClass("BRdn")?(e.refs.$BRtoolbar&&t.push(e.refs.$BRtoolbar.animate({top:-1*e.getToolBarHeight()}).promise()),t.push(e.$(".BRfooter").animate({bottom:-1*e.getFooterHeight()}).promise()),a.addClass("BRup").removeClass("BRdn"),s.addClass("BRdn").removeClass("BRup"),e.$(".BRnavCntlBtm.BRnavCntl").animate({height:"45px"}),e.$(".BRnavCntl").delay(1e3).animate({opacity:.75},1e3)):(e.refs.$BRtoolbar&&t.push(e.refs.$BRtoolbar.animate({top:0}).promise()),t.push(e.$(".BRfooter").animate({bottom:0}).promise()),a.addClass("BRdn").removeClass("BRup"),s.addClass("BRup").removeClass("BRdn"),e.$(".BRnavCntlBtm.BRnavCntl").animate({height:"30px"}),e.$(".BRvavCntl").animate({opacity:1})),Ye.when.apply(Ye,t).done((function(){e.mode==e.constMode2up&&null!=e.twoPage.autofit&&"none"!=e.twoPage.autofit||e.mode==e.constMode1up&&null!=e.onePage.autofit&&"none"!=e.onePage.autofit?e.resize():e.resizeBRcontainer()}))})),a.on("mouseover",(function(){Ye(this).hasClass("BRup")&&e.$(".BRnavCntl").animate({opacity:1},250)})).on("mouseleave",(function(){Ye(this).hasClass("BRup")&&e.$(".BRnavCntl").animate({opacity:.75},250)})),s.on("mouseover",(function(){Ye(this).hasClass("BRdn")&&e.$(".BRnavCntl").animate({opacity:1},250)})).on("mouseleave",(function(){Ye(this).hasClass("BRdn")&&e.$(".BRnavCntl").animate({opacity:.75},250)}))},Qe.prototype.getPageURI=T.prototype.getPageURI,tn(T,"book","getPageURI"),Qe.prototype.updateFromParams=function(t){var e=t.mode,n=void 0===e?0:e,r=t.init,i=void 0!==r&&r,o=t.fragmentChange,a=void 0!==o&&o;n&&this.switchMode(n,{init:i,suppressFragmentChange:!a}),void 0!==t.index?t.index!=this.currentIndex()&&this.jumpToIndex(t.index):void 0!==t.page&&t.page!=this.book.getPageNum(this.currentIndex())&&this.jumpToPage(t.page),this.enableSearch&&void 0!==t.search&&this.searchTerm!==t.search&&this.$(".BRsearchInput").val(t.search),this.enableThemesPlugin&&void 0!==t.theme&&this.updateTheme(t.theme)},Qe.prototype.canSwitchToMode=function(t){return t!=this.constMode2up&&t!=this.constModeThumb||!(this.book.getNumLeafs()<2)},Qe.prototype._getPageURI=function(t,e,n){var r=this.book.getPage(t,!1);return r?(void 0===e&&(e=r.height/this.twoPage.height),r.getURI(e,n)):this.imagesBaseURL+"transparent.png"},Qe.prototype.showProgressPopup=function(t,e){var n=this;if(!this.popup){if(this.popup=document.createElement("div"),Ye(this.popup).prop("className","BRprogresspopup"),"function"==typeof e){var r=document.createElement("button");r.setAttribute("title","close"),r.setAttribute("class","close-popup");var i=document.createElement("span");i.setAttribute("class","icon icon-close-dark"),Ye(r).append(i),r.addEventListener("click",(function(){e(),n.removeProgressPopup()})),Ye(this.popup).append(r)}var o=document.createElement("div");if(Ye(o).css({height:"20px"}).prop("className","BRprogressbar"),Ye(this.popup).append(o),t){var a=document.createElement("div");a.innerHTML=t,Ye(this.popup).append(a)}Ye(this.popup).appendTo(this.refs.$br)}},Qe.prototype.removeProgressPopup=function(){Ye(this.popup).remove(),this.$(".BRprogresspopup").remove(),this.popup=null},Qe.prototype.initUIStrings=function(){var t={".logo":"Go to Archive.org",".zoom_in":"Zoom in",".zoom_out":"Zoom out",".onepg":"One-page view",".twopg":"Two-page view",".thumb":"Thumbnail view",".print":"Print this page",".embed":"Embed BookReader",".link":"Link to this book (and page)",".bookmark":"Bookmark this page",".share":"Share this book",".info":"About this book",".full":"Toggle fullscreen",".book_left":"Flip left",".book_right":"Flip right",".play":"Play",".pause":"Pause",".BRdn":"Show/hide nav bar",".BRup":"Show/hide nav bar",".book_top":"First page",".book_bottom":"Last page",".book_leftmost":"First page",".book_rightmost":"Last page"};for(var e in"rl"==this.pageProgression&&(t[".book_leftmost"]="Last page",t[".book_rightmost"]="First page"),t)this.$(e).prop("title",t[e])},Qe.prototype.reloadImages=function(){this.refs.$brContainer.find("img").each((function(t,e){if(!e.complete||0===e.naturalHeight){var n=e.src;e.src="",setTimeout((function(){e.src=n}),1e3)}}))},Qe.prototype.getFooterHeight=function(){var t=this.mode==this.constMode2up?this.refs.$BRfooter:this.refs.$BRnav;if(t&&this.refs.$BRfooter){var e=t.outerHeight(),n=parseInt(this.refs.$BRfooter.css("bottom"));if(!isNaN(e)&&!isNaN(n))return e+n}return 0},Qe.prototype.paramsFromCurrent=function(){var t={},e=this.currentIndex(),n=this.book.getPageNum(e);return(0===n||n)&&(t.page=n),t.index=e,t.mode=this.mode,this.isFullscreenActive&&(t.view="theater"),this.enableSearch&&(t.search=this.searchTerm),t},Qe.prototype.paramsFromFragment=function(e){var n={};"#"==e.substr(0,1)&&(e=e.substr(1));var r=parseInt(/^\d+$/.exec(e));if(!isNaN(r))return n.index=r,n;for(var i=e.split("/"),o={},a=0;a<i.length;a+=2)o[i[a]]=i[a+1];return"1up"==o.mode?n.mode=this.constMode1up:"2up"==o.mode?n.mode=this.constMode2up:"thumb"==o.mode&&(n.mode=this.constModeThumb),void 0!==o.page&&(n.page=decodeURIComponent(o.page)),null!=o.search&&(n.search=t.decodeURIComponentPlus(o.search)),null!=o.theme&&(n.theme=o.theme),n},Qe.prototype.fragmentFromParams=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hash",r=[];if(void 0!==e.page?r.push("page",encodeURIComponent(e.page)):void 0!==e.index&&r.push("page","n"+e.index),void 0!==e.mode)if(e.mode==this.constMode1up)r.push("mode","1up");else if(e.mode==this.constMode2up)r.push("mode","2up");else{if(e.mode!=this.constModeThumb)throw"fragmentFromParams called with unknown mode "+e.mode;r.push("mode","thumb")}return e.search&&"hash"===n&&r.push("search",t.encodeURIComponentPlus(e.search)),r.join("/")},Qe.prototype.queryStringFromParams=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"hash",r=new URLSearchParams(e);t.view?r.set("view",t.view):r.delete("view"),t.search&&"history"===n&&r.set("q",t.search);var i=r.toString();return i?"?"+i:""},Qe.prototype.$=function(t){return this.refs.$br.find(t)},window.BookReader=Qe}(),i=r.O(i)}();
|
3
3
|
//# sourceMappingURL=BookReader.js.map
|