@cu-mkp/editioncrafter 1.0.2 → 1.0.4-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/editioncrafter.js +65802 -0
- package/dist/editioncrafter.umd.cjs +553 -0
- package/dist/es/src/action/DiplomaticActions.js +9 -11
- package/dist/es/src/action/DocumentActions.js +164 -154
- package/dist/es/src/action/GlossaryActions.js +9 -11
- package/dist/es/src/action/initialState/diplomaticInitialState.js +2 -2
- package/dist/es/src/action/initialState/documentInitialState.js +9 -12
- package/dist/es/src/action/initialState/glossaryInitialState.js +3 -3
- package/dist/es/src/action/rootReducer.js +31 -29
- package/dist/es/src/component/AlphabetLinks.js +44 -66
- package/dist/es/src/component/CustomizedTooltops.js +101 -110
- package/dist/es/src/component/DiploMatic.js +64 -91
- package/dist/es/src/component/DocumentView.js +442 -366
- package/dist/es/src/component/EditorComment.js +51 -75
- package/dist/es/src/component/ErrorBoundary.js +37 -61
- package/dist/es/src/component/FigureImage.js +56 -67
- package/dist/es/src/component/GlossaryView.js +157 -149
- package/dist/es/src/component/HelpPopper.js +96 -78
- package/dist/es/src/component/ImageGridView.js +184 -249
- package/dist/es/src/component/ImageView.js +155 -165
- package/dist/es/src/component/ImageZoomControl.js +19 -38
- package/dist/es/src/component/JumpToFolio.js +56 -60
- package/dist/es/src/component/Navigation.js +374 -328
- package/dist/es/src/component/Pagination.js +73 -70
- package/dist/es/src/component/Parser.js +11 -32
- package/dist/es/src/component/RingSpinner.js +31 -32
- package/dist/es/src/component/RouteListener.js +30 -21
- package/dist/es/src/component/SeaDragonComponent.js +33 -56
- package/dist/es/src/component/SinglePaneView.js +15 -33
- package/dist/es/src/component/SplitPaneView.js +151 -170
- package/dist/es/src/component/TranscriptionView.js +190 -179
- package/dist/es/src/component/Watermark.js +21 -30
- package/dist/es/src/component/XMLView.js +60 -82
- package/dist/es/src/hooks/useIsWidthUp.js +9 -7
- package/dist/es/src/icons/ByIcon.js +16 -16
- package/dist/es/src/icons/CcIcon.js +16 -16
- package/dist/es/src/icons/NcIcon.js +16 -16
- package/dist/es/src/icons/SaIcon.js +16 -16
- package/dist/es/src/icons/SideMenuIconLeft.js +30 -38
- package/dist/es/src/icons/SideMenuIconRight.js +32 -38
- package/dist/es/src/index.js +21 -20
- package/dist/es/src/lib/copyObject.js +3 -2
- package/dist/es/src/lib/registerServiceWorker.js +77 -54
- package/dist/es/src/model/DocumentHelper.js +7 -6
- package/dist/es/src/model/Folio.js +64 -86
- package/dist/es/src/model/ReduxStore.js +32 -78
- package/dist/es/src/model/folioLayout.js +275 -280
- package/dist/es/src/saga/RouteListenerSaga.js +89 -193
- package/dist/es/src/saga/rootSaga.js +9 -16
- package/dist/es/src/scss/_imageView.scss +1 -1
- package/dist/es/src/scss/_navigation.scss +1 -1
- package/dist/es/src/scss/editioncrafter.scss +1 -1
- package/dist/style.css +1 -0
- package/package.json +36 -51
- package/dist/editioncrafter.min.js +0 -2
- package/dist/editioncrafter.min.js.LICENSE.txt +0 -144
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see editioncrafter.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.EditionCrafter=t(require("react"),require("react-dom")):e.EditionCrafter=t(e.React,e.ReactDOM)}(self,((e,t)=>(()=>{var n={74:function(e,t,n){var r=["widget","force"],i=["draft"];function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=p(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function a(){return a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=S(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},a.apply(this,arguments)}function s(e){return function(e){if(Array.isArray(e))return h(e)}(e)||l(e)||p(e)||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 l(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function c(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function u(e,t){return f(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||p(e,t)||d()}function d(){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 p(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e){if(Array.isArray(e))return e}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,C(r.key),r)}}function v(e,t,n){return t&&g(e.prototype,t),n&&g(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function w(e){var t=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(e){return!1}}();return function(){var n,r=S(e);if(t){var i=S(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return x(e)}(this,n)}}function x(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e,t,n){return(t=C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}e.exports=function(){"use strict";var e,t,h,g,b,E,C,k,O,_,R=Object.defineProperty,A=function(e,t,n){return t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},D=function(e,t,n){return A(e,"symbol"!=typeof t?t+"":t,n),n},I={},M=[],L=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function j(e,t){for(var n in t)e[n]=t[n];return e}function N(e){var t=e.parentNode;t&&t.removeChild(e)}function F(e,t,n){var r,i,o,a={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?g.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return B(e,a,r,i,null)}function B(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++E:i};return null==i&&null!=b.vnode&&b.vnode(o),o}function z(){return{current:null}}function H(e){return e.children}function U(e,t){this.props=e,this.context=t}function V(e,t){if(null==t)return e.__?V(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?V(e):null}function W(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return W(e)}}function G(e){(!e.__d&&(e.__d=!0)&&C.push(e)&&!q.__r++||O!==b.debounceRendering)&&((O=b.debounceRendering)||k)(q)}function q(){for(var e;q.__r=C.length;)e=C.sort((function(e,t){return e.__v.__b-t.__v.__b})),C=[],e.some((function(e){var t,n,r,i,o,a;e.__d&&(o=(i=(t=e).__v).__e,(a=t.__P)&&(n=[],(r=j({},i)).__v=i.__v+1,ne(a,i,r,t.__n,void 0!==a.ownerSVGElement,null!=i.__h?[o]:null,n,null==o?V(i):o,i.__h),re(n,i),i.__e!=o&&W(i)))}))}function X(e,t,n,r,i,o,a,s,l,c){var u,d,p,h,f,m,g,v=r&&r.__k||M,y=v.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(h=n.__k[u]=null==(h=t[u])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?B(null,h,null,null,h):Array.isArray(h)?B(H,{children:h},null,null,null):h.__b>0?B(h.type,h.props,h.key,null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(p=v[u])||p&&h.key==p.key&&h.type===p.type)v[u]=void 0;else for(d=0;d<y;d++){if((p=v[d])&&h.key==p.key&&h.type===p.type){v[d]=void 0;break}p=null}ne(e,h,p=p||I,i,o,a,s,l,c),f=h.__e,(d=h.ref)&&p.ref!=d&&(g||(g=[]),p.ref&&g.push(p.ref,null,h),g.push(d,h.__c||f,h)),null!=f?(null==m&&(m=f),"function"==typeof h.type&&h.__k===p.__k?h.__d=l=Z(h,l,e):l=K(e,h,p,v,f,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=V(p))}for(n.__e=m,u=y;u--;)null!=v[u]&&("function"==typeof n.type&&null!=v[u].__e&&v[u].__e==n.__d&&(n.__d=V(r,u+1)),ae(v[u],v[u]));if(g)for(u=0;u<g.length;u++)oe(g[u],g[++u],g[++u])}function Z(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?Z(r,t,n):K(n,r,r,i,r.__e,t));return t}function Y(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){Y(e,t)})):t.push(e)),t}function K(e,t,n,r,i,o){var a,s,l;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),a=null;else{for(s=o,l=0;(s=s.nextSibling)&&l<r.length;l+=2)if(s==i)break e;e.insertBefore(i,o),a=o}return void 0!==a?a:i.nextSibling}function J(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||$(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||$(e,o,t[o],n[o],r)}function Q(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||L.test(t)?n:n+"px"}function $(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Q(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Q(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?te:ee,o):e.removeEventListener(t,o?te:ee,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function ee(e){this.l[e.type+!1](b.event?b.event(e):e)}function te(e){this.l[e.type+!0](b.event?b.event(e):e)}function ne(e,t,n,r,i,o,a,s,l){var c,u,d,p,h,f,m,g,v,y,w,x=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(c=b.__b)&&c(t);try{e:if("function"==typeof x){if(g=t.props,v=(c=x.contextType)&&r[c.__c],y=c?v?v.props.value:c.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in x&&x.prototype.render?t.__c=u=new x(g,y):(t.__c=u=new U(g,y),u.constructor=x,u.render=se),v&&v.sub(u),u.props=g,u.state||(u.state={}),u.context=y,u.__n=r,d=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=x.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=j({},u.__s)),j(u.__s,x.getDerivedStateFromProps(g,u.__s))),p=u.props,h=u.state,d)null==x.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==x.getDerivedStateFromProps&&g!==p&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,y),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,y)||t.__v===n.__v){u.props=g,u.state=u.__s,t.__v!==n.__v&&(u.__d=!1),u.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),u.__h.length&&a.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,y),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(p,h,f)}))}u.context=y,u.props=g,u.state=u.__s,(c=b.__r)&&c(t),u.__d=!1,u.__v=t,u.__P=e,c=u.render(u.props,u.state,u.context),u.state=u.__s,null!=u.getChildContext&&(r=j(j({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(f=u.getSnapshotBeforeUpdate(p,h)),w=null!=c&&c.type===H&&null==c.key?c.props.children:c,X(e,Array.isArray(w)?w:[w],t,n,r,i,o,a,s,l),u.base=t.__e,t.__h=null,u.__h.length&&a.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=ie(n.__e,t,n,r,i,o,a,l);(c=b.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=s,t.__h=!!l,o[o.indexOf(s)]=null),b.__e(e,t,n)}}function re(e,t){b.__c&&b.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){b.__e(e,t.__v)}}))}function ie(e,t,n,r,i,o,a,s){var l,c,u,d=n.props,p=t.props,h=t.type,f=0;if("svg"===h&&(i=!0),null!=o)for(;f<o.length;f++)if((l=o[f])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,o[f]=null;break}if(null==e){if(null===h)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,p.is&&p),o=null,s=!1}if(null===h)d===p||s&&e.data===p||(e.data=p);else{if(o=o&&g.call(e.childNodes),c=(d=n.props||I).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!s){if(null!=o)for(d={},f=0;f<e.attributes.length;f++)d[e.attributes[f].name]=e.attributes[f].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(J(e,p,d,i,s),u)t.__k=[];else if(f=t.props.children,X(e,Array.isArray(f)?f:[f],t,n,r,i&&"foreignObject"!==h,o,a,o?o[0]:n.__k&&V(n,0),s),null!=o)for(f=o.length;f--;)null!=o[f]&&N(o[f]);s||("value"in p&&void 0!==(f=p.value)&&(f!==d.value||f!==e.value||"progress"===h&&!f)&&$(e,"value",f,d.value,!1),"checked"in p&&void 0!==(f=p.checked)&&f!==e.checked&&$(e,"checked",f,d.checked,!1))}return e}function oe(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){b.__e(e,n)}}function ae(e,t,n){var r,i;if(b.unmount&&b.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||oe(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){b.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&ae(r[i],t,"function"!=typeof e.type);n||null==e.__e||N(e.__e),e.__e=e.__d=void 0}function se(e,t,n){return this.constructor(e,n)}function le(e,t,n){var r,i,o;b.__&&b.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],ne(t,e=(!r&&n||t).__k=F(H,null,[e]),i||I,I,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?g.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),re(o,e)}function ce(e,t){le(e,t,ce)}function ue(e,t,n){var r,i,o,a=j({},e.props);for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=t[o];return arguments.length>2&&(a.children=arguments.length>3?g.call(arguments,2):n),B(e.type,a,r||e.key,i||e.ref,null)}function de(e,t){var n={__c:t="__cC"+_++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(G)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}g=M.slice,b={__e:function(e,t){for(var n,r,i;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(e)),i=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),i=n.__d),i)return n.__E=n}catch(t){e=t}throw e}},E=0,U.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=j({},this.state),"function"==typeof e&&(e=e(j({},n),this.props)),e&&j(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),G(this))},U.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),G(this))},U.prototype.render=H,C=[],k="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,q.__r=0,_=0;var pe,he,fe,me=0,ge=[],ve=b.__b,ye=b.__r,be=b.diffed,we=b.__c,xe=b.unmount;function Se(e,t){b.__h&&b.__h(he,e,me||t),me=0;var n=he.__H||(he.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Ee(e){return me=1,Te(Be,e)}function Te(e,t,n){var r=Se(pe++,2);return r.t=e,r.__c||(r.__=[n?n(t):Be(void 0,t),function(e){var t=r.t(r.__[0],e);r.__[0]!==t&&(r.__=[t,r.__[1]],r.__c.setState({}))}],r.__c=he),r.__}function Pe(e,t){var n=Se(pe++,3);!b.__s&&Fe(n.__H,t)&&(n.__=e,n.__H=t,he.__H.__h.push(n))}function Ce(e,t){var n=Se(pe++,4);!b.__s&&Fe(n.__H,t)&&(n.__=e,n.__H=t,he.__h.push(n))}function ke(e){return me=5,_e((function(){return{current:e}}),[])}function Oe(e,t,n){me=6,Ce((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))}function _e(e,t){var n=Se(pe++,7);return Fe(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Re(e,t){return me=8,_e((function(){return e}),t)}function Ae(e){var t=he.context[e.__c],n=Se(pe++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(he)),t.props.value):e.__}function De(e,t){b.useDebugValue&&b.useDebugValue(t?t(e):e)}function Ie(e){var t=Se(pe++,10),n=Ee();return t.__=e,he.componentDidCatch||(he.componentDidCatch=function(e){t.__&&t.__(e),n[1](e)}),[n[0],function(){n[1](void 0)}]}function Me(){var e;for(ge.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=ge.pop();)if(e.__P)try{e.__H.__h.forEach(je),e.__H.__h.forEach(Ne),e.__H.__h=[]}catch(t){e.__H.__h=[],b.__e(t,e.__v)}}b.__b=function(e){he=null,ve&&ve(e)},b.__r=function(e){ye&&ye(e),pe=0;var t=(he=e.__c).__H;t&&(t.__h.forEach(je),t.__h.forEach(Ne),t.__h=[])},b.diffed=function(e){be&&be(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==ge.push(t)&&fe===b.requestAnimationFrame||((fe=b.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),Le&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Le&&(t=requestAnimationFrame(n))})(Me)),he=null},b.__c=function(e,t){t.some((function(e){try{e.__h.forEach(je),e.__h=e.__h.filter((function(e){return!e.__||Ne(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],b.__e(n,e.__v)}})),we&&we(e,t)},b.unmount=function(e){xe&&xe(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{je(e)}catch(e){t=e}})),t&&b.__e(t,n.__v))};var Le="function"==typeof requestAnimationFrame;function je(e){var t=he,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),he=t}function Ne(e){var t=he;e.__c=e.__(),he=t}function Fe(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Be(e,t){return"function"==typeof t?t(e):t}function ze(e,t){for(var n in t)e[n]=t[n];return e}function He(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Ue(e){this.props=e}function Ve(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:He(this.props,e)}function r(t){return this.shouldComponentUpdate=n,F(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Ue.prototype=new U).isPureReactComponent=!0,Ue.prototype.shouldComponentUpdate=function(e,t){return He(this.props,e)||He(this.state,t)};var We=b.__b;b.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),We&&We(e)};var Ge="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function qe(e){function t(t,n){var r=ze({},t);return delete r.ref,e(r,(n=t.ref||n)&&("object"!=typeof n||"current"in n)?n:null)}return t.$$typeof=Ge,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Xe=function(e,t){return null==e?null:Y(Y(e).map(t))},Ze={map:Xe,forEach:Xe,count:function(e){return e?Y(e).length:0},only:function(e){var t=Y(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:Y},Ye=b.__e;b.__e=function(e,t,n){if(e.then)for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);Ye(e,t,n)};var Ke=b.unmount;function Je(){this.__u=0,this.t=null,this.__b=null}function Qe(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function $e(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return F(n,i)}return i.displayName="Lazy",i.__f=!0,i}function et(){this.u=null,this.o=null}b.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Ke&&Ke(e)},(Je.prototype=new U).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Qe(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(! --r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(a,a)},Je.prototype.componentWillUnmount=function(){this.t=[]},Je.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=ze({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)}))),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__e&&F(H,null,e.fallback);return i&&(i.__h=null),[F(H,null,t.__e?null:e.children),i]};var tt=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function nt(e){return this.getChildContext=function(){return e.context},e.children}function rt(e){var t=this,n=e.i;t.componentWillUnmount=function(){le(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),le(F(nt,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function it(e,t){return F(rt,{__v:e,i:t})}(et.prototype=new U).__e=function(e){var t=this,n=Qe(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),tt(t,e,r)):i()};n?n(o):o()}},et.prototype.render=function(e){this.u=null,this.o=new Map;var t=Y(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},et.prototype.componentDidUpdate=et.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){tt(e,n,t)}))};var ot="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,at=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,st="undefined"!=typeof document,lt=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function ct(e,t,n){return null==t.__k&&(t.textContent=""),le(e,t),"function"==typeof n&&n(),e?e.__c:null}function ut(e,t,n){return ce(e,t),"function"==typeof n&&n(),e?e.__c:null}U.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(U.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var dt=b.event;function pt(){}function ht(){return this.cancelBubble}function ft(){return this.defaultPrevented}b.event=function(e){return dt&&(e=dt(e)),e.persist=pt,e.isPropagationStopped=ht,e.isDefaultPrevented=ft,e.nativeEvent=e};var mt,gt={configurable:!0,get:function(){return this.class}},vt=b.vnode;b.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var a=n[o];st&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==a||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===a?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!lt(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():i&&at.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===a&&(a=void 0),r[o]=a)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=Y(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=Y(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(gt.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",gt))}e.$$typeof=ot,vt&&vt(e)};var yt=b.__r;b.__r=function(e){yt&&yt(e),mt=e.__c};var bt={ReactCurrentDispatcher:{current:{readContext:function(e){return mt.__n[e.__c].props.value}}}},wt="17.0.2";function xt(e){return F.bind(null,e)}function St(e){return!!e&&e.$$typeof===ot}function Et(e){return St(e)?ue.apply(null,arguments):e}function Tt(e){return!!e.__k&&(le(null,e),!0)}function Pt(e){return e&&(e.base||1===e.nodeType&&e)||null}var Ct=function(e,t){return e(t)},kt=function(e,t){return e(t)},Ot=H,_t={useState:Ee,useReducer:Te,useEffect:Pe,useLayoutEffect:Ce,useRef:ke,useImperativeHandle:Oe,useMemo:_e,useCallback:Re,useContext:Ae,useDebugValue:De,version:"17.0.2",Children:Ze,render:ct,hydrate:ut,unmountComponentAtNode:Tt,createPortal:it,createElement:F,createContext:de,createFactory:xt,cloneElement:Et,createRef:z,Fragment:H,isValidElement:St,findDOMNode:Pt,Component:U,PureComponent:Ue,memo:Ve,forwardRef:qe,flushSync:kt,unstable_batchedUpdates:Ct,StrictMode:H,Suspense:Je,SuspenseList:et,lazy:$e,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:bt},Rt=Object.freeze((P(e={__proto__:null},Symbol.toStringTag,"Module"),P(e,"default",_t),P(e,"version",wt),P(e,"Children",Ze),P(e,"render",ct),P(e,"hydrate",ut),P(e,"unmountComponentAtNode",Tt),P(e,"createPortal",it),P(e,"createFactory",xt),P(e,"cloneElement",Et),P(e,"isValidElement",St),P(e,"findDOMNode",Pt),P(e,"PureComponent",Ue),P(e,"memo",Ve),P(e,"forwardRef",qe),P(e,"flushSync",kt),P(e,"unstable_batchedUpdates",Ct),P(e,"StrictMode",Ot),P(e,"Suspense",Je),P(e,"SuspenseList",et),P(e,"lazy",$e),P(e,"__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",bt),P(e,"createElement",F),P(e,"createContext",de),P(e,"createRef",z),P(e,"Fragment",H),P(e,"Component",U),P(e,"useState",Ee),P(e,"useReducer",Te),P(e,"useEffect",Pe),P(e,"useLayoutEffect",Ce),P(e,"useRef",ke),P(e,"useImperativeHandle",Oe),P(e,"useMemo",_e),P(e,"useCallback",Re),P(e,"useContext",Ae),P(e,"useDebugValue",De),P(e,"useErrorBoundary",Ie),e)),At="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function Dt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function It(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}var Mt={exports:{}};function Lt(){}Lt.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=n.length;r<i;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],i=[];if(r&&t)for(var o=0,a=r.length;o<a;o++)r[o].fn!==t&&r[o].fn._!==t&&i.push(r[o]);return i.length?n[e]=i:delete n[e],this}},Mt.exports=Lt,Mt.exports.TinyEmitter=Lt;var jt=Mt.exports,Nt={exports:{}},Ft={},Bt=It(Rt),zt={exports:{}},Ht="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function Ut(){}function Vt(){}Vt.resetWarningCache=Ut;var Wt=function(){function e(e,t,n,r,i,o){if(o!==Ht){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Vt,resetWarningCache:Ut};return n.PropTypes=n,n};function Gt(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Gt(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function qt(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Gt(e))&&(r&&(r+=" "),r+=t);return r}zt.exports=Wt();var Xt=It(Object.freeze((P(t={__proto__:null},Symbol.toStringTag,"Module"),P(t,"clsx",qt),P(t,"default",qt),t))),Zt={},Yt={};function Kt(e,t){for(var n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]}function Jt(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)}function Qt(e){return"number"==typeof e&&!isNaN(e)}function $t(e){return parseInt(e,10)}function en(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))}Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.dontSetMe=en,Yt.findInArray=Kt,Yt.int=$t,Yt.isFunction=Jt,Yt.isNum=Qt;var tn={};Object.defineProperty(tn,"__esModule",{value:!0}),tn.browserPrefixToKey=on,tn.browserPrefixToStyle=an,tn.default=void 0,tn.getPrefix=rn;var nn=["Moz","Webkit","O","ms"];function rn(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";var r=null===(e=window.document)||void 0===e||null===(t=e.documentElement)||void 0===t?void 0:t.style;if(!r||n in r)return"";for(var i=0;i<nn.length;i++)if(on(n,nn[i])in r)return nn[i];return""}function on(e,t){return t?"".concat(t).concat(sn(e)):e}function an(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e}function sn(e){for(var t="",n=!0,r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}var ln=rn();function cn(e){return(cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}tn.default=ln,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.addClassName=Mn,Zt.addEvent=wn,Zt.addUserSelectStyles=Dn,Zt.createCSSTransform=kn,Zt.createSVGTransform=On,Zt.getTouch=Rn,Zt.getTouchIdentifier=An,Zt.getTranslation=_n,Zt.innerHeight=Tn,Zt.innerWidth=Pn,Zt.matchesSelector=yn,Zt.matchesSelectorAndParentsTo=bn,Zt.offsetXYFromParent=Cn,Zt.outerHeight=Sn,Zt.outerWidth=En,Zt.removeClassName=Ln,Zt.removeEvent=xn,Zt.removeUserSelectStyles=In;var un=Yt,dn=hn(tn);function pn(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(pn=function(e){return e?n:t})(e)}function hn(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==cn(e)&&"function"!=typeof e)return{default:e};var n=pn(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function fn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fn(Object(n),!0).forEach((function(t){gn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vn="";function yn(e,t){return vn||(vn=(0,un.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(t){return(0,un.isFunction)(e[t])}))),!!(0,un.isFunction)(e[vn])&&e[vn](t)}function bn(e,t,n){var r=e;do{if(yn(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function wn(e,t,n,r){if(e){var i=mn({capture:!0},r);e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}}function xn(e,t,n,r){if(e){var i=mn({capture:!0},r);e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null}}function Sn(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,un.int)(n.borderTopWidth),t+=(0,un.int)(n.borderBottomWidth)}function En(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,un.int)(n.borderLeftWidth),t+=(0,un.int)(n.borderRightWidth)}function Tn(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,un.int)(n.paddingTop),t-=(0,un.int)(n.paddingBottom)}function Pn(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,un.int)(n.paddingLeft),t-=(0,un.int)(n.paddingRight)}function Cn(e,t,n){var r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect();return{x:(e.clientX+t.scrollLeft-r.left)/n,y:(e.clientY+t.scrollTop-r.top)/n}}function kn(e,t){var n=_n(e,t,"px");return gn({},(0,dn.browserPrefixToKey)("transform",dn.default),n)}function On(e,t){return _n(e,t,"")}function _n(e,t,n){var r=e.x,i=e.y,o="translate(".concat(r).concat(n,",").concat(i).concat(n,")");if(t){var a="".concat("string"==typeof t.x?t.x:t.x+n),s="".concat("string"==typeof t.y?t.y:t.y+n);o="translate(".concat(a,", ").concat(s,")")+o}return o}function Rn(e,t){return e.targetTouches&&(0,un.findInArray)(e.targetTouches,(function(e){return t===e.identifier}))||e.changedTouches&&(0,un.findInArray)(e.changedTouches,(function(e){return t===e.identifier}))}function An(e){return e.targetTouches&&e.targetTouches[0]?e.targetTouches[0].identifier:e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].identifier:void 0}function Dn(e){if(e){var t=e.getElementById("react-draggable-style-el");t||((t=e.createElement("style")).type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t)),e.body&&Mn(e.body,"react-draggable-transparent-selection")}}function In(e){if(e)try{if(e.body&&Ln(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{var t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}}function Mn(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function Ln(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}var jn={};Object.defineProperty(jn,"__esModule",{value:!0}),jn.canDragX=Hn,jn.canDragY=Un,jn.createCoreData=Wn,jn.createDraggableData=Gn,jn.getBoundPosition=Bn,jn.getControlPosition=Vn,jn.snapToGrid=zn;var Nn=Yt,Fn=Zt;function Bn(e,t,n){if(!e.props.bounds)return[t,n];var r=e.props.bounds;r="string"==typeof r?r:qn(r);var i=Xn(e);if("string"==typeof r){var o,a=i.ownerDocument,s=a.defaultView;if(!((o="parent"===r?i.parentNode:a.querySelector(r))instanceof s.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');var l=o,c=s.getComputedStyle(i),u=s.getComputedStyle(l);r={left:-i.offsetLeft+(0,Nn.int)(u.paddingLeft)+(0,Nn.int)(c.marginLeft),top:-i.offsetTop+(0,Nn.int)(u.paddingTop)+(0,Nn.int)(c.marginTop),right:(0,Fn.innerWidth)(l)-(0,Fn.outerWidth)(i)-i.offsetLeft+(0,Nn.int)(u.paddingRight)-(0,Nn.int)(c.marginRight),bottom:(0,Fn.innerHeight)(l)-(0,Fn.outerHeight)(i)-i.offsetTop+(0,Nn.int)(u.paddingBottom)-(0,Nn.int)(c.marginBottom)}}return(0,Nn.isNum)(r.right)&&(t=Math.min(t,r.right)),(0,Nn.isNum)(r.bottom)&&(n=Math.min(n,r.bottom)),(0,Nn.isNum)(r.left)&&(t=Math.max(t,r.left)),(0,Nn.isNum)(r.top)&&(n=Math.max(n,r.top)),[t,n]}function zn(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function Hn(e){return"both"===e.props.axis||"x"===e.props.axis}function Un(e){return"both"===e.props.axis||"y"===e.props.axis}function Vn(e,t,n){var r="number"==typeof t?(0,Fn.getTouch)(e,t):null;if("number"==typeof t&&!r)return null;var i=Xn(n),o=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return(0,Fn.offsetXYFromParent)(r||e,o,n.props.scale)}function Wn(e,t,n){var r=e.state,i=!(0,Nn.isNum)(r.lastX),o=Xn(e);return i?{node:o,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:o,deltaX:t-r.lastX,deltaY:n-r.lastY,lastX:r.lastX,lastY:r.lastY,x:t,y:n}}function Gn(e,t){var n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function qn(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function Xn(e){var t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var Zn={},Yn={};function Kn(){}function Jn(e){return(Jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.default=Kn,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.default=void 0;var Qn=sr(Bt),$n=or(zt.exports),er=or(Bt),tr=Zt,nr=jn,rr=Yt,ir=or(Yn);function or(e){return e&&e.__esModule?e:{default:e}}function ar(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(ar=function(e){return e?n:t})(e)}function sr(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==Jn(e)&&"function"!=typeof e)return{default:e};var n=ar(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function lr(e,t){return hr(e)||pr(e,t)||ur(e,t)||cr()}function cr(){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(e,t){if(e){if("string"==typeof e)return dr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dr(e,t)}}function dr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pr(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{!a&&null!=n.return&&n.return()}finally{if(s)throw i}}return o}}function hr(e){if(Array.isArray(e))return e}function fr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gr(e,t,n){return t&&mr(e.prototype,t),n&&mr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function vr(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yr(e,t)}function yr(e,t){return(yr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function br(e){var t=Sr();return function(){var n,r=Er(e);if(t){var i=Er(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return wr(this,n)}}function wr(e,t){if(t&&("object"===Jn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return xr(e)}function xr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sr(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Er(e){return(Er=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Tr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pr={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},Cr=Pr.mouse,kr=function(e){vr(n,e);var t=br(n);function n(){var e;fr(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return Tr(xr(e=t.call.apply(t,[this].concat(i))),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),Tr(xr(e),"mounted",!1),Tr(xr(e),"handleDragStart",(function(t){if(e.props.onMouseDown(t),!e.props.allowAnyClick&&"number"==typeof t.button&&0!==t.button)return!1;var n=e.findDOMNode();if(!n||!n.ownerDocument||!n.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var r=n.ownerDocument;if(!(e.props.disabled||!(t.target instanceof r.defaultView.Node)||e.props.handle&&!(0,tr.matchesSelectorAndParentsTo)(t.target,e.props.handle,n)||e.props.cancel&&(0,tr.matchesSelectorAndParentsTo)(t.target,e.props.cancel,n))){"touchstart"===t.type&&t.preventDefault();var i=(0,tr.getTouchIdentifier)(t);e.setState({touchIdentifier:i});var o=(0,nr.getControlPosition)(t,i,xr(e));if(null!=o){var a=o.x,s=o.y,l=(0,nr.createCoreData)(xr(e),a,s);(0,ir.default)("DraggableCore: handleDragStart: %j",l),(0,ir.default)("calling",e.props.onStart),!1===e.props.onStart(t,l)||!1===e.mounted||(e.props.enableUserSelectHack&&(0,tr.addUserSelectStyles)(r),e.setState({dragging:!0,lastX:a,lastY:s}),(0,tr.addEvent)(r,Cr.move,e.handleDrag),(0,tr.addEvent)(r,Cr.stop,e.handleDragStop))}}})),Tr(xr(e),"handleDrag",(function(t){var n=(0,nr.getControlPosition)(t,e.state.touchIdentifier,xr(e));if(null!=n){var r=n.x,i=n.y;if(Array.isArray(e.props.grid)){var o=r-e.state.lastX,a=i-e.state.lastY,s=lr((0,nr.snapToGrid)(e.props.grid,o,a),2);if(o=s[0],a=s[1],!o&&!a)return;r=e.state.lastX+o,i=e.state.lastY+a}var l=(0,nr.createCoreData)(xr(e),r,i);if((0,ir.default)("DraggableCore: handleDrag: %j",l),!1===e.props.onDrag(t,l)||!1===e.mounted){try{e.handleDragStop(new MouseEvent("mouseup"))}catch(t){var c=document.createEvent("MouseEvents");c.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.handleDragStop(c)}return}e.setState({lastX:r,lastY:i})}})),Tr(xr(e),"handleDragStop",(function(t){if(e.state.dragging){var n=(0,nr.getControlPosition)(t,e.state.touchIdentifier,xr(e));if(null!=n){var r=n.x,i=n.y;if(Array.isArray(e.props.grid)){var o=r-e.state.lastX||0,a=i-e.state.lastY||0,s=lr((0,nr.snapToGrid)(e.props.grid,o,a),2);o=s[0],a=s[1],r=e.state.lastX+o,i=e.state.lastY+a}var l=(0,nr.createCoreData)(xr(e),r,i);if(!1===e.props.onStop(t,l)||!1===e.mounted)return!1;var c=e.findDOMNode();c&&e.props.enableUserSelectHack&&(0,tr.removeUserSelectStyles)(c.ownerDocument),(0,ir.default)("DraggableCore: handleDragStop: %j",l),e.setState({dragging:!1,lastX:NaN,lastY:NaN}),c&&((0,ir.default)("DraggableCore: Removing handlers"),(0,tr.removeEvent)(c.ownerDocument,Cr.move,e.handleDrag),(0,tr.removeEvent)(c.ownerDocument,Cr.stop,e.handleDragStop))}}})),Tr(xr(e),"onMouseDown",(function(t){return Cr=Pr.mouse,e.handleDragStart(t)})),Tr(xr(e),"onMouseUp",(function(t){return Cr=Pr.mouse,e.handleDragStop(t)})),Tr(xr(e),"onTouchStart",(function(t){return Cr=Pr.touch,e.handleDragStart(t)})),Tr(xr(e),"onTouchEnd",(function(t){return Cr=Pr.touch,e.handleDragStop(t)})),e}return gr(n,[{key:"componentDidMount",value:function(){this.mounted=!0;var e=this.findDOMNode();e&&(0,tr.addEvent)(e,Pr.touch.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.findDOMNode();if(e){var t=e.ownerDocument;(0,tr.removeEvent)(t,Pr.mouse.move,this.handleDrag),(0,tr.removeEvent)(t,Pr.touch.move,this.handleDrag),(0,tr.removeEvent)(t,Pr.mouse.stop,this.handleDragStop),(0,tr.removeEvent)(t,Pr.touch.stop,this.handleDragStop),(0,tr.removeEvent)(e,Pr.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,tr.removeUserSelectStyles)(t)}}},{key:"findDOMNode",value:function(){var e,t,n;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(n=t.nodeRef)||void 0===n?void 0:n.current:er.default.findDOMNode(this)}},{key:"render",value:function(){return Qn.cloneElement(Qn.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),n}(Qn.Component);Zn.default=kr,Tr(kr,"displayName","DraggableCore"),Tr(kr,"propTypes",{allowAnyClick:$n.default.bool,disabled:$n.default.bool,enableUserSelectHack:$n.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:$n.default.arrayOf($n.default.number),handle:$n.default.string,cancel:$n.default.string,nodeRef:$n.default.object,onStart:$n.default.func,onDrag:$n.default.func,onStop:$n.default.func,onMouseDown:$n.default.func,scale:$n.default.number,className:rr.dontSetMe,style:rr.dontSetMe,transform:rr.dontSetMe}),Tr(kr,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var n=f(Bt),r=p(zt.exports),i=p(Bt),o=p(Xt),a=Zt,s=jn,l=Yt,c=p(Zn),u=p(Yn),d=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];function p(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function f(e,n){if(!n&&e&&e.__esModule)return e;if(null===e||"object"!==t(e)&&"function"!=typeof e)return{default:e};var r=h(n);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(i,a,s):i[a]=e[a]}return i.default=e,r&&r.set(e,i),i}function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(this,arguments)}function g(e,t){if(null==e)return{};var n,r,i=v(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(i[n]=e[n]))}return i}function v(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&(i[n]=e[n]);return i}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){j(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e,t){return P(e)||T(e,t)||S(e,t)||x()}function x(){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 S(e,t){if(e){if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E(e,t)}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{!a&&null!=n.return&&n.return()}finally{if(s)throw i}}return o}}function P(e){if(Array.isArray(e))return e}function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t,n){return t&&k(e.prototype,t),n&&k(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R(e,t)}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A(e){var t=M();return function(){var n,r=L(e);if(t){var i=L(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return D(this,n)}}function D(e,n){if(n&&("object"===t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return I(e)}function I(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function L(e){return(L=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var N=function(e){_(r,e);var t=A(r);function r(e){var n;return C(this,r),j(I(n=t.call(this,e)),"onDragStart",(function(e,t){if((0,u.default)("Draggable: onDragStart: %j",t),!1===n.props.onStart(e,(0,s.createDraggableData)(I(n),t)))return!1;n.setState({dragging:!0,dragged:!0})})),j(I(n),"onDrag",(function(e,t){if(!n.state.dragging)return!1;(0,u.default)("Draggable: onDrag: %j",t);var r=(0,s.createDraggableData)(I(n),t),i={x:r.x,y:r.y};if(n.props.bounds){var o=i.x,a=i.y;i.x+=n.state.slackX,i.y+=n.state.slackY;var l=w((0,s.getBoundPosition)(I(n),i.x,i.y),2),c=l[0],d=l[1];i.x=c,i.y=d,i.slackX=n.state.slackX+(o-i.x),i.slackY=n.state.slackY+(a-i.y),r.x=i.x,r.y=i.y,r.deltaX=i.x-n.state.x,r.deltaY=i.y-n.state.y}if(!1===n.props.onDrag(e,r))return!1;n.setState(i)})),j(I(n),"onDragStop",(function(e,t){if(!n.state.dragging)return!1;if(!1===n.props.onStop(e,(0,s.createDraggableData)(I(n),t)))return!1;(0,u.default)("Draggable: onDragStop: %j",t);var r={dragging:!1,slackX:0,slackY:0};if(Boolean(n.props.position)){var i=n.props.position,o=i.x,a=i.y;r.x=o,r.y=a}n.setState(r)})),n.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:b({},e.position),slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),n}return O(r,[{key:"componentDidMount",value:function(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var e,t,n;return null!==(e=null===(t=this.props)||void 0===t||null===(n=t.nodeRef)||void 0===n?void 0:n.current)&&void 0!==e?e:i.default.findDOMNode(this)}},{key:"render",value:function(){var e,t=this.props;t.axis,t.bounds;var r=t.children,i=t.defaultPosition,l=t.defaultClassName,u=t.defaultClassNameDragging,p=t.defaultClassNameDragged,h=t.position,f=t.positionOffset;t.scale;var v=g(t,d),y={},w=null,x=!Boolean(h)||this.state.dragging,S=h||i,E={x:(0,s.canDragX)(this)&&x?this.state.x:S.x,y:(0,s.canDragY)(this)&&x?this.state.y:S.y};this.state.isElementSVG?w=(0,a.createSVGTransform)(E,f):y=(0,a.createCSSTransform)(E,f);var T=(0,o.default)(r.props.className||"",l,(j(e={},u,this.state.dragging),j(e,p,this.state.dragged),e));return n.createElement(c.default,m({},v,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),n.cloneElement(n.Children.only(r),{className:T,style:b(b({},r.props.style),y),transform:w}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.position,r=t.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,u.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:b({},n)})}}]),r}(n.Component);e.default=N,j(N,"displayName","Draggable"),j(N,"propTypes",b(b({},c.default.propTypes),{},{axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe})),j(N,"defaultProps",b(b({},c.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))}(Ft);var Or=Ft,_r=Or.default,Rr=Or.DraggableCore;Nt.exports=_r,Nt.exports.default=_r,Nt.exports.DraggableCore=Rr;var Ar=Nt.exports,Dr=["second","minute","hour","day","week","month","year"];function Ir(e,t){if(0===t)return["just now","right now"];var n=Dr[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]}var Mr=["秒","分钟","小时","天","周","个月","年"];function Lr(e,t){if(0===t)return["刚刚","片刻后"];var n=Mr[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}var jr={},Nr=function(e,t){jr[e]=t},Fr=function(e){return jr[e]||jr.en_US},Br=[60,60,24,7,365/7/12,12];function zr(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function Hr(e,t){for(var n=e<0?1:0,r=e=Math.abs(e),i=0;e>=Br[i]&&i<Br.length;i++)e/=Br[i];return(e=Math.floor(e))>(0==(i*=2)?9:1)&&(i+=1),t(e,i,r)[n].replace("%s",e.toString())}function Ur(e,t){return(+(t?zr(t):new Date)-+zr(e))/1e3}function Vr(e){for(var t=1,n=0,r=Math.abs(e);e>=Br[n]&&n<Br.length;n++)e/=Br[n],t*=Br[n];return r=(r%=t)?t-r:t,Math.ceil(r)}var Wr=function(e,t,n){return Hr(Ur(e,n&&n.relativeDate),Fr(t))},Gr="timeago-id";function qr(e){return e.getAttribute("datetime")}function Xr(e,t){e.setAttribute(Gr,t)}function Zr(e){return parseInt(e.getAttribute(Gr))}var Yr={},Kr=function(e){clearTimeout(e),delete Yr[e]};function Jr(e,t,n,r){Kr(Zr(e));var i=r.relativeDate,o=r.minInterval,a=Ur(t,i);e.innerText=Hr(a,n);var s=setTimeout((function(){Jr(e,t,n,r)}),Math.min(1e3*Math.max(Vr(a),o||1),2147483647));Yr[s]=0,Xr(e,s)}function Qr(e){e?Kr(Zr(e)):Object.keys(Yr).forEach(Kr)}function $r(e,t,n){var r=e.length?e:[e];return r.forEach((function(e){Jr(e,qr(e),Fr(t),n||{})})),r}Nr("en_US",Ir),Nr("zh_CN",Lr);var ei,ti=globalThis&&globalThis.__extends||(ei=function(e,t){return(ei=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}ei(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),ni=globalThis&&globalThis.__assign||function(){return ni=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ni.apply(this,arguments)},ri=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},ii=function(e){return""+(e instanceof Date?e.getTime():e)},oi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dom=null,t}return ti(t,e),t.prototype.componentDidMount=function(){this.renderTimeAgo()},t.prototype.componentDidUpdate=function(){this.renderTimeAgo()},t.prototype.renderTimeAgo=function(){var e=this.props,t=e.live,n=e.datetime,r=e.locale,i=e.opts;Qr(this.dom),!1!==t&&(this.dom.setAttribute("datetime",ii(n)),$r(this.dom,r,i))},t.prototype.componentWillUnmount=function(){Qr(this.dom)},t.prototype.render=function(){var e=this,t=this.props,n=t.datetime;t.live;var r=t.locale,i=t.opts,o=ri(t,["datetime","live","locale","opts"]);return F("time",ni({ref:function(t){e.dom=t}},o),Wr(n,r,i))},t.defaultProps={live:!0,className:""},t}(Ue);function ai(e,t){var n=function(n){e.current&&!e.current.contains(event.target)&&t()};Pe((function(){return document.addEventListener("mousedown",n),function(){return document.removeEventListener("mousedown",n)}}))}var si,li=Object.prototype.toString,ci=function(e){var t=li.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===li.call(e.callee)),n};if(!Object.keys){var ui=Object.prototype.hasOwnProperty,di=Object.prototype.toString,pi=ci,hi=Object.prototype.propertyIsEnumerable,fi=!hi.call({toString:null},"toString"),mi=hi.call((function(){}),"prototype"),gi=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],vi=function(e){var t=e.constructor;return t&&t.prototype===e},yi={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},bi=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!yi["$"+e]&&ui.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{vi(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),wi=function(e){if("undefined"==typeof window||!bi)return vi(e);try{return vi(e)}catch(e){return!1}};si=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===di.call(e),r=pi(e),i=t&&"[object String]"===di.call(e),o=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=mi&&n;if(i&&e.length>0&&!ui.call(e,0))for(var s=0;s<e.length;++s)o.push(String(s));if(r&&e.length>0)for(var l=0;l<e.length;++l)o.push(String(l));else for(var c in e)(!a||"prototype"!==c)&&ui.call(e,c)&&o.push(String(c));if(fi)for(var u=wi(e),d=0;d<gi.length;++d)(!u||"constructor"!==gi[d])&&ui.call(e,gi[d])&&o.push(gi[d]);return o}}var xi=si,Si=Array.prototype.slice,Ei=ci,Ti=Object.keys,Pi=Ti?function(e){return Ti(e)}:xi,Ci=Object.keys;Pi.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return Ei(e)?Ci(Si.call(e)):Ci(e)})}else Object.keys=Pi;return Object.keys||Pi};var ki,Oi=Pi,_i=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(n))return!1;var r=42;for(t in e[t]=r,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||!0!==o.enumerable)return!1}return!0},Ri="undefined"!=typeof Symbol&&Symbol,Ai=_i,Di=function(){return"function"==typeof Ri&&"function"==typeof Symbol&&"symbol"==typeof Ri("foo")&&"symbol"==typeof Symbol("bar")&&Ai()},Ii={foo:{}},Mi=Object,Li=function(){return{__proto__:Ii}.foo===Ii.foo&&!({__proto__:null}instanceof Mi)},ji="Function.prototype.bind called on incompatible ",Ni=Array.prototype.slice,Fi=Object.prototype.toString,Bi="[object Function]",zi=function(e){var t=this;if("function"!=typeof t||Fi.call(t)!==Bi)throw new TypeError(ji+t);for(var n,r=Ni.call(arguments,1),i=function(){if(this instanceof n){var i=t.apply(this,r.concat(Ni.call(arguments)));return Object(i)===i?i:this}return t.apply(e,r.concat(Ni.call(arguments)))},o=Math.max(0,t.length-r.length),a=[],s=0;s<o;s++)a.push("$"+s);if(n=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(i),t.prototype){var l=function(){};l.prototype=t.prototype,n.prototype=new l,l.prototype=null}return n},Hi=zi,Ui=Function.prototype.bind||Hi,Vi=Ui.call(Function.call,Object.prototype.hasOwnProperty),Wi=SyntaxError,Gi=Function,qi=TypeError,Xi=function(e){try{return Gi('"use strict"; return ('+e+").constructor;")()}catch(e){}},Zi=Object.getOwnPropertyDescriptor;if(Zi)try{Zi({},"")}catch(e){Zi=null}var Yi=function(){throw new qi},Ki=Zi?function(){try{return Yi}catch(e){try{return Zi(arguments,"callee").get}catch(e){return Yi}}}():Yi,Ji=Di(),Qi=Li(),$i=Object.getPrototypeOf||(Qi?function(e){return e.__proto__}:null),eo={},to="undefined"!=typeof Uint8Array&&$i?$i(Uint8Array):ki,no={"%AggregateError%":"undefined"==typeof AggregateError?ki:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?ki:ArrayBuffer,"%ArrayIteratorPrototype%":Ji&&$i?$i([][Symbol.iterator]()):ki,"%AsyncFromSyncIteratorPrototype%":ki,"%AsyncFunction%":eo,"%AsyncGenerator%":eo,"%AsyncGeneratorFunction%":eo,"%AsyncIteratorPrototype%":eo,"%Atomics%":"undefined"==typeof Atomics?ki:Atomics,"%BigInt%":"undefined"==typeof BigInt?ki:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?ki:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?ki:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?ki:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?ki:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?ki:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?ki:FinalizationRegistry,"%Function%":Gi,"%GeneratorFunction%":eo,"%Int8Array%":"undefined"==typeof Int8Array?ki:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?ki:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?ki:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ji&&$i?$i($i([][Symbol.iterator]())):ki,"%JSON%":"object"==typeof JSON?JSON:ki,"%Map%":"undefined"==typeof Map?ki:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&Ji&&$i?$i((new Map)[Symbol.iterator]()):ki,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?ki:Promise,"%Proxy%":"undefined"==typeof Proxy?ki:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?ki:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?ki:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&Ji&&$i?$i((new Set)[Symbol.iterator]()):ki,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?ki:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ji&&$i?$i(""[Symbol.iterator]()):ki,"%Symbol%":Ji?Symbol:ki,"%SyntaxError%":Wi,"%ThrowTypeError%":Ki,"%TypedArray%":to,"%TypeError%":qi,"%Uint8Array%":"undefined"==typeof Uint8Array?ki:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?ki:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?ki:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?ki:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?ki:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?ki:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?ki:WeakSet};if($i)try{null.error}catch(oh){var ro=$i($i(oh));no["%Error.prototype%"]=ro}var io=function e(t){var n;if("%AsyncFunction%"===t)n=Xi("async function () {}");else if("%GeneratorFunction%"===t)n=Xi("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=Xi("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&$i&&(n=$i(i.prototype))}return no[t]=n,n},oo={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ao=Ui,so=Vi,lo=ao.call(Function.call,Array.prototype.concat),co=ao.call(Function.apply,Array.prototype.splice),uo=ao.call(Function.call,String.prototype.replace),po=ao.call(Function.call,String.prototype.slice),ho=ao.call(Function.call,RegExp.prototype.exec),fo=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,mo=/\\(\\)?/g,go=function(e){var t=po(e,0,1),n=po(e,-1);if("%"===t&&"%"!==n)throw new Wi("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new Wi("invalid intrinsic syntax, expected opening `%`");var r=[];return uo(e,fo,(function(e,t,n,i){r[r.length]=n?uo(i,mo,"$1"):t||e})),r},vo=function(e,t){var n,r=e;if(so(oo,r)&&(r="%"+(n=oo[r])[0]+"%"),so(no,r)){var i=no[r];if(i===eo&&(i=io(r)),void 0===i&&!t)throw new qi("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new Wi("intrinsic "+e+" does not exist!")},yo=function(e,t){if("string"!=typeof e||0===e.length)throw new qi("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new qi('"allowMissing" argument must be a boolean');if(null===ho(/^%?[^%]*%?$/,e))throw new Wi("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=go(e),r=n.length>0?n[0]:"",i=vo("%"+r+"%",t),o=i.name,a=i.value,s=!1,l=i.alias;l&&(r=l[0],co(n,lo([0,1],l)));for(var c=1,u=!0;c<n.length;c+=1){var d=n[c],p=po(d,0,1),h=po(d,-1);if(('"'===p||"'"===p||"`"===p||'"'===h||"'"===h||"`"===h)&&p!==h)throw new Wi("property names with quotes must have matching quotes");if(("constructor"===d||!u)&&(s=!0),so(no,o="%"+(r+="."+d)+"%"))a=no[o];else if(null!=a){if(!(d in a)){if(!t)throw new qi("base intrinsic for "+e+" exists, but the property is not available.");return}if(Zi&&c+1>=n.length){var f=Zi(a,d);a=(u=!!f)&&"get"in f&&!("originalValue"in f.get)?f.get:a[d]}else u=so(a,d),a=a[d];u&&!s&&(no[o]=a)}}return a},bo=yo("%Object.defineProperty%",!0),wo=function(){if(bo)try{return bo({},"a",{value:1}),!0}catch(e){return!1}return!1};wo.hasArrayLengthDefineBug=function(){if(!wo())return null;try{return 1!==bo([],"length",{value:1}).length}catch(e){return!0}};var xo=wo,So=Oi,Eo="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),To=Object.prototype.toString,Po=Array.prototype.concat,Co=Object.defineProperty,ko=function(e){return"function"==typeof e&&"[object Function]"===To.call(e)},Oo=xo(),_o=Co&&Oo,Ro=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if(!ko(r)||!r())return;_o?Co(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n},Ao=function(e,t){var n=arguments.length>2?arguments[2]:{},r=So(t);Eo&&(r=Po.call(r,Object.getOwnPropertySymbols(t)));for(var i=0;i<r.length;i+=1)Ro(e,r[i],t[r[i]],n[r[i]])};Ao.supportsDescriptors=!!_o;var Do=Ao,Io={exports:{}};!function(e){var t=Ui,n=yo,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),a=n("%Object.getOwnPropertyDescriptor%",!0),s=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(s)try{s({},"a",{value:1})}catch(e){s=null}e.exports=function(e){var n=o(t,i,arguments);return a&&s&&a(n,"length").configurable&&s(n,"length",{value:1+l(0,e.length-(arguments.length-1))}),n};var c=function(){return o(t,r,arguments)};s?s(e.exports,"apply",{value:c}):e.exports.apply=c}(Io);var Mo=yo,Lo=Io.exports,jo=Lo(Mo("String.prototype.indexOf")),No=function(e,t){var n=Mo(e,!!t);return"function"==typeof n&&jo(e,".prototype.")>-1?Lo(n):n},Fo=yo("%TypeError%"),Bo=function(e,t){if(null==e)throw new Fo(t||"Cannot call method on "+e);return e},zo=yo("%Array%"),Ho=!zo.isArray&&No("Object.prototype.toString"),Uo=zo.isArray||function(e){return"[object Array]"===Ho(e)},Vo=yo,Wo=No,Go=Vo("%TypeError%"),qo=Uo,Xo=Vo("%Reflect.apply%",!0)||Wo("Function.prototype.apply"),Zo=function(e,t){var n=arguments.length>2?arguments[2]:[];if(!qo(n))throw new Go("Assertion failed: optional `argumentsList`, if provided, must be a List");return Xo(e,t,n)},Yo={},Ko=It(Object.freeze((P(h={__proto__:null},Symbol.toStringTag,"Module"),P(h,"default",Yo),h))),Jo="function"==typeof Map&&Map.prototype,Qo=Object.getOwnPropertyDescriptor&&Jo?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,$o=Jo&&Qo&&"function"==typeof Qo.get?Qo.get:null,ea=Jo&&Map.prototype.forEach,ta="function"==typeof Set&&Set.prototype,na=Object.getOwnPropertyDescriptor&&ta?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ra=ta&&na&&"function"==typeof na.get?na.get:null,ia=ta&&Set.prototype.forEach,oa="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,aa="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,sa="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,la=Boolean.prototype.valueOf,ca=Object.prototype.toString,ua=Function.prototype.toString,da=String.prototype.match,pa=String.prototype.slice,ha=String.prototype.replace,fa=String.prototype.toUpperCase,ma=String.prototype.toLowerCase,ga=RegExp.prototype.test,va=Array.prototype.concat,ya=Array.prototype.join,ba=Array.prototype.slice,wa=Math.floor,xa="function"==typeof BigInt?BigInt.prototype.valueOf:null,Sa=Object.getOwnPropertySymbols,Ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,Ta="function"==typeof Symbol&&"object"==typeof Symbol.iterator,Pa="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,Ca=Object.prototype.propertyIsEnumerable,ka=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Oa(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||ga.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-wa(-e):wa(e);if(r!==e){var i=String(r),o=pa.call(t,i.length+1);return ha.call(i,n,"$&_")+"."+ha.call(ha.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ha.call(t,n,"$&_")}var _a=Ko,Ra=_a.custom,Aa=Ua(Ra)?Ra:null,Da=function e(t,n,r,i){var o=n||{};if(Ga(o,"quoteStyle")&&"single"!==o.quoteStyle&&"double"!==o.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ga(o,"maxStringLength")&&("number"==typeof o.maxStringLength?o.maxStringLength<0&&o.maxStringLength!==1/0:null!==o.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!Ga(o,"customInspect")||o.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ga(o,"indent")&&null!==o.indent&&"\t"!==o.indent&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ga(o,"numericSeparator")&&"boolean"!=typeof o.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=o.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return ts(t,o);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var l=String(t);return s?Oa(t,l):l}if("bigint"==typeof t){var c=String(t)+"n";return s?Oa(t,c):c}var u=void 0===o.depth?5:o.depth;if(void 0===r&&(r=0),r>=u&&u>0&&"object"==typeof t)return La(t)?"[Array]":"[Object]";var d=ss(o,r);if(void 0===i)i=[];else if(Za(i,t)>=0)return"[Circular]";function p(t,n,a){if(n&&(i=ba.call(i)).push(n),a){var s={depth:o.depth};return Ga(o,"quoteStyle")&&(s.quoteStyle=o.quoteStyle),e(t,s,r+1,i)}return e(t,o,r+1,i)}if("function"==typeof t&&!Na(t)){var h=Xa(t),f=cs(t,p);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(f.length>0?" { "+ya.call(f,", ")+" }":"")}if(Ua(t)){var m=Ta?ha.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ea.call(t);return"object"!=typeof t||Ta?m:rs(m)}if(es(t)){for(var g="<"+ma.call(String(t.nodeName)),v=t.attributes||[],y=0;y<v.length;y++)g+=" "+v[y].name+"="+Ia(Ma(v[y].value),"double",o);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+ma.call(String(t.nodeName))+">"}if(La(t)){if(0===t.length)return"[]";var b=cs(t,p);return d&&!as(b)?"["+ls(b,d)+"]":"[ "+ya.call(b,", ")+" ]"}if(Fa(t)){var w=cs(t,p);return"cause"in Error.prototype||!("cause"in t)||Ca.call(t,"cause")?0===w.length?"["+String(t)+"]":"{ ["+String(t)+"] "+ya.call(w,", ")+" }":"{ ["+String(t)+"] "+ya.call(va.call("[cause]: "+p(t.cause),w),", ")+" }"}if("object"==typeof t&&a){if(Aa&&"function"==typeof t[Aa]&&_a)return _a(t,{depth:u-r});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(Ya(t)){var x=[];return ea&&ea.call(t,(function(e,n){x.push(p(n,t,!0)+" => "+p(e,t))})),os("Map",$o.call(t),x,d)}if(Qa(t)){var S=[];return ia&&ia.call(t,(function(e){S.push(p(e,t))})),os("Set",ra.call(t),S,d)}if(Ka(t))return is("WeakMap");if($a(t))return is("WeakSet");if(Ja(t))return is("WeakRef");if(za(t))return rs(p(Number(t)));if(Va(t))return rs(p(xa.call(t)));if(Ha(t))return rs(la.call(t));if(Ba(t))return rs(p(String(t)));if(!ja(t)&&!Na(t)){var E=cs(t,p),T=ka?ka(t)===Object.prototype:t instanceof Object||t.constructor===Object,P=t instanceof Object?"":"null prototype",C=!T&&Pa&&Object(t)===t&&Pa in t?pa.call(qa(t),8,-1):P?"Object":"",k=(T||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(C||P?"["+ya.call(va.call([],C||[],P||[]),": ")+"] ":"");return 0===E.length?k+"{}":d?k+"{"+ls(E,d)+"}":k+"{ "+ya.call(E,", ")+" }"}return String(t)};function Ia(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function Ma(e){return ha.call(String(e),/"/g,""")}function La(e){return!("[object Array]"!==qa(e)||Pa&&"object"==typeof e&&Pa in e)}function ja(e){return!("[object Date]"!==qa(e)||Pa&&"object"==typeof e&&Pa in e)}function Na(e){return!("[object RegExp]"!==qa(e)||Pa&&"object"==typeof e&&Pa in e)}function Fa(e){return!("[object Error]"!==qa(e)||Pa&&"object"==typeof e&&Pa in e)}function Ba(e){return!("[object String]"!==qa(e)||Pa&&"object"==typeof e&&Pa in e)}function za(e){return!("[object Number]"!==qa(e)||Pa&&"object"==typeof e&&Pa in e)}function Ha(e){return!("[object Boolean]"!==qa(e)||Pa&&"object"==typeof e&&Pa in e)}function Ua(e){if(Ta)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!Ea)return!1;try{return Ea.call(e),!0}catch(e){}return!1}function Va(e){if(!e||"object"!=typeof e||!xa)return!1;try{return xa.call(e),!0}catch(e){}return!1}var Wa=Object.prototype.hasOwnProperty||function(e){return e in this};function Ga(e,t){return Wa.call(e,t)}function qa(e){return ca.call(e)}function Xa(e){if(e.name)return e.name;var t=da.call(ua.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Za(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function Ya(e){if(!$o||!e||"object"!=typeof e)return!1;try{$o.call(e);try{ra.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}function Ka(e){if(!oa||!e||"object"!=typeof e)return!1;try{oa.call(e,oa);try{aa.call(e,aa)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}function Ja(e){if(!sa||!e||"object"!=typeof e)return!1;try{return sa.call(e),!0}catch(e){}return!1}function Qa(e){if(!ra||!e||"object"!=typeof e)return!1;try{ra.call(e);try{$o.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}function $a(e){if(!aa||!e||"object"!=typeof e)return!1;try{aa.call(e,aa);try{oa.call(e,oa)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}function es(e){return!(!e||"object"!=typeof e)&&("undefined"!=typeof HTMLElement&&e instanceof HTMLElement||"string"==typeof e.nodeName&&"function"==typeof e.getAttribute)}function ts(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return ts(pa.call(e,0,t.maxStringLength),t)+r}return Ia(ha.call(ha.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ns),"single",t)}function ns(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+fa.call(t.toString(16))}function rs(e){return"Object("+e+")"}function is(e){return e+" { ? }"}function os(e,t,n,r){return e+" ("+t+") {"+(r?ls(n,r):ya.call(n,", "))+"}"}function as(e){for(var t=0;t<e.length;t++)if(Za(e[t],"\n")>=0)return!1;return!0}function ss(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=ya.call(Array(e.indent+1)," ")}return{base:n,prev:ya.call(Array(t+1),n)}}function ls(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+ya.call(e,","+n)+"\n"+t.prev}function cs(e,t){var n=La(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=Ga(e,i)?t(e[i],e):""}var o,a="function"==typeof Sa?Sa(e):[];if(Ta){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var l in e)!Ga(e,l)||n&&String(Number(l))===l&&l<e.length||Ta&&o["$"+l]instanceof Symbol||(ga.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e)));if("function"==typeof Sa)for(var c=0;c<a.length;c++)Ca.call(e,a[c])&&r.push("["+t(a[c])+"]: "+t(e[a[c]],e));return r}var us,ds,ps=function(e){return"string"==typeof e||"symbol"==typeof e},hs=function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0},fs=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":hs(e)},ms=yo("%TypeError%"),gs=Da,vs=ps,ys=fs,bs=function(e,t){if("Object"!==ys(e))throw new ms("Assertion failed: Type(O) is not Object");if(!vs(t))throw new ms("Assertion failed: IsPropertyKey(P) is not true, got "+gs(t));return e[t]},ws=yo("%TypeError%"),xs=ps,Ss=fs,Es=function(e,t){if("Object"!==Ss(e))throw new ws("Assertion failed: `O` must be an Object");if(!xs(t))throw new ws("Assertion failed: `P` must be a Property Key");return t in e},Ts=Function.prototype.toString,Ps="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof Ps&&"function"==typeof Object.defineProperty)try{us=Object.defineProperty({},"length",{get:function(){throw ds}}),ds={},Ps((function(){throw 42}),null,us)}catch(oh){oh!==ds&&(Ps=null)}else Ps=null;var Cs=/^\s*class\b/,ks=function(e){try{var t=Ts.call(e);return Cs.test(t)}catch(e){return!1}},Os=function(e){try{return!ks(e)&&(Ts.call(e),!0)}catch(e){return!1}},_s=Object.prototype.toString,Rs="[object Object]",As="[object Function]",Ds="[object GeneratorFunction]",Is="[object HTMLAllCollection]",Ms="[object HTML document.all class]",Ls="[object HTMLCollection]",js="function"==typeof Symbol&&!!Symbol.toStringTag,Ns=!(0 in[,]),Fs=function(){return!1};if("object"==typeof document){var Bs=document.all;_s.call(Bs)===_s.call(document.all)&&(Fs=function(e){if((Ns||!e)&&(void 0===e||"object"==typeof e))try{var t=_s.call(e);return(t===Is||t===Ms||t===Ls||t===Rs)&&null==e("")}catch(e){}return!1})}var zs=Ps?function(e){if(Fs(e))return!0;if(!e||"function"!=typeof e&&"object"!=typeof e)return!1;try{Ps(e,null,us)}catch(e){if(e!==ds)return!1}return!ks(e)&&Os(e)}:function(e){if(Fs(e))return!0;if(!e||"function"!=typeof e&&"object"!=typeof e)return!1;if(js)return Os(e);if(ks(e))return!1;var t=_s.call(e);return!(t!==As&&t!==Ds&&!/^\[object HTML/.test(t))&&Os(e)},Hs=zs,Us=yo,Vs=Us("%Math%"),Ws=Us("%Number%").MAX_SAFE_INTEGER||Vs.pow(2,53)-1,Gs=yo("%Math.abs%"),qs=function(e){return Gs(e)},Xs=fs,Zs=Math.floor,Ys=function(e){return"BigInt"===Xs(e)?e:Zs(e)},Ks=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e},Js=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e},Qs=_i,$s=function(){return Qs()&&!!Symbol.toStringTag},el=Date.prototype.getDay,tl=function(e){try{return el.call(e),!0}catch(e){return!1}},nl=Object.prototype.toString,rl="[object Date]",il=$s(),ol=function(e){return"object"==typeof e&&null!==e&&(il?tl(e):nl.call(e)===rl)},al={exports:{}},sl=Object.prototype.toString;if(Di()){var ll=Symbol.prototype.toString,cl=/^Symbol\(.*\)$/,ul=function(e){return"symbol"==typeof e.valueOf()&&cl.test(ll.call(e))};al.exports=function(e){if("symbol"==typeof e)return!0;if("[object Symbol]"!==sl.call(e))return!1;try{return ul(e)}catch(e){return!1}}}else al.exports=function(e){return!1};var dl,pl,hl,fl,ml="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,gl=Js,vl=zs,yl=ol,bl=al.exports,wl=function(e,t){if(null==e)throw new TypeError("Cannot call method on "+e);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var n,r,i,o="string"===t?["toString","valueOf"]:["valueOf","toString"];for(i=0;i<o.length;++i)if(n=e[o[i]],vl(n)&&(r=n.call(e),gl(r)))return r;throw new TypeError("No default value")},xl=function(e,t){var n=e[t];if(null!=n){if(!vl(n))throw new TypeError(n+" returned for property "+t+" of object "+e+" is not a function");return n}},Sl=function(e){if(gl(e))return e;var t,n="default";if(arguments.length>1&&(arguments[1]===String?n="string":arguments[1]===Number&&(n="number")),ml&&(Symbol.toPrimitive?t=xl(e,Symbol.toPrimitive):bl(e)&&(t=Symbol.prototype.valueOf)),void 0!==t){var r=t.call(e,n);if(gl(r))return r;throw new TypeError("unable to convert exotic object to primitive")}return"default"===n&&(yl(e)||bl(e))&&(n="string"),wl(e,"default"===n?"number":n)},El=Sl,Tl=function(e){return arguments.length>1?El(e,arguments[1]):El(e)},Pl=No,Cl=$s();if(Cl){dl=Pl("Object.prototype.hasOwnProperty"),pl=Pl("RegExp.prototype.exec"),hl={};var kl=function(){throw hl};fl={toString:kl,valueOf:kl},"symbol"==typeof Symbol.toPrimitive&&(fl[Symbol.toPrimitive]=kl)}var Ol=Pl("Object.prototype.toString"),_l=Object.getOwnPropertyDescriptor,Rl="[object RegExp]",Al=yo,Dl=Cl?function(e){if(!e||"object"!=typeof e)return!1;var t=_l(e,"lastIndex");if(!t||!dl(t,"value"))return!1;try{pl(e,fl)}catch(e){return e===hl}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&Ol(e)===Rl},Il=No("RegExp.prototype.exec"),Ml=Al("%TypeError%"),Ll=function(e){if(!Dl(e))throw new Ml("`regex` must be a RegExp");return function(t){return null!==Il(e,t)}},jl=yo,Nl=jl("%String%"),Fl=jl("%TypeError%"),Bl=function(e){if("symbol"==typeof e)throw new Fl("Cannot convert a Symbol value to a string");return Nl(e)},zl=Bo,Hl=Bl,Ul=No("String.prototype.replace"),Vl=/^\s$/.test(""),Wl=Vl?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,Gl=Vl?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/,ql=function(){var e=Hl(zl(this));return Ul(Ul(e,Wl,""),Gl,"")},Xl=ql,Zl="",Yl="",Kl=function(){return String.prototype.trim&&Zl.trim()===Zl&&Yl.trim()===Yl&&("_"+Yl).trim()==="_"+Yl&&(Yl+"_").trim()===Yl+"_"?String.prototype.trim:Xl},Jl=Do,Ql=Kl,$l=function(){var e=Ql();return Jl(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e},ec=Io.exports,tc=Do,nc=Bo,rc=ql,ic=Kl,oc=$l,ac=ec(ic()),sc=function(e){return nc(e),ac(e)};tc(sc,{getPolyfill:ic,implementation:rc,shim:oc});var lc=sc,cc=yo,uc=cc("%Number%"),dc=cc("%RegExp%"),pc=cc("%TypeError%"),hc=cc("%parseInt%"),fc=Ll,mc=No("String.prototype.slice"),gc=fc(/^0b[01]+$/i),vc=fc(/^0o[0-7]+$/i),yc=fc(/^[-+]0x[0-9a-f]+$/i),bc=["
","",""].join(""),wc=new dc("["+bc+"]","g"),xc=fc(wc),Sc=lc,Ec=fs,Tc=function e(t){if("String"!==Ec(t))throw new pc("Assertion failed: `argument` is not a String");if(gc(t))return uc(hc(mc(t,2),2));if(vc(t))return uc(hc(mc(t,2),8));if(xc(t)||yc(t))return NaN;var n=Sc(t);return n!==t?e(n):uc(t)},Pc=yo,Cc=Pc("%TypeError%"),kc=Pc("%Number%"),Oc=Ks,_c=Tl,Rc=Tc,Ac=function(e){var t=Oc(e)?e:_c(e,kc);if("symbol"==typeof t)throw new Cc("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new Cc("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?Rc(t):kc(t)},Dc=Number.isNaN||function(e){return e!=e},Ic=Dc,Mc=qs,Lc=Ys,jc=Ac,Nc=Dc,Fc=function(e){return("number"==typeof e||"bigint"==typeof e)&&!Ic(e)&&e!==1/0&&e!==-1/0},Bc=function(e){return e>=0?1:-1},zc=Ws,Hc=function(e){var t=jc(e);if(Nc(t)||0===t)return 0;if(!Fc(t))return t;var n=Lc(Mc(t));return 0===n?0:Bc(t)*n},Uc=function(e){var t=Hc(e);return t<=0?0:t>zc?zc:t},Vc=yo("%TypeError%"),Wc=bs,Gc=Uc,qc=fs,Xc=function(e){if("Object"!==qc(e))throw new Vc("Assertion failed: `obj` must be an Object");return Gc(Wc(e,"length"))},Zc=yo("%Object%"),Yc=Bo,Kc=function(e){return Yc(e),Zc(e)},Jc=String.prototype.valueOf,Qc=function(e){try{return Jc.call(e),!0}catch(e){return!1}},$c=Object.prototype.toString,eu="[object String]",tu=$s(),nu=function(e){return"string"==typeof e||"object"==typeof e&&(tu?Qc(e):$c.call(e)===eu)},ru=No,iu=yo("%TypeError%"),ou=Zo,au=bs,su=Es,lu=Hs,cu=Xc,uu=Kc,du=Bl,pu=nu,hu=ru("String.prototype.split"),fu=Object("a"),mu="a"!==fu[0]||!(0 in fu),gu=function(e){var t,n=uu(this),r=mu&&pu(this)?hu(this,""):n,i=cu(r);if(!lu(e))throw new iu("Array.prototype.forEach callback must be a function");arguments.length>1&&(t=arguments[1]);for(var o=0;o<i;){var a=du(o);if(su(r,a)){var s=au(r,a);ou(e,t,[s,o,r])}o+=1}},vu=function(e){var t=!0,n=!0,r=!1;if("function"==typeof e){try{e.call("f",(function(e,n,r){"object"!=typeof r&&(t=!1)})),e.call([null],(function(){n="string"==typeof this}),"x")}catch(e){r=!0}return!r&&t&&n}return!1},yu=gu,bu=function(){var e=Array.prototype.forEach;return vu(e)?e:yu},wu=Do,xu=bu,Su=function(){var e=xu();return wu(Array.prototype,{forEach:e},{forEach:function(){return Array.prototype.forEach!==e}}),e},Eu=Do,Tu=Io.exports,Pu=No,Cu=Bo,ku=gu,Ou=bu,_u=Ou(),Ru=Su,Au=Pu("Array.prototype.slice"),Du=Tu.apply(_u),Iu=function(e,t){return Cu(e),Du(e,Au(arguments,1))};Eu(Iu,{getPolyfill:Ou,implementation:ku,shim:Ru});var Mu=Iu,Lu=Bo,ju=No,Nu=ju("Object.prototype.propertyIsEnumerable"),Fu=ju("Array.prototype.push"),Bu=function(e){var t=Lu(e),n=[];for(var r in t)Nu(t,r)&&Fu(n,[r,t[r]]);return n},zu=Bu,Hu=function(){return"function"==typeof Object.entries?Object.entries:zu},Uu=Hu,Vu=Do,Wu=function(){var e=Uu();return Vu(Object,{entries:e},{entries:function(){return Object.entries!==e}}),e},Gu=Do,qu=Io.exports,Xu=Bu,Zu=Hu,Yu=Wu,Ku=qu(Zu(),Object);Gu(Ku,{getPolyfill:Zu,implementation:Xu,shim:Yu});var Ju=Mu,Qu=Ku,$u=Vi,ed=lc,td=function(e){},nd=String.prototype.replace,rd=String.prototype.split,id="||||",od=function(e){var t=e%100,n=t%10;return 11!==t&&1===n?0:2<=n&&n<=4&&!(t>=12&&t<=14)?1:2},ad={pluralTypes:{arabic:function(e){if(e<3)return e;var t=e%100;return t>=3&&t<=10?3:t>=11?4:5},bosnian_serbian:od,chinese:function(){return 0},croatian:od,french:function(e){return e>=2?1:0},german:function(e){return 1!==e?1:0},russian:od,lithuanian:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?1:2},czech:function(e){return 1===e?0:e>=2&&e<=4?1:2},polish:function(e){if(1===e)return 0;var t=e%10;return 2<=t&&t<=4&&(e%100<10||e%100>=20)?1:2},icelandic:function(e){return e%10!=1||e%100==11?1:0},slovenian:function(e){var t=e%100;return 1===t?0:2===t?1:3===t||4===t?2:3},romanian:function(e){if(1===e)return 0;var t=e%100;return 0===e||t>=2&&t<=19?1:2}},pluralTypeToLanguages:{arabic:["ar"],bosnian_serbian:["bs-Latn-BA","bs-Cyrl-BA","srl-RS","sr-RS"],chinese:["id","id-ID","ja","ko","ko-KR","lo","ms","th","th-TH","zh"],croatian:["hr","hr-HR"],german:["fa","da","de","en","es","fi","el","he","hi-IN","hu","hu-HU","it","nl","no","pt","sv","tr"],french:["fr","tl","pt-br"],russian:["ru","ru-RU"],lithuanian:["lt"],czech:["cs","cs-CZ","sk"],polish:["pl"],icelandic:["is","mk"],slovenian:["sl-SL"],romanian:["ro"]}};function sd(e){var t={};return Ju(Qu(e),(function(e){var n=e[0],r=e[1];Ju(r,(function(e){t[e]=n}))})),t}function ld(e,t){var n=sd(e.pluralTypeToLanguages);return n[t]||n[rd.call(t,/-/,1)[0]]||n.en}function cd(e,t,n){return e.pluralTypes[t](n)}function ud(){var e={};return function(t,n){var r=e[n];return r&&!t.pluralTypes[r]&&(r=null,e[n]=r),r||(r=ld(t,n))&&(e[n]=r),r}}function dd(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function pd(e){var t=e&&e.prefix||"%{",n=e&&e.suffix||"}";if(t===id||n===id)throw new RangeError('"'+id+'" token is reserved for pluralization');return new RegExp(dd(t)+"(.*?)"+dd(n),"g")}var hd=ud(),fd=/%\{(.*?)\}/g;function md(e,t,n,r,i,o){if("string"!=typeof e)throw new TypeError("Polyglot.transformPhrase expects argument #1 to be string");if(null==t)return e;var a=e,s=r||fd,l=o||nd,c="number"==typeof t?{smart_count:t}:t;if(null!=c.smart_count&&e){var u=i||ad,d=rd.call(e,id),p=cd(u,hd(u,n||"en"),c.smart_count);a=ed(d[p]||d[0])}return a=l.call(a,s,(function(e,t){return $u(c,t)&&null!=c[t]?c[t]:e}))}function gd(e){var t=e||{};this.phrases={},this.extend(t.phrases||{}),this.currentLocale=t.locale||"en";var n=t.allowMissing?md:null;this.onMissingKey="function"==typeof t.onMissingKey?t.onMissingKey:n,this.warn=t.warn||td,this.replaceImplementation=t.replace||nd,this.tokenRegex=pd(t.interpolation),this.pluralRules=t.pluralRules||ad}gd.prototype.locale=function(e){return e&&(this.currentLocale=e),this.currentLocale},gd.prototype.extend=function(e,t){Ju(Qu(e||{}),(function(e){var n=e[0],r=e[1],i=t?t+"."+n:n;"object"==typeof r?this.extend(r,i):this.phrases[i]=r}),this)},gd.prototype.unset=function(e,t){"string"==typeof e?delete this.phrases[e]:Ju(Qu(e||{}),(function(e){var n=e[0],r=e[1],i=t?t+"."+n:n;"object"==typeof r?this.unset(r,i):delete this.phrases[i]}),this)},gd.prototype.clear=function(){this.phrases={}},gd.prototype.replace=function(e){this.clear(),this.extend(e)},gd.prototype.t=function(e,t){var n,r,i=null==t?{}:t;return"string"==typeof this.phrases[e]?n=this.phrases[e]:"string"==typeof i._?n=i._:this.onMissingKey?r=(0,this.onMissingKey)(e,i,this.currentLocale,this.tokenRegex,this.pluralRules,this.replaceImplementation):(this.warn('Missing translation for key: "'+e+'"'),r=e),"string"==typeof n&&(r=md(n,i,this.currentLocale,this.tokenRegex,this.pluralRules,this.replaceImplementation)),r},gd.prototype.has=function(e){return $u(this.phrases,e)},gd.transformPhrase=function(e,t,n){return md(e,t,n)};var vd=gd,yd={"Add a comment...":"إضافة تعليق","Add a reply...":"إضافة رد","Add tag...":"إضافة علامة",Cancel:"إلغاء",Close:"إغلاق",Edit:"Edit",Delete:"Delete",Ok:"تم"},bd={"Add a comment...":"Napsat komentář...","Add a reply...":"Odpovědět...","Add tag...":"Přidat štítek...",Cancel:"Zrušit",Close:"Zavřít",Edit:"Upravit",Delete:"Smazat",Ok:"Ok"},wd={"Add a comment...":"Kommentar schreiben...","Add a reply...":"Antwort schreiben...","Add tag...":"Tag...",Cancel:"Abbrechen",Close:"Schliessen",Edit:"Bearbeiten",Delete:"Löschen",Ok:"Ok"},xd={"Add a comment...":"Σχολίασε...","Add a reply...":"Απάντησε...","Add tag...":"Πρόσθεσε tag...",Cancel:"Άκυρο",Close:"Κλείσιμο",Edit:"Επεξεργασία",Delete:"Διαγραφή",Ok:"Ok"},Sd={"Add a comment...":"Agregar un comentario...","Add a reply...":"Agregar una respuesta...","Add tag...":"Etiquetar...",Cancel:"Cancelar",Close:"Cerrar",Edit:"Editar",Delete:"Eliminar",Ok:"Ok"},Ed={"Add a comment...":"Lisää kommentti","Add a reply...":"Lisää vastaus","Add tag...":"Lisää tunniste",Cancel:"Peruuta",Close:"Sulje",Edit:"Muokkaa",Delete:"Poista",Ok:"Ok"},Td={"Add a comment...":"Ajouter un commentaire...","Add a reply...":"Ajouter une réponse...","Add tag...":"Ajouter une étiquette...",Cancel:"Annuler",Close:"Fermer",Edit:"Éditer",Delete:"Supprimer",Ok:"Ok"},Pd={"Add a comment...":"Engadir un comentario...","Add a reply...":"Engadir unha resposta...","Add tag...":"Etiquetar...",Cancel:"Cancelar",Close:"Pechar",Edit:"Edit",Delete:"Delete",Ok:"Ok"},Cd={"Add a comment...":"टिप्पणी जोड़ें","Add a reply...":"जवाब दें","Add tag...":"टैग लगाएँ",Cancel:"रद्द करें",Close:"बंद करें",Edit:"संपादित करें",Delete:"हटाएँ",Ok:"ठीक है"},kd={"Add a comment...":"Commenta...","Add a reply...":"Rispondi...","Add tag...":"Aggiungi tag...",Cancel:"Annulla",Close:"Chiudi",Edit:"Edit",Delete:"Delete",Ok:"Ok"},Od={"Add a comment...":"コメントを追加する...","Add a reply...":"返信する...","Add tag...":"タグを追加する...",Cancel:"キャンセル",Close:"閉じる",Edit:"編集",Delete:"削除",Ok:"Ok"},_d={"Add a comment...":"댓글 추가","Add a reply...":"답글 추가","Add tag...":"태그 추가",Cancel:"취소",Close:"닫기",Edit:"수정",Delete:"삭제",Ok:"확인"},Rd={"Add a comment...":"Commentaar toevoegen...","Add a reply...":"Antwoord toevoegen...","Add tag...":"Tag toevoegen...",Cancel:"Afbreken",Close:"Sluiten",Edit:"Bewerken",Delete:"Verwijderen",Ok:"Ok"},Ad={"Add a comment...":"Adicionar um comentário...","Add a reply...":"Adicionar uma resposta...","Add tag...":"Etiquetar...",Cancel:"Cancelar",Close:"Fechar",Edit:"Editar",Delete:"Apagar",Ok:"Ok"},Dd={"Add a comment...":"Добавить комментарий...","Add a reply...":"Добавить ответ...","Add tag...":"Добавить тэг...",Cancel:"Отмена",Close:"Закрыть",Edit:"Редактировать",Delete:"Удалить",Ok:"Ок"},Id={"Add a comment...":"Skriv en kommentar...","Add a reply...":"Skriv ett svar...","Add tag...":"Tagg...",Cancel:"Cancel",Close:"Stäng",Edit:"Edit",Delete:"Delete",Ok:"Ok"},Md={"Add a comment...":"เพิ่มคอมเมนต์...","Add a reply...":"ตอบกลับ...","Add tag...":"เพิ่มแท็ก...",Cancel:"ยกเลิก",Close:"ปิด",Edit:"แก้ไข",Delete:"ลบ",Ok:"ตกลง"},Ld={"Add a comment...":"Yorum ekle...","Add a reply...":"Cevap ekle...","Add tag...":"Tag Ekle...",Cancel:"İptal",Close:"Kapat",Edit:"Düzenle",Delete:"Sil",Ok:"Tamam"},jd={"Add a comment...":"تبصرہ کریں","Add a reply...":"جواب دیں","Add tag...":"ٹیگ لگائیں",Cancel:"منسوخ کریں",Close:"بند کریں",Edit:"ترمیم کریں",Delete:"ہٹائیں",Ok:"ٹھیک ہے"},Nd={"Add a comment...":"添加评论...","Add a reply...":"添加回复...","Add tag...":"添加标签...",Cancel:"取消",Close:"关闭",Edit:"编辑",Delete:"删除",Ok:"确认"},Fd={"Add a comment...":"添加評論...","Add a reply...":"添加回覆...","Add tag...":"添加標籤...",Cancel:"取消",Close:"關閉",Edit:"編輯",Delete:"刪除",Ok:"確認"},Bd={};Object.defineProperty(Bd,"__esModule",{value:!0});var zd=[["ثانية","ثانيتين","%s ثوان","%s ثانية"],["دقيقة","دقيقتين","%s دقائق","%s دقيقة"],["ساعة","ساعتين","%s ساعات","%s ساعة"],["يوم","يومين","%s أيام","%s يوماً"],["أسبوع","أسبوعين","%s أسابيع","%s أسبوعاً"],["شهر","شهرين","%s أشهر","%s شهراً"],["عام","عامين","%s أعوام","%s عاماً"]];function Hd(e,t){return t<3?zd[e][t-1]:t>=3&&t<=10?zd[e][2]:zd[e][3]}function Ud(e,t){if(0===t)return["منذ لحظات","بعد لحظات"];var n=Hd(Math.floor(t/2),e);return["منذ "+n,"بعد "+n]}var Vd=Bd.default=Ud,Wd={};function Gd(e,t){var n=0;return(1==t||3==t||5==t||7==t||9==t||11==t||13==t)&&e>=5&&(n=1),[[["právě teď","právě teď"]],[["před %s vteřinami","za %s vteřiny"],["před %s vteřinami","za %s vteřin"]],[["před minutou","za minutu"]],[["před %s minutami","za %s minuty"],["před %s minutami","za %s minut"]],[["před hodinou","za hodinu"]],[["před %s hodinami","za %s hodiny"],["před %s hodinami","za %s hodin"]],[["včera","zítra"]],[["před %s dny","za %s dny"],["před %s dny","za %s dnů"]],[["minulý týden","příští týden"]],[["před %s týdny","za %s týdny"],["před %s týdny","za %s týdnů"]],[["minulý měsíc","přístí měsíc"]],[["před %s měsíci","za %s měsíce"],["před %s měsíci","za %s měsíců"]],[["před rokem","přístí rok"]],[["před %s lety","za %s roky"],["před %s lety","za %s let"]]][t][n]}Object.defineProperty(Wd,"__esModule",{value:!0});var qd=Wd.default=Gd,Xd={};function Zd(e,t){return[["gerade eben","vor einer Weile"],["vor %s Sekunden","in %s Sekunden"],["vor 1 Minute","in 1 Minute"],["vor %s Minuten","in %s Minuten"],["vor 1 Stunde","in 1 Stunde"],["vor %s Stunden","in %s Stunden"],["vor 1 Tag","in 1 Tag"],["vor %s Tagen","in %s Tagen"],["vor 1 Woche","in 1 Woche"],["vor %s Wochen","in %s Wochen"],["vor 1 Monat","in 1 Monat"],["vor %s Monaten","in %s Monaten"],["vor 1 Jahr","in 1 Jahr"],["vor %s Jahren","in %s Jahren"]][t]}Object.defineProperty(Xd,"__esModule",{value:!0});var Yd=Xd.default=Zd,Kd={};function Jd(e,t){return[["μόλις τώρα","σε λίγο"],["%s δευτερόλεπτα πριν","σε %s δευτερόλεπτα"],["1 λεπτό πριν","σε 1 λεπτό"],["%s λεπτά πριν","σε %s λεπτά"],["1 ώρα πριν","σε 1 ώρα"],["%s ώρες πριν","σε %s ώρες"],["1 μέρα πριν","σε 1 μέρα"],["%s μέρες πριν","σε %s μέρες"],["1 εβδομάδα πριν","σε 1 εβδομάδα"],["%s εβδομάδες πριν","σε %s εβδομάδες"],["1 μήνα πριν","σε 1 μήνα"],["%s μήνες πριν","σε %s μήνες"],["1 χρόνο πριν","σε 1 χρόνο"],["%s χρόνια πριν","σε %s χρόνια"]][t]}Object.defineProperty(Kd,"__esModule",{value:!0});var Qd=Kd.default=Jd,$d={};function ep(e,t){return[["justo ahora","en un rato"],["hace %s segundos","en %s segundos"],["hace 1 minuto","en 1 minuto"],["hace %s minutos","en %s minutos"],["hace 1 hora","en 1 hora"],["hace %s horas","en %s horas"],["hace 1 día","en 1 día"],["hace %s días","en %s días"],["hace 1 semana","en 1 semana"],["hace %s semanas","en %s semanas"],["hace 1 mes","en 1 mes"],["hace %s meses","en %s meses"],["hace 1 año","en 1 año"],["hace %s años","en %s años"]][t]}Object.defineProperty($d,"__esModule",{value:!0});var tp=$d.default=ep,np={};function rp(e,t){return[["juuri äsken","juuri nyt"],["%s sekuntia sitten","%s sekunnin päästä"],["minuutti sitten","minuutin päästä"],["%s minuuttia sitten","%s minuutin päästä"],["tunti sitten","tunnin päästä"],["%s tuntia sitten","%s tunnin päästä"],["päivä sitten","päivän päästä"],["%s päivää sitten","%s päivän päästä"],["viikko sitten","viikon päästä"],["%s viikkoa sitten","%s viikon päästä"],["kuukausi sitten","kuukauden päästä"],["%s kuukautta sitten","%s kuukauden päästä"],["vuosi sitten","vuoden päästä"],["%s vuotta sitten","%s vuoden päästä"]][t]}Object.defineProperty(np,"__esModule",{value:!0});var ip=np.default=rp,op={};function ap(e,t){return[["à l'instant","dans un instant"],["il y a %s secondes","dans %s secondes"],["il y a 1 minute","dans 1 minute"],["il y a %s minutes","dans %s minutes"],["il y a 1 heure","dans 1 heure"],["il y a %s heures","dans %s heures"],["il y a 1 jour","dans 1 jour"],["il y a %s jours","dans %s jours"],["il y a 1 semaine","dans 1 semaine"],["il y a %s semaines","dans %s semaines"],["il y a 1 mois","dans 1 mois"],["il y a %s mois","dans %s mois"],["il y a 1 an","dans 1 an"],["il y a %s ans","dans %s ans"]][t]}Object.defineProperty(op,"__esModule",{value:!0});var sp=op.default=ap,lp={};function cp(e,t){return[["xusto agora","daquí a un pouco"],["hai %s segundos","en %s segundos"],["hai 1 minuto","nun minuto"],["hai %s minutos","en %s minutos"],["hai 1 hora","nunha hora"],["hai %s horas","en %s horas"],["hai 1 día","nun día"],["hai %s días","en %s días"],["hai 1 semana","nunha semana"],["hai %s semanas","en %s semanas"],["hai 1 mes","nun mes"],["hai %s meses","en %s meses"],["hai 1 ano","nun ano"],["hai %s anos","en %s anos"]][t]}Object.defineProperty(lp,"__esModule",{value:!0});var up=lp.default=cp,dp={};function pp(e,t){return[["अभी","कुछ समय"],["%s सेकंड पहले","%s सेकंड में"],["1 मिनट पहले","1 मिनट में"],["%s मिनट पहले","%s मिनट में"],["1 घंटे पहले","1 घंटे में"],["%s घंटे पहले","%s घंटे में"],["1 दिन पहले","1 दिन में"],["%s दिन पहले","%s दिनों में"],["1 सप्ताह पहले","1 सप्ताह में"],["%s हफ्ते पहले","%s हफ्तों में"],["1 महीने पहले","1 महीने में"],["%s महीने पहले","%s महीनों में"],["1 साल पहले","1 साल में"],["%s साल पहले","%s साल में"]][t]}Object.defineProperty(dp,"__esModule",{value:!0});var hp=dp.default=pp,fp={};function mp(e,t){return[["poco fa","fra poco"],["%s secondi fa","fra %s secondi"],["un minuto fa","fra un minuto"],["%s minuti fa","fra %s minuti"],["un'ora fa","fra un'ora"],["%s ore fa","fra %s ore"],["un giorno fa","fra un giorno"],["%s giorni fa","fra %s giorni"],["una settimana fa","fra una settimana"],["%s settimane fa","fra %s settimane"],["un mese fa","fra un mese"],["%s mesi fa","fra %s mesi"],["un anno fa","fra un anno"],["%s anni fa","fra %s anni"]][t]}Object.defineProperty(fp,"__esModule",{value:!0});var gp=fp.default=mp,vp={};function yp(e,t){return[["すこし前","すぐに"],["%s秒前","%s秒以内"],["1分前","1分以内"],["%s分前","%s分以内"],["1時間前","1時間以内"],["%s時間前","%s時間以内"],["1日前","1日以内"],["%s日前","%s日以内"],["1週間前","1週間以内"],["%s週間前","%s週間以内"],["1ヶ月前","1ヶ月以内"],["%sヶ月前","%sヶ月以内"],["1年前","1年以内"],["%s年前","%s年以内"]][t]}Object.defineProperty(vp,"__esModule",{value:!0});var bp=vp.default=yp,wp={};function xp(e,t){return[["방금","곧"],["%s초 전","%s초 후"],["1분 전","1분 후"],["%s분 전","%s분 후"],["1시간 전","1시간 후"],["%s시간 전","%s시간 후"],["1일 전","1일 후"],["%s일 전","%s일 후"],["1주일 전","1주일 후"],["%s주일 전","%s주일 후"],["1개월 전","1개월 후"],["%s개월 전","%s개월 후"],["1년 전","1년 후"],["%s년 전","%s년 후"]][t]}Object.defineProperty(wp,"__esModule",{value:!0});var Sp=wp.default=xp,Ep={};function Tp(e,t){return[["recent","binnenkort"],["%s seconden geleden","binnen %s seconden"],["1 minuut geleden","binnen 1 minuut"],["%s minuten geleden","binnen %s minuten"],["1 uur geleden","binnen 1 uur"],["%s uur geleden","binnen %s uur"],["1 dag geleden","binnen 1 dag"],["%s dagen geleden","binnen %s dagen"],["1 week geleden","binnen 1 week"],["%s weken geleden","binnen %s weken"],["1 maand geleden","binnen 1 maand"],["%s maanden geleden","binnen %s maanden"],["1 jaar geleden","binnen 1 jaar"],["%s jaar geleden","binnen %s jaar"]][t]}Object.defineProperty(Ep,"__esModule",{value:!0});var Pp=Ep.default=Tp,Cp={};function kp(e,t){return[["agora mesmo","agora"],["há %s segundos","em %s segundos"],["há um minuto","em um minuto"],["há %s minutos","em %s minutos"],["há uma hora","em uma hora"],["há %s horas","em %s horas"],["há um dia","em um dia"],["há %s dias","em %s dias"],["há uma semana","em uma semana"],["há %s semanas","em %s semanas"],["há um mês","em um mês"],["há %s meses","em %s meses"],["há um ano","em um ano"],["há %s anos","em %s anos"]][t]}Object.defineProperty(Cp,"__esModule",{value:!0});var Op=Cp.default=kp,_p={};function Rp(e,t,n,r,i){var o=i%10,a=r;return 1===i?a=e:1===o&&i>20?a=t:o>1&&o<5&&(i>20||i<10)&&(a=n),a}Object.defineProperty(_p,"__esModule",{value:!0});var Ap=Rp.bind(null,"секунду","%s секунду","%s секунды","%s секунд"),Dp=Rp.bind(null,"минуту","%s минуту","%s минуты","%s минут"),Ip=Rp.bind(null,"час","%s час","%s часа","%s часов"),Mp=Rp.bind(null,"день","%s день","%s дня","%s дней"),Lp=Rp.bind(null,"неделю","%s неделю","%s недели","%s недель"),jp=Rp.bind(null,"месяц","%s месяц","%s месяца","%s месяцев"),Np=Rp.bind(null,"год","%s год","%s года","%s лет");function Fp(e,t){switch(t){case 0:return["только что","через несколько секунд"];case 1:return[Ap(e)+" назад","через "+Ap(e)];case 2:case 3:return[Dp(e)+" назад","через "+Dp(e)];case 4:case 5:return[Ip(e)+" назад","через "+Ip(e)];case 6:return["вчера","завтра"];case 7:return[Mp(e)+" назад","через "+Mp(e)];case 8:case 9:return[Lp(e)+" назад","через "+Lp(e)];case 10:case 11:return[jp(e)+" назад","через "+jp(e)];case 12:case 13:return[Np(e)+" назад","через "+Np(e)];default:return["",""]}}var Bp=_p.default=Fp,zp={};function Hp(e,t){return[["just nu","om en stund"],["%s sekunder sedan","om %s sekunder"],["1 minut sedan","om 1 minut"],["%s minuter sedan","om %s minuter"],["1 timme sedan","om 1 timme"],["%s timmar sedan","om %s timmar"],["1 dag sedan","om 1 dag"],["%s dagar sedan","om %s dagar"],["1 vecka sedan","om 1 vecka"],["%s veckor sedan","om %s veckor"],["1 månad sedan","om 1 månad"],["%s månader sedan","om %s månader"],["1 år sedan","om 1 år"],["%s år sedan","om %s år"]][t]}Object.defineProperty(zp,"__esModule",{value:!0});var Up=zp.default=Hp,Vp={};function Wp(e,t){return[["เมื่อสักครู่นี้","อีกสักครู่"],["%s วินาทีที่แล้ว","ใน %s วินาที"],["1 นาทีที่แล้ว","ใน 1 นาที"],["%s นาทีที่แล้ว","ใน %s นาที"],["1 ชั่วโมงที่แล้ว","ใน 1 ชั่วโมง"],["%s ชั่วโมงที่แล้ว","ใน %s ชั่วโมง"],["1 วันที่แล้ว","ใน 1 วัน"],["%s วันที่แล้ว","ใน %s วัน"],["1 อาทิตย์ที่แล้ว","ใน 1 อาทิตย์"],["%s อาทิตย์ที่แล้ว","ใน %s อาทิตย์"],["1 เดือนที่แล้ว","ใน 1 เดือน"],["%s เดือนที่แล้ว","ใน %s เดือน"],["1 ปีที่แล้ว","ใน 1 ปี"],["%s ปีที่แล้ว","ใน %s ปี"]][t]}Object.defineProperty(Vp,"__esModule",{value:!0});var Gp=Vp.default=Wp,qp={};function Xp(e,t){return[["az önce","şimdi"],["%s saniye önce","%s saniye içinde"],["1 dakika önce","1 dakika içinde"],["%s dakika önce","%s dakika içinde"],["1 saat önce","1 saat içinde"],["%s saat önce","%s saat içinde"],["1 gün önce","1 gün içinde"],["%s gün önce","%s gün içinde"],["1 hafta önce","1 hafta içinde"],["%s hafta önce","%s hafta içinde"],["1 ay önce","1 ay içinde"],["%s ay önce","%s ay içinde"],["1 yıl önce","1 yıl içinde"],["%s yıl önce","%s yıl içinde"]][t]}Object.defineProperty(qp,"__esModule",{value:!0});var Zp=qp.default=Xp,Yp={};Object.defineProperty(Yp,"__esModule",{value:!0});var Kp=["秒","分钟","小时","天","周","个月","年"];function Jp(e,t){if(0===t)return["刚刚","片刻后"];var n=Kp[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}var Qp=Yp.default=Jp,$p={};function eh(e,t){return[["剛剛","片刻後"],["%s 秒前","%s 秒後"],["1 分鐘前","1 分鐘後"],["%s 分鐘前","%s 分鐘後"],["1 小時前","1 小時後"],["%s 小時前","%s 小時後"],["1 天前","1 天後"],["%s 天前","%s 天後"],["1 週前","1 週後"],["%s 週前","%s 週後"],["1 個月前","1 個月後"],["%s 個月前","%s 個月後"],["1 年前","1 年後"],["%s 年前","%s 年後"]][t]}Object.defineProperty($p,"__esModule",{value:!0});var th=$p.default=eh,nh={ar:yd,cs:bd,de:wd,el:xd,es:Sd,fi:Ed,fr:Td,gl:Pd,hi:Cd,it:kd,ja:Od,ko:_d,nl:Rd,pt:Ad,ru:Dd,sv:Id,th:Md,tr:Ld,ur:jd,"zh-CN":Nd,"zh-TW":Fd},rh=Object.keys(nh),ih=new vd({allowMissing:!0});ih.init=function(e,t){ih.clear(),e&&(ih.locale(e),ih.extend(nh[e])),t&&ih.extend(t)},Nr("ar",Vd),Nr("cs",qd),Nr("de",Yd),Nr("el",Qd),Nr("es",tp),Nr("fi",ip),Nr("fr",sp),Nr("gl",up),Nr("hi",hp),Nr("it",gp),Nr("ja",bp),Nr("ko",Sp),Nr("nl",Pp),Nr("pt",Op),Nr("ru",Bp),Nr("sv",Up),Nr("th",Gp),Nr("tr",Zp),Nr("zh-CN",Qp),Nr("zh-TW",th),ih.registerMessages=function(e,t){nh[e]?nh[e]=T(T({},nh[e]),t):nh[e]=t};var oh,ah,sh=ih,lh=function(e){var t=ke();return ai(t,(function(){return e.onClickOutside()})),_t.createElement("ul",{ref:t,className:"r6o-comment-dropdown-menu"},_t.createElement("li",{onClick:e.onEdit},sh.t("Edit")),_t.createElement("li",{onClick:e.onDelete},sh.t("Delete")))},ch={},uh={},dh={exports:{}};oh=dh,ah=dh.exports,function(e,t){var n,r,i="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),o=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){o=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function a(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!i.has(e)){var t=null,n=null,r=null,a=function(){e.clientWidth!==n&&p()},s=function(t){window.removeEventListener("resize",a,!1),e.removeEventListener("input",p,!1),e.removeEventListener("keyup",p,!1),e.removeEventListener("autosize:destroy",s,!1),e.removeEventListener("autosize:update",p,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),i.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",s,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",p,!1),window.addEventListener("resize",a,!1),e.addEventListener("input",p,!1),e.addEventListener("autosize:update",p,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",i.set(e,{destroy:s,update:p}),l()}function l(){var n=window.getComputedStyle(e,null);"vertical"===n.resize?e.style.resize="none":"both"===n.resize&&(e.style.resize="horizontal"),t="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(t)&&(t=0),p()}function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function d(){if(0!==e.scrollHeight){var r=u(e),i=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,r.forEach((function(e){e.node.scrollTop=e.scrollTop})),i&&(document.documentElement.scrollTop=i)}}function p(){d();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),i="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(i<t?"hidden"===n.overflowY&&(c("scroll"),d(),i="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),d(),i="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),r!==i){r=i;var a=o("autosize:resized");try{e.dispatchEvent(a)}catch(e){}}}}function s(e){var t=i.get(e);t&&t.destroy()}function l(e){var t=i.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?(c=function(e){return e},c.destroy=function(e){return e},c.update=function(e){return e}):(c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return a(e)})),e},c.destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=c,e.exports=t.default}(oh,ah);var ph=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]};function hh(e){var t=ph(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=ph(e,"line-height"),n=parseFloat(t,10),r?e.style.lineHeight=r:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var i=e.nodeName,o=document.createElement(i);o.innerHTML=" ","TEXTAREA"===i.toUpperCase()&&o.setAttribute("rows","1");var a=ph(e,"font-size");o.style.fontSize=a,o.style.padding="0px",o.style.border="0px";var s=document.body;s.appendChild(o),n=o.offsetHeight,s.removeChild(o)}return n}var fh=hh,mh=At&&At.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gh=At&&At.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},vh=At&&At.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n};uh.__esModule=!0;var yh=Bt,bh=zt.exports,wh=dh.exports,xh=fh,Sh="autosize:resized",Eh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:xh(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return mh(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,r=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||r?setTimeout((function(){return e.textarea&&wh(e.textarea)})):this.textarea&&wh(this.textarea),this.textarea&&this.textarea.addEventListener(Sh,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(Sh,this.onResize),wh.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this,n=t.props;n.onResize;var r=n.maxRows;n.onChange;var i=n.style;n.innerRef;var o=n.children,a=vh(n,["onResize","maxRows","onChange","style","innerRef","children"]),s=t.state.lineHeight,l=r&&s?s*r:null;return yh.createElement("textarea",gh({},a,{onChange:this.onChange,style:l?gh({},i,{maxHeight:l}):i,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),o)},t.prototype.componentDidUpdate=function(){this.textarea&&wh.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:bh.number,maxRows:bh.number,onResize:bh.func,innerRef:bh.any,async:bh.bool},t}(yh.Component);uh.TextareaAutosize=yh.forwardRef((function(e,t){return yh.createElement(Eh,gh({},e,{innerRef:t}))})),function(e){e.__esModule=!0;var t=uh;e.default=t.TextareaAutosize}(ch);var Th=Dt(ch),Ph=function(e){y(n,e);var t=w(n);function n(e){var r;return m(this,n),r=t.call(this,e),D(x(r),"onKeyDown",(function(e){13===e.which&&e.ctrlKey&&r.props.onSaveAndClose()})),D(x(r),"onKeyUp",(function(e){46===e.which&&e.stopPropagation()})),r.element=z(),r}return v(n,[{key:"componentDidMount",value:function(){this.props.focus&&this.element.current&&this.element.current.focus({preventScroll:!0})}},{key:"render",value:function(){return _t.createElement(Th,{ref:this.element,className:"r6o-editable-text",value:this.props.content,placeholder:this.props.placeholder||sh.t("Add a comment..."),disabled:!this.props.editable,onChange:this.props.onChange,onKeyUp:this.onKeyUp,onKeyDown:this.onKeyDown})}}]),n}(U);function Ch(){return Ch=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ch.apply(this,arguments)}function kh(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Oh(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var _h=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(Oh(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=kh(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),Rh="-ms-",Ah="-moz-",Dh="-webkit-",Ih="comm",Mh="rule",Lh="decl",jh="@import",Nh="@keyframes",Fh="@layer",Bh=Math.abs,zh=String.fromCharCode,Hh=Object.assign;function Uh(e,t){return 45^Xh(e,0)?(((t<<2^Xh(e,0))<<2^Xh(e,1))<<2^Xh(e,2))<<2^Xh(e,3):0}function Vh(e){return e.trim()}function Wh(e,t){return(e=t.exec(e))?e[0]:e}function Gh(e,t,n){return e.replace(t,n)}function qh(e,t){return e.indexOf(t)}function Xh(e,t){return 0|e.charCodeAt(t)}function Zh(e,t,n){return e.slice(t,n)}function Yh(e){return e.length}function Kh(e){return e.length}function Jh(e,t){return t.push(e),e}function Qh(e,t){return e.map(t).join("")}var $h=1,ef=1,tf=0,nf=0,rf=0,of="";function af(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:$h,column:ef,length:a,return:""}}function sf(e,t){return Hh(af("",null,null,"",null,null,0),e,{length:-e.length},t)}function lf(){return rf}function cf(){return rf=nf>0?Xh(of,--nf):0,ef--,10===rf&&(ef=1,$h--),rf}function uf(){return rf=nf<tf?Xh(of,nf++):0,ef++,10===rf&&(ef=1,$h++),rf}function df(){return Xh(of,nf)}function pf(){return nf}function hf(e,t){return Zh(of,e,t)}function ff(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function mf(e){return $h=ef=1,tf=Yh(of=e),nf=0,[]}function gf(e){return of="",e}function vf(e){return Vh(hf(nf-1,wf(91===e?e+2:40===e?e+1:e)))}function yf(e){for(;(rf=df())&&rf<33;)uf();return ff(e)>2||ff(rf)>3?"":" "}function bf(e,t){for(;--t&&uf()&&!(rf<48||rf>102||rf>57&&rf<65||rf>70&&rf<97););return hf(e,pf()+(t<6&&32==df()&&32==uf()))}function wf(e){for(;uf();)switch(rf){case e:return nf;case 34:case 39:34!==e&&39!==e&&wf(rf);break;case 40:41===e&&wf(e);break;case 92:uf()}return nf}function xf(e,t){for(;uf()&&e+rf!==57&&(e+rf!==84||47!==df()););return"/*"+hf(t,nf-1)+"*"+zh(47===e?e:uf())}function Sf(e){for(;!ff(df());)uf();return hf(e,nf)}function Ef(e){return gf(Tf("",null,null,null,[""],e=mf(e),0,[0],e))}function Tf(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,p=0,h=0,f=0,m=1,g=1,v=1,y=0,b="",w=i,x=o,S=r,E=b;g;)switch(f=y,y=uf()){case 40:if(108!=f&&58==Xh(E,d-1)){-1!=qh(E+=Gh(vf(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:E+=vf(y);break;case 9:case 10:case 13:case 32:E+=yf(f);break;case 92:E+=bf(pf()-1,7);continue;case 47:switch(df()){case 42:case 47:Jh(Cf(xf(uf(),pf()),t,n),l);break;default:E+="/"}break;case 123*m:s[c++]=Yh(E)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+u:-1==v&&(E=Gh(E,/\f/g,"")),h>0&&Yh(E)-d&&Jh(h>32?kf(E+";",r,n,d-1):kf(Gh(E," ","")+";",r,n,d-2),l);break;case 59:E+=";";default:if(Jh(S=Pf(E,t,n,c,u,i,s,b,w=[],x=[],d),o),123===y)if(0===u)Tf(E,t,S,S,w,o,d,s,x);else switch(99===p&&110===Xh(E,3)?100:p){case 100:case 108:case 109:case 115:Tf(e,S,S,r&&Jh(Pf(e,S,S,0,0,i,s,b,i,w=[],d),x),i,x,d,s,r?w:x);break;default:Tf(E,S,S,S,[""],x,0,s,x)}}c=u=h=0,m=v=1,b=E="",d=a;break;case 58:d=1+Yh(E),h=f;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==cf())continue;switch(E+=zh(y),y*m){case 38:v=u>0?1:(E+="\f",-1);break;case 44:s[c++]=(Yh(E)-1)*v,v=1;break;case 64:45===df()&&(E+=vf(uf())),p=df(),u=d=Yh(b=E+=Sf(pf())),y++;break;case 45:45===f&&2==Yh(E)&&(m=0)}}return o}function Pf(e,t,n,r,i,o,a,s,l,c,u){for(var d=i-1,p=0===i?o:[""],h=Kh(p),f=0,m=0,g=0;f<r;++f)for(var v=0,y=Zh(e,d+1,d=Bh(m=a[f])),b=e;v<h;++v)(b=Vh(m>0?p[v]+" "+y:Gh(y,/&\f/g,p[v])))&&(l[g++]=b);return af(e,t,n,0===i?Mh:s,l,c,u)}function Cf(e,t,n){return af(e,t,n,Ih,zh(lf()),Zh(e,2,-2),0)}function kf(e,t,n,r){return af(e,t,n,Lh,Zh(e,0,r),Zh(e,r+1,-1),r)}function Of(e,t){for(var n="",r=Kh(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function _f(e,t,n,r){switch(e.type){case Fh:if(e.children.length)break;case jh:case Lh:return e.return=e.return||e.value;case Ih:return"";case Nh:return e.return=e.value+"{"+Of(e.children,r)+"}";case Mh:e.value=e.props.join(",")}return Yh(n=Of(e.children,r))?e.return=e.value+"{"+n+"}":""}function Rf(e){var t=Kh(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}function Af(e){return function(t){t.root||(t=t.return)&&e(t)}}function Df(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var If=function(e,t,n){for(var r=0,i=0;r=i,i=df(),38===r&&12===i&&(t[n]=1),!ff(i);)uf();return hf(e,nf)},Mf=function(e,t){var n=-1,r=44;do{switch(ff(r)){case 0:38===r&&12===df()&&(t[n]=1),e[n]+=If(nf-1,t,n);break;case 2:e[n]+=vf(r);break;case 4:if(44===r){e[++n]=58===df()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=zh(r)}}while(r=uf());return e},Lf=function(e,t){return gf(Mf(mf(e),t))},jf=new WeakMap,Nf=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||jf.get(n))&&!r){jf.set(e,!0);for(var i=[],o=Lf(t,i),a=n.props,s=0,l=0;s<o.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},Ff=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Bf(e,t){switch(Uh(e,t)){case 5103:return Dh+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Dh+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Dh+e+Ah+e+Rh+e+e;case 6828:case 4268:return Dh+e+Rh+e+e;case 6165:return Dh+e+Rh+"flex-"+e+e;case 5187:return Dh+e+Gh(e,/(\w+).+(:[^]+)/,Dh+"box-$1$2"+Rh+"flex-$1$2")+e;case 5443:return Dh+e+Rh+"flex-item-"+Gh(e,/flex-|-self/,"")+e;case 4675:return Dh+e+Rh+"flex-line-pack"+Gh(e,/align-content|flex-|-self/,"")+e;case 5548:return Dh+e+Rh+Gh(e,"shrink","negative")+e;case 5292:return Dh+e+Rh+Gh(e,"basis","preferred-size")+e;case 6060:return Dh+"box-"+Gh(e,"-grow","")+Dh+e+Rh+Gh(e,"grow","positive")+e;case 4554:return Dh+Gh(e,/([^-])(transform)/g,"$1"+Dh+"$2")+e;case 6187:return Gh(Gh(Gh(e,/(zoom-|grab)/,Dh+"$1"),/(image-set)/,Dh+"$1"),e,"")+e;case 5495:case 3959:return Gh(e,/(image-set\([^]*)/,Dh+"$1$`$1");case 4968:return Gh(Gh(e,/(.+:)(flex-)?(.*)/,Dh+"box-pack:$3"+Rh+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Dh+e+e;case 4095:case 3583:case 4068:case 2532:return Gh(e,/(.+)-inline(.+)/,Dh+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Yh(e)-1-t>6)switch(Xh(e,t+1)){case 109:if(45!==Xh(e,t+4))break;case 102:return Gh(e,/(.+:)(.+)-([^]+)/,"$1"+Dh+"$2-$3$1"+Ah+(108==Xh(e,t+3)?"$3":"$2-$3"))+e;case 115:return~qh(e,"stretch")?Bf(Gh(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Xh(e,t+1))break;case 6444:switch(Xh(e,Yh(e)-3-(~qh(e,"!important")&&10))){case 107:return Gh(e,":",":"+Dh)+e;case 101:return Gh(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Dh+(45===Xh(e,14)?"inline-":"")+"box$3$1"+Dh+"$2$3$1"+Rh+"$2box$3")+e}break;case 5936:switch(Xh(e,t+11)){case 114:return Dh+e+Rh+Gh(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Dh+e+Rh+Gh(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Dh+e+Rh+Gh(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Dh+e+Rh+e+e}return e}var zf=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Lh:e.return=Bf(e.value,e.length);break;case Nh:return Of([sf(e,{value:Gh(e.value,"@","@"+Dh)})],r);case Mh:if(e.length)return Qh(e.props,(function(t){switch(Wh(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Of([sf(e,{props:[Gh(t,/:(read-\w+)/,":"+Ah+"$1")]})],r);case"::placeholder":return Of([sf(e,{props:[Gh(t,/:(plac\w+)/,":"+Dh+"input-$1")]}),sf(e,{props:[Gh(t,/:(plac\w+)/,":"+Ah+"$1")]}),sf(e,{props:[Gh(t,/:(plac\w+)/,Rh+"input-$1")]})],r)}return""}))}}],Hf=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,i=e.stylisPlugins||zf,o={},a=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)o[t[n]]=!0;a.push(e)}));var s,l,c=[Nf,Ff],u=[_f,Af((function(e){l.insert(e)}))],d=Rf(c.concat(i,u)),p=function(e){return Of(Ef(e),d)};s=function(e,t,n,r){l=n,p(e?e+"{"+t.styles+"}":t.styles),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new _h({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:s};return h.sheet.hydrate(a),h},Uf={exports:{}},Vf={},Wf="function"==typeof Symbol&&Symbol.for,Gf=Wf?Symbol.for("react.element"):60103,qf=Wf?Symbol.for("react.portal"):60106,Xf=Wf?Symbol.for("react.fragment"):60107,Zf=Wf?Symbol.for("react.strict_mode"):60108,Yf=Wf?Symbol.for("react.profiler"):60114,Kf=Wf?Symbol.for("react.provider"):60109,Jf=Wf?Symbol.for("react.context"):60110,Qf=Wf?Symbol.for("react.async_mode"):60111,$f=Wf?Symbol.for("react.concurrent_mode"):60111,em=Wf?Symbol.for("react.forward_ref"):60112,tm=Wf?Symbol.for("react.suspense"):60113,nm=Wf?Symbol.for("react.suspense_list"):60120,rm=Wf?Symbol.for("react.memo"):60115,im=Wf?Symbol.for("react.lazy"):60116,om=Wf?Symbol.for("react.block"):60121,am=Wf?Symbol.for("react.fundamental"):60117,sm=Wf?Symbol.for("react.responder"):60118,lm=Wf?Symbol.for("react.scope"):60119;function cm(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Gf:switch(e=e.type){case Qf:case $f:case Xf:case Yf:case Zf:case tm:return e;default:switch(e=e&&e.$$typeof){case Jf:case em:case im:case rm:case Kf:return e;default:return t}}case qf:return t}}}function um(e){return cm(e)===$f}Vf.AsyncMode=Qf,Vf.ConcurrentMode=$f,Vf.ContextConsumer=Jf,Vf.ContextProvider=Kf,Vf.Element=Gf,Vf.ForwardRef=em,Vf.Fragment=Xf,Vf.Lazy=im,Vf.Memo=rm,Vf.Portal=qf,Vf.Profiler=Yf,Vf.StrictMode=Zf,Vf.Suspense=tm,Vf.isAsyncMode=function(e){return um(e)||cm(e)===Qf},Vf.isConcurrentMode=um,Vf.isContextConsumer=function(e){return cm(e)===Jf},Vf.isContextProvider=function(e){return cm(e)===Kf},Vf.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Gf},Vf.isForwardRef=function(e){return cm(e)===em},Vf.isFragment=function(e){return cm(e)===Xf},Vf.isLazy=function(e){return cm(e)===im},Vf.isMemo=function(e){return cm(e)===rm},Vf.isPortal=function(e){return cm(e)===qf},Vf.isProfiler=function(e){return cm(e)===Yf},Vf.isStrictMode=function(e){return cm(e)===Zf},Vf.isSuspense=function(e){return cm(e)===tm},Vf.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===Xf||e===$f||e===Yf||e===Zf||e===tm||e===nm||"object"==typeof e&&null!==e&&(e.$$typeof===im||e.$$typeof===rm||e.$$typeof===Kf||e.$$typeof===Jf||e.$$typeof===em||e.$$typeof===am||e.$$typeof===sm||e.$$typeof===lm||e.$$typeof===om)},Vf.typeOf=cm,Uf.exports=Vf;var dm=Uf.exports,pm={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},hm={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},fm={};fm[dm.ForwardRef]=pm,fm[dm.Memo]=hm;var mm=!0;function gm(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var vm=function(e,t,n){var r=e.key+"-"+t.name;(!1===n||!1===mm)&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},ym=function(e,t,n){vm(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}};function bm(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}var wm={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},xm=/[A-Z]|^ms/g,Sm=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Em=function(e){return 45===e.charCodeAt(1)},Tm=function(e){return null!=e&&"boolean"!=typeof e},Pm=Df((function(e){return Em(e)?e:e.replace(xm,"-$&").toLowerCase()})),Cm=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Sm,(function(e,t,n){return _m={name:t,styles:n,next:_m},t}))}return 1===wm[e]||Em(e)||"number"!=typeof t||0===t?t:t+"px"};function km(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return _m={name:n.name,styles:n.styles,next:_m},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)_m={name:r.name,styles:r.styles,next:_m},r=r.next;return n.styles+";"}return Om(e,t,n);case"function":if(void 0!==e){var i=_m,o=n(e);return _m=i,km(e,t,o)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}function Om(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=km(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=o+"{"+t[a]+"}":Tm(a)&&(r+=Pm(o)+":"+Cm(o,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=km(e,t,a);switch(o){case"animation":case"animationName":r+=Pm(o)+":"+s+";";break;default:r+=o+"{"+s+"}"}}else for(var l=0;l<a.length;l++)Tm(a[l])&&(r+=Pm(o)+":"+Cm(o,a[l])+";")}return r}var _m,Rm=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Am=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";_m=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=km(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++)i+=km(n,t,e[a]),r&&(i+=o[a]);Rm.lastIndex=0;for(var s,l="";null!==(s=Rm.exec(i));)l+="-"+s[1];return{name:bm(i)+l,styles:i,next:_m}},Dm=function(e){return e()},Im=!!Rt.useInsertionEffect&&Rt.useInsertionEffect||Dm,Mm={}.hasOwnProperty,Lm=de("undefined"!=typeof HTMLElement?Hf({key:"css"}):null);Lm.Provider;var jm=function(e){return qe((function(t,n){var r=Ae(Lm);return e(t,r,n)}))},Nm=de({}),Fm="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Bm=function(e,t){var n={};for(var r in t)Mm.call(t,r)&&(n[r]=t[r]);return n[Fm]=e,n},zm=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return vm(t,n,r),Im((function(){return ym(t,n,r)})),null},Hm=jm((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[Fm],o=[r],a="";"string"==typeof e.className?a=gm(t.registered,o,e.className):null!=e.className&&(a=e.className+" ");var s=Am(o,void 0,Ae(Nm));a+=t.key+"-"+s.name;var l={};for(var c in e)Mm.call(e,c)&&"css"!==c&&c!==Fm&&(l[c]=e[c]);return l.ref=n,l.className=a,F(H,null,F(zm,{cache:t,serialized:s,isStringTag:"string"==typeof i}),F(i,l))})),Um=function(e,t){var n=arguments;if(null==t||!Mm.call(t,"css"))return F.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=Hm,i[1]=Bm(e,t);for(var o=2;o<r;o++)i[o]=n[o];return F.apply(null,i)};function Vm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Am(t)}var Wm=function(){var e=Vm.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},Gm=function e(t){for(var n=t.length,r=0,i="";r<n;r++){var o=t[r];if(null!=o){var a=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))a=e(o);else for(var s in a="",o)o[s]&&s&&(a&&(a+=" "),a+=s);break;default:a=o}a&&(i&&(i+=" "),i+=a)}}return i};function qm(e,t,n){var r=[],i=gm(e,r,n);return r.length<2?n:i+t(r)}var Xm=function(e){var t=e.cache,n=e.serializedArr;return Im((function(){for(var e=0;e<n.length;e++)ym(t,n[e],!1)})),null},Zm=jm((function(e,t){var n=[],r=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var o=Am(r,t.registered);return n.push(o),vm(t,o,!1),t.key+"-"+o.name},i=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return qm(t.registered,r,Gm(n))},o={css:r,cx:i,theme:Ae(Nm)},a=e.children(o);return F(H,null,F(Xm,{cache:t,serializedArr:n}),a)}));function Ym(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Km(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&(i[n]=e[n]);return i}function Jm(e,t){if(null==e)return{};var n,r,i=Km(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(i[n]=e[n]))}return i}function Qm(e){return Qm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qm(e)}var $m={};Object.defineProperty($m,"__esModule",{value:!0});var eg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tg=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),ng=Bt,rg=og(ng),ig=og(zt.exports);function og(e){return e&&e.__esModule?e:{default:e}}function ag(e,t){var n={};for(var r in e)t.indexOf(r)>=0||!Object.prototype.hasOwnProperty.call(e,r)||(n[r]=e[r]);return n}function sg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lg(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function cg(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var ug={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},dg=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],pg=function(e){return dg.forEach((function(t){return delete e[t]})),e},hg=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},fg=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),mg=function(){return fg?"_"+Math.random().toString(36).substr(2,12):void 0},gg=function(e){function t(e){sg(this,t);var n=lg(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||mg(),prevId:e.id},n}return cg(t,e),tg(t,null,[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.id;return n!==t.prevId?{inputId:n||mg(),prevId:n}:null}}]),tg(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);!e||(hg(e,this.sizer),this.placeHolderSizer&&hg(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return fg&&e?rg.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=eg({},this.props.style);t.display||(t.display="inline-block");var n=eg({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),r=ag(this.props,[]);return pg(r),r.className=this.props.inputClassName,r.id=this.state.inputId,r.style=n,rg.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),rg.default.createElement("input",eg({},r,{ref:this.inputRef})),rg.default.createElement("div",{ref:this.sizerRef,style:ug},e),this.props.placeholder?rg.default.createElement("div",{ref:this.placeHolderSizerRef,style:ug},this.props.placeholder):null)}}]),t}(ng.Component);gg.propTypes={className:ig.default.string,defaultValue:ig.default.any,extraWidth:ig.default.oneOfType([ig.default.number,ig.default.string]),id:ig.default.string,injectStyles:ig.default.bool,inputClassName:ig.default.string,inputRef:ig.default.func,inputStyle:ig.default.object,minWidth:ig.default.oneOfType([ig.default.number,ig.default.string]),onAutosize:ig.default.func,onChange:ig.default.func,placeholder:ig.default.string,placeholderIsMinWidth:ig.default.bool,style:ig.default.object,value:ig.default.any},gg.defaultProps={minWidth:1,injectStyles:!0};var vg=$m.default=gg;function yg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bg(e,t){if("object"!==Qm(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Qm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function wg(e){var t=bg(e,"string");return"symbol"===Qm(t)?t:String(t)}function xg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wg(r.key),r)}}function Sg(e,t,n){return t&&xg(e.prototype,t),n&&xg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Eg(e,t){return(Eg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Tg(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Eg(e,t)}function Pg(e,t,n){return(t=wg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Og(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kg(Object(n),!0).forEach((function(t){Cg(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _g(e){return(_g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Rg(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Ag(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dg(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Ag(e):t}function Ig(e){var t=Rg();return function(){var n,r=_g(e);if(t){var i=_g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Dg(this,n)}}var Mg=function(){};function Lg(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function jg(e,t,n){var r=[n];if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&r.push("".concat(Lg(e,i)));return r.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var Ng=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===Qm(e)&&null!==e?[e]:[]},Fg=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,Og({},Jm(e,["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"]))};function Bg(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function zg(e){return Bg(e)?window.pageYOffset:e.scrollTop}function Hg(e,t){Bg(e)?window.scrollTo(0,t):e.scrollTop=t}function Ug(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/,i=document.documentElement;if("fixed"===t.position)return i;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return i}function Vg(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Wg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Mg,i=zg(e),o=t-i,a=10,s=0;function l(){var t=Vg(s+=a,i,o,n);Hg(e,t),s<n?window.requestAnimationFrame(l):r(e)}l()}function Gg(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?Hg(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&Hg(e,Math.max(t.offsetTop-i,0))}function qg(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function Xg(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function Zg(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}var Yg=!1,Kg={get passive(){return Yg=!0}},Jg="undefined"!=typeof window?window:{};Jg.addEventListener&&Jg.removeEventListener&&(Jg.addEventListener("p",Mg,Kg),Jg.removeEventListener("p",Mg,!1));var Qg=Yg;function $g(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,a=e.isFixedPosition,s=e.theme.spacing,l=Ug(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u=l.getBoundingClientRect().height,d=n.getBoundingClientRect(),p=d.bottom,h=d.height,f=d.top,m=n.offsetParent.getBoundingClientRect().top,g=window.innerHeight,v=zg(l),y=parseInt(getComputedStyle(n).marginBottom,10),b=parseInt(getComputedStyle(n).marginTop,10),w=m-b,x=g-f,S=w+v,E=u-v-f,T=p-g+v+y,P=v+f-b,C=160;switch(i){case"auto":case"bottom":if(x>=h)return{placement:"bottom",maxHeight:t};if(E>=h&&!a)return o&&Wg(l,T,C),{placement:"bottom",maxHeight:t};if(!a&&E>=r||a&&x>=r)return o&&Wg(l,T,C),{placement:"bottom",maxHeight:a?x-y:E-y};if("auto"===i||a){var k=t,O=a?w:S;return O>=r&&(k=Math.min(O-y-s.controlHeight,t)),{placement:"top",maxHeight:k}}if("bottom"===i)return o&&Hg(l,T),{placement:"bottom",maxHeight:t};break;case"top":if(w>=h)return{placement:"top",maxHeight:t};if(S>=h&&!a)return o&&Wg(l,P,C),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&w>=r){var _=t;return(!a&&S>=r||a&&w>=r)&&(_=a?w-b:S-b),o&&Wg(l,P,C),{placement:"top",maxHeight:_}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function ev(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}var tv=function(e){return"auto"===e?"bottom":e},nv=function(e){var t,n=e.placement,r=e.theme,i=r.borderRadius,o=r.spacing,a=r.colors;return Pg(t={label:"menu"},ev(n),"100%"),Pg(t,"backgroundColor",a.neutral0),Pg(t,"borderRadius",i),Pg(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Pg(t,"marginBottom",o.menuGutter),Pg(t,"marginTop",o.menuGutter),Pg(t,"position","absolute"),Pg(t,"width","100%"),Pg(t,"zIndex",1),t},rv=de({getPortalPlacement:null}),iv=function(e){Tg(n,e);var t=Ig(n);function n(){var e;yg(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).state={maxHeight:e.props.maxMenuHeight,placement:null},e.getPlacement=function(t){var n=e.props,r=n.minMenuHeight,i=n.maxMenuHeight,o=n.menuPlacement,a=n.menuPosition,s=n.menuShouldScrollIntoView,l=n.theme;if(t){var c="fixed"===a,u=$g({maxHeight:i,menuEl:t,minHeight:r,placement:o,shouldScroll:s&&!c,isFixedPosition:c,theme:l}),d=e.context.getPortalPlacement;d&&d(u),e.setState(u)}},e.getUpdatedProps=function(){var t=e.props.menuPlacement,n=e.state.placement||tv(t);return Og(Og({},e.props),{},{placement:n,maxHeight:e.state.maxHeight})},e}return Sg(n,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),n}(U);iv.contextType=rv;var ov=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerRef,a=e.innerProps;return Um("div",Ch({css:i("menu",e),className:r({menu:!0},n),ref:o},a),t)},av=function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},sv=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps,a=e.innerRef,s=e.isMulti;return Um("div",Ch({css:i("menuList",e),className:r({"menu-list":!0,"menu-list--is-multi":s},n),ref:a},o),t)},lv=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},cv=lv,uv=lv,dv=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return Um("div",Ch({css:i("noOptionsMessage",e),className:r({"menu-notice":!0,"menu-notice--no-options":!0},n)},o),t)};dv.defaultProps={children:"No options"};var pv=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return Um("div",Ch({css:i("loadingMessage",e),className:r({"menu-notice":!0,"menu-notice--loading":!0},n)},o),t)};pv.defaultProps={children:"Loading..."};var hv,fv=function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},mv=function(e){Tg(n,e);var t=Ig(n);function n(){var e;yg(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).state={placement:null},e.getPortalPlacement=function(t){var n=t.placement;n!==tv(e.props.menuPlacement)&&e.setState({placement:n})},e}return Sg(n,[{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,r=e.className,i=e.controlElement,o=e.cx,a=e.innerProps,s=e.menuPlacement,l=e.menuPosition,c=e.getStyles,u="fixed"===l;if(!t&&!u||!i)return null;var d=this.state.placement||tv(s),p=qg(i),h=u?0:window.pageYOffset,f=p[d]+h,m=Um("div",Ch({css:c("menuPortal",{offset:f,position:l,rect:p}),className:o({"menu-portal":!0},r)},a),n);return Um(rv.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},t?it(m,t):m)}}]),n}(U),gv=function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},vv=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps,a=e.isDisabled,s=e.isRtl;return Um("div",Ch({css:i("container",e),className:r({"--is-disabled":a,"--is-rtl":s},n)},o),t)},yv=function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}},bv=function(e){var t=e.children,n=e.className,r=e.cx,i=e.innerProps,o=e.isMulti,a=e.getStyles,s=e.hasValue;return Um("div",Ch({css:a("valueContainer",e),className:r({"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s},n)},i),t)},wv=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},xv=function(e){var t=e.children,n=e.className,r=e.cx,i=e.innerProps,o=e.getStyles;return Um("div",Ch({css:o("indicatorsContainer",e),className:r({indicators:!0},n)},i),t)},Sv={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Ev=function(e){var t=e.size,n=Jm(e,["size"]);return Um("svg",Ch({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Sv},n))},Tv=function(e){return Um(Ev,Ch({size:20},e),Um("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Pv=function(e){return Um(Ev,Ch({size:20},e),Um("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Cv=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorContainer",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?i.neutral80:i.neutral40}}},kv=Cv,Ov=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return Um("div",Ch({css:i("dropdownIndicator",e),className:r({indicator:!0,"dropdown-indicator":!0},n)},o),t||Um(Pv,null))},_v=Cv,Rv=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return Um("div",Ch({css:i("clearIndicator",e),className:r({indicator:!0,"clear-indicator":!0},n)},o),t||Um(Tv,null))},Av=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},Dv=function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerProps;return Um("span",Ch({},i,{css:r("indicatorSeparator",e),className:n({"indicator-separator":!0},t)}))},Iv=Wm(hv||(hv=Ym(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),Mv=function(e){var t=e.isFocused,n=e.size,r=e.theme,i=r.colors,o=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*o,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},Lv=function(e){var t=e.delay,n=e.offset;return Um("span",{css:Vm({animation:"".concat(Iv," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"","")})},jv=function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerProps,o=e.isRtl;return Um("div",Ch({css:r("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)},i),Um(Lv,{delay:0,offset:o}),Um(Lv,{delay:160,offset:!0}),Um(Lv,{delay:320,offset:!o}))};jv.defaultProps={size:4};var Nv=function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,i=r.colors,o=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?i.neutral5:i.neutral0,borderColor:t?i.neutral10:n?i.primary:i.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(i.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?i.primary:i.neutral30}}},Fv=function(e){var t=e.children,n=e.cx,r=e.getStyles,i=e.className,o=e.isDisabled,a=e.isFocused,s=e.innerRef,l=e.innerProps,c=e.menuIsOpen;return Um("div",Ch({ref:s,css:r("control",e),className:n({control:!0,"control--is-disabled":o,"control--is-focused":a,"control--menu-is-open":c},i)},l),t)},Bv=function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},zv=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return Um("div",Ch({css:i("group",e),className:r({group:!0},n)},s),Um(o,Ch({},a,{selectProps:u,theme:c,getStyles:i,cx:r}),l),Um("div",null,t))},Hv=function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},Uv=function(e){var t=e.getStyles,n=e.cx,r=e.className,i=Fg(e);i.data;var o=Jm(i,["data"]);return Um("div",Ch({css:t("groupHeading",e),className:n({"group-heading":!0},r)},o))},Vv=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:i.neutral80}},Wv=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}},Gv=function(e){var t=e.className,n=e.cx,r=e.getStyles,i=Fg(e),o=i.innerRef,a=i.isDisabled,s=i.isHidden,l=Jm(i,["innerRef","isDisabled","isHidden"]);return Um("div",{css:r("input",e)},Um(vg,Ch({className:n({input:!0},t),inputRef:o,inputStyle:Wv(s),disabled:a},l)))},qv=function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},Xv=function(e){var t=e.theme,n=t.borderRadius,r=t.colors,i=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:i?"ellipsis":null,whiteSpace:"nowrap"}},Zv=function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,i=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&i.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}}},Yv=function(e){var t=e.children,n=e.innerProps;return Um("div",n,t)},Kv=Yv,Jv=Yv;function Qv(e){var t=e.children,n=e.innerProps;return Um("div",n,t||Um(Tv,{size:14}))}var $v=function(e){var t=e.children,n=e.className,r=e.components,i=e.cx,o=e.data,a=e.getStyles,s=e.innerProps,l=e.isDisabled,c=e.removeProps,u=e.selectProps,d=r.Container,p=r.Label,h=r.Remove;return Um(Zm,null,(function(r){var f=r.css,m=r.cx;return Um(d,{data:o,innerProps:Og({className:m(f(a("multiValue",e)),i({"multi-value":!0,"multi-value--is-disabled":l},n))},s),selectProps:u},Um(p,{data:o,innerProps:{className:m(f(a("multiValueLabel",e)),i({"multi-value__label":!0},n))},selectProps:u},t),Um(h,{data:o,innerProps:Og({className:m(f(a("multiValueRemove",e)),i({"multi-value__remove":!0},n))},c),selectProps:u}))}))};$v.defaultProps={cropWithEllipsis:!0};var ey=function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,i=e.theme,o=i.spacing,a=i.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*o.baseUnit,"px ").concat(3*o.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?a.primary:a.primary50)}}},ty=function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},ny=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{label:"singleValue",color:t?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},ry={ClearIndicator:Rv,Control:Fv,DropdownIndicator:Ov,DownChevron:Pv,CrossIcon:Tv,Group:zv,GroupHeading:Uv,IndicatorsContainer:xv,IndicatorSeparator:Dv,Input:Gv,LoadingIndicator:jv,Menu:ov,MenuList:sv,MenuPortal:mv,LoadingMessage:pv,NoOptionsMessage:dv,MultiValue:$v,MultiValueContainer:Kv,MultiValueLabel:Jv,MultiValueRemove:Qv,Option:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.isDisabled,a=e.isFocused,s=e.isSelected,l=e.innerRef,c=e.innerProps;return Um("div",Ch({css:i("option",e),className:r({option:!0,"option--is-disabled":o,"option--is-focused":a,"option--is-selected":s},n),ref:l},c),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return Um("div",Ch({css:i("placeholder",e),className:r({placeholder:!0},n)},o),t)},SelectContainer:vv,SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.isDisabled,a=e.innerProps;return Um("div",Ch({css:i("singleValue",e),className:r({"single-value":!0,"single-value--is-disabled":o},n)},a),t)},ValueContainer:bv},iy=function(e){return Og(Og({},ry),e.components)};function oy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ay(e){if(Array.isArray(e))return oy(e)}function sy(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ly(e,t){if(e){if("string"==typeof e)return oy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oy(e,t)}}function cy(){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 uy(e){return ay(e)||sy(e)||ly(e)||cy()}var dy=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function py(e,t){return!!(e===t||dy(e)&&dy(t))}function hy(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!py(e[n],t[n]))return!1;return!0}function fy(e,t){void 0===t&&(t=hy);var n,r,i=[],o=!1;function a(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return o&&n===this&&t(a,i)||(r=e.apply(this,a),o=!0,n=this,i=a),r}return a}for(var my={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},gy=function(e){return Um("span",Ch({css:my},e))},vy={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.isDisabled,i=e.tabSelectsValue;switch(e.context){case"menu":return"Use Up and Down to choose options".concat(r?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=void 0===n?{}:n,i=e.options,o=e.label,a=void 0===o?"":o,s=e.selectValue,l=e.isDisabled,c=e.isSelected,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&s)return"value ".concat(a," focused, ").concat(u(s,r),".");if("menu"===t){var d=l?" disabled":"",p="".concat(c?"selected":"focused").concat(d);return"option ".concat(a," ").concat(p,", ").concat(u(i,r),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},yy=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,i=e.focusableOptions,o=e.isFocused,a=e.selectValue,s=e.selectProps,l=s.ariaLiveMessages,c=s.getOptionLabel,u=s.inputValue,d=s.isMulti,p=s.isOptionDisabled,h=s.isSearchable,f=s.menuIsOpen,m=s.options,g=s.screenReaderStatus,v=s.tabSelectsValue,y=s["aria-label"],b=s["aria-live"],w=_e((function(){return Og(Og({},vy),l||{})}),[l]),x=_e((function(){var e,n="";if(t&&w.onChange){var r=t.option,i=t.removedValue,o=t.value,a=i||r||(e=o,Array.isArray(e)?null:e),s=Og({isDisabled:a&&p(a),label:a?c(a):""},t);n=w.onChange(s)}return n}),[t,p,c,w]),S=_e((function(){var e="",t=n||r,i=!!(n&&a&&a.includes(n));if(t&&w.onFocus){var o={focused:t,label:c(t),isDisabled:p(t),isSelected:i,options:m,context:t===n?"menu":"value",selectValue:a};e=w.onFocus(o)}return e}),[n,r,c,p,w,m,a]),E=_e((function(){var e="";if(f&&m.length&&w.onFilter){var t=g({count:i.length});e=w.onFilter({inputValue:u,resultsMessage:t})}return e}),[i,u,f,w,m,g]),T=_e((function(){var e="";if(w.guidance){var t=r?"value":f?"menu":"input";e=w.guidance({"aria-label":y,context:t,isDisabled:n&&p(n),isMulti:d,isSearchable:h,tabSelectsValue:v})}return e}),[y,n,r,d,p,h,f,w,v]),P="".concat(S," ").concat(E," ").concat(T);return Um(gy,{"aria-live":b,"aria-atomic":"false","aria-relevant":"additions text"},o&&Um(_t.Fragment,null,Um("span",{id:"aria-selection"},x),Um("span",{id:"aria-context"},P)))},by=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],wy=new RegExp("["+by.map((function(e){return e.letters})).join("")+"]","g"),xy={},Sy=0;Sy<by.length;Sy++)for(var Ey=by[Sy],Ty=0;Ty<Ey.letters.length;Ty++)xy[Ey.letters[Ty]]=Ey.base;var Py=function(e){return e.replace(wy,(function(e){return xy[e]}))},Cy=fy(Py),ky=function(e){return e.replace(/^\s+|\s+$/g,"")},Oy=function(e){return"".concat(e.label," ").concat(e.value)},_y=function(e){return function(t,n){var r=Og({ignoreCase:!0,ignoreAccents:!0,stringify:Oy,trim:!0,matchFrom:"any"},e),i=r.ignoreCase,o=r.ignoreAccents,a=r.stringify,s=r.trim,l=r.matchFrom,c=s?ky(n):n,u=s?ky(a(t)):a(t);return i&&(c=c.toLowerCase(),u=u.toLowerCase()),o&&(c=Cy(c),u=Py(u)),"start"===l?u.substr(0,c.length)===c:u.indexOf(c)>-1}};function Ry(e){e.in,e.out,e.onExited,e.appear,e.enter,e.exit;var t=e.innerRef;e.emotion;var n=Jm(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]);return Um("input",Ch({ref:t},n,{css:Vm({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"","")}))}var Ay=function(e){e.preventDefault(),e.stopPropagation()};function Dy(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,a=ke(!1),s=ke(!1),l=ke(0),c=ke(null),u=Re((function(e,t){if(null!==c.current){var l=c.current,u=l.scrollTop,d=l.scrollHeight,p=l.clientHeight,h=c.current,f=t>0,m=d-p-u,g=!1;m>t&&a.current&&(r&&r(e),a.current=!1),f&&s.current&&(o&&o(e),s.current=!1),f&&t>m?(n&&!a.current&&n(e),h.scrollTop=d,g=!0,a.current=!0):!f&&-t>u&&(i&&!s.current&&i(e),h.scrollTop=0,g=!0,s.current=!0),g&&Ay(e)}}),[]),d=Re((function(e){u(e,e.deltaY)}),[u]),p=Re((function(e){l.current=e.changedTouches[0].clientY}),[]),h=Re((function(e){var t=l.current-e.changedTouches[0].clientY;u(e,t)}),[u]),f=Re((function(e){if(e){var t=!!Qg&&{passive:!1};"function"==typeof e.addEventListener&&e.addEventListener("wheel",d,t),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",p,t),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",h,t)}}),[h,p,d]),m=Re((function(e){!e||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",d,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",p,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",h,!1))}),[h,p,d]);return Pe((function(){if(t){var e=c.current;return f(e),function(){m(e)}}}),[t,f,m]),function(e){c.current=e}}var Iy=["boxSizing","height","overflow","paddingRight","position"],My={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Ly(e){e.preventDefault()}function jy(e){e.stopPropagation()}function Ny(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Fy(){return"ontouchstart"in window||navigator.maxTouchPoints}var By=!("undefined"==typeof window||!window.document||!window.document.createElement),zy=0,Hy={capture:!1,passive:!1};function Uy(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,i=ke({}),o=ke(null),a=Re((function(e){if(By){var t=document.body,n=t&&t.style;if(r&&Iy.forEach((function(e){var t=n&&n[e];i.current[e]=t})),r&&zy<1){var o=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+o||0;Object.keys(My).forEach((function(e){var t=My[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&Fy()&&(t.addEventListener("touchmove",Ly,Hy),e&&(e.addEventListener("touchstart",Ny,Hy),e.addEventListener("touchmove",jy,Hy))),zy+=1}}),[]),s=Re((function(e){if(By){var t=document.body,n=t&&t.style;zy=Math.max(zy-1,0),r&&zy<1&&Iy.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&Fy()&&(t.removeEventListener("touchmove",Ly,Hy),e&&(e.removeEventListener("touchstart",Ny,Hy),e.removeEventListener("touchmove",jy,Hy)))}}),[]);return Pe((function(){if(t){var e=o.current;return a(e),function(){s(e)}}}),[t,a,s]),function(e){o.current=e}}var Vy=function(){return document.activeElement&&document.activeElement.blur()},Wy={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Gy(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=Dy({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),o=Uy({isEnabled:n}),a=function(e){i(e),o(e)};return Um(_t.Fragment,null,n&&Um("div",{onClick:Vy,css:Wy}),t(a))}var qy=function(e){return e.label},Xy=function(e){return e.label},Zy=function(e){return e.value},Yy=function(e){return!!e.isDisabled},Ky={clearIndicator:_v,container:gv,control:Nv,dropdownIndicator:kv,group:Bv,groupHeading:Hv,indicatorsContainer:wv,indicatorSeparator:Av,input:Vv,loadingIndicator:Mv,loadingMessage:uv,menu:nv,menuList:av,menuPortal:fv,multiValue:qv,multiValueLabel:Xv,multiValueRemove:Zv,noOptionsMessage:cv,option:ey,placeholder:ty,singleValue:ny,valueContainer:yv},Jy=4,Qy={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:Jy,controlHeight:38,menuGutter:2*Jy}},$y={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Xg(),captureMenuScroll:!Xg(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:_y(),formatGroupLabel:qy,getOptionLabel:Xy,getOptionValue:Zy,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:Yy,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!Zg(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0};function eb(e,t,n,r){return{type:"option",data:t,isDisabled:cb(e,t,n),isSelected:ub(e,t,n),label:sb(e,t),value:lb(e,t),index:r}}function tb(e,t){return e.options.map((function(n,r){if(n.options){var i=n.options.map((function(n,r){return eb(e,n,t,r)})).filter((function(t){return ib(e,t)}));return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=eb(e,n,t,r);return ib(e,o)?o:void 0})).filter((function(e){return!!e}))}function nb(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,uy(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function rb(e,t){return nb(tb(e,t))}function ib(e,t){var n=e.inputValue,r=void 0===n?"":n,i=t.data,o=t.isSelected,a=t.label,s=t.value;return(!pb(e)||!o)&&db(e,{label:a,value:s,data:i},r)}function ob(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}function ab(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var sb=function(e,t){return e.getOptionLabel(t)},lb=function(e,t){return e.getOptionValue(t)};function cb(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function ub(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=lb(e,t);return n.some((function(t){return lb(e,t)===r}))}function db(e,t,n){return!e.filterOption||e.filterOption(t,n)}var pb=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},hb=1,fb=function(e){Tg(n,e);var t=Ig(n);function n(e){var r;return yg(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.instancePrefix="",r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,i=n.onChange,o=n.name;t.name=o,r.ariaOnChange(e,t),i(e,t)},r.setValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",n=arguments.length>2?arguments[2]:void 0,i=r.props,o=i.closeMenuOnSelect,a=i.isMulti;r.onInputChange("",{action:"set-value"}),o&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,i=t.isMulti,o=t.name,a=r.state.selectValue,s=i&&r.isOptionSelected(e,a),l=r.isOptionDisabled(e,a);if(s){var c=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",name:o});i?r.setValue([].concat(uy(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,i=r.getOptionValue(e),o=n.filter((function(e){return r.getOptionValue(e)!==i})),a=t?o:o[0]||null;r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(r.props.isMulti?[]:null,{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],i=t.slice(0,t.length-1),o=e?i:i[0]||null;r.onChange(o,{action:"pop-value",removedValue:n})},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return jg.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return sb(r.props,e)},r.getOptionValue=function(e){return lb(r.props,e)},r.getStyles=function(e,t){var n=Ky[e](t);n.boxSizing="border-box";var i=r.props.styles[e];return i?i(n,t):n},r.getElementId=function(e){return"".concat(r.instancePrefix,"-").concat(e)},r.getComponents=function(){return iy(r.props)},r.buildCategorizedOptions=function(){return tb(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return nb(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:Og({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,i=t.menuIsOpen;r.focusInput(),i?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault(),e.stopPropagation()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.stopPropagation(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Bg(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);!n||(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var i=Math.abs(n.clientX-r.initialTouchX),o=Math.abs(n.clientY-r.initialTouchY),a=5;r.userIsDragging=i>a||o>a}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(t,{action:"input-change"}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur"}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})},r.shouldHideSelectedOptions=function(){return pb(r.props)},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,i=t.backspaceRemovesValue,o=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,h=r.state,f=h.focusedOption,m=h.focusedValue,g=h.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)r.removeValue(m);else{if(!i)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing||e.shiftKey||!c||!d||!f||p&&r.isOptionSelected(f,g))return;r.selectOption(f);break;case"Enter":if(229===e.keyCode)break;if(c){if(!f||r.isComposing)return;r.selectOption(f);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close"}),r.onMenuClose()):s&&o&&r.clearValue();break;case" ":if(a)return;if(!c){r.openMenu("first");break}if(!f)return;r.selectOption(f);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.instancePrefix="react-select-"+(r.props.instanceId||++hb),r.state.selectValue=Ng(e.value),r}return Sg(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,i=this.state.isFocused;(i&&!n&&e.isDisabled||i&&r&&!e.menuIsOpen)&&this.focusInput(),i&&n&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Gg(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){!this.inputRef||this.inputRef.focus()}},{key:"blurInput",value:function(){!this.inputRef||this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,i=n.isFocused,o=this.buildFocusableOptions(),a="first"===e?0:o.length-1;if(!this.props.isMulti){var s=o.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:o[a]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var i=n.indexOf(r);r||(i=-1);var o=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===i?0:-1===i?o:i-1;break;case"next":i>-1&&i<o&&(a=i+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var i=0,o=r.indexOf(n);n||(o=-1),"up"===e?i=o>0?o-1:r.length-1:"down"===e?i=(o+1)%r.length:"pageup"===e?(i=o-t)<0&&(i=0):"pagedown"===e?(i=o+t)>r.length-1&&(i=r.length-1):"last"===e&&(i=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[i],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Qy):Og(Og({},Qy),this.props.theme):Qy}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getValue,i=this.selectOption,o=this.setValue,a=this.props,s=a.isMulti,l=a.isRtl,c=a.options;return{clearValue:e,cx:t,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:s,isRtl:l,options:c,selectOption:i,selectProps:a,setValue:o,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return cb(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return ub(this.props,e,t)}},{key:"filterOption",value:function(e,t){return db(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,o=e.tabIndex,a=e.form,s=this.getComponents().Input,l=this.state.inputIsHidden,c=this.commonProps,u=r||this.getElementId("input"),d={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return n?_t.createElement(s,Ch({},c,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:u,innerRef:this.getInputRef,isDisabled:t,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:o,form:a,type:"text",value:i},d)):_t.createElement(Ry,Ch({id:u,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Mg,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:o,form:a,value:""},d))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,o=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,l=this.commonProps,c=this.props,u=c.controlShouldRenderValue,d=c.isDisabled,p=c.isMulti,h=c.inputValue,f=c.placeholder,m=this.state,g=m.selectValue,v=m.focusedValue,y=m.isFocused;if(!this.hasValue()||!u)return h?null:_t.createElement(s,Ch({},l,{key:"placeholder",isDisabled:d,isFocused:y}),f);if(p)return g.map((function(t,a){var s=t===v;return _t.createElement(n,Ch({},l,{components:{Container:r,Label:i,Remove:o},isFocused:s,isDisabled:d,key:"".concat(e.getOptionValue(t)).concat(a),index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));if(h)return null;var b=g[0];return _t.createElement(a,Ch({},l,{data:b,isDisabled:d}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,o=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return _t.createElement(e,Ch({},t,{innerProps:a,isFocused:o}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,o=this.state.isFocused;if(!e||!i)return null;var a={"aria-hidden":"true"};return _t.createElement(e,Ch({},t,{innerProps:a,isDisabled:r,isFocused:o}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,o=this.state.isFocused;return _t.createElement(n,Ch({},r,{isDisabled:i,isFocused:o}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return _t.createElement(e,Ch({},t,{innerProps:i,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,i=t.Menu,o=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,u=this.commonProps,d=this.state.focusedOption,p=this.props,h=p.captureMenuScroll,f=p.inputValue,m=p.isLoading,g=p.loadingMessage,v=p.minMenuHeight,y=p.maxMenuHeight,b=p.menuIsOpen,w=p.menuPlacement,x=p.menuPosition,S=p.menuPortalTarget,E=p.menuShouldBlockScroll,T=p.menuShouldScrollIntoView,P=p.noOptionsMessage,C=p.onMenuScrollToTop,k=p.onMenuScrollToBottom;if(!b)return null;var O,_=function(t,n){var r=t.type,i=t.data,o=t.isDisabled,a=t.isSelected,s=t.label,l=t.value,p=d===i,h=o?void 0:function(){return e.onOptionHover(i)},f=o?void 0:function(){return e.selectOption(i)},m="".concat(e.getElementId("option"),"-").concat(n),g={id:m,onClick:f,onMouseMove:h,onMouseOver:h,tabIndex:-1};return _t.createElement(c,Ch({},u,{innerProps:g,data:i,isDisabled:o,isSelected:a,key:m,label:s,type:r,value:l,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())O=this.getCategorizedOptions().map((function(t){if("group"===t.type){var i=t.data,o=t.options,a=t.index,s="".concat(e.getElementId("group"),"-").concat(a),l="".concat(s,"-heading");return _t.createElement(n,Ch({},u,{key:s,data:i,options:o,Heading:r,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return _(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return _(t,"".concat(t.index))}));else if(m){var R=g({inputValue:f});if(null===R)return null;O=_t.createElement(s,u,R)}else{var A=P({inputValue:f});if(null===A)return null;O=_t.createElement(l,u,A)}var D={minMenuHeight:v,maxMenuHeight:y,menuPlacement:w,menuPosition:x,menuShouldScrollIntoView:T},I=_t.createElement(iv,Ch({},u,D),(function(t){var n=t.ref,r=t.placerProps,a=r.placement,s=r.maxHeight;return _t.createElement(i,Ch({},u,D,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:m,placement:a}),_t.createElement(Gy,{captureEnabled:h,onTopArrive:C,onBottomArrive:k,lockEnabled:E},(function(t){return _t.createElement(o,Ch({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:m,maxHeight:s,focusedOption:d}),O)})))}));return S||"fixed"===x?_t.createElement(a,Ch({},u,{appendTo:S,controlElement:this.controlRef,menuPlacement:w,menuPosition:x}),I):I}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,o=t.name,a=this.state.selectValue;if(o&&!r){if(i){if(n){var s=a.map((function(t){return e.getOptionValue(t)})).join(n);return _t.createElement("input",{name:o,type:"hidden",value:s})}var l=a.length>0?a.map((function(t,n){return _t.createElement("input",{key:"i-".concat(n),name:o,type:"hidden",value:e.getOptionValue(t)})})):_t.createElement("input",{name:o,type:"hidden"});return _t.createElement("div",null,l)}var c=a[0]?this.getOptionValue(a[0]):"";return _t.createElement("input",{name:o,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.isFocused,a=t.selectValue,s=this.getFocusableOptions();return _t.createElement(yy,Ch({},e,{ariaSelection:n,focusedOption:r,focusedValue:i,isFocused:o,selectValue:a,focusableOptions:s}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,o=this.props,a=o.className,s=o.id,l=o.isDisabled,c=o.menuIsOpen,u=this.state.isFocused,d=this.commonProps=this.getCommonProps();return _t.createElement(r,Ch({},d,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:u}),this.renderLiveRegion(),_t.createElement(t,Ch({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:u,menuIsOpen:c}),_t.createElement(i,Ch({},d,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),_t.createElement(n,Ch({},d,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,i=t.inputIsHiddenAfterUpdate,o=e.options,a=e.value,s=e.menuIsOpen,l=e.inputValue,c={};if(n&&(a!==n.value||o!==n.options||s!==n.menuIsOpen||l!==n.inputValue)){var u=Ng(a),d=s?rb(e,u):[],p=r?ob(t,u):null;c={selectValue:u,focusedOption:ab(t,d),focusedValue:p,clearFocusValueOnUpdate:!1}}var h=null!=i&&e!==n?{inputIsHidden:i,inputIsHiddenAfterUpdate:void 0}:{};return Og(Og(Og({},c),h),{},{prevProps:e})}}]),n}(U);fb.defaultProps=$y;var mb={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},gb=function(e){var t,n;return n=t=function(t){Tg(r,t);var n=Ig(r);function r(){var e;yg(this,r);for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return(e=n.call.apply(n,[this].concat(i))).select=void 0,e.state={inputValue:void 0!==e.props.inputValue?e.props.inputValue:e.props.defaultInputValue,menuIsOpen:void 0!==e.props.menuIsOpen?e.props.menuIsOpen:e.props.defaultMenuIsOpen,value:void 0!==e.props.value?e.props.value:e.props.defaultValue},e.onChange=function(t,n){e.callProp("onChange",t,n),e.setState({value:t})},e.onInputChange=function(t,n){var r=e.callProp("onInputChange",t,n);e.setState({inputValue:void 0!==r?r:t})},e.onMenuOpen=function(){e.callProp("onMenuOpen"),e.setState({menuIsOpen:!0})},e.onMenuClose=function(){e.callProp("onMenuClose"),e.setState({menuIsOpen:!1})},e}return Sg(r,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"==typeof this.props[e]){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this.props)[e].apply(t,r)}}},{key:"render",value:function(){var t=this,n=this.props;n.defaultInputValue,n.defaultMenuIsOpen,n.defaultValue;var r=Jm(n,["defaultInputValue","defaultMenuIsOpen","defaultValue"]);return _t.createElement(e,Ch({},r,{ref:function(e){t.select=e},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),r}(U),t.defaultProps=mb,n},vb=gb(fb),yb=[{value:"assessing",label:"Assessing"},{value:"bookmarking",label:"Bookmarking"},{value:"classifying",label:"Classifying"},{value:"commenting",label:"Commenting"},{value:"describing",label:"Describing"},{value:"editing",label:"Editing"},{value:"highlighting",label:"Highlighting"},{value:"identifying",label:"Identifying"},{value:"linking",label:"Linking"},{value:"moderating",label:"Moderating"},{value:"questioning",label:"Questioning"},{value:"replying",label:"Replying"},{value:"supplementing",label:"Transcription"}],bb=function(e){var t=e.content?yb.find((function(t){return t.value===e.content})):null;return _t.createElement("div",{className:"r6o-purposedropdown"},_t.createElement(vb,{value:t,onChange:e.onChange,options:yb,isDisabled:!e.editable}))},wb=function(e){return _t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1000 940",width:e.width},_t.createElement("metadata",null,"IcoFont Icons"),_t.createElement("title",null,"simple-down"),_t.createElement("glyph",{glyphName:"simple-down",unicode:"",horizAdvX:"1000"}),_t.createElement("path",{fill:"currentColor",d:"M200 392.6l300 300 300-300-85.10000000000002-85.10000000000002-214.89999999999998 214.79999999999995-214.89999999999998-214.89999999999998-85.10000000000002 85.20000000000005z"}))},xb=function(e){return _t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"180 150 700 800",width:e.width},_t.createElement("metadata",null,"IcoFont Icons"),_t.createElement("title",null,"close"),_t.createElement("glyph",{glyphName:"close",unicode:"",horizAdvX:"1000"}),_t.createElement("path",{fill:"currentColor",d:"M709.8 206.6c-64.39999999999998 65.50000000000003-128.89999999999998 131.20000000000002-194.19999999999993 197.6-8.600000000000023 8.699999999999989-22.400000000000034 8.800000000000011-31 0-65-66-129.70000000000005-131.8-194.5-197.6-8.600000000000023-8.699999999999989-22.400000000000034-8.599999999999994-30.900000000000034 0.09999999999999432-15.699999999999989 16.200000000000017-31.099999999999994 32.30000000000001-47.099999999999994 48.80000000000001-8.5 8.800000000000011-8.299999999999983 23 0.20000000000001705 31.69999999999999 63.099999999999966 64.19999999999999 127.89999999999998 130.10000000000002 193.59999999999997 197 8.600000000000023 8.699999999999989 8.5 22.80000000000001 0 31.599999999999966-65.19999999999999 66.40000000000009-130.2 132.5-194.7 198.10000000000002-8.5 8.700000000000045-8.5 22.800000000000068 0.20000000000001705 31.399999999999977l47.79999999999998 47.90000000000009c8.600000000000023 8.599999999999909 22.600000000000023 8.599999999999909 31.100000000000023-0.10000000000002274l194.2-197.30000000000007c8.600000000000023-8.699999999999932 22.399999999999977-8.699999999999932 31 0 64.70000000000005 65.80000000000007 129.20000000000005 131.4000000000001 194.20000000000005 197.5 8.599999999999909 8.700000000000045 22.5 8.800000000000068 31 0.10000000000002274 16-16.199999999999932 31.699999999999932-32.19999999999993 47.59999999999991-48.299999999999955 8.600000000000023-8.700000000000045 8.600000000000023-22.899999999999977 0.10000000000002274-31.600000000000023-63.799999999999955-65-128.5-130.89999999999998-194.19999999999993-197.79999999999995-8.600000000000023-8.700000000000045-8.600000000000023-22.900000000000034 0-31.600000000000023 65.19999999999993-66.40000000000003 130.0999999999999-132.5 194.5-198.20000000000005 8.599999999999909-8.699999999999989 8.5-22.799999999999955-0.10000000000002274-31.49999999999997l-47.80000000000007-48.099999999999994c-8.5-8.5-22.399999999999977-8.400000000000006-31 0.29999999999998295z"}))},Sb=function(e){return _t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:e.width},_t.createElement("path",{fill:"currentColor",d:"M268 416h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12zM432 80h-82.41l-34-56.7A48 48 0 0 0 274.41 0H173.59a48 48 0 0 0-41.16 23.3L98.41 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16v336a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM171.84 50.91A6 6 0 0 1 177 48h94a6 6 0 0 1 5.15 2.91L293.61 80H154.39zM368 464H80V128h288zm-212-48h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12z"}))},Eb=function(e){var t=u(Ee(!1),2),n=t[0],r=t[1],i=u(Ee(!1),2),o=i[0],a=i[1],s=function(e){r(!0),a(!1)},l=function(t){e.onDelete(e.body),a(!1)},c=function(t){return e.onUpdate(e.body,T(T({},e.body),{},{value:t.target.value}))},d=function(t){return e.onUpdate(e.body,T(T({},e.body),{},{purpose:t.value}))},p=e.body.modified||e.body.created,h=e.body.creator&&_t.createElement("div",{className:"r6o-lastmodified"},_t.createElement("span",{className:"r6o-lastmodified-by"},e.body.creator.name||e.body.creator.id),e.body.created&&_t.createElement("span",{className:"r6o-lastmodified-at"},_t.createElement(oi,{datetime:e.env.toClientTime(p),locale:sh.locale()})));return e.readOnly?_t.createElement("div",{className:"r6o-widget comment"},_t.createElement("div",{className:"r6o-readonly-comment"},e.body.value),h):_t.createElement("div",{className:n?"r6o-widget comment editable":"r6o-widget comment"},_t.createElement(Ph,{editable:n,content:e.body.value,onChange:c,onSaveAndClose:e.onSaveAndClose}),!n&&h,e.purposeSelector&&_t.createElement(bb,{editable:n,content:e.body.purpose,onChange:d,onSaveAndClose:e.onSaveAndClose}),_t.createElement("div",{className:o?"r6o-icon r6o-arrow-down r6o-menu-open":"r6o-icon r6o-arrow-down",onClick:function(){return a(!o)}},_t.createElement(wb,{width:12})),o&&_t.createElement(lh,{onEdit:s,onDelete:l,onClickOutside:function(){return a(!1)}}))},Tb=yb.map((function(e){return e.value})),Pb=function(e,t){var n=t?Tb.indexOf(e.purpose)>-1:"commenting"==e.purpose||"replying"==e.purpose;return"TextualBody"===e.type&&(!Object.prototype.hasOwnProperty.call(e,"purpose")||n)},Cb=function(e,t){var n,r;if(!0===t.editable)return!1;if(!1===t.editable)return!0;if("MINE_ONLY"===t.editable){var i=null==(n=e.creator)?void 0:n.id;return(null==(r=t.env.user)?void 0:r.id)!==i}return t.readOnly},kb=function(e,t){return e||{type:"TextualBody",value:"",purpose:t?"replying":"commenting",draft:!0}},Ob=function(e){var t=e.annotation?e.annotation.bodies.filter((function(t){return Pb(t,e.purposeSelector)})):[],n=kb(t.find((function(e){return 1==e.draft})),t.length>1),r=t.filter((function(e){return e!=n})),i=function(t){var r=n.value,i=t.target.value;0===r.length&&i.length>0?e.onAppendBody(T(T({},n),{},{value:i})):r.length>0&&0===i.length?e.onRemoveBody(n):e.onUpdateBody(n,T(T({},n),{},{value:i}))},o=function(t){return e.onUpdateBody(n,T(T({},n),{},{purpose:t.value}))},a=!e.readOnly&&e.annotation,s=0===r.length||!e.disableReply;return _t.createElement(_t.Fragment,null,r.map((function(t,n){return _t.createElement(Eb,{key:n,env:e.env,purposeSelector:e.purposeSelector,readOnly:Cb(t,e),body:t,onUpdate:e.onUpdateBody,onDelete:e.onRemoveBody,onSaveAndClose:e.onSaveAndClose})})),a&&s&&_t.createElement("div",{className:"r6o-widget comment editable"},_t.createElement(Ph,{focus:e.focus,content:n.value,editable:!0,placeholder:r.length>0?sh.t("Add a reply..."):e.textPlaceHolder||sh.t("Add a comment..."),onChange:i,onSaveAndClose:function(){return e.onSaveAndClose()}}),e.purposeSelector&&n.value.length>0&&_t.createElement(bb,{editable:!0,content:n.purpose,onChange:o,onSaveAndClose:function(){return e.onSaveAndClose()}})))};Ob.disableDelete=function(e,t){return e.bodies.filter((function(e){return Pb(e,t.purposeSelector)})).some((function(e){return Cb(e,t)}))};var _b=Ob;function Rb(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Eg(e,t)}function Ab(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}function Db(e,t){e.classList?e.classList.add(t):Ab(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Ib(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Mb(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=Ib(e.className,t):e.setAttribute("class",Ib(e.className&&e.className.baseVal||"",t))}var Lb={disabled:!1},jb=_t.createContext(null),Nb=function(e){return e.scrollTop},Fb="unmounted",Bb="exited",zb="entering",Hb="entered",Ub="exiting",Vb=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=Bb,r.appearStatus=zb):i=Hb:i=t.unmountOnExit||t.mountOnEnter?Fb:Bb,r.state={status:i},r.nextCallback=null,r}Rb(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Fb?{status:Bb}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==zb&&n!==Hb&&(t=zb):(n===zb||n===Hb)&&(t=Ub)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===zb){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:_t.findDOMNode(this);n&&Nb(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Bb&&this.setState({status:Fb})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[_t.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||Lb.disabled?this.safeSetState({status:Hb},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:zb},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:Hb},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:_t.findDOMNode(this);t&&!Lb.disabled?(this.props.onExit(r),this.safeSetState({status:Ub},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Bb},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:Bb},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:_t.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Fb)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Km(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return _t.createElement(jb.Provider,{value:null},"function"==typeof n?n(e,r):_t.cloneElement(_t.Children.only(n),r))},t}(_t.Component);function Wb(){}Vb.contextType=jb,Vb.propTypes={},Vb.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Wb,onEntering:Wb,onEntered:Wb,onExit:Wb,onExiting:Wb,onExited:Wb},Vb.UNMOUNTED=Fb,Vb.EXITED=Bb,Vb.ENTERING=zb,Vb.ENTERED=Hb,Vb.EXITING=Ub;var Gb=Vb,qb=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return Db(e,t)}))},Xb=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return Mb(e,t)}))},Zb=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.removeClasses(i,"exit"),t.addClass(i,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.addClass(i,o,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.removeClasses(i,o),t.addClass(i,o,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,i=r?(r&&n?n+"-":"")+e:n[e];return{baseClassName:i,activeClassName:r?i+"-active":n[e+"Active"],doneClassName:r?i+"-done":n[e+"Done"]}},t}Rb(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&i&&(r+=" "+i),"active"===n&&e&&Nb(e),r&&(this.appliedClasses[t][n]=r,qb(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,o=n.done;this.appliedClasses[t]={},r&&Xb(e,r),i&&Xb(e,i),o&&Xb(e,o)},n.render=function(){var e=this.props;e.classNames;var t=Km(e,["classNames"]);return _t.createElement(Gb,Ch({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(_t.Component);Zb.defaultProps={classNames:""},Zb.propTypes={};var Yb=Zb,Kb=function(e,t){return t.filter((function(t){return(t.label?t.label:t).toLowerCase().startsWith(e.toLowerCase())}))},Jb=function(e,t){return t(e)},Qb=function(e){var t=ke(),n=u(Ee(e.initialValue||""),2),r=n[0],i=n[1],o=u(Ee([]),2),a=o[0],s=o[1],l=u(Ee(null),2),c=l[0],d=l[1];Pe((function(){e.focus&&t.current.querySelector("input").focus({preventScroll:!0})}),[]),Pe((function(){e.onChange&&e.onChange(r)}),[r]);var p=function(t){if("function"==typeof e.vocabulary){var n=Jb(t,e.vocabulary);n.then?n.then(s):s(n)}else{var r=Kb(t,e.vocabulary);s(r)}},h=function(){if(null!==c)e.onSubmit(a[c]);else{var t=r.trim();if(t){var n=Array.isArray(e.vocabulary)?e.vocabulary.find((function(e){return(e.label||e).toLowerCase()===t.toLowerCase()})):null;n?e.onSubmit(n):e.onSubmit(t)}}i(""),s([]),d(null)},f=function(t){if(13===t.which)h();else if(27===t.which)e.onCancel&&e.onCancel();else if(a.length>0){if(38===t.which)if(null===c)d(0);else{var n=Math.max(0,c-1);d(n)}else if(40===t.which)if(null===c)d(0);else{var r=Math.min(a.length-1,c+1);d(r)}}else 40===t.which&&Array.isArray(e.vocabulary)&&s(e.vocabulary)},m=function(e){var t=e.target.value;i(t),d(null),t?p(t):s([])};return _t.createElement("div",{ref:t,className:"r6o-autocomplete"},_t.createElement("div",null,_t.createElement("input",{onKeyDown:f,onChange:m,value:r,placeholder:e.placeholder})),_t.createElement("ul",null,a.length>0&&a.map((function(e,t){return _t.createElement("li",{key:"".concat(e.label?e.label:e).concat(t),onClick:h,onMouseEnter:function(){return d(t)},style:c===t?{backgroundColor:"#bde4ff"}:{}},e.label?e.label:e)}))))},$b=function(e){return e||{type:"TextualBody",value:"",purpose:"tagging",draft:!0}},ew=function(e){var t=e.annotation?e.annotation.bodies.filter((function(e){return"tagging"===e.purpose})):[],n=$b(t.slice().reverse().find((function(e){return e.draft}))),r=t.filter((function(e){return e!=n})),i=u(Ee(!1),2),o=i[0],a=i[1],s=function(e){return function(t){a(o!==e&&e)}},l=function(t){var r=n.value.trim(),i=t.trim();0===r.length&&i.length>0?e.onAppendBody(T(T({},n),{},{value:i})):r.length>0&&0===i.length?e.onRemoveBody(n):r!==i&&e.onUpdateBody(n,T(T({},n),{},{value:i}))},c=function(t){return function(n){n.stopPropagation(),e.onRemoveBody(t)}},d=function(t){var r=t.uri?{type:"SpecificResource",purpose:"tagging",source:{id:t.uri,label:t.label}}:{type:"TextualBody",purpose:"tagging",value:t.label||t};0===n.value.trim().length?e.onAppendBody(r):e.onUpdateBody(n,r)},p=function(e){return e.value||e.source.label};return _t.createElement("div",{className:"r6o-widget r6o-tag"},r.length>0&&_t.createElement("ul",{className:"r6o-taglist"},r.map((function(t){return _t.createElement("li",{key:p(t),onClick:s(t)},_t.createElement("span",{className:"r6o-label"},p(t)),!e.readOnly&&_t.createElement(Yb,{in:o===t,timeout:200,classNames:"r6o-delete"},_t.createElement("span",{className:"r6o-delete-wrapper",onClick:c(t)},_t.createElement("span",{className:"r6o-delete"},_t.createElement(xb,{width:12})))))}))),!e.readOnly&&_t.createElement(Qb,{focus:e.focus,placeholder:e.textPlaceHolder||sh.t("Add tag..."),vocabulary:e.vocabulary||[],onChange:l,onSubmit:d}))},tw=function(e){y(n,e);var t=w(n);function n(e){var r;return m(this,n),(r=t.call(this,e)).element=_t.createRef(),r}return v(n,[{key:"renderWidget",value:function(e){for(var t=this.props.widget(T(T({annotation:e.annotation,readOnly:e.readOnly},e.config),{},{onAppendBody:function(t,n){return e.onAppendBody(t,n)},onUpdateBody:function(t,n,r){return e.onUpdateBody(t,n,r)},onUpsertBody:function(t,n,r){return e.onUpsertBody(t,n,r)},onRemoveBody:function(t,n){return e.onRemoveBody(t,n)},onBatchModify:function(t,n){return e.onBatchModify(t,n)},onSetProperty:function(t,n){return e.onSetProperty(t,n)},onAddContext:function(t){return e.onAddContext(t)},onSaveAndClose:function(){return e.onSaveAndClose()}}));this.element.current.firstChild;)this.element.current.removeChild(this.element.current.lastChild);this.element.current.appendChild(t)}},{key:"componentDidMount",value:function(){this.renderWidget(this.props)}},{key:"componentWillReceiveProps",value:function(e){this.element.current&&this.props.annotation!==e.annotation&&this.renderWidget(e)}},{key:"render",value:function(){return _t.createElement("div",{ref:this.element,className:"widget"})}}]),n}(U);window.React=_t,window.ReactDOM=_t;var nw,rw={COMMENT:_b,TAG:ew},iw=[_t.createElement(_b,null),_t.createElement(ew,null)],ow=function(e){var t,n,r=function(e){return"function"==typeof e&&(String(e).match(/return .+\(['|"].+['|"],\s*\{/g)||String(e).match(/return .+preact_compat/)||String(e).match(/return .+\.createElement/g))};return"function"==typeof(t=e)&&!(null==(n=t.prototype)||!n.isReactComponent)||r(e)},aw=function(e){var t=function(e,t,n){if("string"==typeof e||e instanceof String)return _t.createElement(rw[e],t);if("react"===(null==n?void 0:n.toLowerCase()))return _t.createElement(e,t);if("plainjs"===(null==n?void 0:n.toLowerCase()))return _t.createElement(tw,{widget:e,config:t});if(ow(e))return _t.createElement(e,t);if("function"==typeof e||e instanceof Function)return _t.createElement(tw,{widget:e,config:t});throw"".concat(e," is not a valid plugin")};if(e.widget){var n=e.widget,i=e.force;return t(n,c(e,r),i)}return t(e)},sw=14,lw=function(e,t,n,r){var i=e.getBoundingClientRect();t.className="r6o-editor r6o-arrow-top r6o-arrow-left";var o=n.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,c=o.bottom;if(t.style.top="".concat(c-i.top+sw,"px"),t.style.left="".concat(a-i.left,"px"),r){var u=t.children[1].getBoundingClientRect(),d=e.ownerDocument.defaultView,p=d.innerWidth,h=d.innerHeight;if(u.right>p&&(t.classList.remove("r6o-arrow-left"),t.classList.add("r6o-arrow-right"),t.style.left="".concat(l-u.width-i.left,"px")),u.bottom>h){t.classList.remove("r6o-arrow-top"),t.classList.add("r6o-arrow-bottom");var f=t.children[1].getBoundingClientRect().height;t.style.top="".concat(s-i.top-f-sw,"px")}var m=t.children[1].getBoundingClientRect();if(m.top<0){t.classList.add("pushed","down"),t.style.top="".concat(-i.top,"px");var g=c-i.top;m.height-i.top>g&&t.classList.remove("r6o-arrow-bottom")}m.left<0&&(t.classList.add("pushed","right"),t.style.left="".concat(-i.left,"px")),requestAnimationFrame((function(){return t.style.opacity=1}))}},cw=function(e){var t=e.getBoundingClientRect(),n=t.top,r=t.left,i=t.width,o=t.height;return"".concat(n,", ").concat(r,", ").concat(i,", ").concat(o)},uw=function(e){y(n,e);var t=w(n);function n(e){var r;return m(this,n),r=t.call(this,e),D(x(r),"initResizeObserver",(function(){var e=void 0===r.props.autoPosition||r.props.autoPosition;if(null!=window&&window.ResizeObserver){var t=new ResizeObserver((function(){r.state.dragged||lw(r.props.wrapperEl,r.element.current,r.props.selectedElement,e)}));return t.observe(r.props.wrapperEl),function(){return t.disconnect()}}r.state.dragged||lw(r.props.wrapperEl,r.element.current,r.props.selectedElement,e)})),D(x(r),"creationMeta",(function(e){var t={},n=r.props.env.user;return n&&(t.creator={},n.id&&(t.creator.id=n.id),n.displayName&&(t.creator.name=n.displayName),t[e.created?"modified":"created"]=r.props.env.getCurrentTimeAdjusted()),t})),D(x(r),"getCurrentAnnotation",(function(){return r.state.currentAnnotation.clone()})),D(x(r),"hasChanges",(function(){var e;return!(null!=(e=r.props.annotation)&&e.isEqual(r.state.currentAnnotation))})),D(x(r),"updateCurrentAnnotation",(function(e,t){r.setState({currentAnnotation:r.state.currentAnnotation.clone(e)},(function(){t?r.onOk():r.props.onChanged&&r.props.onChanged()}))})),D(x(r),"onAppendBody",(function(e,t){return r.updateCurrentAnnotation({body:[].concat(s(r.state.currentAnnotation.bodies),[T(T({},e),r.creationMeta(e))])},t)})),D(x(r),"onUpdateBody",(function(e,t,n){return r.updateCurrentAnnotation({body:r.state.currentAnnotation.bodies.map((function(n){return n===e?T(T({},t),r.creationMeta(t)):n}))},n)})),D(x(r),"onRemoveBody",(function(e,t){return r.updateCurrentAnnotation({body:r.state.currentAnnotation.bodies.filter((function(t){return t!==e}))},t)})),D(x(r),"onUpsertBody",(function(e,t,n){if(null==e&&null!=t)r.onAppendBody(t,n);else if(null!=e&&null!=t)r.onUpdateBody(e,t,n);else if(null!=e&&null==t){var i=r.state.currentAnnotation.bodies.find((function(t){return t.purpose===e.purpose}));i?r.onUpdateBody(i,e,n):r.onAppendBody(e,n)}})),D(x(r),"onBatchModify",(function(e,t){var n=e.filter((function(e){return"upsert"===e.action&&e.body})).map((function(e){return{previous:r.state.currentAnnotation.bodies.find((function(t){return t.purpose===e.body.purpose})),updated:T(T({},e.body),r.creationMeta(e.body))}})),i=e.filter((function(e){return"remove"===e.action})).map((function(e){return e.body})),o=[].concat(s(e.filter((function(e){return"append"===e.action||"upsert"===e.action&&e.updated&&!e.previous})).map((function(e){return T(T({},e.body),r.creationMeta(e.body))}))),s(n.filter((function(e){return!e.previous})).map((function(e){return e.updated})))),a=[].concat(s(e.filter((function(e){return"update"===e.action||"upsert"===e.action&&e.updated&&e.previous})).map((function(e){return{previous:e.previous,updated:T(T({},e.updated),r.creationMeta(e.updated))}}))),s(n.filter((function(e){return e.previous})))),l=[].concat(s(r.state.currentAnnotation.bodies.filter((function(e){return!i.includes(e)})).map((function(e){var t=a.find((function(t){return t.previous===e}));return t?t.updated:e}))),s(o));r.updateCurrentAnnotation({body:l},t)})),D(x(r),"onSetProperty",(function(e,t){if(["@context","id","type","body","target"].includes(e))throw new Exception("Cannot set ".concat(e," - not allowed"));if(t)r.updateCurrentAnnotation(P({},e,t));else{var n=r.currentAnnotation.clone();delete n[e],r.setState({currentAnnotation:n})}})),D(x(r),"onAddContext",(function(e){var t=r.state.currentAnnotation,n=Array.isArray(t.context)?t.context:[t.context];n.indexOf(e)<0&&(n.push(e),r.updateCurrentAnnotation({"@context":n}))})),D(x(r),"onCancel",(function(){return r.props.onCancel(r.props.annotation)})),D(x(r),"onOk",(function(){var e=function(e){return e.clone({body:e.bodies.map((function(e){return e.draft,c(e,i)}))})},t=r.state.currentAnnotation;0!==t.bodies.length||r.props.allowEmpty?t.isSelection?r.props.onAnnotationCreated(e(t).toAnnotation()):r.props.onAnnotationUpdated(e(t),r.props.annotation):t.isSelection?r.onCancel():r.props.onAnnotationDeleted(r.props.annotation)})),D(x(r),"onDelete",(function(){return r.props.onAnnotationDeleted(r.props.annotation)})),r.element=_t.createRef(),r.state={currentAnnotation:e.annotation,dragged:!1,selectionBounds:cw(e.selectedElement)},r}return v(n,[{key:"componentWillReceiveProps",value:function(e){var t,n=this.state.selectionBounds,r=cw(e.selectedElement);null!=(t=this.props.annotation)&&t.isEqual(e.annotation)?this.setState({selectionBounds:r}):this.setState({currentAnnotation:e.annotation,selectionBounds:r}),this.props.modifiedTarget!=e.modifiedTarget&&this.state.currentAnnotation&&this.updateCurrentAnnotation({target:this.props.modifiedTarget}),n!=r&&this.element.current&&(this.removeObserver&&this.removeObserver(),this.removeObserver=this.initResizeObserver())}},{key:"componentDidMount",value:function(){var e=this;this.removeObserver=this.initResizeObserver(),new MutationObserver((function(){e.element.current&&(e.removeObserver&&e.removeObserver(),e.removeObserver=e.initResizeObserver())})).observe(this.element.current,{childList:!0,subtree:!0})}},{key:"componentWillUnmount",value:function(){this.removeObserver&&this.removeObserver()}},{key:"render",value:function(){var e=this,t=this.state.currentAnnotation,n=this.props.widgets?this.props.widgets.map(aw):iw,r=function(n){return!!n.type.disableDelete&&n.type.disableDelete(t,T(T({},n.props),{},{readOnly:e.props.readOnly,env:e.props.env}))},i=t&&(t.bodies.length>0||this.props.allowEmpty)&&!this.props.readOnly&&!t.isSelection&&!n.some(r);return _t.createElement(Ar,{disabled:!this.props.detachable,handle:".r6o-draggable",cancel:".r6o-btn, .r6o-btn *",onDrag:function(){return e.setState({dragged:!0})}},_t.createElement("div",{ref:this.element,className:this.state.dragged?"r6o-editor dragged":"r6o-editor"},_t.createElement("div",{className:"r6o-arrow"}),_t.createElement("div",{className:"r6o-editor-inner"},n.map((function(n,r){return _t.cloneElement(n,{key:"".concat(r),focus:0===r,annotation:t,readOnly:e.props.readOnly,env:e.props.env,onAppendBody:e.onAppendBody,onUpdateBody:e.onUpdateBody,onRemoveBody:e.onRemoveBody,onUpsertBody:e.onUpsertBody,onBatchModify:e.onBatchModify,onSetProperty:e.onSetProperty,onAddContext:e.onAddContext,onSaveAndClose:e.onOk})})),this.props.readOnly?_t.createElement("div",{className:"r6o-footer"},_t.createElement("button",{className:"r6o-btn",onClick:this.onCancel},sh.t("Close"))):_t.createElement("div",{className:this.props.detachable?"r6o-footer r6o-draggable":"r6o-footer"},i&&_t.createElement("button",{className:"r6o-btn left delete-annotation",title:sh.t("Delete"),onClick:this.onDelete},_t.createElement(Sb,{width:12})),_t.createElement("button",{className:"r6o-btn outline",onClick:this.onCancel},sh.t("Cancel")),_t.createElement("button",{className:"r6o-btn ",onClick:this.onOk},sh.t("Ok"))))))}}]),n}(U),dw=new Uint8Array(16);function pw(){if(!nw&&!(nw="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return nw(dw)}var hw=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function fw(e){return"string"==typeof e&&hw.test(e)}for(var mw=[],gw=0;gw<256;++gw)mw.push((gw+256).toString(16).substr(1));function vw(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(mw[e[t+0]]+mw[e[t+1]]+mw[e[t+2]]+mw[e[t+3]]+"-"+mw[e[t+4]]+mw[e[t+5]]+"-"+mw[e[t+6]]+mw[e[t+7]]+"-"+mw[e[t+8]]+mw[e[t+9]]+"-"+mw[e[t+10]]+mw[e[t+11]]+mw[e[t+12]]+mw[e[t+13]]+mw[e[t+14]]+mw[e[t+15]]).toLowerCase();if(!fw(n))throw TypeError("Stringified UUID is invalid");return n}function yw(e,t,n){var r=(e=e||{}).random||(e.rng||pw)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return vw(r)}var bw=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){var a=o[i];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n},ww=function(){function e(t,n){var r=this;m(this,e),D(this,"clone",(function(t,n){return new e(T(T({},r.underlying),t),T(T({},r.opts),n))})),D(this,"selector",(function(e){var t=r.underlying.target;if(t.selector)return(Array.isArray(t.selector)?t.selector:[t.selector]).find((function(t){return t.type===e}))})),this.underlying=t,this.opts=n}return v(e,[{key:"isEqual",value:function(e){return"Annotation"===(null==e?void 0:e.type)&&(this.underlying===e.underlying||!(!this.underlying.id||!e.underlying.id)&&bw(this.underlying,e.underlying))}},{key:"readOnly",get:function(){var e;return null==(e=this.opts)?void 0:e.readOnly}},{key:"id",get:function(){return this.underlying.id}},{key:"context",get:function(){return this.underlying["@context"]}},{key:"type",get:function(){return this.underlying.type}},{key:"motivation",get:function(){return this.underlying.motivation}},{key:"body",get:function(){return this.underlying.body}},{key:"target",get:function(){return this.underlying.target}},{key:"bodies",get:function(){return Array.isArray(this.underlying.body)?this.underlying.body:[this.underlying.body]},set:function(e){this.underlying.body=e}},{key:"targets",get:function(){return Array.isArray(this.underlying.target)?this.underlying.target:[this.underlying.target]}},{key:"quote",get:function(){var e;return null==(e=this.selector("TextQuoteSelector"))?void 0:e.exact}},{key:"start",get:function(){var e;return null==(e=this.selector("TextPositionSelector"))?void 0:e.start}},{key:"end",get:function(){var e;return null==(e=this.selector("TextPositionSelector"))?void 0:e.end}}]),e}(),xw=ww;D(xw,"create",(function(e){var t={"@context":"http://www.w3.org/ns/anno.jsonld",type:"Annotation",id:"#".concat(yw()),body:[]};return new ww(T(T({},t),e))}));var Sw=function(){function e(t,n){var r=this;m(this,e),D(this,"clone",(function(t){var n=new e;return n.underlying=JSON.parse(JSON.stringify(r.underlying)),t&&(n.underlying=T(T({},n.underlying),t)),n})),D(this,"selector",(function(e){var t=r.underlying.target;if(t.selector)return(Array.isArray(t.selector)?t.selector:[t.selector]).find((function(t){return t.type===e}))})),D(this,"toAnnotation",(function(){var e=Object.assign({},r.underlying,{type:"Annotation",id:"#".concat(yw())});return new xw(e)})),this.underlying={"@context":"http://www.w3.org/ns/anno.jsonld",type:"Selection",body:n||[],target:t}}return v(e,[{key:"context",get:function(){return this.underlying["@context"]}},{key:"type",get:function(){return this.underlying.type}},{key:"body",get:function(){return this.underlying.body}},{key:"target",get:function(){return this.underlying.target}},{key:"targets",get:function(){return Array.isArray(this.underlying.target)?this.underlying.target:[this.underlying.target]}},{key:"isEqual",value:function(e){return!!e&&bw(this.underlying,e.underlying)}},{key:"bodies",get:function(){return Array.isArray(this.underlying.body)?this.underlying.body:[this.underlying.body]}},{key:"quote",get:function(){var e;return null==(e=this.selector("TextQuoteSelector"))?void 0:e.exact}},{key:"isSelection",get:function(){return!0}}]),e}(),Ew=0,Tw=function(){return{setServerTime:function(e){var t=Date.now();Ew=e-t},getCurrentTimeAdjusted:function(){return new Date(Date.now()+Ew).toISOString()},toClientTime:function(e){return Date.parse(e)-Ew}}},Pw=function(e,t){if(e){var n="auto"===e?window.navigator.userLanguage||window.navigator.language:e,r=n.split("-")[0].toLowerCase(),i=[n,r].find((function(e){return rh.includes(e)}));i||console.warn("Unsupported locale '".concat(n,"'. Falling back to default en.")),sh.init(i,t)}else sh.init(null,t)},Cw={exports:{}};!function(e){function t(e){return new t.Viewer(e)}var n,r;(function(e){e.version={versionStr:"3.0.0",major:parseInt("3",10),minor:parseInt("0",10),revision:parseInt("0",10)};var n,r={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;e.isFunction=function(t){return"function"===e.type(t)},e.isArray=Array.isArray||function(t){return"array"===e.type(t)},e.isWindow=function(e){return e&&"object"==typeof e&&"setInterval"in e},e.type=function(e){return null==e?String(e):r[i.call(e)]||"object"},e.isPlainObject=function(n){if(!n||"object"!==t.type(n)||n.nodeType||e.isWindow(n)||n.constructor&&!o.call(n,"constructor")&&!o.call(n.constructor.prototype,"isPrototypeOf"))return!1;var r;for(var i in n)r=i;return void 0===r||o.call(n,r)},e.isEmptyObject=function(e){for(var t in e)return!1;return!0},e.freezeObject=function(t){return Object.freeze?e.freezeObject=Object.freeze:e.freezeObject=function(e){return e},e.freezeObject(t)},e.supportsCanvas=(n=document.createElement("canvas"),!(!e.isFunction(n.getContext)||!n.getContext("2d"))),e.isCanvasTainted=function(e){var t=!1;try{e.getContext("2d").getImageData(0,0,1,1)}catch(e){t=!0}return t},e.supportsAddEventListener=!(!document.documentElement.addEventListener||!document.addEventListener),e.supportsRemoveEventListener=!(!document.documentElement.removeEventListener||!document.removeEventListener),e.supportsEventListenerOptions=function(){var t=0;if(e.supportsAddEventListener)try{var n={get capture(){return t++,!1},get once(){return t++,!1},get passive(){return t++,!1}};window.addEventListener("test",null,n),window.removeEventListener("test",null,n)}catch(e){t=0}return t>=3}(),e.getCurrentPixelDensityRatio=function(){if(e.supportsCanvas){var t=document.createElement("canvas").getContext("2d"),n=window.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return Math.max(n,1)/r}return 1},e.pixelDensityRatio=e.getCurrentPixelDensityRatio()})(t),function(e){e.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=arguments.length,c=!1,u=1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"!=typeof s&&!t.isFunction(s)&&(s={}),l===u&&(s=this,--u);u<l;u++)if(null!==(e=arguments[u])||void 0!==e)for(n in e)r=s[n],s!==(i=e[n])&&(c&&i&&(t.isPlainObject(i)||(o=t.isArray(i)))?(o?(o=!1,a=r&&t.isArray(r)?r:[]):a=r&&t.isPlainObject(r)?r:{},s[n]=t.extend(c,a,i)):void 0!==i&&(s[n]=i));return s};var n=function(){if("object"!=typeof navigator)return!1;var e=navigator.userAgent;return"string"==typeof e&&(-1!==e.indexOf("iPhone")||-1!==e.indexOf("iPad")||-1!==e.indexOf("iPod"))};e.extend(e,{DEFAULT_SETTINGS:{xmlPath:null,tileSources:null,tileHost:null,initialPage:0,crossOriginPolicy:!1,ajaxWithCredentials:!1,loadTilesWithAjax:!1,ajaxHeaders:{},panHorizontal:!0,panVertical:!0,constrainDuringPan:!1,wrapHorizontal:!1,wrapVertical:!1,visibilityRatio:.5,minPixelRatio:.5,defaultZoomLevel:0,minZoomLevel:null,maxZoomLevel:null,homeFillsViewer:!1,clickTimeThreshold:300,clickDistThreshold:5,dblClickTimeThreshold:300,dblClickDistThreshold:20,springStiffness:6.5,animationTime:1.2,gestureSettingsMouse:{dragToPan:!0,scrollToZoom:!0,clickToZoom:!0,dblClickToZoom:!1,pinchToZoom:!1,zoomToRefPoint:!0,flickEnabled:!1,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsTouch:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!1,dblClickToZoom:!0,pinchToZoom:!0,zoomToRefPoint:!0,flickEnabled:!0,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsPen:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!0,dblClickToZoom:!1,pinchToZoom:!1,zoomToRefPoint:!0,flickEnabled:!1,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsUnknown:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!1,dblClickToZoom:!0,pinchToZoom:!0,zoomToRefPoint:!0,flickEnabled:!0,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},zoomPerClick:2,zoomPerScroll:1.2,zoomPerSecond:1,blendTime:0,alwaysBlend:!1,autoHideControls:!0,immediateRender:!1,minZoomImageRatio:.9,maxZoomPixelRatio:1.1,smoothTileEdgesMinZoom:1.1,iOSDevice:n(),pixelsPerWheelLine:40,pixelsPerArrowPress:40,autoResize:!0,preserveImageSizeOnResize:!1,minScrollDeltaTime:50,rotationIncrement:90,showSequenceControl:!0,sequenceControlAnchor:null,preserveViewport:!1,preserveOverlays:!1,navPrevNextWrap:!1,showNavigationControl:!0,navigationControlAnchor:null,showZoomControl:!0,showHomeControl:!0,showFullPageControl:!0,showRotationControl:!1,showFlipControl:!1,controlsFadeDelay:2e3,controlsFadeLength:1500,mouseNavEnabled:!0,showNavigator:!1,navigatorId:null,navigatorPosition:null,navigatorSizeRatio:.2,navigatorMaintainSizeRatio:!1,navigatorTop:null,navigatorLeft:null,navigatorHeight:null,navigatorWidth:null,navigatorAutoResize:!0,navigatorAutoFade:!0,navigatorRotate:!0,navigatorBackground:"#000",navigatorOpacity:.8,navigatorBorderColor:"#555",navigatorDisplayRegionColor:"#900",degrees:0,flipped:!1,opacity:1,preload:!1,compositeOperation:null,imageSmoothingEnabled:!0,placeholderFillStyle:null,showReferenceStrip:!1,referenceStripScroll:"horizontal",referenceStripElement:null,referenceStripHeight:null,referenceStripWidth:null,referenceStripPosition:"BOTTOM_LEFT",referenceStripSizeRatio:.2,collectionRows:3,collectionColumns:0,collectionLayout:"horizontal",collectionMode:!1,collectionTileSize:800,collectionTileMargin:80,imageLoaderLimit:0,maxImageCacheCount:200,timeout:3e4,useCanvas:!0,prefixUrl:"/images/",navImages:{zoomIn:{REST:"zoomin_rest.png",GROUP:"zoomin_grouphover.png",HOVER:"zoomin_hover.png",DOWN:"zoomin_pressed.png"},zoomOut:{REST:"zoomout_rest.png",GROUP:"zoomout_grouphover.png",HOVER:"zoomout_hover.png",DOWN:"zoomout_pressed.png"},home:{REST:"home_rest.png",GROUP:"home_grouphover.png",HOVER:"home_hover.png",DOWN:"home_pressed.png"},fullpage:{REST:"fullpage_rest.png",GROUP:"fullpage_grouphover.png",HOVER:"fullpage_hover.png",DOWN:"fullpage_pressed.png"},rotateleft:{REST:"rotateleft_rest.png",GROUP:"rotateleft_grouphover.png",HOVER:"rotateleft_hover.png",DOWN:"rotateleft_pressed.png"},rotateright:{REST:"rotateright_rest.png",GROUP:"rotateright_grouphover.png",HOVER:"rotateright_hover.png",DOWN:"rotateright_pressed.png"},flip:{REST:"flip_rest.png",GROUP:"flip_grouphover.png",HOVER:"flip_hover.png",DOWN:"flip_pressed.png"},previous:{REST:"previous_rest.png",GROUP:"previous_grouphover.png",HOVER:"previous_hover.png",DOWN:"previous_pressed.png"},next:{REST:"next_rest.png",GROUP:"next_grouphover.png",HOVER:"next_hover.png",DOWN:"next_pressed.png"}},debugMode:!1,debugGridColor:["#437AB2","#1B9E77","#D95F02","#7570B3","#E7298A","#66A61E","#E6AB02","#A6761D","#666666"]},SIGNAL:"----seadragon----",delegate:function(e,t){return function(){var n=arguments;return void 0===n&&(n=[]),t.apply(e,n)}},BROWSERS:{UNKNOWN:0,IE:1,FIREFOX:2,SAFARI:3,CHROME:4,OPERA:5,EDGE:6,CHROMEEDGE:7},_viewers:new Map,getViewer:function(t){return e._viewers.get(this.getElement(t))},getElement:function(e){return"string"==typeof e&&(e=document.getElementById(e)),e},getElementPosition:function(t){var n,r,i=new e.Point;for(r=a(t=e.getElement(t),n="fixed"===e.getElementStyle(t).position);r;)i.x+=t.offsetLeft,i.y+=t.offsetTop,n&&(i=i.plus(e.getPageScroll())),r=a(t=r,n="fixed"===e.getElementStyle(t).position);return i},getElementOffset:function(t){var n,r,i=(t=e.getElement(t))&&t.ownerDocument,o={top:0,left:0};return i?(n=i.documentElement,void 0!==t.getBoundingClientRect&&(o=t.getBoundingClientRect()),r=i===i.window?i:9===i.nodeType&&(i.defaultView||i.parentWindow),new e.Point(o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0),o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0))):new e.Point},getElementSize:function(t){return t=e.getElement(t),new e.Point(t.clientWidth,t.clientHeight)},getElementStyle:document.documentElement.currentStyle?function(t){return(t=e.getElement(t)).currentStyle}:function(t){return t=e.getElement(t),window.getComputedStyle(t,"")},getCssPropertyWithVendorPrefix:function(t){var n={};return e.getCssPropertyWithVendorPrefix=function(t){if(void 0!==n[t])return n[t];var r=document.createElement("div").style,i=null;if(void 0!==r[t])i=t;else for(var o=["Webkit","Moz","MS","O","webkit","moz","ms","o"],a=e.capitalizeFirstLetter(t),s=0;s<o.length;s++){var l=o[s]+a;if(void 0!==r[l]){i=l;break}}return n[t]=i,i},e.getCssPropertyWithVendorPrefix(t)},capitalizeFirstLetter:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},positiveModulo:function(e,t){var n=e%t;return n<0&&(n+=t),n},pointInElement:function(t,n){t=e.getElement(t);var r=e.getElementOffset(t),i=e.getElementSize(t);return n.x>=r.x&&n.x<r.x+i.x&&n.y<r.y+i.y&&n.y>=r.y},getMousePosition:function(t){if("number"==typeof t.pageX)e.getMousePosition=function(t){var n=new e.Point;return n.x=t.pageX,n.y=t.pageY,n};else{if("number"!=typeof t.clientX)throw new Error("Unknown event mouse position, no known technique.");e.getMousePosition=function(t){var n=new e.Point;return n.x=t.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,n.y=t.clientY+document.body.scrollTop+document.documentElement.scrollTop,n}}return e.getMousePosition(t)},getPageScroll:function(){var t=document.documentElement||{},n=document.body||{};if("number"==typeof window.pageXOffset)e.getPageScroll=function(){return new e.Point(window.pageXOffset,window.pageYOffset)};else if(n.scrollLeft||n.scrollTop)e.getPageScroll=function(){return new e.Point(document.body.scrollLeft,document.body.scrollTop)};else{if(!t.scrollLeft&&!t.scrollTop)return new e.Point(0,0);e.getPageScroll=function(){return new e.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)}}return e.getPageScroll()},setPageScroll:function(t){if(void 0!==window.scrollTo)e.setPageScroll=function(e){window.scrollTo(e.x,e.y)};else{var n=e.getPageScroll();if(n.x===t.x&&n.y===t.y)return;document.body.scrollLeft=t.x,document.body.scrollTop=t.y;var r=e.getPageScroll();if(r.x!==n.x&&r.y!==n.y)return void(e.setPageScroll=function(e){document.body.scrollLeft=e.x,document.body.scrollTop=e.y});if(document.documentElement.scrollLeft=t.x,document.documentElement.scrollTop=t.y,(r=e.getPageScroll()).x!==n.x&&r.y!==n.y)return void(e.setPageScroll=function(e){document.documentElement.scrollLeft=e.x,document.documentElement.scrollTop=e.y});e.setPageScroll=function(e){}}e.setPageScroll(t)},getWindowSize:function(){var t=document.documentElement||{},n=document.body||{};if("number"==typeof window.innerWidth)e.getWindowSize=function(){return new e.Point(window.innerWidth,window.innerHeight)};else if(t.clientWidth||t.clientHeight)e.getWindowSize=function(){return new e.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else{if(!n.clientWidth&&!n.clientHeight)throw new Error("Unknown window size, no known technique.");e.getWindowSize=function(){return new e.Point(document.body.clientWidth,document.body.clientHeight)}}return e.getWindowSize()},makeCenteredNode:function(t){t=e.getElement(t);var n=[e.makeNeutralElement("div"),e.makeNeutralElement("div"),e.makeNeutralElement("div")];return e.extend(n[0].style,{display:"table",height:"100%",width:"100%"}),e.extend(n[1].style,{display:"table-row"}),e.extend(n[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),n[0].appendChild(n[1]),n[1].appendChild(n[2]),n[2].appendChild(t),n[0]},makeNeutralElement:function(e){var t=document.createElement(e),n=t.style;return n.background="transparent none",n.border="none",n.margin="0px",n.padding="0px",n.position="static",t},now:function(){return Date.now?e.now=Date.now:e.now=function(){return(new Date).getTime()},e.now()},makeTransparentImage:function(t){var n=e.makeNeutralElement("img");return n.src=t,n},setElementOpacity:function(t,n,r){var i;t=e.getElement(t),r&&!e.Browser.alpha&&(n=Math.round(n)),e.Browser.opacity?t.style.opacity=n<1?n:"":n<1?(i="alpha(opacity="+Math.round(100*n)+")",t.style.filter=i):t.style.filter=""},setElementTouchActionNone:function(t){void 0!==(t=e.getElement(t)).style.touchAction?t.style.touchAction="none":void 0!==t.style.msTouchAction&&(t.style.msTouchAction="none")},setElementPointerEvents:function(t,n){void 0!==(t=e.getElement(t)).style.pointerEvents&&(t.style.pointerEvents=n)},setElementPointerEventsNone:function(t){e.setElementPointerEvents(t,"none")},addClass:function(t,n){(t=e.getElement(t)).className?-1===(" "+t.className+" ").indexOf(" "+n+" ")&&(t.className+=" "+n):t.className=n},indexOf:function(e,t,n){return Array.prototype.indexOf?this.indexOf=function(e,t,n){return e.indexOf(t,n)}:this.indexOf=function(e,t,n){var r,i,o=n||0;if(!e)throw new TypeError;if(0===(i=e.length)||o>=i)return-1;for(o<0&&(o=i-Math.abs(o)),r=o;r<i;r++)if(e[r]===t)return r;return-1},this.indexOf(e,t,n)},removeClass:function(t,n){var r,i,o=[];for(r=(t=e.getElement(t)).className.split(/\s+/),i=0;i<r.length;i++)r[i]&&r[i]!==n&&o.push(r[i]);t.className=o.join(" ")},normalizeEventListenerOptions:function(t){return void 0!==t?"boolean"==typeof t?e.supportsEventListenerOptions?{capture:t}:t:e.supportsEventListenerOptions?t:void 0!==t.capture&&t.capture:!!e.supportsEventListenerOptions&&{capture:!1}},addEvent:function(){if(e.supportsAddEventListener)return function(t,n,r,i){i=e.normalizeEventListenerOptions(i),(t=e.getElement(t)).addEventListener(n,r,i)};if(document.documentElement.attachEvent&&document.attachEvent)return function(t,n,r){(t=e.getElement(t)).attachEvent("on"+n,r)};throw new Error("No known event model.")}(),removeEvent:function(){if(e.supportsRemoveEventListener)return function(t,n,r,i){i=e.normalizeEventListenerOptions(i),(t=e.getElement(t)).removeEventListener(n,r,i)};if(document.documentElement.detachEvent&&document.detachEvent)return function(t,n,r){(t=e.getElement(t)).detachEvent("on"+n,r)};throw new Error("No known event model.")}(),cancelEvent:function(e){e.preventDefault()},eventIsCanceled:function(e){return e.defaultPrevented},stopEvent:function(e){e.stopPropagation()},createCallback:function(e,t){var n,r=[];for(n=2;n<arguments.length;n++)r.push(arguments[n]);return function(){var n,i=r.concat([]);for(n=0;n<arguments.length;n++)i.push(arguments[n]);return t.apply(e,i)}},getUrlParameter:function(e){return o[e]||null},getUrlProtocol:function(e){var t=e.match(/^([a-z]+:)\/\//i);return null===t?window.location.protocol:t[1].toLowerCase()},createAjaxRequest:function(t){var n;try{n=!!new ActiveXObject("Microsoft.XMLHTTP")}catch(e){n=!1}if(n)window.XMLHttpRequest?e.createAjaxRequest=function(e){return e?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest}:e.createAjaxRequest=function(){return new ActiveXObject("Microsoft.XMLHTTP")};else{if(!window.XMLHttpRequest)throw new Error("Browser doesn't support XMLHttpRequest.");e.createAjaxRequest=function(){return new XMLHttpRequest}}return e.createAjaxRequest(t)},makeAjaxRequest:function(t,n,r){var i,o,a;e.isPlainObject(t)&&(n=t.success,r=t.error,i=t.withCredentials,o=t.headers,a=t.responseType||null,t=t.url);var s=e.getUrlProtocol(t),l=e.createAjaxRequest("file:"===s);if(!e.isFunction(n))throw new Error("makeAjaxRequest requires a success callback");l.onreadystatechange=function(){4===l.readyState&&(l.onreadystatechange=function(){},l.status>=200&&l.status<300||0===l.status&&"http:"!==s&&"https:"!==s?n(l):(e.console.log("AJAX request returned %d: %s",l.status,t),e.isFunction(r)&&r(l)))};try{if(l.open("GET",t,!0),a&&(l.responseType=a),o)for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&o[c]&&l.setRequestHeader(c,o[c]);i&&(l.withCredentials=!0),l.send(null)}catch(t){e.console.log("%s while making AJAX request: %s",t.name,t.message),l.onreadystatechange=function(){},e.isFunction(r)&&r(l,t)}return l},jsonp:function(t){var n,r=t.url,i=document.head||document.getElementsByTagName("head")[0]||document.documentElement,o=t.callbackName||"openseadragon"+e.now(),a=window[o],s="$1"+o+"$2",l=t.param||"callback",c=t.callback;r=r.replace(/(=)\?(&|$)|\?\?/i,s),r+=(/\?/.test(r)?"&":"?")+l+"="+o,window[o]=function(t){if(a)window[o]=a;else try{delete window[o]}catch(e){}c&&e.isFunction(c)&&c(t)},n=document.createElement("script"),(void 0!==t.async||!1!==t.async)&&(n.async="async"),t.scriptCharset&&(n.charset=t.scriptCharset),n.src=r,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,i&&n.parentNode&&i.removeChild(n),n=void 0)},i.insertBefore(n,i.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(t){if(window.DOMParser)e.parseXml=function(e){return(new DOMParser).parseFromString(e,"text/xml")};else{if(!window.ActiveXObject)throw new Error("Browser doesn't support XML DOM.");e.parseXml=function(e){var t=null;return(t=new ActiveXObject("Microsoft.XMLDOM")).async=!1,t.loadXML(e),t}}return e.parseXml(t)},parseJSON:function(t){return e.parseJSON=window.JSON.parse,e.parseJSON(t)},imageFormatSupported:function(e){return!!i[(e=e||"").toLowerCase()]},setImageFormatsSupported:function(t){e.extend(i,t)}});var r=function(e){};e.console=window.console||{log:r,debug:r,info:r,warn:r,error:r,assert:r},e.Browser={vendor:e.BROWSERS.UNKNOWN,version:0,alpha:!0};var i={bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1},o={};function a(e,t){return t&&e!==document.body?document.body:e.offsetParent}(function(){var t=navigator.appVersion,n=navigator.userAgent;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&(e.Browser.vendor=e.BROWSERS.IE,e.Browser.version=parseFloat(n.substring(n.indexOf("MSIE")+5,n.indexOf(";",n.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(n.indexOf("Edge")>=0?(e.Browser.vendor=e.BROWSERS.EDGE,e.Browser.version=parseFloat(n.substring(n.indexOf("Edge")+5))):n.indexOf("Edg")>=0?(e.Browser.vendor=e.BROWSERS.CHROMEEDGE,e.Browser.version=parseFloat(n.substring(n.indexOf("Edg")+4))):n.indexOf("Firefox")>=0?(e.Browser.vendor=e.BROWSERS.FIREFOX,e.Browser.version=parseFloat(n.substring(n.indexOf("Firefox")+8))):n.indexOf("Safari")>=0?(e.Browser.vendor=n.indexOf("Chrome")>=0?e.BROWSERS.CHROME:e.BROWSERS.SAFARI,e.Browser.version=parseFloat(n.substring(n.substring(0,n.indexOf("Safari")).lastIndexOf("/")+1,n.indexOf("Safari")))):null!==new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(n)&&(e.Browser.vendor=e.BROWSERS.IE,e.Browser.version=parseFloat(RegExp.$1)));break;case"Opera":e.Browser.vendor=e.BROWSERS.OPERA,e.Browser.version=parseFloat(t)}var r,i,a,s=window.location.search.substring(1).split("&");for(a=0;a<s.length;a++)if((i=(r=s[a]).indexOf("="))>0){var l=r.substring(0,i),c=r.substring(i+1);try{o[l]=decodeURIComponent(c)}catch(t){e.console.error("Ignoring malformed URL parameter: %s=%s",l,c)}}e.Browser.alpha=!(e.Browser.vendor===e.BROWSERS.CHROME&&e.Browser.version<2),e.Browser.opacity=!0,e.Browser.vendor===e.BROWSERS.IE&&e.Browser.version<11&&e.console.error("Internet Explorer versions < 11 are not supported by OpenSeadragon")})(),function(t){var n=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame,r=t.cancelAnimationFrame||t.mozCancelAnimationFrame||t.webkitCancelAnimationFrame||t.msCancelAnimationFrame;if(n&&r)e.requestAnimationFrame=function(){return n.apply(t,arguments)},e.cancelAnimationFrame=function(){return r.apply(t,arguments)};else{var i,o=[],a=[],s=0;e.requestAnimationFrame=function(t){return o.push([++s,t]),i||(i=setInterval((function(){if(o.length){var t=e.now(),n=a;for(a=o,o=n;a.length;)a.shift()[1](t)}else clearInterval(i),i=void 0}),20)),s},e.cancelAnimationFrame=function(e){var t,n;for(t=0,n=o.length;t<n;t+=1)if(o[t][0]===e)return void o.splice(t,1);for(t=0,n=a.length;t<n;t+=1)if(a[t][0]===e)return void a.splice(t,1)}}}(window)}(t),n=At,r=function(){return t},e.exports?e.exports=r():n.OpenSeadragon=r(),function(e){var t={supportsFullScreen:!1,isFullScreen:function(){return!1},getFullScreenElement:function(){return null},requestFullScreen:function(){},exitFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",fullScreenErrorEventName:""};document.exitFullscreen?(t.supportsFullScreen=!0,t.getFullScreenElement=function(){return document.fullscreenElement},t.requestFullScreen=function(e){return e.requestFullscreen()},t.exitFullScreen=function(){document.exitFullscreen()},t.fullScreenEventName="fullscreenchange",t.fullScreenErrorEventName="fullscreenerror"):document.msExitFullscreen?(t.supportsFullScreen=!0,t.getFullScreenElement=function(){return document.msFullscreenElement},t.requestFullScreen=function(e){return e.msRequestFullscreen()},t.exitFullScreen=function(){document.msExitFullscreen()},t.fullScreenEventName="MSFullscreenChange",t.fullScreenErrorEventName="MSFullscreenError"):document.webkitExitFullscreen?(t.supportsFullScreen=!0,t.getFullScreenElement=function(){return document.webkitFullscreenElement},t.requestFullScreen=function(e){return e.webkitRequestFullscreen()},t.exitFullScreen=function(){document.webkitExitFullscreen()},t.fullScreenEventName="webkitfullscreenchange",t.fullScreenErrorEventName="webkitfullscreenerror"):document.webkitCancelFullScreen?(t.supportsFullScreen=!0,t.getFullScreenElement=function(){return document.webkitCurrentFullScreenElement},t.requestFullScreen=function(e){return e.webkitRequestFullScreen()},t.exitFullScreen=function(){document.webkitCancelFullScreen()},t.fullScreenEventName="webkitfullscreenchange",t.fullScreenErrorEventName="webkitfullscreenerror"):document.mozCancelFullScreen&&(t.supportsFullScreen=!0,t.getFullScreenElement=function(){return document.mozFullScreenElement},t.requestFullScreen=function(e){return e.mozRequestFullScreen()},t.exitFullScreen=function(){document.mozCancelFullScreen()},t.fullScreenEventName="mozfullscreenchange",t.fullScreenErrorEventName="mozfullscreenerror"),t.isFullScreen=function(){return null!==t.getFullScreenElement()},t.cancelFullScreen=function(){e.console.error("cancelFullScreen is deprecated. Use exitFullScreen instead."),t.exitFullScreen()},e.extend(e,t)}(t),function(e){e.EventSource=function(){this.events={}},e.EventSource.prototype={addOnceHandler:function(e,t,n,r){var i=this;r=r||1;var o=0,a=function n(a){++o===r&&i.removeHandler(e,n),t(a)};this.addHandler(e,a,n)},addHandler:function(t,n,r){var i=this.events[t];i||(this.events[t]=i=[]),n&&e.isFunction(n)&&(i[i.length]={handler:n,userData:r||null})},removeHandler:function(t,n){var r,i=this.events[t],o=[];if(i&&e.isArray(i)){for(r=0;r<i.length;r++)i[r].handler!==n&&o.push(i[r]);this.events[t]=o}},removeAllHandlers:function(e){if(e)this.events[e]=[];else for(var t in this.events)this.events[t]=[]},getHandler:function(e){var t=this.events[e];return t&&t.length?(t=1===t.length?[t[0]]:Array.apply(null,t),function(e,n){var r,i=t.length;for(r=0;r<i;r++)t[r]&&(n.eventSource=e,n.userData=t[r].userData,t[r].handler(n))}):null},raiseEvent:function(e,t){var n=this.getHandler(e);n&&(t||(t={}),n(this,t))}}}(t),function(e){var t={};e.MouseTracker=function(n){var r=arguments;e.isPlainObject(n)||(n={element:r[0],clickTimeThreshold:r[1],clickDistThreshold:r[2]}),this.hash=Math.random(),this.element=e.getElement(n.element),this.clickTimeThreshold=n.clickTimeThreshold||e.DEFAULT_SETTINGS.clickTimeThreshold,this.clickDistThreshold=n.clickDistThreshold||e.DEFAULT_SETTINGS.clickDistThreshold,this.dblClickTimeThreshold=n.dblClickTimeThreshold||e.DEFAULT_SETTINGS.dblClickTimeThreshold,this.dblClickDistThreshold=n.dblClickDistThreshold||e.DEFAULT_SETTINGS.dblClickDistThreshold,this.userData=n.userData||null,this.stopDelay=n.stopDelay||50,this.preProcessEventHandler=n.preProcessEventHandler||null,this.contextMenuHandler=n.contextMenuHandler||null,this.enterHandler=n.enterHandler||null,this.leaveHandler=n.leaveHandler||null,this.exitHandler=n.exitHandler||null,this.overHandler=n.overHandler||null,this.outHandler=n.outHandler||null,this.pressHandler=n.pressHandler||null,this.nonPrimaryPressHandler=n.nonPrimaryPressHandler||null,this.releaseHandler=n.releaseHandler||null,this.nonPrimaryReleaseHandler=n.nonPrimaryReleaseHandler||null,this.moveHandler=n.moveHandler||null,this.scrollHandler=n.scrollHandler||null,this.clickHandler=n.clickHandler||null,this.dblClickHandler=n.dblClickHandler||null,this.dragHandler=n.dragHandler||null,this.dragEndHandler=n.dragEndHandler||null,this.pinchHandler=n.pinchHandler||null,this.stopHandler=n.stopHandler||null,this.keyDownHandler=n.keyDownHandler||null,this.keyUpHandler=n.keyUpHandler||null,this.keyHandler=n.keyHandler||null,this.focusHandler=n.focusHandler||null,this.blurHandler=n.blurHandler||null;var i=this;t[this.hash]={click:function(e){S(i,e)},dblclick:function(e){E(i,e)},keydown:function(e){T(i,e)},keyup:function(e){P(i,e)},keypress:function(e){C(i,e)},focus:function(e){k(i,e)},blur:function(e){O(i,e)},contextmenu:function(e){_(i,e)},wheel:function(e){R(i,e)},mousewheel:function(e){A(i,e)},DOMMouseScroll:function(e){A(i,e)},MozMousePixelScroll:function(e){A(i,e)},losecapture:function(e){I(i,e)},mouseenter:function(e){U(i,e)},mouseleave:function(e){V(i,e)},mouseover:function(e){W(i,e)},mouseout:function(e){G(i,e)},mousedown:function(e){q(i,e)},mouseup:function(e){X(i,e)},mousemove:function(e){K(i,e)},touchstart:function(e){M(i,e)},touchend:function(e){L(i,e)},touchmove:function(e){j(i,e)},touchcancel:function(e){N(i,e)},gesturestart:function(e){F(i,e)},gesturechange:function(e){B(i,e)},gotpointercapture:function(e){z(i,e)},lostpointercapture:function(e){H(i,e)},pointerenter:function(e){U(i,e)},pointerleave:function(e){V(i,e)},pointerover:function(e){W(i,e)},pointerout:function(e){G(i,e)},pointerdown:function(e){q(i,e)},pointerup:function(e){X(i,e)},pointermove:function(e){K(i,e)},pointercancel:function(e){$(i,e)},pointerupcaptured:function(e){Z(i,e)},pointermovecaptured:function(e){J(i,e)},tracking:!1,activePointersLists:[],lastClickPos:null,dblClickTimeOut:null,pinchGPoints:[],lastPinchDist:0,currentPinchDist:0,lastPinchCenter:null,currentPinchCenter:null,sentDragEvent:!1},this.hasGestureHandlers=!!(this.pressHandler||this.nonPrimaryPressHandler||this.releaseHandler||this.nonPrimaryReleaseHandler||this.clickHandler||this.dblClickHandler||this.dragHandler||this.dragEndHandler||this.pinchHandler),this.hasScrollHandler=!!this.scrollHandler,e.MouseTracker.havePointerEvents&&e.setElementPointerEvents(this.element,"auto"),this.exitHandler&&e.console.error("MouseTracker.exitHandler is deprecated. Use MouseTracker.leaveHandler instead."),n.startDisabled||this.setTracking(!0)},e.MouseTracker.prototype={destroy:function(){d(this),this.element=null,t[this.hash]=null,delete t[this.hash]},isTracking:function(){return t[this.hash].tracking},setTracking:function(e){return e?u(this):d(this),this},getActivePointersListByType:function(n){var r,i,o=t[this.hash],a=o.activePointersLists.length;for(r=0;r<a;r++)if(o.activePointersLists[r].type===n)return o.activePointersLists[r];return i=new e.MouseTracker.GesturePointList(n),o.activePointersLists.push(i),i},getActivePointerCount:function(){var e,n=t[this.hash],r=n.activePointersLists.length,i=0;for(e=0;e<r;e++)i+=n.activePointersLists[e].getLength();return i},preProcessEventHandler:function(){},contextMenuHandler:function(){},enterHandler:function(){},leaveHandler:function(){},exitHandler:function(){},overHandler:function(){},outHandler:function(){},pressHandler:function(){},nonPrimaryPressHandler:function(){},releaseHandler:function(){},nonPrimaryReleaseHandler:function(){},moveHandler:function(){},scrollHandler:function(){},clickHandler:function(){},dblClickHandler:function(){},dragHandler:function(){},dragEndHandler:function(){},pinchHandler:function(){},stopHandler:function(){},keyDownHandler:function(){},keyUpHandler:function(){},keyHandler:function(){},focusHandler:function(){},blurHandler:function(){}};var n,r,i,o,a,s=function(){try{return window.self!==window.top}catch(e){return!0}}();function l(e){try{return e.addEventListener&&e.removeEventListener}catch(e){return!1}}function c(e){var n,r,i,o,a,s=t[e.hash],l=s.activePointersLists.length;for(n=0;n<l;n++)if((i=s.activePointersLists[n]).getLength()>0){for(a=[],o=i.asArray(),r=0;r<o.length;r++)a.push(o[r]);for(r=0;r<a.length;r++)te(e,i,a[r])}for(n=0;n<l;n++)s.activePointersLists.pop();s.sentDragEvent=!1}function u(n){var r,i,o=t[n.hash];if(!o.tracking){for(i=0;i<e.MouseTracker.subscribeEvents.length;i++)r=e.MouseTracker.subscribeEvents[i],e.addEvent(n.element,r,o[r],r===e.MouseTracker.wheelEventName&&{passive:!1,capture:!1});c(n),o.tracking=!0}}function d(n){var r,i,o=t[n.hash];if(o.tracking){for(i=0;i<e.MouseTracker.subscribeEvents.length;i++)r=e.MouseTracker.subscribeEvents[i],e.removeEvent(n.element,r,o[r],!1);c(n),o.tracking=!1}}function p(e,n){var r=t[e.hash];if("pointerevent"===n)return{upName:"pointerup",upHandler:r.pointerupcaptured,moveName:"pointermove",moveHandler:r.pointermovecaptured};if("mouse"===n)return{upName:"pointerup",upHandler:r.pointerupcaptured,moveName:"pointermove",moveHandler:r.pointermovecaptured};if("touch"===n)return{upName:"touchend",upHandler:r.touchendcaptured,moveName:"touchmove",moveHandler:r.touchmovecaptured};throw new Error("MouseTracker.getCaptureEventParams: Unknown pointer type.")}function h(t,n){var r;if(e.MouseTracker.havePointerCapture)if(e.MouseTracker.havePointerEvents)try{t.element.setPointerCapture(n.id)}catch(t){return void e.console.warn("setPointerCapture() called on invalid pointer ID")}else t.element.setCapture(!0);else r=p(t,e.MouseTracker.havePointerEvents?"pointerevent":n.type),s&&l(window.top)&&e.addEvent(window.top,r.upName,r.upHandler,!0),e.addEvent(e.MouseTracker.captureElement,r.upName,r.upHandler,!0),e.addEvent(e.MouseTracker.captureElement,r.moveName,r.moveHandler,!0);ie(t,n,!0)}function f(t,n){var r,i;if(e.MouseTracker.havePointerCapture)if(e.MouseTracker.havePointerEvents){if(!(i=t.getActivePointersListByType(n.type).getById(n.id))||!i.captured)return;try{t.element.releasePointerCapture(n.id)}catch(e){}}else t.element.releaseCapture();else r=p(t,e.MouseTracker.havePointerEvents?"pointerevent":n.type),s&&l(window.top)&&e.removeEvent(window.top,r.upName,r.upHandler,!0),e.removeEvent(e.MouseTracker.captureElement,r.moveName,r.moveHandler,!0),e.removeEvent(e.MouseTracker.captureElement,r.upName,r.upHandler,!0);ie(t,n,!1)}function m(t){return e.MouseTracker.havePointerEvents?t.pointerId:e.MouseTracker.mousePointerId}function g(t){return e.MouseTracker.havePointerEvents?t.pointerType||(e.Browser.vendor===e.BROWSERS.IE?"mouse":""):"mouse"}function v(t){return!e.MouseTracker.havePointerEvents||t.isPrimary}function y(t){return e.getMousePosition(t)}function b(e,t){return w(y(e),t)}function w(t,n){var r=e.getElementOffset(n);return t.minus(r)}function x(t,n){return new e.Point((t.x+n.x)/2,(t.y+n.y)/2)}function S(t,n){var r={originalEvent:n,eventType:"click",pointerType:"mouse",isEmulated:!1};re(t,r),r.preventDefault&&!r.defaultPrevented&&e.cancelEvent(n),r.stopPropagation&&e.stopEvent(n)}function E(t,n){var r={originalEvent:n,eventType:"dblclick",pointerType:"mouse",isEmulated:!1};re(t,r),r.preventDefault&&!r.defaultPrevented&&e.cancelEvent(n),r.stopPropagation&&e.stopEvent(n)}function T(t,n){var r=null,i={originalEvent:n,eventType:"keydown",pointerType:"",isEmulated:!1};re(t,i),t.keyDownHandler&&!i.preventGesture&&!i.defaultPrevented&&(r={eventSource:t,keyCode:n.keyCode?n.keyCode:n.charCode,ctrl:n.ctrlKey,shift:n.shiftKey,alt:n.altKey,meta:n.metaKey,originalEvent:n,preventDefault:i.preventDefault||i.defaultPrevented,userData:t.userData},t.keyDownHandler(r)),(r&&r.preventDefault||i.preventDefault&&!i.defaultPrevented)&&e.cancelEvent(n),i.stopPropagation&&e.stopEvent(n)}function P(t,n){var r=null,i={originalEvent:n,eventType:"keyup",pointerType:"",isEmulated:!1};re(t,i),t.keyUpHandler&&!i.preventGesture&&!i.defaultPrevented&&(r={eventSource:t,keyCode:n.keyCode?n.keyCode:n.charCode,ctrl:n.ctrlKey,shift:n.shiftKey,alt:n.altKey,meta:n.metaKey,originalEvent:n,preventDefault:i.preventDefault||i.defaultPrevented,userData:t.userData},t.keyUpHandler(r)),(r&&r.preventDefault||i.preventDefault&&!i.defaultPrevented)&&e.cancelEvent(n),i.stopPropagation&&e.stopEvent(n)}function C(t,n){var r=null,i={originalEvent:n,eventType:"keypress",pointerType:"",isEmulated:!1};re(t,i),t.keyHandler&&!i.preventGesture&&!i.defaultPrevented&&(r={eventSource:t,keyCode:n.keyCode?n.keyCode:n.charCode,ctrl:n.ctrlKey,shift:n.shiftKey,alt:n.altKey,meta:n.metaKey,originalEvent:n,preventDefault:i.preventDefault||i.defaultPrevented,userData:t.userData},t.keyHandler(r)),(r&&r.preventDefault||i.preventDefault&&!i.defaultPrevented)&&e.cancelEvent(n),i.stopPropagation&&e.stopEvent(n)}function k(e,t){var n={originalEvent:t,eventType:"focus",pointerType:"",isEmulated:!1};re(e,n),e.focusHandler&&!n.preventGesture&&e.focusHandler({eventSource:e,originalEvent:t,userData:e.userData})}function O(e,t){var n={originalEvent:t,eventType:"blur",pointerType:"",isEmulated:!1};re(e,n),e.blurHandler&&!n.preventGesture&&e.blurHandler({eventSource:e,originalEvent:t,userData:e.userData})}function _(t,n){var r=null,i={originalEvent:n,eventType:"contextmenu",pointerType:"mouse",isEmulated:!1};re(t,i),t.contextMenuHandler&&!i.preventGesture&&!i.defaultPrevented&&(r={eventSource:t,position:w(y(n),t.element),originalEvent:i.originalEvent,preventDefault:i.preventDefault||i.defaultPrevented,userData:t.userData},t.contextMenuHandler(r)),(r&&r.preventDefault||i.preventDefault&&!i.defaultPrevented)&&e.cancelEvent(n),i.stopPropagation&&e.stopEvent(n)}function R(e,t){D(e,t,t)}function A(t,n){var r={target:n.target||n.srcElement,type:"wheel",shiftKey:n.shiftKey||!1,clientX:n.clientX,clientY:n.clientY,pageX:n.pageX?n.pageX:n.clientX,pageY:n.pageY?n.pageY:n.clientY,deltaMode:"MozMousePixelScroll"===n.type?0:1,deltaX:0,deltaZ:0};"mousewheel"===e.MouseTracker.wheelEventName?r.deltaY=-n.wheelDelta/e.DEFAULT_SETTINGS.pixelsPerWheelLine:r.deltaY=n.detail,D(t,r,n)}function D(t,n,r){var i,o=0,a=null;o=n.deltaY<0?1:-1,re(t,i={originalEvent:n,eventType:"wheel",pointerType:"mouse",isEmulated:n!==r}),t.scrollHandler&&!i.preventGesture&&!i.defaultPrevented&&(a={eventSource:t,pointerType:"mouse",position:b(n,t.element),scroll:o,shift:n.shiftKey,isTouchEvent:!1,originalEvent:r,preventDefault:i.preventDefault||i.defaultPrevented,userData:t.userData},t.scrollHandler(a)),i.stopPropagation&&e.stopEvent(r),(a&&a.preventDefault||i.preventDefault&&!i.defaultPrevented)&&e.cancelEvent(r)}function I(t,n){var r={id:e.MouseTracker.mousePointerId,type:"mouse"},i={originalEvent:n,eventType:"lostpointercapture",pointerType:"mouse",isEmulated:!1};re(t,i),n.target===t.element&&ie(t,r,!1),i.stopPropagation&&e.stopEvent(n)}function M(t,n){var r,i,o,a=n.changedTouches.length,s=t.getActivePointersListByType("touch");r=e.now(),s.getLength()>n.touches.length-a&&e.console.warn("Tracked touch contact count doesn't match event.touches.length");var l={originalEvent:n,eventType:"pointerdown",pointerType:"touch",isEmulated:!1};for(re(t,l),i=0;i<a;i++)oe(t,l,o={id:n.changedTouches[i].identifier,type:"touch",isPrimary:0===s.getLength(),currentPos:y(n.changedTouches[i]),currentTime:r}),ce(t,l,o,0),ie(t,o,!0);l.preventDefault&&!l.defaultPrevented&&e.cancelEvent(n),l.stopPropagation&&e.stopEvent(n)}function L(t,n){var r,i,o,a=n.changedTouches.length;r=e.now();var s={originalEvent:n,eventType:"pointerup",pointerType:"touch",isEmulated:!1};for(re(t,s),i=0;i<a;i++)ue(t,s,o={id:n.changedTouches[i].identifier,type:"touch",currentPos:y(n.changedTouches[i]),currentTime:r},0),ie(t,o,!1),ae(t,s,o);s.preventDefault&&!s.defaultPrevented&&e.cancelEvent(n),s.stopPropagation&&e.stopEvent(n)}function j(t,n){var r,i,o=n.changedTouches.length;r=e.now();var a={originalEvent:n,eventType:"pointermove",pointerType:"touch",isEmulated:!1};for(re(t,a),i=0;i<o;i++)de(t,a,{id:n.changedTouches[i].identifier,type:"touch",currentPos:y(n.changedTouches[i]),currentTime:r});a.preventDefault&&!a.defaultPrevented&&e.cancelEvent(n),a.stopPropagation&&e.stopEvent(n)}function N(t,n){var r,i=n.changedTouches.length,o={originalEvent:n,eventType:"pointercancel",pointerType:"touch",isEmulated:!1};for(re(t,o),r=0;r<i;r++)pe(t,o,{id:n.changedTouches[r].identifier,type:"touch"});o.stopPropagation&&e.stopEvent(n)}function F(t,n){return e.eventIsCanceled(n)||n.preventDefault(),!1}function B(t,n){return e.eventIsCanceled(n)||n.preventDefault(),!1}function z(t,n){var r={originalEvent:n,eventType:"gotpointercapture",pointerType:g(n),isEmulated:!1};re(t,r),n.target===t.element&&ie(t,{id:n.pointerId,type:g(n)},!0),r.stopPropagation&&e.stopEvent(n)}function H(t,n){var r={originalEvent:n,eventType:"lostpointercapture",pointerType:g(n),isEmulated:!1};re(t,r),n.target===t.element&&ie(t,{id:n.pointerId,type:g(n)},!1),r.stopPropagation&&e.stopEvent(n)}function U(t,n){var r={id:m(n),type:g(n),isPrimary:v(n),currentPos:y(n),currentTime:e.now()},i={originalEvent:n,eventType:"pointerenter",pointerType:r.type,isEmulated:!1};re(t,i),oe(t,i,r)}function V(t,n){var r={id:m(n),type:g(n),isPrimary:v(n),currentPos:y(n),currentTime:e.now()},i={originalEvent:n,eventType:"pointerleave",pointerType:r.type,isEmulated:!1};re(t,i),ae(t,i,r)}function W(t,n){var r={id:m(n),type:g(n),isPrimary:v(n),currentPos:y(n),currentTime:e.now()},i={originalEvent:n,eventType:"pointerover",pointerType:r.type,isEmulated:!1};re(t,i),se(t,i,r),i.preventDefault&&!i.defaultPrevented&&e.cancelEvent(n),i.stopPropagation&&e.stopEvent(n)}function G(t,n){var r={id:m(n),type:g(n),isPrimary:v(n),currentPos:y(n),currentTime:e.now()},i={originalEvent:n,eventType:"pointerout",pointerType:r.type,isEmulated:!1};re(t,i),le(t,i,r),i.preventDefault&&!i.defaultPrevented&&e.cancelEvent(n),i.stopPropagation&&e.stopEvent(n)}function q(t,n){var r={id:m(n),type:g(n),isPrimary:v(n),currentPos:y(n),currentTime:e.now()},i=e.MouseTracker.havePointerEvents&&"touch"===r.type&&e.Browser.vendor!==e.BROWSERS.IE,o={originalEvent:n,eventType:"pointerdown",pointerType:r.type,isEmulated:!1};re(t,o),ce(t,o,r,n.button),o.preventDefault&&!o.defaultPrevented&&e.cancelEvent(n),o.stopPropagation&&e.stopEvent(n),o.shouldCapture&&(i?ie(t,r,!0):h(t,r))}function X(e,t){Y(e,t)}function Z(t,n){t.getActivePointersListByType(g(n)).getById(n.pointerId)&&Y(t,n),e.stopEvent(n)}function Y(t,n){var r,i={originalEvent:n,eventType:"pointerup",pointerType:(r={id:m(n),type:g(n),isPrimary:v(n),currentPos:y(n),currentTime:e.now()}).type,isEmulated:!1};re(t,i),ue(t,i,r,n.button),i.preventDefault&&!i.defaultPrevented&&e.cancelEvent(n),i.stopPropagation&&e.stopEvent(n),i.shouldReleaseCapture&&(n.target===t.element?f(t,r):ie(t,r,!1))}function K(e,t){Q(e,t)}function J(t,n){t.getActivePointersListByType(g(n)).getById(n.pointerId)&&Q(t,n),e.stopEvent(n)}function Q(t,n){var r={id:m(n),type:g(n),isPrimary:v(n),currentPos:y(n),currentTime:e.now()},i={originalEvent:n,eventType:"pointermove",pointerType:r.type,isEmulated:!1};re(t,i),de(t,i,r),i.preventDefault&&!i.defaultPrevented&&e.cancelEvent(n),i.stopPropagation&&e.stopEvent(n)}function $(t,n){var r={id:n.pointerId,type:g(n)},i={originalEvent:n,eventType:"pointercancel",pointerType:r.type,isEmulated:!1};re(t,i),pe(t,i,r),i.stopPropagation&&e.stopEvent(n)}function ee(e,t){return t.speed=0,t.direction=0,t.contactPos=t.currentPos,t.contactTime=t.currentTime,t.lastPos=t.currentPos,t.lastTime=t.currentTime,e.add(t)}function te(t,n,r){var i,o=n.getById(r.id);return o?(o.captured&&(e.console.warn("stopTrackingPointer() called on captured pointer"),f(t,o)),("mouse"===n.type||"pen"===n.type)&&n.contacts>0&&n.removeContact(),i=n.removeById(r.id)):i=n.getLength(),i}function ne(e,t){switch(t.eventType){case"pointermove":case"pointerdown":case"pointerup":t.isStoppable=!0,t.isCancelable=!0,t.preventDefault=!1,t.preventGesture=!e.hasGestureHandlers,t.stopPropagation=!1;break;case"pointerover":case"pointerout":case"contextmenu":case"keydown":case"keyup":case"keypress":t.isStoppable=!0,t.isCancelable=!0,t.preventDefault=!1,t.preventGesture=!1,t.stopPropagation=!1;break;case"wheel":t.isStoppable=!0,t.isCancelable=!0,t.preventDefault=!1,t.preventGesture=!e.hasScrollHandler,t.stopPropagation=!1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":t.isStoppable=!0,t.isCancelable=!1,t.preventDefault=!1,t.preventGesture=!1,t.stopPropagation=!1;break;case"click":t.isStoppable=!0,t.isCancelable=!0,t.preventDefault=!!e.clickHandler,t.preventGesture=!1,t.stopPropagation=!1;break;case"dblclick":t.isStoppable=!0,t.isCancelable=!0,t.preventDefault=!!e.dblClickHandler,t.preventGesture=!1,t.stopPropagation=!1;break;default:t.isStoppable=!1,t.isCancelable=!1,t.preventDefault=!1,t.preventGesture=!1,t.stopPropagation=!1}}function re(t,n){n.eventSource=t,n.eventPhase=n.originalEvent&&void 0!==n.originalEvent.eventPhase?n.originalEvent.eventPhase:0,n.defaultPrevented=e.eventIsCanceled(n.originalEvent),n.shouldCapture=!1,n.shouldReleaseCapture=!1,n.userData=t.userData,ne(t,n),t.preProcessEventHandler&&t.preProcessEventHandler(n)}function ie(t,n,r){var i=t.getActivePointersListByType(n.type),o=i.getById(n.id);o?r&&!o.captured?(o.captured=!0,i.captureCount++):!r&&o.captured&&(o.captured=!1,i.captureCount--,i.captureCount<0&&(i.captureCount=0,e.console.warn("updatePointerCaptured() - pointsList.captureCount went negative"))):e.console.warn("updatePointerCaptured() called on untracked pointer")}function oe(e,t,n){var r,i=e.getActivePointersListByType(n.type);(r=i.getById(n.id))?(r.insideElement=!0,r.lastPos=r.currentPos,r.lastTime=r.currentTime,r.currentPos=n.currentPos,r.currentTime=n.currentTime,n=r):(n.captured=!1,n.insideElementPressed=!1,n.insideElement=!0,ee(i,n)),e.enterHandler&&e.enterHandler({eventSource:e,pointerType:n.type,position:w(n.currentPos,e.element),buttons:i.buttons,pointers:e.getActivePointerCount(),insideElementPressed:n.insideElementPressed,buttonDownAny:0!==i.buttons,isTouchEvent:"touch"===n.type,originalEvent:t.originalEvent,userData:e.userData})}function ae(e,t,n){var r,i,o=e.getActivePointersListByType(n.type);(r=o.getById(n.id))?(r.captured?(r.insideElement=!1,r.lastPos=r.currentPos,r.lastTime=r.currentTime,r.currentPos=n.currentPos,r.currentTime=n.currentTime):te(e,o,r),n=r):(n.captured=!1,n.insideElementPressed=!1),(e.leaveHandler||e.exitHandler)&&(i={eventSource:e,pointerType:n.type,position:n.currentPos&&w(n.currentPos,e.element),buttons:o.buttons,pointers:e.getActivePointerCount(),insideElementPressed:n.insideElementPressed,buttonDownAny:0!==o.buttons,isTouchEvent:"touch"===n.type,originalEvent:t.originalEvent,userData:e.userData},e.leaveHandler&&e.leaveHandler(i),e.exitHandler&&e.exitHandler(i))}function se(e,t,n){var r,i;(i=(r=e.getActivePointersListByType(n.type)).getById(n.id))?n=i:(n.captured=!1,n.insideElementPressed=!1),e.overHandler&&e.overHandler({eventSource:e,pointerType:n.type,position:w(n.currentPos,e.element),buttons:r.buttons,pointers:e.getActivePointerCount(),insideElementPressed:n.insideElementPressed,buttonDownAny:0!==r.buttons,isTouchEvent:"touch"===n.type,originalEvent:t.originalEvent,userData:e.userData})}function le(e,t,n){var r,i;(i=(r=e.getActivePointersListByType(n.type)).getById(n.id))?n=i:(n.captured=!1,n.insideElementPressed=!1),e.outHandler&&e.outHandler({eventSource:e,pointerType:n.type,position:n.currentPos&&w(n.currentPos,e.element),buttons:r.buttons,pointers:e.getActivePointerCount(),insideElementPressed:n.insideElementPressed,buttonDownAny:0!==r.buttons,isTouchEvent:"touch"===n.type,originalEvent:t.originalEvent,userData:e.userData})}function ce(n,r,i,o){var a,s=t[n.hash],l=n.getActivePointersListByType(i.type);return void 0!==r.originalEvent.buttons?l.buttons=r.originalEvent.buttons:0===o?l.buttons|=1:1===o?l.buttons|=4:2===o?l.buttons|=2:3===o?l.buttons|=8:4===o?l.buttons|=16:5===o&&(l.buttons|=32),0!==o?(r.shouldCapture=!1,r.shouldReleaseCapture=!1,void(n.nonPrimaryPressHandler&&!r.preventGesture&&!r.defaultPrevented&&(r.preventDefault=!0,n.nonPrimaryPressHandler({eventSource:n,pointerType:i.type,position:w(i.currentPos,n.element),button:o,buttons:l.buttons,isTouchEvent:"touch"===i.type,originalEvent:r.originalEvent,userData:n.userData})))):(a=l.getById(i.id))?(a.insideElementPressed=!0,a.insideElement=!0,a.originalTarget=r.originalEvent.target,a.contactPos=i.currentPos,a.contactTime=i.currentTime,a.lastPos=a.currentPos,a.lastTime=a.currentTime,a.currentPos=i.currentPos,a.currentTime=i.currentTime,i=a,l.addContact(),void(r.preventGesture||r.defaultPrevented?(r.shouldCapture=!1,r.shouldReleaseCapture=!1):(r.shouldCapture=!0,r.shouldReleaseCapture=!1,r.preventDefault=!0,(n.dragHandler||n.dragEndHandler||n.pinchHandler)&&e.MouseTracker.gesturePointVelocityTracker.addPoint(n,i),1===l.contacts?n.pressHandler&&!r.preventGesture&&n.pressHandler({eventSource:n,pointerType:i.type,position:w(i.contactPos,n.element),buttons:l.buttons,isTouchEvent:"touch"===i.type,originalEvent:r.originalEvent,userData:n.userData}):2===l.contacts&&n.pinchHandler&&"touch"===i.type&&(s.pinchGPoints=l.asArray(),s.lastPinchDist=s.currentPinchDist=s.pinchGPoints[0].currentPos.distanceTo(s.pinchGPoints[1].currentPos),s.lastPinchCenter=s.currentPinchCenter=x(s.pinchGPoints[0].currentPos,s.pinchGPoints[1].currentPos))))):(e.console.warn("pointerdown event on untracked pointer"),i.captured=!1,i.insideElementPressed=!0,i.insideElement=!0,i.originalTarget=r.originalEvent.target,void ee(l,i))}function ue(n,r,i,o){var a,s,l,c,u=t[n.hash],d=n.getActivePointersListByType(i.type),p=!1;if(void 0!==r.originalEvent.buttons?d.buttons=r.originalEvent.buttons:0===o?d.buttons^=-2:1===o?d.buttons^=-5:2===o?d.buttons^=-3:3===o?d.buttons^=-9:4===o?d.buttons^=-17:5===o&&(d.buttons^=-33),r.shouldCapture=!1,0!==o)return r.shouldReleaseCapture=!1,void(n.nonPrimaryReleaseHandler&&!r.preventGesture&&!r.defaultPrevented&&(r.preventDefault=!0,n.nonPrimaryReleaseHandler({eventSource:n,pointerType:i.type,position:w(i.currentPos,n.element),button:o,buttons:d.buttons,isTouchEvent:"touch"===i.type,originalEvent:r.originalEvent,userData:n.userData})));(l=d.getById(i.id))?(d.removeContact(),l.captured&&(p=!0),l.lastPos=l.currentPos,l.lastTime=l.currentTime,l.currentPos=i.currentPos,l.currentTime=i.currentTime,l.insideElement||te(n,d,l),a=l.currentPos,s=l.currentTime):(e.console.warn("updatePointerUp(): pointerup on untracked gPoint"),i.captured=!1,i.insideElementPressed=!1,i.insideElement=!0,ee(d,i),l=i),!r.preventGesture&&!r.defaultPrevented&&(p?(r.shouldReleaseCapture=!0,r.preventDefault=!0,(n.dragHandler||n.dragEndHandler||n.pinchHandler)&&e.MouseTracker.gesturePointVelocityTracker.removePoint(n,l),0===d.contacts?(n.releaseHandler&&n.releaseHandler({eventSource:n,pointerType:l.type,position:w(a,n.element),buttons:d.buttons,insideElementPressed:l.insideElementPressed,insideElementReleased:l.insideElement,isTouchEvent:"touch"===l.type,originalEvent:r.originalEvent,userData:n.userData}),n.dragEndHandler&&u.sentDragEvent&&n.dragEndHandler({eventSource:n,pointerType:l.type,position:w(l.currentPos,n.element),speed:l.speed,direction:l.direction,shift:r.originalEvent.shiftKey,isTouchEvent:"touch"===l.type,originalEvent:r.originalEvent,userData:n.userData}),u.sentDragEvent=!1,(n.clickHandler||n.dblClickHandler)&&l.insideElement&&(c=s-l.contactTime<=n.clickTimeThreshold&&l.contactPos.distanceTo(a)<=n.clickDistThreshold,n.clickHandler&&n.clickHandler({eventSource:n,pointerType:l.type,position:w(l.currentPos,n.element),quick:c,shift:r.originalEvent.shiftKey,isTouchEvent:"touch"===l.type,originalEvent:r.originalEvent,originalTarget:l.originalTarget,userData:n.userData}),n.dblClickHandler&&c&&(d.clicks++,1===d.clicks?(u.lastClickPos=a,u.dblClickTimeOut=setTimeout((function(){d.clicks=0}),n.dblClickTimeThreshold)):2===d.clicks&&(clearTimeout(u.dblClickTimeOut),d.clicks=0,u.lastClickPos.distanceTo(a)<=n.dblClickDistThreshold&&n.dblClickHandler({eventSource:n,pointerType:l.type,position:w(l.currentPos,n.element),shift:r.originalEvent.shiftKey,isTouchEvent:"touch"===l.type,originalEvent:r.originalEvent,userData:n.userData}),u.lastClickPos=null)))):2===d.contacts&&n.pinchHandler&&"touch"===l.type&&(u.pinchGPoints=d.asArray(),u.lastPinchDist=u.currentPinchDist=u.pinchGPoints[0].currentPos.distanceTo(u.pinchGPoints[1].currentPos),u.lastPinchCenter=u.currentPinchCenter=x(u.pinchGPoints[0].currentPos,u.pinchGPoints[1].currentPos))):(r.shouldReleaseCapture=!1,n.releaseHandler&&(n.releaseHandler({eventSource:n,pointerType:l.type,position:w(a,n.element),buttons:d.buttons,insideElementPressed:l.insideElementPressed,insideElementReleased:l.insideElement,isTouchEvent:"touch"===l.type,originalEvent:r.originalEvent,userData:n.userData}),r.preventDefault=!0)))}function de(e,n,r){var i,o,a,s=t[e.hash],l=e.getActivePointersListByType(r.type);void 0!==n.originalEvent.buttons&&(l.buttons=n.originalEvent.buttons),(i=l.getById(r.id))&&(i.lastPos=i.currentPos,i.lastTime=i.currentTime,i.currentPos=r.currentPos,i.currentTime=r.currentTime,n.shouldCapture=!1,n.shouldReleaseCapture=!1,e.stopHandler&&"mouse"===r.type&&(clearTimeout(e.stopTimeOut),e.stopTimeOut=setTimeout((function(){he(e,n.originalEvent,r.type)}),e.stopDelay)),0===l.contacts?e.moveHandler&&e.moveHandler({eventSource:e,pointerType:r.type,position:w(r.currentPos,e.element),buttons:l.buttons,isTouchEvent:"touch"===r.type,originalEvent:n.originalEvent,userData:e.userData}):1===l.contacts?(e.moveHandler&&(i=l.asArray()[0],e.moveHandler({eventSource:e,pointerType:i.type,position:w(i.currentPos,e.element),buttons:l.buttons,isTouchEvent:"touch"===i.type,originalEvent:n.originalEvent,userData:e.userData})),e.dragHandler&&!n.preventGesture&&!n.defaultPrevented&&(a=(i=l.asArray()[0]).currentPos.minus(i.lastPos),e.dragHandler({eventSource:e,pointerType:i.type,position:w(i.currentPos,e.element),buttons:l.buttons,delta:a,speed:i.speed,direction:i.direction,shift:n.originalEvent.shiftKey,isTouchEvent:"touch"===i.type,originalEvent:n.originalEvent,userData:e.userData}),n.preventDefault=!0,s.sentDragEvent=!0)):2===l.contacts&&(e.moveHandler&&(o=l.asArray(),e.moveHandler({eventSource:e,pointerType:o[0].type,position:w(x(o[0].currentPos,o[1].currentPos),e.element),buttons:l.buttons,isTouchEvent:"touch"===o[0].type,originalEvent:n.originalEvent,userData:e.userData})),e.pinchHandler&&"touch"===r.type&&!n.preventGesture&&!n.defaultPrevented&&(a=s.pinchGPoints[0].currentPos.distanceTo(s.pinchGPoints[1].currentPos))!==s.currentPinchDist&&(s.lastPinchDist=s.currentPinchDist,s.currentPinchDist=a,s.lastPinchCenter=s.currentPinchCenter,s.currentPinchCenter=x(s.pinchGPoints[0].currentPos,s.pinchGPoints[1].currentPos),e.pinchHandler({eventSource:e,pointerType:"touch",gesturePoints:s.pinchGPoints,lastCenter:w(s.lastPinchCenter,e.element),center:w(s.currentPinchCenter,e.element),lastDistance:s.lastPinchDist,distance:s.currentPinchDist,shift:n.originalEvent.shiftKey,originalEvent:n.originalEvent,userData:e.userData}),n.preventDefault=!0)))}function pe(e,t,n){var r,i=e.getActivePointersListByType(n.type);(r=i.getById(n.id))&&te(e,i,r)}function he(e,t,n){e.stopHandler&&e.stopHandler({eventSource:e,pointerType:n,position:b(t,e.element),buttons:e.getActivePointersListByType(n).buttons,isTouchEvent:"touch"===n,originalEvent:t,userData:e.userData})}e.MouseTracker.gesturePointVelocityTracker=(n=[],r=0,i=0,o=function(e,t){return e.hash.toString()+t.type+t.id.toString()},a=function(){var t,r,o,a,s,l,c=n.length,u=e.now();for(a=u-i,i=u,t=0;t<c;t++)(o=(r=n[t]).gPoint).direction=Math.atan2(o.currentPos.y-r.lastPos.y,o.currentPos.x-r.lastPos.x),s=r.lastPos.distanceTo(o.currentPos),r.lastPos=o.currentPos,l=1e3*s/(a+1),o.speed=.75*l+.25*o.speed},{addPoint:function(t,s){var l=o(t,s);n.push({guid:l,gPoint:s,lastPos:s.currentPos}),1===n.length&&(i=e.now(),r=window.setInterval(a,50))},removePoint:function(e,t){var i,a=o(e,t),s=n.length;for(i=0;i<s;i++)if(n[i].guid===a){n.splice(i,1),0==--s&&window.clearInterval(r);break}}}),e.MouseTracker.captureElement=document,e.MouseTracker.wheelEventName=e.Browser.vendor===e.BROWSERS.IE&&e.Browser.version>8||"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",e.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur","contextmenu",e.MouseTracker.wheelEventName],"DOMMouseScroll"===e.MouseTracker.wheelEventName&&e.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent?(e.MouseTracker.havePointerEvents=!0,e.MouseTracker.subscribeEvents.push("pointerenter","pointerleave","pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),e.MouseTracker.havePointerCapture=function(){var t=document.createElement("div");return e.isFunction(t.setPointerCapture)&&e.isFunction(t.releasePointerCapture)}(),e.MouseTracker.havePointerCapture&&e.MouseTracker.subscribeEvents.push("gotpointercapture","lostpointercapture")):(e.MouseTracker.havePointerEvents=!1,e.MouseTracker.subscribeEvents.push("mouseenter","mouseleave","mouseover","mouseout","mousedown","mouseup","mousemove"),e.MouseTracker.mousePointerId="legacy-mouse",e.MouseTracker.havePointerCapture=function(){var t=document.createElement("div");return e.isFunction(t.setCapture)&&e.isFunction(t.releaseCapture)}(),e.MouseTracker.havePointerCapture&&e.MouseTracker.subscribeEvents.push("losecapture"),"ontouchstart"in window&&e.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&e.MouseTracker.subscribeEvents.push("gesturestart","gesturechange")),e.MouseTracker.GesturePointList=function(e){this._gPoints=[],this.type=e,this.buttons=0,this.contacts=0,this.clicks=0,this.captureCount=0},e.MouseTracker.GesturePointList.prototype={getLength:function(){return this._gPoints.length},asArray:function(){return this._gPoints},add:function(e){return this._gPoints.push(e)},removeById:function(e){var t,n=this._gPoints.length;for(t=0;t<n;t++)if(this._gPoints[t].id===e){this._gPoints.splice(t,1);break}return this._gPoints.length},getByIndex:function(e){return e<this._gPoints.length?this._gPoints[e]:null},getById:function(e){var t,n=this._gPoints.length;for(t=0;t<n;t++)if(this._gPoints[t].id===e)return this._gPoints[t];return null},getPrimary:function(e){var t,n=this._gPoints.length;for(t=0;t<n;t++)if(this._gPoints[t].isPrimary)return this._gPoints[t];return null},addContact:function(){++this.contacts,this.contacts>1&&("mouse"===this.type||"pen"===this.type)&&(e.console.warn("GesturePointList.addContact() Implausible contacts value"),this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(e.console.warn("GesturePointList.removeContact() Implausible contacts value"),this.contacts=0)}}}(t),function(e){e.ControlAnchor={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4,ABSOLUTE:5},e.Control=function(t,n,r){var i=t.parentNode;"number"==typeof n&&(e.console.error("Passing an anchor directly into the OpenSeadragon.Control constructor is deprecated; please use an options object instead. Support for this deprecated variant is scheduled for removal in December 2013"),n={anchor:n}),n.attachToViewer=void 0===n.attachToViewer||n.attachToViewer,this.autoFade=void 0===n.autoFade||n.autoFade,this.element=t,this.anchor=n.anchor,this.container=r,this.anchor===e.ControlAnchor.ABSOLUTE?(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top="number"==typeof n.top?n.top+"px":n.top,this.wrapper.style.left="number"==typeof n.left?n.left+"px":n.left,this.wrapper.style.height="number"==typeof n.height?n.height+"px":n.height,this.wrapper.style.width="number"==typeof n.width?n.width+"px":n.width,this.wrapper.style.margin="0px",this.wrapper.style.padding="0px",this.element.style.position="relative",this.element.style.top="0px",this.element.style.left="0px",this.element.style.height="100%",this.element.style.width="100%"):(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.display="inline-block",this.anchor===e.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%")),this.wrapper.appendChild(this.element),n.attachToViewer?this.anchor===e.ControlAnchor.TOP_RIGHT||this.anchor===e.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.wrapper,this.container.firstChild):this.container.appendChild(this.wrapper):i.appendChild(this.wrapper)},e.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.anchor!==e.ControlAnchor.NONE&&this.container.removeChild(this.wrapper)},isVisible:function(){return"none"!==this.wrapper.style.display},setVisible:function(t){this.wrapper.style.display=t?this.anchor===e.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(t){this.element[e.SIGNAL]&&e.Browser.vendor===e.BROWSERS.IE?e.setElementOpacity(this.element,t,!0):e.setElementOpacity(this.wrapper,t,!0)}}}(t),function(e){function t(e,t){var n,r=e.controls;for(n=r.length-1;n>=0;n--)if(r[n].element===t)return n;return-1}e.ControlDock=function(t){var n,r,i=["topleft","topright","bottomright","bottomleft"];for(e.extend(!0,this,{id:"controldock-"+e.now()+"-"+Math.floor(1e6*Math.random()),container:e.makeNeutralElement("div"),controls:[]},t),this.container.onsubmit=function(){return!1},this.element&&(this.element=e.getElement(this.element),this.element.appendChild(this.container),this.element.style.position="relative",this.container.style.width="100%",this.container.style.height="100%"),r=0;r<i.length;r++)n=i[r],this.controls[n]=e.makeNeutralElement("div"),this.controls[n].style.position="absolute",n.match("left")&&(this.controls[n].style.left="0px"),n.match("right")&&(this.controls[n].style.right="0px"),n.match("top")&&(this.controls[n].style.top="0px"),n.match("bottom")&&(this.controls[n].style.bottom="0px");this.container.appendChild(this.controls.topleft),this.container.appendChild(this.controls.topright),this.container.appendChild(this.controls.bottomright),this.container.appendChild(this.controls.bottomleft)},e.ControlDock.prototype={addControl:function(n,r){var i=null;if(!(t(this,n=e.getElement(n))>=0)){switch(r.anchor){case e.ControlAnchor.TOP_RIGHT:i=this.controls.topright,n.style.position="relative",n.style.paddingRight="0px",n.style.paddingTop="0px";break;case e.ControlAnchor.BOTTOM_RIGHT:i=this.controls.bottomright,n.style.position="relative",n.style.paddingRight="0px",n.style.paddingBottom="0px";break;case e.ControlAnchor.BOTTOM_LEFT:i=this.controls.bottomleft,n.style.position="relative",n.style.paddingLeft="0px",n.style.paddingBottom="0px";break;case e.ControlAnchor.TOP_LEFT:i=this.controls.topleft,n.style.position="relative",n.style.paddingLeft="0px",n.style.paddingTop="0px";break;case e.ControlAnchor.ABSOLUTE:default:case e.ControlAnchor.NONE:i=this.container,n.style.margin="0px",n.style.padding="0px"}this.controls.push(new e.Control(n,r,i)),n.style.display="inline-block"}},removeControl:function(n){var r=t(this,n=e.getElement(n));return r>=0&&(this.controls[r].destroy(),this.controls.splice(r,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var e;for(e=this.controls.length-1;e>=0;e--)if(this.controls[e].isVisible())return!0;return!1},setControlsEnabled:function(e){var t;for(t=this.controls.length-1;t>=0;t--)this.controls[t].setVisible(e);return this}}}(t),function(e){e.Placement=e.freezeObject({CENTER:0,TOP_LEFT:1,TOP:2,TOP_RIGHT:3,RIGHT:4,BOTTOM_RIGHT:5,BOTTOM:6,BOTTOM_LEFT:7,LEFT:8,properties:{0:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1},1:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},2:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},3:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!0,isVerticallyCentered:!1,isBottom:!1},4:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!0,isBottom:!1},5:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!1,isBottom:!0},6:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},7:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},8:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1}}})}(t),function(e){var t={},n=1;function r(t){return t=e.getElement(t),new e.Point(0===t.clientWidth?1:t.clientWidth,0===t.clientHeight?1:t.clientHeight)}function i(t,n,r,i,o){var a=t;if("string"===e.type(n))if(n.match(/^\s*<.*>\s*$/))n=e.parseXml(n);else if(n.match(/^\s*[{[].*[}\]]\s*$/))try{var s=e.parseJSON(n);n=s}catch(e){}function l(e,t){e.ready?i(e):(e.addHandler("ready",(function(){i(e)})),e.addHandler("open-failed",(function(e){o({message:e.message,source:t})})))}setTimeout((function(){if("string"===e.type(n))(n=new e.TileSource({url:n,crossOriginPolicy:void 0!==r.crossOriginPolicy?r.crossOriginPolicy:t.crossOriginPolicy,ajaxWithCredentials:t.ajaxWithCredentials,ajaxHeaders:r.ajaxHeaders?r.ajaxHeaders:t.ajaxHeaders,useCanvas:t.useCanvas,success:function(e){i(e.tileSource)}})).addHandler("open-failed",(function(e){o(e)}));else if(e.isPlainObject(n)||n.nodeType)if(void 0===n.crossOriginPolicy&&(void 0!==r.crossOriginPolicy||void 0!==t.crossOriginPolicy)&&(n.crossOriginPolicy=void 0!==r.crossOriginPolicy?r.crossOriginPolicy:t.crossOriginPolicy),void 0===n.ajaxWithCredentials&&(n.ajaxWithCredentials=t.ajaxWithCredentials),void 0===n.useCanvas&&(n.useCanvas=t.useCanvas),e.isFunction(n.getTileUrl)){var s=new e.TileSource(n);s.getTileUrl=n.getTileUrl,i(s)}else{var c=e.TileSource.determineType(a,n);if(!c)return void o({message:"Unable to load TileSource",source:n});var u=c.prototype.configure.apply(a,[n]);l(new c(u),n)}else l(n,n)}))}function o(t,n){if(n instanceof e.Overlay)return n;var r=null;if(n.element)r=e.getElement(n.element);else{var i=n.id?n.id:"openseadragon-overlay-"+Math.floor(1e7*Math.random());(r=e.getElement(n.id))||((r=document.createElement("a")).href="#/overlay/"+i),r.id=i,e.addClass(r,n.className?n.className:"openseadragon-overlay")}var o=n.location,a=n.width,s=n.height;if(!o){var l=n.x,c=n.y;if(void 0!==n.px){var u=t.viewport.imageToViewportRectangle(new e.Rect(n.px,n.py,a||0,s||0));l=u.x,c=u.y,a=void 0!==a?u.width:void 0,s=void 0!==s?u.height:void 0}o=new e.Point(l,c)}var d=n.placement;return d&&"string"===e.type(d)&&(d=e.Placement[n.placement.toUpperCase()]),new e.Overlay({element:r,location:o,placement:d,onDraw:n.onDraw,checkResize:n.checkResize,width:a,height:s,rotationMode:n.rotationMode})}function a(e,t){var n;for(n=e.length-1;n>=0;n--)if(e[n].element===t)return n;return-1}function s(t,n){return e.requestAnimationFrame((function(){n(t)}))}function l(t){e.requestAnimationFrame((function(){u(t)}))}function c(t){!t.autoHideControls||(t.controlsShouldFade=!0,t.controlsFadeBeginTime=e.now()+t.controlsFadeDelay,window.setTimeout((function(){l(t)}),t.controlsFadeDelay))}function u(t){var n,r;if(t.controlsShouldFade){for(n=1-(e.now()-t.controlsFadeBeginTime)/t.controlsFadeLength,n=Math.min(1,n),n=Math.max(0,n),r=t.controls.length-1;r>=0;r--)t.controls[r].autoFade&&t.controls[r].setOpacity(n);n>0&&l(t)}}function d(e){var t;for(e.controlsShouldFade=!1,t=e.controls.length-1;t>=0;t--)e.controls[t].setOpacity(1)}function p(){d(this)}function h(){c(this)}function f(e){var t={tracker:e.eventSource,position:e.position,originalEvent:e.originalEvent,preventDefault:e.preventDefault};this.raiseEvent("canvas-contextmenu",t),e.preventDefault=t.preventDefault}function m(t){var n={originalEvent:t.originalEvent,preventDefaultAction:!1,preventVerticalPan:t.preventVerticalPan,preventHorizontalPan:t.preventHorizontalPan};if(this.raiseEvent("canvas-key",n),n.preventDefaultAction||t.ctrl||t.alt||t.meta)t.preventDefault=!1;else switch(t.keyCode){case 38:n.preventVerticalPan||(t.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 40:n.preventVerticalPan||(t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 37:n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 39:n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;default:t.preventDefault=!1}}function g(t){var n={originalEvent:t.originalEvent,preventDefaultAction:!1,preventVerticalPan:t.preventVerticalPan,preventHorizontalPan:t.preventHorizontalPan};if(this.raiseEvent("canvas-key",n),n.preventDefaultAction||t.ctrl||t.alt||t.meta)t.preventDefault=!1;else switch(t.keyCode){case 43:case 61:this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 45:this.viewport.zoomBy(.9),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 48:this.viewport.goHome(),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 119:case 87:n.preventVerticalPan||(t.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-40))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 115:case 83:n.preventVerticalPan||(t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,40))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 97:n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-40,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 100:n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(40,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 114:this.viewport.flipped?this.viewport.setRotation(e.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)):this.viewport.setRotation(e.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 82:this.viewport.flipped?this.viewport.setRotation(e.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)):this.viewport.setRotation(e.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 102:this.viewport.toggleFlip(),t.preventDefault=!0;break;case 106:this.goToPreviousPage();break;case 107:this.goToNextPage();break;default:t.preventDefault=!1}}function v(e){var t;document.activeElement===this.canvas||this.canvas.focus(),this.viewport.flipped&&(e.position.x=this.viewport.getContainerSize().x-e.position.x);var n={tracker:e.eventSource,position:e.position,quick:e.quick,shift:e.shift,originalEvent:e.originalEvent,originalTarget:e.originalTarget,preventDefaultAction:!1};this.raiseEvent("canvas-click",n),!n.preventDefaultAction&&this.viewport&&e.quick&&(t=this.gestureSettingsByDeviceType(e.pointerType)).clickToZoom&&(this.viewport.zoomBy(e.shift?1/this.zoomPerClick:this.zoomPerClick,t.zoomToRefPoint?this.viewport.pointFromPixel(e.position,!0):null),this.viewport.applyConstraints())}function y(e){var t,n={tracker:e.eventSource,position:e.position,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};this.raiseEvent("canvas-double-click",n),!n.preventDefaultAction&&this.viewport&&(t=this.gestureSettingsByDeviceType(e.pointerType)).dblClickToZoom&&(this.viewport.zoomBy(e.shift?1/this.zoomPerClick:this.zoomPerClick,t.zoomToRefPoint?this.viewport.pointFromPixel(e.position,!0):null),this.viewport.applyConstraints())}function b(e){var t,n={tracker:e.eventSource,pointerType:e.pointerType,position:e.position,delta:e.delta,speed:e.speed,direction:e.direction,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag",n),(t=this.gestureSettingsByDeviceType(e.pointerType)).dragToPan&&!n.preventDefaultAction&&this.viewport){if(this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.viewport.flipped&&(e.delta.x=-e.delta.x),this.constrainDuringPan){var r=this.viewport.deltaPointsFromPixels(e.delta.negate());this.viewport.centerSpringX.target.value+=r.x,this.viewport.centerSpringY.target.value+=r.y;var i=this.viewport.getBounds(),o=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=r.x,this.viewport.centerSpringY.target.value-=r.y,i.x!==o.x&&(e.delta.x=0),i.y!==o.y&&(e.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta.negate()),t.flickEnabled&&!this.constrainDuringPan)}}function w(t){var n={tracker:t.eventSource,pointerType:t.pointerType,position:t.position,speed:t.speed,direction:t.direction,shift:t.shift,originalEvent:t.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag-end",n),!n.preventDefaultAction&&this.viewport){var r=this.gestureSettingsByDeviceType(t.pointerType);if(r.flickEnabled&&t.speed>=r.flickMinSpeed){var i=0;this.panHorizontal&&(i=r.flickMomentum*t.speed*Math.cos(t.direction));var o=0;this.panVertical&&(o=r.flickMomentum*t.speed*Math.sin(t.direction));var a=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),s=this.viewport.pointFromPixel(new e.Point(a.x-i,a.y-o));this.viewport.panTo(s,!1)}this.viewport.applyConstraints()}}function x(e){this.raiseEvent("canvas-enter",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function S(e){this.raiseEvent("canvas-exit",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function E(e){this.raiseEvent("canvas-press",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,insideElementPressed:e.insideElementPressed,insideElementReleased:e.insideElementReleased,originalEvent:e.originalEvent})}function T(e){this.raiseEvent("canvas-release",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,insideElementPressed:e.insideElementPressed,insideElementReleased:e.insideElementReleased,originalEvent:e.originalEvent})}function P(e){this.raiseEvent("canvas-nonprimary-press",{tracker:e.eventSource,position:e.position,pointerType:e.pointerType,button:e.button,buttons:e.buttons,originalEvent:e.originalEvent})}function C(e){this.raiseEvent("canvas-nonprimary-release",{tracker:e.eventSource,position:e.position,pointerType:e.pointerType,button:e.button,buttons:e.buttons,originalEvent:e.originalEvent})}function k(e){var t,n,r,i={tracker:e.eventSource,pointerType:e.pointerType,gesturePoints:e.gesturePoints,lastCenter:e.lastCenter,center:e.center,lastDistance:e.lastDistance,distance:e.distance,shift:e.shift,originalEvent:e.originalEvent,preventDefaultPanAction:!1,preventDefaultZoomAction:!1,preventDefaultRotateAction:!1};if(this.raiseEvent("canvas-pinch",i),this.viewport&&((t=this.gestureSettingsByDeviceType(e.pointerType)).pinchToZoom&&(!i.preventDefaultPanAction||!i.preventDefaultZoomAction)&&(n=this.viewport.pointFromPixel(e.center,!0),i.preventDefaultZoomAction||this.viewport.zoomBy(e.distance/e.lastDistance,n,!0),t.zoomToRefPoint&&!i.preventDefaultPanAction&&(r=this.viewport.pointFromPixel(e.lastCenter,!0).minus(n),this.panHorizontal||(r.x=0),this.panVertical||(r.y=0),this.viewport.panBy(r,!0)),this.viewport.applyConstraints()),t.pinchRotate&&!i.preventDefaultRotateAction)){var o=Math.atan2(e.gesturePoints[0].currentPos.y-e.gesturePoints[1].currentPos.y,e.gesturePoints[0].currentPos.x-e.gesturePoints[1].currentPos.x),a=Math.atan2(e.gesturePoints[0].lastPos.y-e.gesturePoints[1].lastPos.y,e.gesturePoints[0].lastPos.x-e.gesturePoints[1].lastPos.x);this.viewport.setRotation(this.viewport.getRotation()+(o-a)*(180/Math.PI))}}function O(t){var n,r,i,o;(o=e.now())-this._lastScrollTime>this.minScrollDeltaTime?(this._lastScrollTime=o,n={tracker:t.eventSource,position:t.position,scroll:t.scroll,shift:t.shift,originalEvent:t.originalEvent,preventDefaultAction:!1,preventDefault:!0},this.raiseEvent("canvas-scroll",n),!n.preventDefaultAction&&this.viewport&&(this.viewport.flipped&&(t.position.x=this.viewport.getContainerSize().x-t.position.x),(r=this.gestureSettingsByDeviceType(t.pointerType)).scrollToZoom&&(i=Math.pow(this.zoomPerScroll,t.scroll),this.viewport.zoomBy(i,r.zoomToRefPoint?this.viewport.pointFromPixel(t.position,!0):null),this.viewport.applyConstraints())),t.preventDefault=n.preventDefault):t.preventDefault=!0}function _(e){t[this.hash].mouseInside=!0,d(this),this.raiseEvent("container-enter",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function R(e){e.pointers<1&&(t[this.hash].mouseInside=!1,t[this.hash].animating||c(this)),this.raiseEvent("container-exit",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function A(e){D(e),e.isOpen()?e._updateRequestId=s(e,A):e._updateRequestId=!1}function D(e){if(!e._opening&&t[e.hash]){if(e.autoResize){var n=r(e.container),i=t[e.hash].prevContainerSize;if(!n.equals(i)){var o=e.viewport;if(e.preserveImageSizeOnResize){var a=i.x/n.x,s=o.getZoom()*a,l=o.getCenter();o.resize(n,!1),o.zoomTo(s,null,!0),o.panTo(l,!0)}else{var u=o.getBounds();o.resize(n,!0),o.fitBoundsWithConstraints(u,!0)}t[e.hash].prevContainerSize=n,t[e.hash].forceRedraw=!0}}var p=e.viewport.update(),h=e.world.update()||p;p&&e.raiseEvent("viewport-change"),e.referenceStrip&&(h=e.referenceStrip.update(e.viewport)||h),!t[e.hash].animating&&h&&(e.raiseEvent("animation-start"),d(e)),(h||t[e.hash].forceRedraw||e.world.needsDraw())&&(I(e),e._drawOverlays(),e.navigator&&e.navigator.update(e.viewport),t[e.hash].forceRedraw=!1,h&&e.raiseEvent("animation")),t[e.hash].animating&&!h&&(e.raiseEvent("animation-finish"),t[e.hash].mouseInside||c(e)),t[e.hash].animating=h}}function I(e){e.imageLoader.clear(),e.drawer.clear(),e.world.draw(),e.raiseEvent("update-viewport",{})}function M(e,t){return e?e+t:t}function L(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=this.zoomPerSecond,t[this.hash].zooming=!0,F(this)}function j(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=1/this.zoomPerSecond,t[this.hash].zooming=!0,F(this)}function N(){t[this.hash].zooming=!1}function F(t){e.requestAnimationFrame(e.delegate(t,B))}function B(){var n,r,i;t[this.hash].zooming&&this.viewport&&(r=(n=e.now())-t[this.hash].lastZoomTime,i=Math.pow(t[this.hash].zoomFactor,r/1e3),this.viewport.zoomBy(i),this.viewport.applyConstraints(),t[this.hash].lastZoomTime=n,F(this))}function z(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function H(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function U(){this.buttonGroup&&(this.buttonGroup.emulateEnter(),this.buttonGroup.emulateLeave())}function V(){this.viewport&&this.viewport.goHome()}function W(){this.isFullPage()&&!e.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttonGroup&&this.buttonGroup.emulateLeave(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function G(){if(this.viewport){var t=this.viewport.getRotation();t=this.viewport.flipped?e.positiveModulo(t+this.rotationIncrement,360):e.positiveModulo(t-this.rotationIncrement,360),this.viewport.setRotation(t)}}function q(){if(this.viewport){var t=this.viewport.getRotation();t=this.viewport.flipped?e.positiveModulo(t-this.rotationIncrement,360):e.positiveModulo(t+this.rotationIncrement,360),this.viewport.setRotation(t)}}function X(){this.viewport.toggleFlip()}e.Viewer=function(i){var o,a,l=arguments,u=this;if(e.isPlainObject(i)||(i={id:l[0],xmlPath:l.length>1?l[1]:void 0,prefixUrl:l.length>2?l[2]:void 0,controls:l.length>3?l[3]:void 0,overlays:l.length>4?l[4]:void 0}),i.config&&(e.extend(!0,i,i.config),delete i.config),e.extend(!0,this,{id:i.id,hash:i.hash||n++,initialPage:0,element:null,container:null,canvas:null,overlays:[],overlaysContainer:null,previousBody:[],customControls:[],source:null,drawer:null,world:null,viewport:null,navigator:null,collectionViewport:null,collectionDrawer:null,navImages:null,buttons:null,profiler:null},e.DEFAULT_SETTINGS,i),void 0===this.hash)throw new Error("A hash must be defined, either by specifying options.id or options.hash.");for(void 0!==t[this.hash]&&e.console.warn("Hash "+this.hash+" has already been used."),t[this.hash]={fsBoundsDelta:new e.Point(1,1),prevContainerSize:null,animating:!1,forceRedraw:!1,mouseInside:!1,group:null,zooming:!1,zoomFactor:null,lastZoomTime:null,fullPage:!1,onfullscreenchange:null},this._sequenceIndex=0,this._firstOpen=!0,this._updateRequestId=null,this._loadQueue=[],this.currentOverlays=[],this._updatePixelDensityRatioBind=null,this._lastScrollTime=e.now(),e.EventSource.call(this),this.addHandler("open-failed",(function(t){var n=e.getString("Errors.OpenFailed",t.eventSource,t.message);u._showMessage(n)})),e.ControlDock.call(this,i),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=e.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",(a=this.canvas.style).width="100%",a.height="100%",a.overflow="hidden",a.position="absolute",a.top="0px",a.left="0px",e.setElementTouchActionNone(this.canvas),""!==i.tabIndex&&(this.canvas.tabIndex=void 0===i.tabIndex?0:i.tabIndex),this.container.className="openseadragon-container",function(e){e.width="100%",e.height="100%",e.position="relative",e.overflow="hidden",e.left="0px",e.top="0px",e.textAlign="left"}(this.container.style),e.setElementTouchActionNone(this.container),this.container.insertBefore(this.canvas,this.container.firstChild),this.element.appendChild(this.container),this.bodyWidth=document.body.style.width,this.bodyHeight=document.body.style.height,this.bodyOverflow=document.body.style.overflow,this.docOverflow=document.documentElement.style.overflow,this.innerTracker=new e.MouseTracker({userData:"Viewer.innerTracker",element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,contextMenuHandler:e.delegate(this,f),keyDownHandler:e.delegate(this,m),keyHandler:e.delegate(this,g),clickHandler:e.delegate(this,v),dblClickHandler:e.delegate(this,y),dragHandler:e.delegate(this,b),dragEndHandler:e.delegate(this,w),enterHandler:e.delegate(this,x),leaveHandler:e.delegate(this,S),pressHandler:e.delegate(this,E),releaseHandler:e.delegate(this,T),nonPrimaryPressHandler:e.delegate(this,P),nonPrimaryReleaseHandler:e.delegate(this,C),scrollHandler:e.delegate(this,O),pinchHandler:e.delegate(this,k)}),this.outerTracker=new e.MouseTracker({userData:"Viewer.outerTracker",element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:e.delegate(this,_),leaveHandler:e.delegate(this,R)}),this.toolbar&&(this.toolbar=new e.ControlDock({element:this.toolbar})),this.bindStandardControls(),t[this.hash].prevContainerSize=r(this.container),this.world=new e.World({viewer:this}),this.world.addHandler("add-item",(function(e){u.source=u.world.getItemAt(0).source,t[u.hash].forceRedraw=!0,u._updateRequestId||(u._updateRequestId=s(u,A))})),this.world.addHandler("remove-item",(function(e){u.world.getItemCount()?u.source=u.world.getItemAt(0).source:u.source=null,t[u.hash].forceRedraw=!0})),this.world.addHandler("metrics-change",(function(e){u.viewport&&u.viewport._setContentBounds(u.world.getHomeBounds(),u.world.getContentFactor())})),this.world.addHandler("item-index-change",(function(e){u.source=u.world.getItemAt(0).source})),this.viewport=new e.Viewport({containerSize:t[this.hash].prevContainerSize,springStiffness:this.springStiffness,animationTime:this.animationTime,minZoomImageRatio:this.minZoomImageRatio,maxZoomPixelRatio:this.maxZoomPixelRatio,visibilityRatio:this.visibilityRatio,wrapHorizontal:this.wrapHorizontal,wrapVertical:this.wrapVertical,defaultZoomLevel:this.defaultZoomLevel,minZoomLevel:this.minZoomLevel,maxZoomLevel:this.maxZoomLevel,viewer:this,degrees:this.degrees,flipped:this.flipped,navigatorRotate:this.navigatorRotate,homeFillsViewer:this.homeFillsViewer,margins:this.viewportMargins}),this.viewport._setContentBounds(this.world.getHomeBounds(),this.world.getContentFactor()),this.imageLoader=new e.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:i.timeout}),this.tileCache=new e.TileCache({maxImageCacheCount:this.maxImageCacheCount}),this.drawer=new e.Drawer({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor}),this.overlaysContainer=e.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),this.drawer.canRotate()||(this.rotateLeft&&(o=this.buttonGroup.buttons.indexOf(this.rotateLeft),this.buttonGroup.buttons.splice(o,1),this.buttonGroup.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(o=this.buttonGroup.buttons.indexOf(this.rotateRight),this.buttonGroup.buttons.splice(o,1),this.buttonGroup.element.removeChild(this.rotateRight.element))),this._addUpdatePixelDensityRatioEvent(),this.showNavigator&&(this.navigator=new e.Navigator({id:this.navigatorId,position:this.navigatorPosition,sizeRatio:this.navigatorSizeRatio,maintainSizeRatio:this.navigatorMaintainSizeRatio,top:this.navigatorTop,left:this.navigatorLeft,width:this.navigatorWidth,height:this.navigatorHeight,autoResize:this.navigatorAutoResize,autoFade:this.navigatorAutoFade,prefixUrl:this.prefixUrl,viewer:this,navigatorRotate:this.navigatorRotate,background:this.navigatorBackground,opacity:this.navigatorOpacity,borderColor:this.navigatorBorderColor,displayRegionColor:this.navigatorDisplayRegionColor,crossOriginPolicy:this.crossOriginPolicy})),this.sequenceMode&&this.bindSequenceControls(),this.tileSources&&this.open(this.tileSources),o=0;o<this.customControls.length;o++)this.addControl(this.customControls[o].id,{anchor:this.customControls[o].anchor});e.requestAnimationFrame((function(){c(u)})),void 0!==this.imageSmoothingEnabled&&!this.imageSmoothingEnabled&&this.drawer.setImageSmoothingEnabled(this.imageSmoothingEnabled),e._viewers.set(this.element,this)},e.extend(e.Viewer.prototype,e.EventSource.prototype,e.ControlDock.prototype,{isOpen:function(){return!!this.world.getItemCount()},openDzi:function(t){return e.console.error("[Viewer.openDzi] this function is deprecated; use Viewer.open() instead."),this.open(t)},openTileSource:function(t){return e.console.error("[Viewer.openTileSource] this function is deprecated; use Viewer.open() instead."),this.open(t)},open:function(t,n){var r=this;if(this.close(),!t)return this;if(this.sequenceMode&&e.isArray(t))return this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null),void 0!==n&&!isNaN(n)&&(this.initialPage=n),this.tileSources=t,this._sequenceIndex=Math.max(0,Math.min(this.tileSources.length-1,this.initialPage)),this.tileSources.length&&(this.open(this.tileSources[this._sequenceIndex]),this.showReferenceStrip&&this.addReferenceStrip()),this._updateSequenceButtons(this._sequenceIndex),this;if(e.isArray(t)||(t=[t]),!t.length)return this;this._opening=!0;for(var i,a=t.length,s=0,l=0,c=function(){if(s+l===a)if(s){(r._firstOpen||!r.preserveViewport)&&(r.viewport.goHome(!0),r.viewport.update()),r._firstOpen=!1;var e=t[0];if(e.tileSource&&(e=e.tileSource),r.overlays&&!r.preserveOverlays)for(var n=0;n<r.overlays.length;n++)r.currentOverlays[n]=o(r,r.overlays[n]);r._drawOverlays(),r._opening=!1,r.raiseEvent("open",{source:e})}else r._opening=!1,r.raiseEvent("open-failed",i)},u=function(t){(!e.isPlainObject(t)||!t.tileSource)&&(t={tileSource:t}),void 0!==t.index&&(e.console.error("[Viewer.open] setting indexes here is not supported; use addTiledImage instead"),delete t.index),void 0===t.collectionImmediately&&(t.collectionImmediately=!0);var n=t.success;t.success=function(e){if(s++,t.tileSource.overlays)for(var i=0;i<t.tileSource.overlays.length;i++)r.addOverlay(t.tileSource.overlays[i]);n&&n(e),c()};var o=t.error;t.error=function(e){l++,i||(i=e),o&&o(e),c()},r.addTiledImage(t)},d=0;d<t.length;d++)u(t[d]);return this},close:function(){return t[this.hash]?(this._opening=!1,this.navigator&&this.navigator.close(),this.preserveOverlays||(this.clearOverlays(),this.overlaysContainer.innerHTML=""),t[this.hash].animating=!1,this.world.removeAll(),this.imageLoader.clear(),this.raiseEvent("close"),this):this},destroy:function(){if(t[this.hash]){if(this._removeUpdatePixelDensityRatioEvent(),this.close(),this.clearOverlays(),this.overlaysContainer.innerHTML="",this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null),null!==this._updateRequestId&&(e.cancelAnimationFrame(this._updateRequestId),this._updateRequestId=null),this.drawer&&this.drawer.destroy(),this.navigator&&(this.navigator.destroy(),t[this.navigator.hash]=null,delete t[this.navigator.hash],this.navigator=null),this.removeAllHandlers(),this.buttonGroup)this.buttonGroup.destroy();else if(this.customButtons)for(;this.customButtons.length;)this.customButtons.pop().destroy();if(this.paging&&this.paging.destroy(),this.element)for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.container.onsubmit=null,this.clearControls(),this.innerTracker&&this.innerTracker.destroy(),this.outerTracker&&this.outerTracker.destroy(),t[this.hash]=null,delete t[this.hash],this.canvas=null,this.container=null,e._viewers.delete(this.element),this.element=null}},isMouseNavEnabled:function(){return this.innerTracker.isTracking()},setMouseNavEnabled:function(e){return this.innerTracker.setTracking(e),this.outerTracker.setTracking(e),this.raiseEvent("mouse-enabled",{enabled:e}),this},areControlsEnabled:function(){var e,t=this.controls.length;for(e=0;e<this.controls.length;e++)t=t&&this.controls[e].isVisible();return t},setControlsEnabled:function(e){return e?d(this):c(this),this.raiseEvent("controls-enabled",{enabled:e}),this},setDebugMode:function(e){for(var t=0;t<this.world.getItemCount();t++)this.world.getItemAt(t).debugMode=e;this.debugMode=e,this.forceRedraw()},isFullPage:function(){return t[this.hash].fullPage},setFullPage:function(n){var r,i,o=document.body,a=o.style,s=document.documentElement.style,l=this;if(n===this.isFullPage())return this;var c={fullPage:n,preventDefaultAction:!1};if(this.raiseEvent("pre-full-page",c),c.preventDefaultAction)return this;if(n){for(this.elementSize=e.getElementSize(this.element),this.pageScroll=e.getPageScroll(),this.elementMargin=this.element.style.margin,this.element.style.margin="0",this.elementPadding=this.element.style.padding,this.element.style.padding="0",this.bodyMargin=a.margin,this.docMargin=s.margin,a.margin="0",s.margin="0",this.bodyPadding=a.padding,this.docPadding=s.padding,a.padding="0",s.padding="0",this.bodyWidth=a.width,this.docWidth=s.width,a.width="100%",s.width="100%",this.bodyHeight=a.height,this.docHeight=s.height,a.height="100%",s.height="100%",this.bodyDisplay=a.display,a.display="block",this.previousBody=[],t[this.hash].prevElementParent=this.element.parentNode,t[this.hash].prevNextSibling=this.element.nextSibling,t[this.hash].prevElementWidth=this.element.style.width,t[this.hash].prevElementHeight=this.element.style.height,r=o.childNodes.length,i=0;i<r;i++)this.previousBody.push(o.childNodes[0]),o.removeChild(o.childNodes[0]);this.toolbar&&this.toolbar.element&&(this.toolbar.parentNode=this.toolbar.element.parentNode,this.toolbar.nextSibling=this.toolbar.element.nextSibling,o.appendChild(this.toolbar.element),e.addClass(this.toolbar.element,"fullpage")),e.addClass(this.element,"fullpage"),o.appendChild(this.element),this.element.style.height=e.getWindowSize().y+"px",this.element.style.width=e.getWindowSize().x+"px",this.toolbar&&this.toolbar.element&&(this.element.style.height=e.getElementSize(this.element).y-e.getElementSize(this.toolbar.element).y+"px"),t[this.hash].fullPage=!0,e.delegate(this,_)({})}else{for(this.element.style.margin=this.elementMargin,this.element.style.padding=this.elementPadding,a.margin=this.bodyMargin,s.margin=this.docMargin,a.padding=this.bodyPadding,s.padding=this.docPadding,a.width=this.bodyWidth,s.width=this.docWidth,a.height=this.bodyHeight,s.height=this.docHeight,a.display=this.bodyDisplay,o.removeChild(this.element),r=this.previousBody.length,i=0;i<r;i++)o.appendChild(this.previousBody.shift());e.removeClass(this.element,"fullpage"),t[this.hash].prevElementParent.insertBefore(this.element,t[this.hash].prevNextSibling),this.toolbar&&this.toolbar.element&&(o.removeChild(this.toolbar.element),e.removeClass(this.toolbar.element,"fullpage"),this.toolbar.parentNode.insertBefore(this.toolbar.element,this.toolbar.nextSibling),delete this.toolbar.parentNode,delete this.toolbar.nextSibling),this.element.style.width=t[this.hash].prevElementWidth,this.element.style.height=t[this.hash].prevElementHeight;var u=0,d=function t(){e.setPageScroll(l.pageScroll);var n=e.getPageScroll();++u<10&&(n.x!==l.pageScroll.x||n.y!==l.pageScroll.y)&&e.requestAnimationFrame(t)};e.requestAnimationFrame(d),t[this.hash].fullPage=!1,e.delegate(this,R)({})}return this.navigator&&this.viewport&&this.navigator.update(this.viewport),this.raiseEvent("full-page",{fullPage:n}),this},setFullScreen:function(t){var n=this;if(!e.supportsFullScreen)return this.setFullPage(t);if(e.isFullScreen()===t)return this;var r={fullScreen:t,preventDefaultAction:!1};if(this.raiseEvent("pre-full-screen",r),r.preventDefaultAction)return this;if(t){if(this.setFullPage(!0),!this.isFullPage())return this;this.fullPageStyleWidth=this.element.style.width,this.fullPageStyleHeight=this.element.style.height,this.element.style.width="100%",this.element.style.height="100%";var i=function t(){var r=e.isFullScreen();r||(e.removeEvent(document,e.fullScreenEventName,t),e.removeEvent(document,e.fullScreenErrorEventName,t),n.setFullPage(!1),n.isFullPage()&&(n.element.style.width=n.fullPageStyleWidth,n.element.style.height=n.fullPageStyleHeight)),n.navigator&&n.viewport&&setTimeout((function(){n.navigator.update(n.viewport)})),n.raiseEvent("full-screen",{fullScreen:r})};e.addEvent(document,e.fullScreenEventName,i),e.addEvent(document,e.fullScreenErrorEventName,i),e.requestFullScreen(document.body)}else e.exitFullScreen();return this},isVisible:function(){return"hidden"!==this.container.style.visibility},setVisible:function(e){return this.container.style.visibility=e?"":"hidden",this.raiseEvent("visible",{visible:e}),this},addTiledImage:function(t){e.console.assert(t,"[Viewer.addTiledImage] options is required"),e.console.assert(t.tileSource,"[Viewer.addTiledImage] options.tileSource is required"),e.console.assert(!t.replace||t.index>-1&&t.index<this.world.getItemCount(),"[Viewer.addTiledImage] if options.replace is used, options.index must be a valid index in Viewer.world");var n=this;t.replace&&(t.replaceItem=n.world.getItemAt(t.index)),this._hideMessage(),void 0===t.placeholderFillStyle&&(t.placeholderFillStyle=this.placeholderFillStyle),void 0===t.opacity&&(t.opacity=this.opacity),void 0===t.preload&&(t.preload=this.preload),void 0===t.compositeOperation&&(t.compositeOperation=this.compositeOperation),void 0===t.crossOriginPolicy&&(t.crossOriginPolicy=void 0!==t.tileSource.crossOriginPolicy?t.tileSource.crossOriginPolicy:this.crossOriginPolicy),void 0===t.ajaxWithCredentials&&(t.ajaxWithCredentials=this.ajaxWithCredentials),void 0===t.loadTilesWithAjax&&(t.loadTilesWithAjax=this.loadTilesWithAjax),void 0===t.ajaxHeaders||null===t.ajaxHeaders?t.ajaxHeaders=this.ajaxHeaders:e.isPlainObject(t.ajaxHeaders)&&e.isPlainObject(this.ajaxHeaders)&&(t.ajaxHeaders=e.extend({},this.ajaxHeaders,t.ajaxHeaders));var r={options:t};function o(e){for(var i=0;i<n._loadQueue.length;i++)if(n._loadQueue[i]===r){n._loadQueue.splice(i,1);break}0===n._loadQueue.length&&a(r),n.raiseEvent("add-item-failed",e),t.error&&t.error(e)}function a(e){n.collectionMode&&(n.world.arrange({immediately:e.options.collectionImmediately,rows:n.collectionRows,columns:n.collectionColumns,layout:n.collectionLayout,tileSize:n.collectionTileSize,tileMargin:n.collectionTileMargin}),n.world.setAutoRefigureSizes(!0))}function s(){for(var t,r,i;n._loadQueue.length&&(t=n._loadQueue[0]).tileSource;){if(n._loadQueue.splice(0,1),t.options.replace){var o=n.world.getIndexOfItem(t.options.replaceItem);-1!==o&&(t.options.index=o),n.world.removeItem(t.options.replaceItem)}r=new e.TiledImage({viewer:n,source:t.tileSource,viewport:n.viewport,drawer:n.drawer,tileCache:n.tileCache,imageLoader:n.imageLoader,x:t.options.x,y:t.options.y,width:t.options.width,height:t.options.height,fitBounds:t.options.fitBounds,fitBoundsPlacement:t.options.fitBoundsPlacement,clip:t.options.clip,placeholderFillStyle:t.options.placeholderFillStyle,opacity:t.options.opacity,preload:t.options.preload,degrees:t.options.degrees,flipped:t.options.flipped,compositeOperation:t.options.compositeOperation,springStiffness:n.springStiffness,animationTime:n.animationTime,minZoomImageRatio:n.minZoomImageRatio,wrapHorizontal:n.wrapHorizontal,wrapVertical:n.wrapVertical,immediateRender:n.immediateRender,blendTime:n.blendTime,alwaysBlend:n.alwaysBlend,minPixelRatio:n.minPixelRatio,smoothTileEdgesMinZoom:n.smoothTileEdgesMinZoom,iOSDevice:n.iOSDevice,crossOriginPolicy:t.options.crossOriginPolicy,ajaxWithCredentials:t.options.ajaxWithCredentials,loadTilesWithAjax:t.options.loadTilesWithAjax,ajaxHeaders:t.options.ajaxHeaders,debugMode:n.debugMode}),n.collectionMode&&n.world.setAutoRefigureSizes(!1),n.navigator&&(i=e.extend({},t.options,{replace:!1,originalTiledImage:r,tileSource:t.tileSource}),n.navigator.addTiledImage(i)),n.world.addItem(r,{index:t.options.index}),0===n._loadQueue.length&&a(t),1===n.world.getItemCount()&&!n.preserveViewport&&n.viewport.goHome(!0),t.options.success&&t.options.success({item:r})}}e.isArray(t.tileSource)?setTimeout((function(){o({message:"[Viewer.addTiledImage] Sequences can not be added; add them one at a time instead.",source:t.tileSource,options:t})})):(this._loadQueue.push(r),i(this,t.tileSource,t,(function(e){r.tileSource=e,s()}),(function(e){e.options=t,o(e),s()})))},addSimpleImage:function(t){e.console.assert(t,"[Viewer.addSimpleImage] options is required"),e.console.assert(t.url,"[Viewer.addSimpleImage] options.url is required");var n=e.extend({},t,{tileSource:{type:"image",url:t.url}});delete n.url,this.addTiledImage(n)},addLayer:function(t){var n=this;e.console.error("[Viewer.addLayer] this function is deprecated; use Viewer.addTiledImage() instead.");var r=e.extend({},t,{success:function(e){n.raiseEvent("add-layer",{options:t,drawer:e.item})},error:function(e){n.raiseEvent("add-layer-failed",e)}});return this.addTiledImage(r),this},getLayerAtLevel:function(t){return e.console.error("[Viewer.getLayerAtLevel] this function is deprecated; use World.getItemAt() instead."),this.world.getItemAt(t)},getLevelOfLayer:function(t){return e.console.error("[Viewer.getLevelOfLayer] this function is deprecated; use World.getIndexOfItem() instead."),this.world.getIndexOfItem(t)},getLayersCount:function(){return e.console.error("[Viewer.getLayersCount] this function is deprecated; use World.getItemCount() instead."),this.world.getItemCount()},setLayerLevel:function(t,n){return e.console.error("[Viewer.setLayerLevel] this function is deprecated; use World.setItemIndex() instead."),this.world.setItemIndex(t,n)},removeLayer:function(t){return e.console.error("[Viewer.removeLayer] this function is deprecated; use World.removeItem() instead."),this.world.removeItem(t)},forceRedraw:function(){return t[this.hash].forceRedraw=!0,this},bindSequenceControls:function(){var t=e.delegate(this,p),n=e.delegate(this,h),r=e.delegate(this,this.goToNextPage),i=e.delegate(this,this.goToPreviousPage),o=this.navImages,a=!0;return this.showSequenceControl&&((this.previousButton||this.nextButton)&&(a=!1),this.previousButton=new e.Button({element:this.previousButton?e.getElement(this.previousButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.PreviousPage"),srcRest:M(this.prefixUrl,o.previous.REST),srcGroup:M(this.prefixUrl,o.previous.GROUP),srcHover:M(this.prefixUrl,o.previous.HOVER),srcDown:M(this.prefixUrl,o.previous.DOWN),onRelease:i,onFocus:t,onBlur:n}),this.nextButton=new e.Button({element:this.nextButton?e.getElement(this.nextButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.NextPage"),srcRest:M(this.prefixUrl,o.next.REST),srcGroup:M(this.prefixUrl,o.next.GROUP),srcHover:M(this.prefixUrl,o.next.HOVER),srcDown:M(this.prefixUrl,o.next.DOWN),onRelease:r,onFocus:t,onBlur:n}),this.navPrevNextWrap||this.previousButton.disable(),(!this.tileSources||!this.tileSources.length)&&this.nextButton.disable(),a&&(this.paging=new e.ButtonGroup({buttons:[this.previousButton,this.nextButton],clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.pagingControl=this.paging.element,this.toolbar?this.toolbar.addControl(this.pagingControl,{anchor:e.ControlAnchor.BOTTOM_RIGHT}):this.addControl(this.pagingControl,{anchor:this.sequenceControlAnchor||e.ControlAnchor.TOP_LEFT}))),this},bindStandardControls:function(){var t=e.delegate(this,L),n=e.delegate(this,N),r=e.delegate(this,z),i=e.delegate(this,j),o=e.delegate(this,H),a=e.delegate(this,V),s=e.delegate(this,W),l=e.delegate(this,G),c=e.delegate(this,q),u=e.delegate(this,X),d=e.delegate(this,p),f=e.delegate(this,h),m=this.navImages,g=[],v=!0;return this.showNavigationControl&&((this.zoomInButton||this.zoomOutButton||this.homeButton||this.fullPageButton||this.rotateLeftButton||this.rotateRightButton||this.flipButton)&&(v=!1),this.showZoomControl&&(g.push(this.zoomInButton=new e.Button({element:this.zoomInButton?e.getElement(this.zoomInButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.ZoomIn"),srcRest:M(this.prefixUrl,m.zoomIn.REST),srcGroup:M(this.prefixUrl,m.zoomIn.GROUP),srcHover:M(this.prefixUrl,m.zoomIn.HOVER),srcDown:M(this.prefixUrl,m.zoomIn.DOWN),onPress:t,onRelease:n,onClick:r,onEnter:t,onExit:n,onFocus:d,onBlur:f})),g.push(this.zoomOutButton=new e.Button({element:this.zoomOutButton?e.getElement(this.zoomOutButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.ZoomOut"),srcRest:M(this.prefixUrl,m.zoomOut.REST),srcGroup:M(this.prefixUrl,m.zoomOut.GROUP),srcHover:M(this.prefixUrl,m.zoomOut.HOVER),srcDown:M(this.prefixUrl,m.zoomOut.DOWN),onPress:i,onRelease:n,onClick:o,onEnter:i,onExit:n,onFocus:d,onBlur:f}))),this.showHomeControl&&g.push(this.homeButton=new e.Button({element:this.homeButton?e.getElement(this.homeButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.Home"),srcRest:M(this.prefixUrl,m.home.REST),srcGroup:M(this.prefixUrl,m.home.GROUP),srcHover:M(this.prefixUrl,m.home.HOVER),srcDown:M(this.prefixUrl,m.home.DOWN),onRelease:a,onFocus:d,onBlur:f})),this.showFullPageControl&&g.push(this.fullPageButton=new e.Button({element:this.fullPageButton?e.getElement(this.fullPageButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.FullPage"),srcRest:M(this.prefixUrl,m.fullpage.REST),srcGroup:M(this.prefixUrl,m.fullpage.GROUP),srcHover:M(this.prefixUrl,m.fullpage.HOVER),srcDown:M(this.prefixUrl,m.fullpage.DOWN),onRelease:s,onFocus:d,onBlur:f})),this.showRotationControl&&(g.push(this.rotateLeftButton=new e.Button({element:this.rotateLeftButton?e.getElement(this.rotateLeftButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.RotateLeft"),srcRest:M(this.prefixUrl,m.rotateleft.REST),srcGroup:M(this.prefixUrl,m.rotateleft.GROUP),srcHover:M(this.prefixUrl,m.rotateleft.HOVER),srcDown:M(this.prefixUrl,m.rotateleft.DOWN),onRelease:l,onFocus:d,onBlur:f})),g.push(this.rotateRightButton=new e.Button({element:this.rotateRightButton?e.getElement(this.rotateRightButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.RotateRight"),srcRest:M(this.prefixUrl,m.rotateright.REST),srcGroup:M(this.prefixUrl,m.rotateright.GROUP),srcHover:M(this.prefixUrl,m.rotateright.HOVER),srcDown:M(this.prefixUrl,m.rotateright.DOWN),onRelease:c,onFocus:d,onBlur:f}))),this.showFlipControl&&g.push(this.flipButton=new e.Button({element:this.flipButton?e.getElement(this.flipButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.Flip"),srcRest:M(this.prefixUrl,m.flip.REST),srcGroup:M(this.prefixUrl,m.flip.GROUP),srcHover:M(this.prefixUrl,m.flip.HOVER),srcDown:M(this.prefixUrl,m.flip.DOWN),onRelease:u,onFocus:d,onBlur:f})),v?(this.buttonGroup=new e.ButtonGroup({buttons:g,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.navControl=this.buttonGroup.element,this.addHandler("open",e.delegate(this,U)),this.toolbar?this.toolbar.addControl(this.navControl,{anchor:this.navigationControlAnchor||e.ControlAnchor.TOP_LEFT}):this.addControl(this.navControl,{anchor:this.navigationControlAnchor||e.ControlAnchor.TOP_LEFT})):this.customButtons=g),this},currentPage:function(){return this._sequenceIndex},goToPage:function(e){return this.tileSources&&e>=0&&e<this.tileSources.length&&(this._sequenceIndex=e,this._updateSequenceButtons(e),this.open(this.tileSources[e]),this.referenceStrip&&this.referenceStrip.setFocus(e),this.raiseEvent("page",{page:e})),this},addOverlay:function(t,n,r,i){var s;if(s=e.isPlainObject(t)?t:{element:t,location:n,placement:r,onDraw:i},t=e.getElement(s.element),a(this.currentOverlays,t)>=0)return this;var l=o(this,s);return this.currentOverlays.push(l),l.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:t,location:s.location,placement:s.placement}),this},updateOverlay:function(n,r,i){var o;return n=e.getElement(n),(o=a(this.currentOverlays,n))>=0&&(this.currentOverlays[o].update(r,i),t[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:n,location:r,placement:i})),this},removeOverlay:function(n){var r;return n=e.getElement(n),(r=a(this.currentOverlays,n))>=0&&(this.currentOverlays[r].destroy(),this.currentOverlays.splice(r,1),t[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:n})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return t[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(t){var n;return t=e.getElement(t),(n=a(this.currentOverlays,t))>=0?this.currentOverlays[n]:null},_updateSequenceButtons:function(e){this.nextButton&&(this.tileSources&&this.tileSources.length-1!==e?this.nextButton.enable():this.navPrevNextWrap||this.nextButton.disable()),this.previousButton&&(e>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(t){this._hideMessage();var n=e.makeNeutralElement("div");n.appendChild(document.createTextNode(t)),this.messageDiv=e.makeCenteredNode(n),e.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var e=this.messageDiv;e&&(e.parentNode.removeChild(e),delete this.messageDiv)},gestureSettingsByDeviceType:function(e){switch(e){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var e,t=this.currentOverlays.length;for(e=0;e<t;e++)this.currentOverlays[e].drawHTML(this.overlaysContainer,this.viewport)},_cancelPendingImages:function(){this._loadQueue=[]},removeReferenceStrip:function(){this.showReferenceStrip=!1,this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null)},addReferenceStrip:function(){if(this.showReferenceStrip=!0,this.sequenceMode){if(this.referenceStrip)return;this.tileSources.length&&this.tileSources.length>1&&(this.referenceStrip=new e.ReferenceStrip({id:this.referenceStripElement,position:this.referenceStripPosition,sizeRatio:this.referenceStripSizeRatio,scroll:this.referenceStripScroll,height:this.referenceStripHeight,width:this.referenceStripWidth,tileSources:this.tileSources,prefixUrl:this.prefixUrl,useCanvas:this.useCanvas,viewer:this}),this.referenceStrip.setFocus(this._sequenceIndex))}else e.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')},_addUpdatePixelDensityRatioEvent:function(){this._updatePixelDensityRatioBind=this._updatePixelDensityRatio.bind(this),e.addEvent(window,"resize",this._updatePixelDensityRatioBind)},_removeUpdatePixelDensityRatioEvent:function(){e.removeEvent(window,"resize",this._updatePixelDensityRatioBind)},_updatePixelDensityRatio:function(){var t=e.pixelDensityRatio,n=e.getCurrentPixelDensityRatio();t!==n&&(e.pixelDensityRatio=n,this.world.resetItems(),this.forceRedraw())},goToPreviousPage:function(){var e=this._sequenceIndex-1;this.navPrevNextWrap&&e<0&&(e+=this.tileSources.length),this.goToPage(e)},goToNextPage:function(){var e=this._sequenceIndex+1;this.navPrevNextWrap&&e>=this.tileSources.length&&(e=0),this.goToPage(e)}})}(t),function(e){function t(e){var t={tracker:e.eventSource,position:e.position,quick:e.quick,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};if(this.viewer.raiseEvent("navigator-click",t),!t.preventDefaultAction&&e.quick&&this.viewer.viewport&&(this.panVertical||this.panHorizontal)){this.viewer.viewport.flipped&&(e.position.x=this.viewport.getContainerSize().x-e.position.x);var n=this.viewport.pointFromPixel(e.position);this.panVertical?this.panHorizontal||(n.x=this.viewer.viewport.getCenter(!0).x):n.y=this.viewer.viewport.getCenter(!0).y,this.viewer.viewport.panTo(n),this.viewer.viewport.applyConstraints()}}function n(e){var t={tracker:e.eventSource,position:e.position,delta:e.delta,speed:e.speed,direction:e.direction,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};this.viewer.raiseEvent("navigator-drag",t),!t.preventDefaultAction&&this.viewer.viewport&&(this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.viewer.viewport.flipped&&(e.delta.x=-e.delta.x),this.viewer.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta)),this.viewer.constrainDuringPan&&this.viewer.viewport.applyConstraints())}function r(e){e.insideElementPressed&&this.viewer.viewport&&this.viewer.viewport.applyConstraints()}function i(e){var t={tracker:e.eventSource,position:e.position,scroll:e.scroll,shift:e.shift,originalEvent:e.originalEvent,preventDefault:e.preventDefault};this.viewer.raiseEvent("navigator-scroll",t),e.preventDefault=t.preventDefault}function o(e,t){a(e,"rotate("+t+"deg)")}function a(e,t){e.style.webkitTransform=t,e.style.mozTransform=t,e.style.msTransform=t,e.style.oTransform=t,e.style.transform=t}e.Navigator=function(a){var s,l,c,u,d=a.viewer,p=this;function h(e){o(p.displayRegionContainer,e),o(p.displayRegion,-e),p.viewport.setRotation(e)}a.id?(this.element=document.getElementById(a.id),a.controlOptions={anchor:e.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(a.id="navigator-"+e.now(),this.element=e.makeNeutralElement("div"),a.controlOptions={anchor:e.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:a.autoFade},a.position&&("BOTTOM_RIGHT"===a.position?a.controlOptions.anchor=e.ControlAnchor.BOTTOM_RIGHT:"BOTTOM_LEFT"===a.position?a.controlOptions.anchor=e.ControlAnchor.BOTTOM_LEFT:"TOP_RIGHT"===a.position?a.controlOptions.anchor=e.ControlAnchor.TOP_RIGHT:"TOP_LEFT"===a.position?a.controlOptions.anchor=e.ControlAnchor.TOP_LEFT:"ABSOLUTE"===a.position&&(a.controlOptions.anchor=e.ControlAnchor.ABSOLUTE,a.controlOptions.top=a.top,a.controlOptions.left=a.left,a.controlOptions.height=a.height,a.controlOptions.width=a.width))),this.element.id=a.id,this.element.className+=" navigator",(a=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.navigatorSizeRatio},a,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,autoResize:a.autoResize,minZoomImageRatio:1,background:a.background,opacity:a.opacity,borderColor:a.borderColor,displayRegionColor:a.displayRegionColor})).minPixelRatio=this.minPixelRatio=d.minPixelRatio,e.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new e.Point(1,1),this.totalBorderWidths=new e.Point(2*this.borderWidth,2*this.borderWidth).minus(this.fudge),a.controlOptions.anchor!==e.ControlAnchor.NONE&&(c=this.element.style,u=this.borderWidth,c.margin="0px",c.border=u+"px solid "+a.borderColor,c.padding="0px",c.background=a.background,c.opacity=a.opacity,c.overflow="hidden"),this.displayRegion=e.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function(e,t){e.position="relative",e.top="0px",e.left="0px",e.fontSize="0px",e.overflow="hidden",e.border=t+"px solid "+a.displayRegionColor,e.margin="0px",e.padding="0px",e.background="transparent",e.float="left",e.cssFloat="left",e.styleFloat="left",e.zIndex=999999999,e.cursor="default"}(this.displayRegion.style,this.borderWidth),e.setElementPointerEventsNone(this.displayRegion),e.setElementTouchActionNone(this.displayRegion),this.displayRegionContainer=e.makeNeutralElement("div"),this.displayRegionContainer.id=this.element.id+"-displayregioncontainer",this.displayRegionContainer.className="displayregioncontainer",this.displayRegionContainer.style.width="100%",this.displayRegionContainer.style.height="100%",e.setElementPointerEventsNone(this.displayRegionContainer),e.setElementTouchActionNone(this.displayRegionContainer),d.addControl(this.element,a.controlOptions),this._resizeWithViewer=a.controlOptions.anchor!==e.ControlAnchor.ABSOLUTE&&a.controlOptions.anchor!==e.ControlAnchor.NONE,a.width&&a.height?(this.setWidth(a.width),this.setHeight(a.height)):this._resizeWithViewer&&(s=e.getElementSize(d.element),this.element.style.height=Math.round(s.y*a.sizeRatio)+"px",this.element.style.width=Math.round(s.x*a.sizeRatio)+"px",this.oldViewerSize=s,l=e.getElementSize(this.element),this.elementArea=l.x*l.y),this.oldContainerSize=new e.Point(0,0),e.Viewer.apply(this,[a]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer),a.navigatorRotate&&(h(a.viewer.viewport?a.viewer.viewport.getRotation():a.viewer.degrees||0),a.viewer.addHandler("rotate",(function(e){h(e.degrees)}))),this.innerTracker.destroy(),this.innerTracker=new e.MouseTracker({userData:"Navigator.innerTracker",element:this.element,dragHandler:e.delegate(this,n),clickHandler:e.delegate(this,t),releaseHandler:e.delegate(this,r),scrollHandler:e.delegate(this,i),preProcessEventHandler:function(e){"wheel"===e.eventType&&(e.preventDefault=!0)}}),this.outerTracker.userData="Navigator.outerTracker",e.setElementPointerEventsNone(this.canvas),e.setElementPointerEventsNone(this.container),this.addHandler("reset-size",(function(){p.viewport&&p.viewport.goHome(!0)})),d.world.addHandler("item-index-change",(function(e){window.setTimeout((function(){var t=p.world.getItemAt(e.previousIndex);p.world.setItemIndex(t,e.newIndex)}),1)})),d.world.addHandler("remove-item",(function(e){var t=e.item,n=p._getMatchingItem(t);n&&p.world.removeItem(n)})),this.update(d.viewport)},e.extend(e.Navigator.prototype,e.EventSource.prototype,e.Viewer.prototype,{updateSize:function(){if(this.viewport){var t=new e.Point(0===this.container.clientWidth?1:this.container.clientWidth,0===this.container.clientHeight?1:this.container.clientHeight);t.equals(this.oldContainerSize)||(this.viewport.resize(t,!0),this.viewport.goHome(!0),this.oldContainerSize=t,this.drawer.clear(),this.world.draw())}},setWidth:function(e){this.width=e,this.element.style.width="number"==typeof e?e+"px":e,this._resizeWithViewer=!1},setHeight:function(e){this.height=e,this.element.style.height="number"==typeof e?e+"px":e,this._resizeWithViewer=!1},setFlip:function(e){return this.viewport.setFlip(e),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(e){a(this.displayRegion,e),a(this.canvas,e),a(this.element,e)},update:function(t){var n,r,i,o,a,s;if(n=e.getElementSize(this.viewer.element),this._resizeWithViewer&&n.x&&n.y&&!n.equals(this.oldViewerSize)&&(this.oldViewerSize=n,this.maintainSizeRatio||!this.elementArea?(r=n.x*this.sizeRatio,i=n.y*this.sizeRatio):(r=Math.sqrt(this.elementArea*(n.x/n.y)),i=this.elementArea/r),this.element.style.width=Math.round(r)+"px",this.element.style.height=Math.round(i)+"px",this.elementArea||(this.elementArea=r*i),this.updateSize()),t&&this.viewport){o=t.getBoundsNoRotate(!0),a=this.viewport.pixelFromPointNoRotate(o.getTopLeft(),!1),s=this.viewport.pixelFromPointNoRotate(o.getBottomRight(),!1).minus(this.totalBorderWidths);var l=this.displayRegion.style;l.display=this.world.getItemCount()?"block":"none",l.top=Math.round(a.y)+"px",l.left=Math.round(a.x)+"px";var c=Math.abs(a.x-s.x),u=Math.abs(a.y-s.y);l.width=Math.round(Math.max(c,0))+"px",l.height=Math.round(Math.max(u,0))+"px"}},addTiledImage:function(t){var n=this,r=t.originalTiledImage;delete t.original;var i=e.extend({},t,{success:function(e){var t=e.item;function i(){n._matchBounds(t,r)}function o(){n._matchOpacity(t,r)}function a(){n._matchCompositeOperation(t,r)}t._originalForNavigator=r,n._matchBounds(t,r,!0),n._matchOpacity(t,r),n._matchCompositeOperation(t,r),r.addHandler("bounds-change",i),r.addHandler("clip-change",i),r.addHandler("opacity-change",o),r.addHandler("composite-operation-change",a)}});return e.Viewer.prototype.addTiledImage.apply(this,[i])},destroy:function(){return e.Viewer.prototype.destroy.apply(this)},_getMatchingItem:function(e){for(var t,n=this.world.getItemCount(),r=0;r<n;r++)if((t=this.world.getItemAt(r))._originalForNavigator===e)return t;return null},_matchBounds:function(e,t,n){var r=t.getBoundsNoRotate();e.setPosition(r.getTopLeft(),n),e.setWidth(r.width,n),e.setRotation(t.getRotation(),n),e.setClip(t.getClip()),e.setFlip(t.getFlip())},_matchOpacity:function(e,t){e.setOpacity(t.opacity)},_matchCompositeOperation:function(e,t){e.setCompositeOperation(t.compositeOperation)}})}(t),function(e){var t={Errors:{Dzc:"Sorry, we don't support Deep Zoom Collections!",Dzi:"Hmm, this doesn't appear to be a valid Deep Zoom Image.",Xml:"Hmm, this doesn't appear to be a valid Deep Zoom Image.",ImageFormat:"Sorry, we don't support {0}-based Deep Zoom Images.",Security:"It looks like a security restriction stopped us from loading this Deep Zoom Image.",Status:"This space unintentionally left blank ({0} {1}).",OpenFailed:"Unable to open {0}: {1}"},Tooltips:{FullPage:"Toggle full page",Home:"Go home",ZoomIn:"Zoom in",ZoomOut:"Zoom out",NextPage:"Next page",PreviousPage:"Previous page",RotateLeft:"Rotate left",RotateRight:"Rotate right",Flip:"Flip Horizontally"}};e.extend(e,{getString:function(n){var r,i=n.split("."),o=null,a=arguments,s=t;for(r=0;r<i.length-1;r++)s=s[i[r]]||{};return"string"!=typeof(o=s[i[r]])&&(e.console.log("Untranslated source string:",n),o=""),o.replace(/\{\d+\}/g,(function(e){var t=parseInt(e.match(/\d+/),10)+1;return t<a.length?a[t]:""}))},setString:function(e,n){var r,i=e.split("."),o=t;for(r=0;r<i.length-1;r++)o[i[r]]||(o[i[r]]={}),o=o[i[r]];o[i[r]]=n}})}(t),function(e){e.Point=function(e,t){this.x="number"==typeof e?e:0,this.y="number"==typeof t?t:0},e.Point.prototype={clone:function(){return new e.Point(this.x,this.y)},plus:function(t){return new e.Point(this.x+t.x,this.y+t.y)},minus:function(t){return new e.Point(this.x-t.x,this.y-t.y)},times:function(t){return new e.Point(this.x*t,this.y*t)},divide:function(t){return new e.Point(this.x/t,this.y/t)},negate:function(){return new e.Point(-this.x,-this.y)},distanceTo:function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},squaredDistanceTo:function(e){return Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2)},apply:function(t){return new e.Point(t(this.x),t(this.y))},equals:function(t){return t instanceof e.Point&&this.x===t.x&&this.y===t.y},rotate:function(t,n){var r,i;if(n=n||new e.Point(0,0),t%90==0)switch(e.positiveModulo(t,360)){case 0:r=1,i=0;break;case 90:r=0,i=1;break;case 180:r=-1,i=0;break;case 270:r=0,i=-1}else{var o=t*Math.PI/180;r=Math.cos(o),i=Math.sin(o)}var a=r*(this.x-n.x)-i*(this.y-n.y)+n.x,s=i*(this.x-n.x)+r*(this.y-n.y)+n.y;return new e.Point(a,s)},toString:function(){return"("+Math.round(100*this.x)/100+","+Math.round(100*this.y)/100+")"}}}(t),function(e){function n(t){var n,r,i=t.responseText,o=t.status;if(!t)throw new Error(e.getString("Errors.Security"));if(200!==t.status&&0!==t.status)throw n=404===(o=t.status)?"Not Found":t.statusText,new Error(e.getString("Errors.Status",o,n));if(i.match(/\s*<.*/))try{r=t.responseXML&&t.responseXML.documentElement?t.responseXML:e.parseXml(i)}catch(e){r=t.responseText}else if(i.match(/\s*[{[].*/))try{r=e.parseJSON(i)}catch(e){r=i}else r=i;return r}e.TileSource=function(t,n,r,i,o,a){var s,l,c=this,u=arguments;if(s=e.isPlainObject(t)?t:{width:u[0],height:u[1],tileSize:u[2],tileOverlap:u[3],minLevel:u[4],maxLevel:u[5]},e.EventSource.call(this),e.extend(!0,this,s),!this.success)for(l=0;l<arguments.length;l++)if(e.isFunction(arguments[l])){this.success=arguments[l];break}this.success&&this.addHandler("ready",(function(e){c.success(e)})),"string"===e.type(arguments[0])&&(this.url=arguments[0]),this.url?(this.aspectRatio=1,this.dimensions=new e.Point(10,10),this._tileWidth=0,this._tileHeight=0,this.tileOverlap=0,this.minLevel=0,this.maxLevel=0,this.ready=!1,this.getImageInfo(this.url)):(this.ready=!0,this.aspectRatio=s.width&&s.height?s.width/s.height:1,this.dimensions=new e.Point(s.width,s.height),this.tileSize?(this._tileWidth=this._tileHeight=this.tileSize,delete this.tileSize):(this.tileWidth?(this._tileWidth=this.tileWidth,delete this.tileWidth):this._tileWidth=0,this.tileHeight?(this._tileHeight=this.tileHeight,delete this.tileHeight):this._tileHeight=0),this.tileOverlap=s.tileOverlap?s.tileOverlap:0,this.minLevel=s.minLevel?s.minLevel:0,this.maxLevel=void 0!==s.maxLevel&&null!==s.maxLevel?s.maxLevel:s.width&&s.height?Math.ceil(Math.log(Math.max(s.width,s.height))/Math.log(2)):0,this.success&&e.isFunction(this.success)&&this.success(this))},e.TileSource.prototype={getTileSize:function(t){return e.console.error("[TileSource.getTileSize] is deprecated. Use TileSource.getTileWidth() and TileSource.getTileHeight() instead"),this._tileWidth},getTileWidth:function(e){return this._tileWidth?this._tileWidth:this.getTileSize(e)},getTileHeight:function(e){return this._tileHeight?this._tileHeight:this.getTileSize(e)},setMaxLevel:function(e){this.maxLevel=e,this._memoizeLevelScale()},getLevelScale:function(e){return this._memoizeLevelScale(),this.getLevelScale(e)},_memoizeLevelScale:function(){var e,t={};for(e=0;e<=this.maxLevel;e++)t[e]=1/Math.pow(2,this.maxLevel-e);this.getLevelScale=function(e){return t[e]}},getNumTiles:function(t){var n=this.getLevelScale(t),r=Math.ceil(n*this.dimensions.x/this.getTileWidth(t)),i=Math.ceil(n*this.dimensions.y/this.getTileHeight(t));return new e.Point(r,i)},getPixelRatio:function(t){var n=this.dimensions.times(this.getLevelScale(t)),r=1/n.x*e.pixelDensityRatio,i=1/n.y*e.pixelDensityRatio;return new e.Point(r,i)},getClosestLevel:function(){var e,t;for(e=this.minLevel+1;e<=this.maxLevel&&!((t=this.getNumTiles(e)).x>1||t.y>1);e++);return e-1},getTileAtPoint:function(t,n){var r=n.x>=0&&n.x<=1&&n.y>=0&&n.y<=1/this.aspectRatio;e.console.assert(r,"[TileSource.getTileAtPoint] must be called with a valid point.");var i=this.dimensions.x*this.getLevelScale(t),o=n.x*i,a=n.y*i,s=Math.floor(o/this.getTileWidth(t)),l=Math.floor(a/this.getTileHeight(t));n.x>=1&&(s=this.getNumTiles(t).x-1);var c=1e-15;return n.y>=1/this.aspectRatio-c&&(l=this.getNumTiles(t).y-1),new e.Point(s,l)},getTileBounds:function(t,n,r,i){var o=this.dimensions.times(this.getLevelScale(t)),a=this.getTileWidth(t),s=this.getTileHeight(t),l=0===n?0:a*n-this.tileOverlap,c=0===r?0:s*r-this.tileOverlap,u=a+(0===n?1:2)*this.tileOverlap,d=s+(0===r?1:2)*this.tileOverlap,p=1/o.x;return u=Math.min(u,o.x-l),d=Math.min(d,o.y-c),i?new e.Rect(0,0,u,d):new e.Rect(l*p,c*p,u*p,d*p)},getImageInfo:function(t){var r,i,o,a,s,l,c,u=this;t&&(c=(l=(s=t.split("/"))[s.length-1]).lastIndexOf("."))>-1&&(s[s.length-1]=l.slice(0,c)),i=function(n){"string"==typeof n&&(n=e.parseXml(n));var r=e.TileSource.determineType(u,n,t);r?(void 0===(a=r.prototype.configure.apply(u,[n,t])).ajaxWithCredentials&&(a.ajaxWithCredentials=u.ajaxWithCredentials),o=new r(a),u.ready=!0,u.raiseEvent("ready",{tileSource:o})):u.raiseEvent("open-failed",{message:"Unable to load TileSource",source:t})},t.match(/\.js$/)?(r=t.split("/").pop().replace(".js",""),e.jsonp({url:t,async:!1,callbackName:r,callback:i})):e.makeAjaxRequest({url:t,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(e){var t=n(e);i(t)},error:function(e,n){var r;try{r="HTTP "+e.status+" attempting to load TileSource"}catch(e){r=(void 0!==n&&n.toString?n.toString():"Unknown error")+" attempting to load TileSource"}u.raiseEvent("open-failed",{message:r,source:t})}})},supports:function(e,t){return!1},configure:function(e,t){throw new Error("Method not implemented.")},getTileUrl:function(e,t,n){throw new Error("Method not implemented.")},getTileAjaxHeaders:function(e,t,n){return{}},tileExists:function(e,t,n){var r=this.getNumTiles(e);return e>=this.minLevel&&e<=this.maxLevel&&t>=0&&n>=0&&t<r.x&&n<r.y}},e.extend(!0,e.TileSource.prototype,e.EventSource.prototype),e.TileSource.determineType=function(n,r,i){var o;for(o in t)if(o.match(/.+TileSource$/)&&e.isFunction(t[o])&&e.isFunction(t[o].prototype.supports)&&t[o].prototype.supports.call(n,r,i))return t[o];return e.console.error("No TileSource was able to open %s %s",i,r),null}}(t),function(e){function t(t,r){if(!r||!r.documentElement)throw new Error(e.getString("Errors.Xml"));var i,o,a,s,l,c=r.documentElement,u=c.localName||c.tagName,d=r.documentElement.namespaceURI,p=null,h=[];if("Image"===u)try{if(void 0===(s=c.getElementsByTagName("Size")[0])&&(s=c.getElementsByTagNameNS(d,"Size")[0]),p={Image:{xmlns:"http://schemas.microsoft.com/deepzoom/2008",Url:c.getAttribute("Url"),Format:c.getAttribute("Format"),DisplayRect:null,Overlap:parseInt(c.getAttribute("Overlap"),10),TileSize:parseInt(c.getAttribute("TileSize"),10),Size:{Height:parseInt(s.getAttribute("Height"),10),Width:parseInt(s.getAttribute("Width"),10)}}},!e.imageFormatSupported(p.Image.Format))throw new Error(e.getString("Errors.ImageFormat",p.Image.Format.toUpperCase()));for(void 0===(i=c.getElementsByTagName("DisplayRect"))&&(i=c.getElementsByTagNameNS(d,"DisplayRect")[0]),l=0;l<i.length;l++)void 0===(a=(o=i[l]).getElementsByTagName("Rect")[0])&&(a=o.getElementsByTagNameNS(d,"Rect")[0]),h.push({Rect:{X:parseInt(a.getAttribute("X"),10),Y:parseInt(a.getAttribute("Y"),10),Width:parseInt(a.getAttribute("Width"),10),Height:parseInt(a.getAttribute("Height"),10),MinLevel:parseInt(o.getAttribute("MinLevel"),10),MaxLevel:parseInt(o.getAttribute("MaxLevel"),10)}});return h.length&&(p.Image.DisplayRect=h),n(t,p)}catch(t){throw t instanceof Error?t:new Error(e.getString("Errors.Dzi"))}else{if("Collection"===u)throw new Error(e.getString("Errors.Dzc"));if("Error"===u){var f=c.getElementsByTagName("Message")[0].firstChild.nodeValue;throw new Error(f)}}throw new Error(e.getString("Errors.Dzi"))}function n(t,n){var r,i,o=n.Image,a=o.Url,s=o.Format,l=o.Size,c=o.DisplayRect||[],u=parseInt(l.Width,10),d=parseInt(l.Height,10),p=parseInt(o.TileSize,10),h=parseInt(o.Overlap,10),f=[];for(i=0;i<c.length;i++)r=c[i].Rect,f.push(new e.DisplayRect(parseInt(r.X,10),parseInt(r.Y,10),parseInt(r.Width,10),parseInt(r.Height,10),parseInt(r.MinLevel,10),parseInt(r.MaxLevel,10)));return e.extend(!0,{width:u,height:d,tileSize:p,tileOverlap:h,minLevel:null,maxLevel:null,tilesUrl:a,fileFormat:s,displayRects:f},n)}e.DziTileSource=function(t,n,r,i,o,a,s,l,c){var u,d,p,h;if(h=e.isPlainObject(t)?t:{width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4],fileFormat:arguments[5],displayRects:arguments[6],minLevel:arguments[7],maxLevel:arguments[8]},this._levelRects={},this.tilesUrl=h.tilesUrl,this.fileFormat=h.fileFormat,this.displayRects=h.displayRects,this.displayRects)for(u=this.displayRects.length-1;u>=0;u--)for(p=(d=this.displayRects[u]).minLevel;p<=d.maxLevel;p++)this._levelRects[p]||(this._levelRects[p]=[]),this._levelRects[p].push(d);e.TileSource.apply(this,[h])},e.extend(e.DziTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){var n;return e.Image?n=e.Image.xmlns:e.documentElement&&("Image"===e.documentElement.localName||"Image"===e.documentElement.tagName)&&(n=e.documentElement.namespaceURI),-1!==(n=(n||"").toLowerCase()).indexOf("schemas.microsoft.com/deepzoom/2008")||-1!==n.indexOf("schemas.microsoft.com/deepzoom/2009")},configure:function(r,i){var o;return o=e.isPlainObject(r)?n(this,r):t(this,r),i&&!o.tilesUrl&&(o.tilesUrl=i.replace(/([^/]+?)(\.(dzi|xml|js)?(\?[^/]*)?)?\/?$/,"$1_files/"),-1!==i.search(/\.(dzi|xml|js)\?/)?o.queryParams=i.match(/\?.*/):o.queryParams=""),o},getTileUrl:function(e,t,n){return[this.tilesUrl,e,"/",t,"_",n,".",this.fileFormat,this.queryParams].join("")},tileExists:function(e,t,n){var r,i,o,a,s,l,c,u=this._levelRects[e];if(this.minLevel&&e<this.minLevel||this.maxLevel&&e>this.maxLevel)return!1;if(!u||!u.length)return!0;for(c=u.length-1;c>=0;c--)if(!(e<(r=u[c]).minLevel||e>r.maxLevel)&&(i=this.getLevelScale(e),o=r.x*i,a=r.y*i,s=o+r.width*i,l=a+r.height*i,o=Math.floor(o/this._tileWidth),a=Math.floor(a/this._tileWidth),s=Math.ceil(s/this._tileWidth),l=Math.ceil(l/this._tileWidth),o<=t&&t<s&&a<=n&&n<l))return!0;return!1}})}(t),function(e){function n(e){var t=["http://library.stanford.edu/iiif/image-api/compliance.html#level0","http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0","http://iiif.io/api/image/2/level0.json","level0","https://iiif.io/api/image/3/level0.json"],n=Array.isArray(e.profile)?e.profile[0]:e.profile,r=-1!==t.indexOf(n),i=!1;return 2===e.version&&e.profile.length>1&&e.profile[1].supports&&(i=-1!==e.profile[1].supports.indexOf("sizeByW")),3===e.version&&e.extraFeatures&&(i=-1!==e.extraFeatures.indexOf("sizeByWh")),!r||i}function r(e){for(var t=[],n=0;n<e.sizes.length;n++)t.push({url:e["@id"]+"/full/"+e.sizes[n].width+","+(3===e.version?e.sizes[n].height:"")+"/0/default."+e.tileFormat,width:e.sizes[n].width,height:e.sizes[n].height});return t.sort((function(e,t){return e.width-t.width}))}function i(t){if(!t||!t.documentElement)throw new Error(e.getString("Errors.Xml"));var n=t.documentElement,r=null;if("info"===n.tagName)try{return o(n,r={}),r}catch(t){throw t instanceof Error?t:new Error(e.getString("Errors.IIIF"))}throw new Error(e.getString("Errors.IIIF"))}function o(t,n,r){var i,a;if(3===t.nodeType&&r)(a=t.nodeValue.trim()).match(/^\d*$/)&&(a=Number(a)),n[r]?(e.isArray(n[r])||(n[r]=[n[r]]),n[r].push(a)):n[r]=a;else if(1===t.nodeType)for(i=0;i<t.childNodes.length;i++)o(t.childNodes[i],n,t.nodeName)}e.IIIFTileSource=function(t){if(e.extend(!0,this,t),!(this.height&&this.width&&this["@id"]))throw new Error("IIIF required parameters not provided.");if(t.tileSizePerScaleFactor={},this.tileFormat=this.tileFormat||"jpg",this.version=t.version,this.tile_width&&this.tile_height)t.tileWidth=this.tile_width,t.tileHeight=this.tile_height;else if(this.tile_width)t.tileSize=this.tile_width;else if(this.tile_height)t.tileSize=this.tile_height;else if(this.tiles)if(1===this.tiles.length)t.tileWidth=this.tiles[0].width,t.tileHeight=this.tiles[0].height||this.tiles[0].width,this.scale_factors=this.tiles[0].scaleFactors;else{this.scale_factors=[];for(var i=0;i<this.tiles.length;i++)for(var o=0;o<this.tiles[i].scaleFactors.length;o++){var a=this.tiles[i].scaleFactors[o];this.scale_factors.push(a),t.tileSizePerScaleFactor[a]={width:this.tiles[i].width,height:this.tiles[i].height||this.tiles[i].width}}}else if(n(t)){for(var s=Math.min(this.height,this.width),l=[256,512,1024],c=[],u=0;u<l.length;u++)l[u]<=s&&c.push(l[u]);c.length>0?t.tileSize=Math.max.apply(null,c):t.tileSize=s}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,t.levels=r(this),e.extend(!0,t,{width:t.levels[t.levels.length-1].width,height:t.levels[t.levels.length-1].height,tileSize:Math.max(t.height,t.width),tileOverlap:0,minLevel:0,maxLevel:t.levels.length-1}),this.levels=t.levels):e.console.error("Nothing in the info.json to construct image pyramids from");if(!t.maxLevel&&!this.emulateLegacyImagePyramid)if(this.scale_factors){var d=Math.max.apply(null,this.scale_factors);t.maxLevel=Math.round(Math.log(d)*Math.LOG2E)}else t.maxLevel=Number(Math.ceil(Math.log(Math.max(this.width,this.height),2)));e.TileSource.apply(this,[t])},e.extend(e.IIIFTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return!!(e.protocol&&"http://iiif.io/api/image"===e.protocol||e["@context"]&&("http://library.stanford.edu/iiif/image-api/1.1/context.json"===e["@context"]||"http://iiif.io/api/image/1/context.json"===e["@context"])||e.profile&&0===e.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html")||e.identifier&&e.width&&e.height)||!(!e.documentElement||"info"!==e.documentElement.tagName||"http://library.stanford.edu/iiif/image-api/ns/"!==e.documentElement.namespaceURI)},configure:function(n,r){if(e.isPlainObject(n)){if(n["@context"]){var o=n["@context"];if(Array.isArray(o))for(var a=0;a<o.length;a++)if("string"==typeof o[a]&&(/^http:\/\/iiif\.io\/api\/image\/[1-3]\/context\.json$/.test(o[a])||"http://library.stanford.edu/iiif/image-api/1.1/context.json"===o[a])){o=o[a];break}switch(o){case"http://iiif.io/api/image/1/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/context.json":n.version=1;break;case"http://iiif.io/api/image/2/context.json":n.version=2;break;case"http://iiif.io/api/image/3/context.json":n.version=3;break;default:e.console.error("Data has a @context property which contains no known IIIF context URI.")}}else n["@context"]="http://iiif.io/api/image/1.0/context.json",n["@id"]=r.replace("/info.json",""),n.version=1;if(!n["@id"]&&n.id&&(n["@id"]=n.id),n.preferredFormats)for(var s=0;s<n.preferredFormats.length;s++)if(t.imageFormatSupported(n.preferredFormats[s])){n.tileFormat=n.preferredFormats[s];break}return n}var l=i(n);return l["@context"]="http://iiif.io/api/image/1.0/context.json",l["@id"]=r.replace("/info.xml",""),l.version=1,l},getTileWidth:function(t){if(this.emulateLegacyImagePyramid)return e.TileSource.prototype.getTileWidth.call(this,t);var n=Math.pow(2,this.maxLevel-t);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[n]?this.tileSizePerScaleFactor[n].width:this._tileWidth},getTileHeight:function(t){if(this.emulateLegacyImagePyramid)return e.TileSource.prototype.getTileHeight.call(this,t);var n=Math.pow(2,this.maxLevel-t);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[n]?this.tileSizePerScaleFactor[n].height:this._tileHeight},getLevelScale:function(t){if(this.emulateLegacyImagePyramid){var n=NaN;return this.levels.length>0&&t>=this.minLevel&&t<=this.maxLevel&&(n=this.levels[t].width/this.levels[this.maxLevel].width),n}return e.TileSource.prototype.getLevelScale.call(this,t)},getNumTiles:function(t){return this.emulateLegacyImagePyramid?this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0):e.TileSource.prototype.getNumTiles.call(this,t)},getTileAtPoint:function(t,n){return this.emulateLegacyImagePyramid?new e.Point(0,0):e.TileSource.prototype.getTileAtPoint.call(this,t,n)},getTileUrl:function(e,t,n){if(this.emulateLegacyImagePyramid){var r=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(r=this.levels[e].url),r}var i,o,a,s,l,c,u,d,p,h,f,m,g,v="0",y=Math.pow(.5,this.maxLevel-e),b=Math.ceil(this.width*y),w=Math.ceil(this.height*y);return i=this.getTileWidth(e),o=this.getTileHeight(e),a=Math.ceil(i/y),s=Math.ceil(o/y),g=1===this.version?"native."+this.tileFormat:"default."+this.tileFormat,b<i&&w<o?(h=2===this.version&&b===this.width?"full":3===this.version&&b===this.width&&w===this.height?"max":3===this.version?b+","+w:b+",",l="full"):(c=t*a,u=n*s,d=Math.min(a,this.width-c),p=Math.min(s,this.height-u),l=0===t&&0===n&&d===this.width&&p===this.height?"full":[c,u,d,p].join(","),f=Math.ceil(d*y),m=Math.ceil(p*y),h=2===this.version&&f===this.width?"full":3===this.version&&f===this.width&&m===this.height?"max":3===this.version?f+","+m:f+","),[this["@id"],l,h,v,g].join("/")},__testonly__:{canBeTiled:n,constructLevels:r}})}(t),function(e){e.OsmTileSource=function(t,n,r,i,o){var a;(!(a=e.isPlainObject(t)?t:{width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]}).width||!a.height)&&(a.width=65572864,a.height=65572864),a.tileSize||(a.tileSize=256,a.tileOverlap=0),a.tilesUrl||(a.tilesUrl="http://tile.openstreetmap.org/"),a.minLevel=8,e.TileSource.apply(this,[a])},e.extend(e.OsmTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"openstreetmaps"===e.type},configure:function(e,t){return e},getTileUrl:function(e,t,n){return this.tilesUrl+(e-8)+"/"+t+"/"+n+".png"}})}(t),function(e){e.TmsTileSource=function(t,n,r,i,o){var a;a=e.isPlainObject(t)?t:{width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]};var s,l=256*Math.ceil(a.width/256),c=256*Math.ceil(a.height/256);s=l>c?l/256:c/256,a.maxLevel=Math.ceil(Math.log(s)/Math.log(2))-1,a.tileSize=256,a.width=l,a.height=c,e.TileSource.apply(this,[a])},e.extend(e.TmsTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"tiledmapservice"===e.type},configure:function(e,t){return e},getTileUrl:function(e,t,n){var r=this.getNumTiles(e).y-1;return this.tilesUrl+e+"/"+t+"/"+(r-n)+".png"}})}(t),function(e){e.ZoomifyTileSource=function(e){void 0===e.tileSize&&(e.tileSize=256),void 0===e.fileFormat&&(e.fileFormat="jpg",this.fileFormat=e.fileFormat);var n={x:e.width,y:e.height};for(e.imageSizes=[{x:e.width,y:e.height}],e.gridSize=[this._getGridSize(e.width,e.height,e.tileSize)];parseInt(n.x,10)>e.tileSize||parseInt(n.y,10)>e.tileSize;)n.x=Math.floor(n.x/2),n.y=Math.floor(n.y/2),e.imageSizes.push({x:n.x,y:n.y}),e.gridSize.push(this._getGridSize(n.x,n.y,e.tileSize));e.imageSizes.reverse(),e.gridSize.reverse(),e.minLevel=0,e.maxLevel=e.gridSize.length-1,t.TileSource.apply(this,[e])},e.extend(e.ZoomifyTileSource.prototype,e.TileSource.prototype,{_getGridSize:function(e,t,n){return{x:Math.ceil(e/n),y:Math.ceil(t/n)}},_calculateAbsoluteTileNumber:function(e,t,n){for(var r=0,i={},o=0;o<e;o++)r+=(i=this.gridSize[o]).x*i.y;return r+=(i=this.gridSize[e]).x*n+t},supports:function(e,t){return e.type&&"zoomifytileservice"===e.type},configure:function(e,t){return e},getTileUrl:function(e,t,n){var r=0,i=this._calculateAbsoluteTileNumber(e,t,n);return r=Math.floor(i/256),this.tilesUrl+"TileGroup"+r+"/"+e+"-"+t+"-"+n+"."+this.fileFormat}})}(t),function(e){function t(t){var n,r,i=[];for(r=0;r<t.length;r++)(n=t[r]).height&&n.width&&n.url?i.push({url:n.url,width:Number(n.width),height:Number(n.height)}):e.console.error("Unsupported image format: %s",n.url?n.url:"<no URL>");return i.sort((function(e,t){return e.height-t.height}))}function n(t,n){if(!n||!n.documentElement)throw new Error(e.getString("Errors.Xml"));var i,o,a=n.documentElement,s=a.tagName,l=null,c=[];if("image"===s)try{for(l={type:a.getAttribute("type"),levels:[]},c=a.getElementsByTagName("level"),o=0;o<c.length;o++)i=c[o],l.levels.push({url:i.getAttribute("url"),width:parseInt(i.getAttribute("width"),10),height:parseInt(i.getAttribute("height"),10)});return r(t,l)}catch(e){throw e instanceof Error?e:new Error("Unknown error parsing Legacy Image Pyramid XML.")}else{if("collection"===s)throw new Error("Legacy Image Pyramid Collections not yet supported.");if("error"===s)throw new Error("Error: "+n)}throw new Error("Unknown element "+s)}function r(e,t){return t.levels}e.LegacyTileSource=function(n){var r,i,o;e.isArray(n)&&(r={type:"legacy-image-pyramid",levels:n}),r.levels=t(r.levels),r.levels.length>0?(i=r.levels[r.levels.length-1].width,o=r.levels[r.levels.length-1].height):(i=0,o=0,e.console.error("No supported image formats found")),e.extend(!0,r,{width:i,height:o,tileSize:Math.max(o,i),tileOverlap:0,minLevel:0,maxLevel:r.levels.length>0?r.levels.length-1:0}),e.TileSource.apply(this,[r]),this.levels=r.levels},e.extend(e.LegacyTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"legacy-image-pyramid"===e.type||e.documentElement&&"legacy-image-pyramid"===e.documentElement.getAttribute("type")},configure:function(t,i){return e.isPlainObject(t)?r(this,t):n(this,t)},getLevelScale:function(e){var t=NaN;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(t){return this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(e,t,n){var r=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(r=this.levels[e].url),r}})}(t),function(e){e.ImageTileSource=function(t){t=e.extend({buildPyramid:!0,crossOriginPolicy:!1,ajaxWithCredentials:!1,useCanvas:!0},t),e.TileSource.apply(this,[t])},e.extend(e.ImageTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"image"===e.type},configure:function(e,t){return e},getImageInfo:function(t){var n=this._image=new Image,r=this;this.crossOriginPolicy&&(n.crossOrigin=this.crossOriginPolicy),this.ajaxWithCredentials&&(n.useCredentials=this.ajaxWithCredentials),e.addEvent(n,"load",(function(){r.width=n.naturalWidth,r.height=n.naturalHeight,r.aspectRatio=r.width/r.height,r.dimensions=new e.Point(r.width,r.height),r._tileWidth=r.width,r._tileHeight=r.height,r.tileOverlap=0,r.minLevel=0,r.levels=r._buildLevels(),r.maxLevel=r.levels.length-1,r.ready=!0,r.raiseEvent("ready",{tileSource:r})})),e.addEvent(n,"error",(function(){r.raiseEvent("open-failed",{message:"Error loading image at "+t,source:t})})),n.src=t},getLevelScale:function(e){var t=NaN;return e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(t){return this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(e,t,n){var r=null;return e>=this.minLevel&&e<=this.maxLevel&&(r=this.levels[e].url),r},getContext2D:function(e,t,n){var r=null;return e>=this.minLevel&&e<=this.maxLevel&&(r=this.levels[e].context2D),r},destroy:function(){this._freeupCanvasMemory()},_buildLevels:function(){var t=[{url:this._image.src,width:this._image.naturalWidth,height:this._image.naturalHeight}];if(!this.buildPyramid||!e.supportsCanvas||!this.useCanvas)return delete this._image,t;var n=this._image.naturalWidth,r=this._image.naturalHeight,i=document.createElement("canvas"),o=i.getContext("2d");if(i.width=n,i.height=r,o.drawImage(this._image,0,0,n,r),t[0].context2D=o,delete this._image,e.isCanvasTainted(i))return t;for(;n>=2&&r>=2;){n=Math.floor(n/2),r=Math.floor(r/2);var a=document.createElement("canvas"),s=a.getContext("2d");a.width=n,a.height=r,s.drawImage(i,0,0,n,r),t.splice(0,0,{context2D:s,width:n,height:r}),i=a,o=s}return t},_freeupCanvasMemory:function(){for(var e=0;e<this.levels.length;e++)this.levels[e].context2D.canvas.height=0,this.levels[e].context2D.canvas.width=0}})}(t),function(e){e.TileSourceCollection=function(t,n,r,i){e.console.error("TileSourceCollection is deprecated; use World instead")}}(t),function(e){function t(t){e.requestAnimationFrame((function(){n(t)}))}function n(n){var r;n.shouldFade&&(r=1-(e.now()-n.fadeBeginTime)/n.fadeLength,r=Math.min(1,r),r=Math.max(0,r),n.imgGroup&&e.setElementOpacity(n.imgGroup,r,!0),r>0&&t(n))}function r(n){n.shouldFade=!0,n.fadeBeginTime=e.now()+n.fadeDelay,window.setTimeout((function(){t(n)}),n.fadeDelay)}function i(t){t.shouldFade=!1,t.imgGroup&&e.setElementOpacity(t.imgGroup,1,!0)}function o(t,n){t.element.disabled||(n>=e.ButtonState.GROUP&&t.currentState===e.ButtonState.REST&&(i(t),t.currentState=e.ButtonState.GROUP),n>=e.ButtonState.HOVER&&t.currentState===e.ButtonState.GROUP&&(t.imgHover&&(t.imgHover.style.visibility=""),t.currentState=e.ButtonState.HOVER),n>=e.ButtonState.DOWN&&t.currentState===e.ButtonState.HOVER&&(t.imgDown&&(t.imgDown.style.visibility=""),t.currentState=e.ButtonState.DOWN))}function a(t,n){t.element.disabled||(n<=e.ButtonState.HOVER&&t.currentState===e.ButtonState.DOWN&&(t.imgDown&&(t.imgDown.style.visibility="hidden"),t.currentState=e.ButtonState.HOVER),n<=e.ButtonState.GROUP&&t.currentState===e.ButtonState.HOVER&&(t.imgHover&&(t.imgHover.style.visibility="hidden"),t.currentState=e.ButtonState.GROUP),n<=e.ButtonState.REST&&t.currentState===e.ButtonState.GROUP&&(r(t),t.currentState=e.ButtonState.REST))}e.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},e.Button=function(t){var n=this;e.EventSource.call(this),e.extend(!0,this,{tooltip:null,srcRest:null,srcGroup:null,srcHover:null,srcDown:null,clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,fadeDelay:0,fadeLength:2e3,onPress:null,onRelease:null,onClick:null,onEnter:null,onExit:null,onFocus:null,onBlur:null,userData:null},t),this.element=t.element||e.makeNeutralElement("div"),t.element||(this.imgRest=e.makeTransparentImage(this.srcRest),this.imgGroup=e.makeTransparentImage(this.srcGroup),this.imgHover=e.makeTransparentImage(this.srcHover),this.imgDown=e.makeTransparentImage(this.srcDown),this.imgRest.alt=this.imgGroup.alt=this.imgHover.alt=this.imgDown.alt=this.tooltip,e.setElementPointerEventsNone(this.imgRest),e.setElementPointerEventsNone(this.imgGroup),e.setElementPointerEventsNone(this.imgHover),e.setElementPointerEventsNone(this.imgDown),this.element.style.position="relative",e.setElementTouchActionNone(this.element),this.imgGroup.style.position=this.imgHover.style.position=this.imgDown.style.position="absolute",this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top="0px",this.imgGroup.style.left=this.imgHover.style.left=this.imgDown.style.left="0px",this.imgHover.style.visibility=this.imgDown.style.visibility="hidden",e.Browser.vendor===e.BROWSERS.FIREFOX&&e.Browser.version<3&&(this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top=""),this.element.appendChild(this.imgRest),this.element.appendChild(this.imgGroup),this.element.appendChild(this.imgHover),this.element.appendChild(this.imgDown)),this.addHandler("press",this.onPress),this.addHandler("release",this.onRelease),this.addHandler("click",this.onClick),this.addHandler("enter",this.onEnter),this.addHandler("exit",this.onExit),this.addHandler("focus",this.onFocus),this.addHandler("blur",this.onBlur),this.currentState=e.ButtonState.GROUP,this.fadeBeginTime=null,this.shouldFade=!1,this.element.style.display="inline-block",this.element.style.position="relative",this.element.title=this.tooltip,this.tracker=new e.MouseTracker({userData:"Button.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(t){t.insideElementPressed?(o(n,e.ButtonState.DOWN),n.raiseEvent("enter",{originalEvent:t.originalEvent})):t.buttonDownAny||o(n,e.ButtonState.HOVER)},focusHandler:function(e){n.tracker.enterHandler(e),n.raiseEvent("focus",{originalEvent:e.originalEvent})},leaveHandler:function(t){a(n,e.ButtonState.GROUP),t.insideElementPressed&&n.raiseEvent("exit",{originalEvent:t.originalEvent})},blurHandler:function(e){n.tracker.leaveHandler(e),n.raiseEvent("blur",{originalEvent:e.originalEvent})},pressHandler:function(t){o(n,e.ButtonState.DOWN),n.raiseEvent("press",{originalEvent:t.originalEvent})},releaseHandler:function(t){t.insideElementPressed&&t.insideElementReleased?(a(n,e.ButtonState.HOVER),n.raiseEvent("release",{originalEvent:t.originalEvent})):t.insideElementPressed?a(n,e.ButtonState.GROUP):o(n,e.ButtonState.HOVER)},clickHandler:function(e){e.quick&&n.raiseEvent("click",{originalEvent:e.originalEvent})},keyHandler:function(e){13===e.keyCode?(n.raiseEvent("click",{originalEvent:e.originalEvent}),n.raiseEvent("release",{originalEvent:e.originalEvent}),e.preventDefault=!0):e.preventDefault=!1}}),a(this,e.ButtonState.REST)},e.extend(e.Button.prototype,e.EventSource.prototype,{notifyGroupEnter:function(){o(this,e.ButtonState.GROUP)},notifyGroupExit:function(){a(this,e.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,e.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,e.setElementOpacity(this.element,1,!0),this.notifyGroupEnter()},destroy:function(){this.imgRest&&(this.element.removeChild(this.imgRest),this.imgRest=null),this.imgGroup&&(this.element.removeChild(this.imgGroup),this.imgGroup=null),this.imgHover&&(this.element.removeChild(this.imgHover),this.imgHover=null),this.imgDown&&(this.element.removeChild(this.imgDown),this.imgDown=null),this.removeAllHandlers(),this.tracker.destroy(),this.element=null}})}(t),function(e){e.ButtonGroup=function(t){e.extend(!0,this,{buttons:[],clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},t);var n,r=this.buttons.concat([]),i=this;if(this.element=t.element||e.makeNeutralElement("div"),!t.group)for(this.element.style.display="inline-block",n=0;n<r.length;n++)this.element.appendChild(r[n].element);e.setElementTouchActionNone(this.element),this.tracker=new e.MouseTracker({userData:"ButtonGroup.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(e){var t;for(t=0;t<i.buttons.length;t++)i.buttons[t].notifyGroupEnter()},leaveHandler:function(e){var t;if(!e.insideElementPressed)for(t=0;t<i.buttons.length;t++)i.buttons[t].notifyGroupExit()}})},e.ButtonGroup.prototype={emulateEnter:function(){this.tracker.enterHandler({eventSource:this.tracker})},emulateLeave:function(){this.tracker.leaveHandler({eventSource:this.tracker})},destroy:function(){for(;this.buttons.length;){var e=this.buttons.pop();this.element.removeChild(e.element),e.destroy()}this.tracker.destroy(),this.element=null}}}(t),function(e){e.Rect=function(t,n,r,i,o){var a,s;this.x="number"==typeof t?t:0,this.y="number"==typeof n?n:0,this.width="number"==typeof r?r:0,this.height="number"==typeof i?i:0,this.degrees="number"==typeof o?o:0,this.degrees=e.positiveModulo(this.degrees,360),this.degrees>=270?(a=this.getTopRight(),this.x=a.x,this.y=a.y,s=this.height,this.height=this.width,this.width=s,this.degrees-=270):this.degrees>=180?(a=this.getBottomRight(),this.x=a.x,this.y=a.y,this.degrees-=180):this.degrees>=90&&(a=this.getBottomLeft(),this.x=a.x,this.y=a.y,s=this.height,this.height=this.width,this.width=s,this.degrees-=90)},e.Rect.fromSummits=function(t,n,r){var i=t.distanceTo(n),o=t.distanceTo(r),a=n.minus(t),s=Math.atan(a.y/a.x);return a.x<0?s+=Math.PI:a.y<0&&(s+=2*Math.PI),new e.Rect(t.x,t.y,i,o,s/Math.PI*180)},e.Rect.prototype={clone:function(){return new e.Rect(this.x,this.y,this.width,this.height,this.degrees)},getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new e.Point(this.x,this.y)},getBottomRight:function(){return new e.Point(this.x+this.width,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getTopRight:function(){return new e.Point(this.x+this.width,this.y).rotate(this.degrees,this.getTopLeft())},getBottomLeft:function(){return new e.Point(this.x,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getCenter:function(){return new e.Point(this.x+this.width/2,this.y+this.height/2).rotate(this.degrees,this.getTopLeft())},getSize:function(){return new e.Point(this.width,this.height)},equals:function(t){return t instanceof e.Rect&&this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height&&this.degrees===t.degrees},times:function(t){return new e.Rect(this.x*t,this.y*t,this.width*t,this.height*t,this.degrees)},translate:function(t){return new e.Rect(this.x+t.x,this.y+t.y,this.width,this.height,this.degrees)},union:function(t){var n=this.getBoundingBox(),r=t.getBoundingBox(),i=Math.min(n.x,r.x),o=Math.min(n.y,r.y),a=Math.max(n.x+n.width,r.x+r.width),s=Math.max(n.y+n.height,r.y+r.height);return new e.Rect(i,o,a-i,s-o)},intersection:function(t){var n=1e-10,r=[],i=this.getTopLeft();t.containsPoint(i,n)&&r.push(i);var o=this.getTopRight();t.containsPoint(o,n)&&r.push(o);var a=this.getBottomLeft();t.containsPoint(a,n)&&r.push(a);var s=this.getBottomRight();t.containsPoint(s,n)&&r.push(s);var l=t.getTopLeft();this.containsPoint(l,n)&&r.push(l);var c=t.getTopRight();this.containsPoint(c,n)&&r.push(c);var u=t.getBottomLeft();this.containsPoint(u,n)&&r.push(u);var d=t.getBottomRight();this.containsPoint(d,n)&&r.push(d);for(var p=this._getSegments(),h=t._getSegments(),f=0;f<p.length;f++)for(var m=p[f],g=0;g<h.length;g++){var v=h[g],y=b(m[0],m[1],v[0],v[1]);y&&r.push(y)}function b(t,r,i,o){var a=r.minus(t),s=o.minus(i),l=-s.x*a.y+a.x*s.y;if(0===l)return null;var c=(a.x*(t.y-i.y)-a.y*(t.x-i.x))/l,u=(s.x*(t.y-i.y)-s.y*(t.x-i.x))/l;return-n<=c&&c<=1-n&&-n<=u&&u<=1-n?new e.Point(t.x+u*a.x,t.y+u*a.y):null}if(0===r.length)return null;for(var w=r[0].x,x=r[0].x,S=r[0].y,E=r[0].y,T=1;T<r.length;T++){var P=r[T];P.x<w&&(w=P.x),P.x>x&&(x=P.x),P.y<S&&(S=P.y),P.y>E&&(E=P.y)}return new e.Rect(w,S,x-w,E-S)},_getSegments:function(){var e=this.getTopLeft(),t=this.getTopRight(),n=this.getBottomLeft(),r=this.getBottomRight();return[[e,t],[t,r],[r,n],[n,e]]},rotate:function(t,n){if(0===(t=e.positiveModulo(t,360)))return this.clone();n=n||this.getCenter();var r=this.getTopLeft().rotate(t,n),i=this.getTopRight().rotate(t,n).minus(r);i=i.apply((function(e){var t=1e-15;return Math.abs(e)<t?0:e}));var o=Math.atan(i.y/i.x);return i.x<0?o+=Math.PI:i.y<0&&(o+=2*Math.PI),new e.Rect(r.x,r.y,this.width,this.height,o/Math.PI*180)},getBoundingBox:function(){if(0===this.degrees)return this.clone();var t=this.getTopLeft(),n=this.getTopRight(),r=this.getBottomLeft(),i=this.getBottomRight(),o=Math.min(t.x,n.x,r.x,i.x),a=Math.max(t.x,n.x,r.x,i.x),s=Math.min(t.y,n.y,r.y,i.y),l=Math.max(t.y,n.y,r.y,i.y);return new e.Rect(o,s,a-o,l-s)},getIntegerBoundingBox:function(){var t=this.getBoundingBox(),n=Math.floor(t.x),r=Math.floor(t.y),i=Math.ceil(t.width+t.x-n),o=Math.ceil(t.height+t.y-r);return new e.Rect(n,r,i,o)},containsPoint:function(e,t){t=t||0;var n=this.getTopLeft(),r=this.getTopRight(),i=this.getBottomLeft(),o=r.minus(n),a=i.minus(n);return(e.x-n.x)*o.x+(e.y-n.y)*o.y>=-t&&(e.x-r.x)*o.x+(e.y-r.y)*o.y<=t&&(e.x-n.x)*a.x+(e.y-n.y)*a.y>=-t&&(e.x-i.x)*a.x+(e.y-i.y)*a.y<=t},toString:function(){return"["+Math.round(100*this.x)/100+", "+Math.round(100*this.y)/100+", "+Math.round(100*this.width)/100+"x"+Math.round(100*this.height)/100+", "+Math.round(100*this.degrees)/100+"deg]"}}}(t),function(e){var t={};function n(e){var t;e.quick&&(t="horizontal"===this.scroll?Math.floor(e.position.x/this.panelWidth):Math.floor(e.position.y/this.panelHeight),this.viewer.goToPage(t)),this.element.focus()}function r(t){if(this.dragging=!0,this.element){var n=Number(this.element.style.marginLeft.replace("px","")),r=Number(this.element.style.marginTop.replace("px","")),i=Number(this.element.style.width.replace("px","")),a=Number(this.element.style.height.replace("px","")),s=e.getElementSize(this.viewer.canvas);"horizontal"===this.scroll?-t.delta.x>0?n>-(i-s.x)&&(this.element.style.marginLeft=n+2*t.delta.x+"px",o(this,s.x,n+2*t.delta.x)):-t.delta.x<0&&n<0&&(this.element.style.marginLeft=n+2*t.delta.x+"px",o(this,s.x,n+2*t.delta.x)):-t.delta.y>0?r>-(a-s.y)&&(this.element.style.marginTop=r+2*t.delta.y+"px",o(this,s.y,r+2*t.delta.y)):-t.delta.y<0&&r<0&&(this.element.style.marginTop=r+2*t.delta.y+"px",o(this,s.y,r+2*t.delta.y))}}function i(t){if(this.element){var n=Number(this.element.style.marginLeft.replace("px","")),r=Number(this.element.style.marginTop.replace("px","")),i=Number(this.element.style.width.replace("px","")),a=Number(this.element.style.height.replace("px","")),s=e.getElementSize(this.viewer.canvas);"horizontal"===this.scroll?t.scroll>0?n>-(i-s.x)&&(this.element.style.marginLeft=n-60*t.scroll+"px",o(this,s.x,n-60*t.scroll)):t.scroll<0&&n<0&&(this.element.style.marginLeft=n-60*t.scroll+"px",o(this,s.x,n-60*t.scroll)):t.scroll<0?r>s.y-a&&(this.element.style.marginTop=r+60*t.scroll+"px",o(this,s.y,r+60*t.scroll)):t.scroll>0&&r<0&&(this.element.style.marginTop=r+60*t.scroll+"px",o(this,s.y,r+60*t.scroll)),t.preventDefault=!0}}function o(t,n,r){var i,o,a,s,l,c;for(i="horizontal"===t.scroll?t.panelWidth:t.panelHeight,o=Math.ceil(n/i)+5,l=o=(o=(a=Math.ceil((Math.abs(r)+n)/i)+1)-o)<0?0:o;l<a&&l<t.panels.length;l++)if(!(c=t.panels[l]).activePanel){var u,d=t.viewer.tileSources[l];u=d.referenceStripThumbnailUrl?{type:"image",url:d.referenceStripThumbnailUrl}:d,s=new e.Viewer({id:c.id,tileSources:[u],element:c,navigatorSizeRatio:t.sizeRatio,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,loadTilesWithAjax:t.viewer.loadTilesWithAjax,ajaxHeaders:t.viewer.ajaxHeaders,useCanvas:t.useCanvas}),e.setElementPointerEventsNone(s.canvas),e.setElementPointerEventsNone(s.container),s.innerTracker.setTracking(!1),s.outerTracker.setTracking(!1),t.miniViewers[c.id]=s,c.activePanel=!0}}function a(e){var t=e.eventSource.element;"horizontal"===this.scroll?t.style.marginBottom="0px":t.style.marginLeft="0px"}function s(t){var n=t.eventSource.element;"horizontal"===this.scroll?n.style.marginBottom="-"+e.getElementSize(n).y/2+"px":n.style.marginLeft="-"+e.getElementSize(n).x/2+"px"}function l(e){if(e.ctrl||e.alt||e.meta)e.preventDefault=!1;else switch(e.keyCode){case 38:case 39:i.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),e.preventDefault=!0;break;case 40:case 37:i.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),e.preventDefault=!0;break;default:e.preventDefault=!1}}function c(e){if(e.ctrl||e.alt||e.meta)e.preventDefault=!1;else switch(e.keyCode){case 61:case 48:case 119:case 87:case 100:i.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),e.preventDefault=!0;break;case 45:case 115:case 83:case 97:i.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),e.preventDefault=!0;break;default:e.preventDefault=!1}}e.ReferenceStrip=function(u){var d,p,h,f=this,m=u.viewer,g=e.getElementSize(m.element);for(u.id||(u.id="referencestrip-"+e.now(),this.element=e.makeNeutralElement("div"),this.element.id=u.id,this.element.className="referencestrip"),u=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.referenceStripSizeRatio,position:e.DEFAULT_SETTINGS.referenceStripPosition,scroll:e.DEFAULT_SETTINGS.referenceStripScroll,clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold},u,{element:this.element}),e.extend(this,u),t[this.id]={animating:!1},this.minPixelRatio=this.viewer.minPixelRatio,this.element.tabIndex=0,(p=this.element.style).marginTop="0px",p.marginRight="0px",p.marginBottom="0px",p.marginLeft="0px",p.left="0px",p.bottom="0px",p.border="0px",p.background="#000",p.position="relative",e.setElementTouchActionNone(this.element),e.setElementOpacity(this.element,.8),this.viewer=m,this.tracker=new e.MouseTracker({userData:"ReferenceStrip.tracker",element:this.element,clickHandler:e.delegate(this,n),dragHandler:e.delegate(this,r),scrollHandler:e.delegate(this,i),enterHandler:e.delegate(this,a),leaveHandler:e.delegate(this,s),keyDownHandler:e.delegate(this,l),keyHandler:e.delegate(this,c),preProcessEventHandler:function(e){"wheel"===e.eventType&&(e.preventDefault=!0)}}),u.width&&u.height?(this.element.style.width=u.width+"px",this.element.style.height=u.height+"px",m.addControl(this.element,{anchor:e.ControlAnchor.BOTTOM_LEFT})):"horizontal"===u.scroll?(this.element.style.width=g.x*u.sizeRatio*m.tileSources.length+12*m.tileSources.length+"px",this.element.style.height=g.y*u.sizeRatio+"px",m.addControl(this.element,{anchor:e.ControlAnchor.BOTTOM_LEFT})):(this.element.style.height=g.y*u.sizeRatio*m.tileSources.length+12*m.tileSources.length+"px",this.element.style.width=g.x*u.sizeRatio+"px",m.addControl(this.element,{anchor:e.ControlAnchor.TOP_LEFT})),this.panelWidth=g.x*this.sizeRatio+8,this.panelHeight=g.y*this.sizeRatio+8,this.panels=[],this.miniViewers={},h=0;h<m.tileSources.length;h++)(d=e.makeNeutralElement("div")).id=this.element.id+"-"+h,d.style.width=f.panelWidth+"px",d.style.height=f.panelHeight+"px",d.style.display="inline",d.style.float="left",d.style.cssFloat="left",d.style.styleFloat="left",d.style.padding="2px",e.setElementTouchActionNone(d),e.setElementPointerEventsNone(d),this.element.appendChild(d),d.activePanel=!1,this.panels.push(d);o(this,"vertical"===this.scroll?g.y:g.x,0),this.setFocus(0)},e.ReferenceStrip.prototype={setFocus:function(t){var n,r=this.element.querySelector("#"+this.element.id+"-"+t),i=e.getElementSize(this.viewer.canvas),s=Number(this.element.style.width.replace("px","")),l=Number(this.element.style.height.replace("px","")),c=-Number(this.element.style.marginLeft.replace("px","")),u=-Number(this.element.style.marginTop.replace("px",""));this.currentSelected!==r&&(this.currentSelected&&(this.currentSelected.style.background="#000"),this.currentSelected=r,this.currentSelected.style.background="#999","horizontal"===this.scroll?(n=Number(t)*(this.panelWidth+3))>c+i.x-this.panelWidth?(n=Math.min(n,s-i.x),this.element.style.marginLeft=-n+"px",o(this,i.x,-n)):n<c&&(n=Math.max(0,n-i.x/2),this.element.style.marginLeft=-n+"px",o(this,i.x,-n)):(n=Number(t)*(this.panelHeight+3))>u+i.y-this.panelHeight?(n=Math.min(n,l-i.y),this.element.style.marginTop=-n+"px",o(this,i.y,-n)):n<u&&(n=Math.max(0,n-i.y/2),this.element.style.marginTop=-n+"px",o(this,i.y,-n)),this.currentPage=t,a.call(this,{eventSource:this.tracker}))},update:function(){return!!t[this.id].animating&&(e.console.log("image reference strip update"),!0)},destroy:function(){if(this.miniViewers)for(var e in this.miniViewers)this.miniViewers[e].destroy();this.tracker.destroy(),this.element&&this.viewer.removeControl(this.element)}}}(t),function(e){e.DisplayRect=function(t,n,r,i,o,a){e.Rect.apply(this,[t,n,r,i]),this.minLevel=o,this.maxLevel=a},e.extend(e.DisplayRect.prototype,e.Rect.prototype)}(t),function(e){function t(e,t){return(1-Math.exp(e*-t))/(1-Math.exp(-e))}e.Spring=function(t){var n=arguments;"object"!=typeof t&&(t={initial:n.length&&"number"==typeof n[0]?n[0]:void 0,springStiffness:n.length>1?n[1].springStiffness:5,animationTime:n.length>1?n[1].animationTime:1.5}),e.console.assert("number"==typeof t.springStiffness&&0!==t.springStiffness,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),e.console.assert("number"==typeof t.animationTime&&t.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),t.exponential&&(this._exponential=!0,delete t.exponential),e.extend(!0,this,t),this.current={value:"number"==typeof this.initial?this.initial:this._exponential?0:1,time:e.now()},e.console.assert(!this._exponential||0!==this.current.value,"[OpenSeadragon.Spring] value must be non-zero for exponential springs"),this.start={value:this.current.value,time:this.current.time},this.target={value:this.current.value,time:this.current.time},this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},e.Spring.prototype={resetTo:function(t){e.console.assert(!this._exponential||0!==t,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=t,this.start.time=this.target.time=this.current.time=e.now(),this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},springTo:function(t){e.console.assert(!this._exponential||0!==t,"[OpenSeadragon.Spring.springTo] target must be non-zero for exponential springs"),this.start.value=this.current.value,this.start.time=this.current.time,this.target.value=t,this.target.time=this.start.time+1e3*this.animationTime,this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},shiftBy:function(t){this.start.value+=t,this.target.value+=t,this._exponential&&(e.console.assert(0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.shiftBy] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},setExponential:function(t){this._exponential=t,this._exponential&&(e.console.assert(0!==this.current.value&&0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.setExponential] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},update:function(){var n,r;this.current.time=e.now(),this._exponential?(n=this.start._logValue,r=this.target._logValue):(n=this.start.value,r=this.target.value);var i=this.current.time>=this.target.time?r:n+(r-n)*t(this.springStiffness,(this.current.time-this.start.time)/(this.target.time-this.start.time)),o=this.current.value;return this._exponential?this.current.value=Math.exp(i):this.current.value=i,o!==this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}}}(t),function(e){function t(t){e.extend(!0,this,{timeout:e.DEFAULT_SETTINGS.timeout,jobId:null},t),this.image=null}function n(e,t,n){e.jobsInProgress--,(!e.jobLimit||e.jobsInProgress<e.jobLimit)&&e.jobQueue.length>0&&(e.jobQueue.shift().start(),e.jobsInProgress++),n(t.image,t.errorMsg,t.request)}t.prototype={errorMsg:null,start:function(){var t=this,n=this.abort;this.image=new Image,this.image.onload=function(){t.finish(!0)},this.image.onabort=this.image.onerror=function(){t.errorMsg="Image load aborted",t.finish(!1)},this.jobId=window.setTimeout((function(){t.errorMsg="Image load exceeded timeout ("+t.timeout+" ms)",t.finish(!1)}),this.timeout),this.loadWithAjax?(this.request=e.makeAjaxRequest({url:this.src,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,responseType:"arraybuffer",success:function(e){var n;try{n=new window.Blob([e.response])}catch(t){var r=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if("TypeError"===t.name&&r){var i=new r;i.append(e.response),n=i.getBlob()}}0===n.size&&(t.errorMsg="Empty image response.",t.finish(!1));var o=(window.URL||window.webkitURL).createObjectURL(n);t.image.src=o},error:function(e){t.errorMsg="Image load aborted - XHR error",t.finish(!1)}}),this.abort=function(){t.request.abort(),"function"==typeof n&&n()}):(!1!==this.crossOriginPolicy&&(this.image.crossOrigin=this.crossOriginPolicy),this.image.src=this.src)},finish:function(e){this.image.onload=this.image.onerror=this.image.onabort=null,e||(this.image=null),this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},e.ImageLoader=function(t){e.extend(!0,this,{jobLimit:e.DEFAULT_SETTINGS.imageLoaderLimit,timeout:e.DEFAULT_SETTINGS.timeout,jobQueue:[],jobsInProgress:0},t)},e.ImageLoader.prototype={addJob:function(e){var r=this,i=function(t){n(r,t,e.callback)},o=new t({src:e.src,loadWithAjax:e.loadWithAjax,ajaxHeaders:e.loadWithAjax?e.ajaxHeaders:null,crossOriginPolicy:e.crossOriginPolicy,ajaxWithCredentials:e.ajaxWithCredentials,callback:i,abort:e.abort,timeout:this.timeout});!this.jobLimit||this.jobsInProgress<this.jobLimit?(o.start(),this.jobsInProgress++):this.jobQueue.push(o)},clear:function(){for(var e=0;e<this.jobQueue.length;e++){var t=this.jobQueue[e];"function"==typeof t.abort&&t.abort()}this.jobQueue=[]}}}(t),function(e){e.Tile=function(e,t,n,r,i,o,a,s,l,c){this.level=e,this.x=t,this.y=n,this.bounds=r,this.sourceBounds=c,this.exists=i,this.url=o,this.context2D=a,this.loadWithAjax=s,this.ajaxHeaders=l,this.ajaxHeaders?this.cacheKey=this.url+"+"+JSON.stringify(this.ajaxHeaders):this.cacheKey=this.url,this.loaded=!1,this.loading=!1,this.element=null,this.imgElement=null,this.image=null,this.style=null,this.position=null,this.size=null,this.flipped=!1,this.blendStart=null,this.opacity=null,this.squaredDistance=null,this.visibility=null,this.beingDrawn=!1,this.lastTouchTime=0,this.isRightMost=!1,this.isBottomMost=!1},e.Tile.prototype={toString:function(){return this.level+"/"+this.x+"_"+this.y},_hasTransparencyChannel:function(){return!!this.context2D||this.url.match(".png")},drawHTML:function(t){this.cacheImageRecord?this.loaded?(this.element||(this.element=e.makeNeutralElement("div"),this.imgElement=this.cacheImageRecord.getImage().cloneNode(),this.imgElement.style.msInterpolationMode="nearest-neighbor",this.imgElement.style.width="100%",this.imgElement.style.height="100%",this.style=this.element.style,this.style.position="absolute"),this.element.parentNode!==t&&t.appendChild(this.element),this.imgElement.parentNode!==this.element&&this.element.appendChild(this.imgElement),this.style.top=this.position.y+"px",this.style.left=this.position.x+"px",this.style.height=this.size.y+"px",this.style.width=this.size.x+"px",this.flipped&&(this.style.transform="scaleX(-1)"),e.setElementOpacity(this.element,this.opacity)):e.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString()):e.console.warn("[Tile.drawHTML] attempting to draw tile %s when it's not cached",this.toString())},drawCanvas:function(t,n,r,i){var o,a,s,l=this.position.times(e.pixelDensityRatio),c=this.size.times(e.pixelDensityRatio);this.context2D||this.cacheImageRecord?(o=this.context2D||this.cacheImageRecord.getRenderedContext(),this.loaded&&o?(t.save(),t.globalAlpha=this.opacity,"number"==typeof r&&1!==r&&(l=l.times(r),c=c.times(r)),i instanceof e.Point&&(l=l.plus(i)),1===t.globalAlpha&&this._hasTransparencyChannel()&&t.clearRect(l.x,l.y,c.x,c.y),n({context:t,tile:this,rendered:o}),this.sourceBounds?(a=Math.min(this.sourceBounds.width,o.canvas.width),s=Math.min(this.sourceBounds.height,o.canvas.height)):(a=o.canvas.width,s=o.canvas.height),t.translate(l.x+c.x/2,0),this.flipped&&t.scale(-1,1),t.drawImage(o.canvas,0,0,a,s,-c.x/2,l.y,c.x,c.y),t.restore()):e.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString())):e.console.warn("[Tile.drawCanvas] attempting to draw tile %s when it's not cached",this.toString())},getScaleForEdgeSmoothing:function(){var t;if(this.cacheImageRecord)t=this.cacheImageRecord.getRenderedContext();else{if(!this.context2D)return e.console.warn("[Tile.drawCanvas] attempting to get tile scale %s when tile's not cached",this.toString()),1;t=this.context2D}return t.canvas.width/(this.size.x*e.pixelDensityRatio)},getTranslationForEdgeSmoothing:function(t,n,r){var i=Math.max(1,Math.ceil((r.x-n.x)/2)),o=Math.max(1,Math.ceil((r.y-n.y)/2));return new e.Point(i,o).minus(this.position.times(e.pixelDensityRatio).times(t||1).apply((function(e){return e%1})))},unload:function(){this.imgElement&&this.imgElement.parentNode&&this.imgElement.parentNode.removeChild(this.imgElement),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.imgElement=null,this.loaded=!1,this.loading=!1}}}(t),function(e){e.OverlayPlacement=e.Placement,e.OverlayRotationMode=e.freezeObject({NO_ROTATION:1,EXACT:2,BOUNDING_BOX:3}),e.Overlay=function(t,n,r){var i;i=e.isPlainObject(t)?t:{element:t,location:n,placement:r},this.element=i.element,this.style=i.element.style,this._init(i)},e.Overlay.prototype={_init:function(t){this.location=t.location,this.placement=void 0===t.placement?e.Placement.TOP_LEFT:t.placement,this.onDraw=t.onDraw,this.checkResize=void 0===t.checkResize||t.checkResize,this.width=void 0===t.width?null:t.width,this.height=void 0===t.height?null:t.height,this.rotationMode=t.rotationMode||e.OverlayRotationMode.EXACT,this.location instanceof e.Rect&&(this.width=this.location.width,this.height=this.location.height,this.location=this.location.getTopLeft(),this.placement=e.Placement.TOP_LEFT),this.scales=null!==this.width&&null!==this.height,this.bounds=new e.Rect(this.location.x,this.location.y,this.width,this.height),this.position=this.location},adjust:function(t,n){var r=e.Placement.properties[this.placement];!r||(r.isHorizontallyCentered?t.x-=n.x/2:r.isRight&&(t.x-=n.x),r.isVerticallyCentered?t.y-=n.y/2:r.isBottom&&(t.y-=n.y))},destroy:function(){var t=this.element,n=this.style;t.parentNode&&(t.parentNode.removeChild(t),t.prevElementParent&&(n.display="none",document.body.appendChild(t))),this.onDraw=null,n.top="",n.left="",n.position="",null!==this.width&&(n.width=""),null!==this.height&&(n.height="");var r=e.getCssPropertyWithVendorPrefix("transformOrigin"),i=e.getCssPropertyWithVendorPrefix("transform");r&&i&&(n[r]="",n[i]="")},drawHTML:function(t,n){var r=this.element;r.parentNode!==t&&(r.prevElementParent=r.parentNode,r.prevNextSibling=r.nextSibling,t.appendChild(r),this.style.position="absolute",this.size=e.getElementSize(r));var i=this._getOverlayPositionAndSize(n),o=i.position,a=this.size=i.size,s=i.rotate;if(this.onDraw)this.onDraw(o,a,this.element);else{var l=this.style;l.left=o.x+"px",l.top=o.y+"px",null!==this.width&&(l.width=a.x+"px"),null!==this.height&&(l.height=a.y+"px");var c=e.getCssPropertyWithVendorPrefix("transformOrigin"),u=e.getCssPropertyWithVendorPrefix("transform");c&&u&&(s?(l[c]=this._getTransformOrigin(),l[u]="rotate("+s+"deg)"):(l[c]="",l[u]="")),l.display="block"}},_getOverlayPositionAndSize:function(t){var n=t.pixelFromPoint(this.location,!0),r=this._getSizeInPixels(t);this.adjust(n,r);var i=0;if(t.degrees&&this.rotationMode!==e.OverlayRotationMode.NO_ROTATION)if(this.rotationMode===e.OverlayRotationMode.BOUNDING_BOX&&null!==this.width&&null!==this.height){var o=new e.Rect(n.x,n.y,r.x,r.y),a=this._getBoundingBox(o,t.degrees);n=a.getTopLeft(),r=a.getSize()}else i=t.degrees;return{position:n,size:r,rotate:i}},_getSizeInPixels:function(t){var n=this.size.x,r=this.size.y;if(null!==this.width||null!==this.height){var i=t.deltaPixelsFromPointsNoRotate(new e.Point(this.width||0,this.height||0),!0);null!==this.width&&(n=i.x),null!==this.height&&(r=i.y)}if(this.checkResize&&(null===this.width||null===this.height)){var o=this.size=e.getElementSize(this.element);null===this.width&&(n=o.x),null===this.height&&(r=o.y)}return new e.Point(n,r)},_getBoundingBox:function(e,t){var n=this._getPlacementPoint(e);return e.rotate(t,n).getBoundingBox()},_getPlacementPoint:function(t){var n=new e.Point(t.x,t.y),r=e.Placement.properties[this.placement];return r&&(r.isHorizontallyCentered?n.x+=t.width/2:r.isRight&&(n.x+=t.width),r.isVerticallyCentered?n.y+=t.height/2:r.isBottom&&(n.y+=t.height)),n},_getTransformOrigin:function(){var t="",n=e.Placement.properties[this.placement];return n&&(n.isLeft?t="left":n.isRight&&(t="right"),n.isTop?t+=" top":n.isBottom&&(t+=" bottom")),t},update:function(t,n){var r=e.isPlainObject(t)?t:{location:t,placement:n};this._init({location:r.location||this.location,placement:void 0!==r.placement?r.placement:this.placement,onDraw:r.onDraw||this.onDraw,checkResize:r.checkResize||this.checkResize,width:void 0!==r.width?r.width:this.width,height:void 0!==r.height?r.height:this.height,rotationMode:r.rotationMode||this.rotationMode})},getBounds:function(t){e.console.assert(t,"A viewport must now be passed to Overlay.getBounds.");var n=this.width,r=this.height;if(null===n||null===r){var i=t.deltaPointsFromPixelsNoRotate(this.size,!0);null===n&&(n=i.x),null===r&&(r=i.y)}var o=this.location.clone();return this.adjust(o,new e.Point(n,r)),this._adjustBoundsForRotation(t,new e.Rect(o.x,o.y,n,r))},_adjustBoundsForRotation:function(t,n){if(!t||0===t.degrees||this.rotationMode===e.OverlayRotationMode.EXACT)return n;if(this.rotationMode===e.OverlayRotationMode.BOUNDING_BOX){if(null===this.width||null===this.height)return n;var r=this._getOverlayPositionAndSize(t);return t.viewerElementToViewportRectangle(new e.Rect(r.position.x,r.position.y,r.size.x,r.size.y))}return n.rotate(-t.degrees,this._getPlacementPoint(n))}}}(t),function(e){e.Drawer=function(t){e.console.assert(t.viewer,"[Drawer] options.viewer is required");var n=arguments;if(e.isPlainObject(t)||(t={source:n[0],viewport:n[1],element:n[2]}),e.console.assert(t.viewport,"[Drawer] options.viewport is required"),e.console.assert(t.element,"[Drawer] options.element is required"),t.source&&e.console.error("[Drawer] options.source is no longer accepted; use TiledImage instead"),this.viewer=t.viewer,this.viewport=t.viewport,this.debugGridColor="string"==typeof t.debugGridColor?[t.debugGridColor]:t.debugGridColor||e.DEFAULT_SETTINGS.debugGridColor,t.opacity&&e.console.error("[Drawer] options.opacity is no longer accepted; set the opacity on the TiledImage instead"),this.useCanvas=e.supportsCanvas&&(!this.viewer||this.viewer.useCanvas),this.container=e.getElement(t.element),this.canvas=e.makeNeutralElement(this.useCanvas?"canvas":"div"),this.context=this.useCanvas?this.canvas.getContext("2d"):null,this.sketchCanvas=null,this.sketchContext=null,this.element=this.container,this.container.dir="ltr",this.useCanvas){var r=this._calculateCanvasSize();this.canvas.width=r.x,this.canvas.height=r.y}this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.position="absolute",e.setElementOpacity(this.canvas,this.opacity,!0),e.setElementPointerEventsNone(this.canvas),e.setElementTouchActionNone(this.canvas),this.container.style.textAlign="left",this.container.appendChild(this.canvas),this._imageSmoothingEnabled=!0},e.Drawer.prototype={addOverlay:function(t,n,r,i){return e.console.error("drawer.addOverlay is deprecated. Use viewer.addOverlay instead."),this.viewer.addOverlay(t,n,r,i),this},updateOverlay:function(t,n,r){return e.console.error("drawer.updateOverlay is deprecated. Use viewer.updateOverlay instead."),this.viewer.updateOverlay(t,n,r),this},removeOverlay:function(t){return e.console.error("drawer.removeOverlay is deprecated. Use viewer.removeOverlay instead."),this.viewer.removeOverlay(t),this},clearOverlays:function(){return e.console.error("drawer.clearOverlays is deprecated. Use viewer.clearOverlays instead."),this.viewer.clearOverlays(),this},viewportCoordToDrawerCoord:function(t){var n=this.viewport.pixelFromPointNoRotate(t,!0);return new e.Point(n.x*e.pixelDensityRatio,n.y*e.pixelDensityRatio)},clipWithPolygons:function(e,t){if(this.useCanvas){var n=this._getContext(t);n.beginPath(),e.forEach((function(e){e.forEach((function(e,t){n[0===t?"moveTo":"lineTo"](e.x,e.y)}))})),n.clip()}},setOpacity:function(t){e.console.error("drawer.setOpacity is deprecated. Use tiledImage.setOpacity instead.");for(var n=this.viewer.world,r=0;r<n.getItemCount();r++)n.getItemAt(r).setOpacity(t);return this},getOpacity:function(){e.console.error("drawer.getOpacity is deprecated. Use tiledImage.getOpacity instead.");for(var t=this.viewer.world,n=0,r=0;r<t.getItemCount();r++){var i=t.getItemAt(r).getOpacity();i>n&&(n=i)}return n},needsUpdate:function(){return e.console.error("[Drawer.needsUpdate] this function is deprecated. Use World.needsDraw instead."),this.viewer.world.needsDraw()},numTilesLoaded:function(){return e.console.error("[Drawer.numTilesLoaded] this function is deprecated. Use TileCache.numTilesLoaded instead."),this.viewer.tileCache.numTilesLoaded()},reset:function(){return e.console.error("[Drawer.reset] this function is deprecated. Use World.resetItems instead."),this.viewer.world.resetItems(),this},update:function(){return e.console.error("[Drawer.update] this function is deprecated. Use Drawer.clear and World.draw instead."),this.clear(),this.viewer.world.draw(),this},canRotate:function(){return this.useCanvas},destroy:function(){this.canvas.width=1,this.canvas.height=1,this.sketchCanvas=null,this.sketchContext=null},clear:function(){if(this.canvas.innerHTML="",this.useCanvas){var e=this._calculateCanvasSize();if((this.canvas.width!==e.x||this.canvas.height!==e.y)&&(this.canvas.width=e.x,this.canvas.height=e.y,this._updateImageSmoothingEnabled(this.context),null!==this.sketchCanvas)){var t=this._calculateSketchCanvasSize();this.sketchCanvas.width=t.x,this.sketchCanvas.height=t.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}},_clear:function(e,t){if(this.useCanvas){var n=this._getContext(e);if(t)n.clearRect(t.x,t.y,t.width,t.height);else{var r=n.canvas;n.clearRect(0,0,r.width,r.height)}}},viewportToDrawerRectangle:function(t){var n=this.viewport.pixelFromPointNoRotate(t.getTopLeft(),!0),r=this.viewport.deltaPixelsFromPointsNoRotate(t.getSize(),!0);return new e.Rect(n.x*e.pixelDensityRatio,n.y*e.pixelDensityRatio,r.x*e.pixelDensityRatio,r.y*e.pixelDensityRatio)},drawTile:function(t,n,r,i,o){if(e.console.assert(t,"[Drawer.drawTile] tile is required"),e.console.assert(n,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var a=this._getContext(r);i=i||1,t.drawCanvas(a,n,i,o)}else t.drawHTML(this.canvas)},_getContext:function(e){var t=this.context;if(e){if(null===this.sketchCanvas){this.sketchCanvas=document.createElement("canvas");var n=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=n.x,this.sketchCanvas.height=n.y,this.sketchContext=this.sketchCanvas.getContext("2d"),0===this.viewport.getRotation()){var r=this;this.viewer.addHandler("rotate",(function e(){if(0!==r.viewport.getRotation()){r.viewer.removeHandler("rotate",e);var t=r._calculateSketchCanvasSize();r.sketchCanvas.width=t.x,r.sketchCanvas.height=t.y}}))}this._updateImageSmoothingEnabled(this.sketchContext)}t=this.sketchContext}return t},saveContext:function(e){!this.useCanvas||this._getContext(e).save()},restoreContext:function(e){!this.useCanvas||this._getContext(e).restore()},setClip:function(e,t){if(this.useCanvas){var n=this._getContext(t);n.beginPath(),n.rect(e.x,e.y,e.width,e.height),n.clip()}},drawRectangle:function(e,t,n){if(this.useCanvas){var r=this._getContext(n);r.save(),r.fillStyle=t,r.fillRect(e.x,e.y,e.width,e.height),r.restore()}},blendSketch:function(t,n,r,i){var o=t;if(e.isPlainObject(o)||(o={opacity:t,scale:n,translate:r,compositeOperation:i}),this.useCanvas&&this.sketchCanvas){t=o.opacity,i=o.compositeOperation;var a=o.bounds;if(this.context.save(),this.context.globalAlpha=t,i&&(this.context.globalCompositeOperation=i),a)a.x<0&&(a.width+=a.x,a.x=0),a.x+a.width>this.canvas.width&&(a.width=this.canvas.width-a.x),a.y<0&&(a.height+=a.y,a.y=0),a.y+a.height>this.canvas.height&&(a.height=this.canvas.height-a.y),this.context.drawImage(this.sketchCanvas,a.x,a.y,a.width,a.height,a.x,a.y,a.width,a.height);else{n=o.scale||1;var s=(r=o.translate)instanceof e.Point?r:new e.Point(0,0),l=0,c=0;if(r){var u=this.sketchCanvas.width-this.canvas.width,d=this.sketchCanvas.height-this.canvas.height;l=Math.round(u/2),c=Math.round(d/2)}this.context.drawImage(this.sketchCanvas,s.x-l*n,s.y-c*n,(this.canvas.width+2*l)*n,(this.canvas.height+2*c)*n,-l,-c,this.canvas.width+2*l,this.canvas.height+2*c)}this.context.restore()}},drawDebugInfo:function(t,n,r,i){if(this.useCanvas){var o=this.viewer.world.getIndexOfItem(i)%this.debugGridColor.length,a=this.context;a.save(),a.lineWidth=2*e.pixelDensityRatio,a.font="small-caps bold "+13*e.pixelDensityRatio+"px arial",a.strokeStyle=this.debugGridColor[o],a.fillStyle=this.debugGridColor[o],0!==this.viewport.degrees&&this._offsetForRotation({degrees:this.viewport.degrees}),i.getRotation(!0)%360!=0&&this._offsetForRotation({degrees:i.getRotation(!0),point:i.viewport.pixelFromPointNoRotate(i._getRotationPoint(!0),!0)}),0===i.viewport.degrees&&i.getRotation(!0)%360==0&&i._drawer.viewer.viewport.getFlip()&&i._drawer._flip(),a.strokeRect(t.position.x*e.pixelDensityRatio,t.position.y*e.pixelDensityRatio,t.size.x*e.pixelDensityRatio,t.size.y*e.pixelDensityRatio);var s=(t.position.x+t.size.x/2)*e.pixelDensityRatio,l=(t.position.y+t.size.y/2)*e.pixelDensityRatio;a.translate(s,l),a.rotate(Math.PI/180*-this.viewport.degrees),a.translate(-s,-l),0===t.x&&0===t.y&&(a.fillText("Zoom: "+this.viewport.getZoom(),t.position.x*e.pixelDensityRatio,(t.position.y-30)*e.pixelDensityRatio),a.fillText("Pan: "+this.viewport.getBounds().toString(),t.position.x*e.pixelDensityRatio,(t.position.y-20)*e.pixelDensityRatio)),a.fillText("Level: "+t.level,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+20)*e.pixelDensityRatio),a.fillText("Column: "+t.x,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+30)*e.pixelDensityRatio),a.fillText("Row: "+t.y,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+40)*e.pixelDensityRatio),a.fillText("Order: "+r+" of "+n,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+50)*e.pixelDensityRatio),a.fillText("Size: "+t.size.toString(),(t.position.x+10)*e.pixelDensityRatio,(t.position.y+60)*e.pixelDensityRatio),a.fillText("Position: "+t.position.toString(),(t.position.x+10)*e.pixelDensityRatio,(t.position.y+70)*e.pixelDensityRatio),0!==this.viewport.degrees&&this._restoreRotationChanges(),i.getRotation(!0)%360!=0&&this._restoreRotationChanges(),0===i.viewport.degrees&&i.getRotation(!0)%360==0&&i._drawer.viewer.viewport.getFlip()&&i._drawer._flip(),a.restore()}},debugRect:function(t){if(this.useCanvas){var n=this.context;n.save(),n.lineWidth=2*e.pixelDensityRatio,n.strokeStyle=this.debugGridColor[0],n.fillStyle=this.debugGridColor[0],n.strokeRect(t.x*e.pixelDensityRatio,t.y*e.pixelDensityRatio,t.width*e.pixelDensityRatio,t.height*e.pixelDensityRatio),n.restore()}},setImageSmoothingEnabled:function(e){this.useCanvas&&(this._imageSmoothingEnabled=e,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw())},_updateImageSmoothingEnabled:function(e){e.msImageSmoothingEnabled=this._imageSmoothingEnabled,e.imageSmoothingEnabled=this._imageSmoothingEnabled},getCanvasSize:function(t){var n=this._getContext(t).canvas;return new e.Point(n.width,n.height)},getCanvasCenter:function(){return new e.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(t){var n=t.point?t.point.times(e.pixelDensityRatio):this.getCanvasCenter(),r=this._getContext(t.useSketch);r.save(),r.translate(n.x,n.y),this.viewer.viewport.flipped?(r.rotate(Math.PI/180*-t.degrees),r.scale(-1,1)):r.rotate(Math.PI/180*t.degrees),r.translate(-n.x,-n.y)},_flip:function(t){var n=(t=t||{}).point?t.point.times(e.pixelDensityRatio):this.getCanvasCenter(),r=this._getContext(t.useSketch);r.translate(n.x,0),r.scale(-1,1),r.translate(-n.x,0)},_restoreRotationChanges:function(e){this._getContext(e).restore()},_calculateCanvasSize:function(){var t=e.pixelDensityRatio,n=this.viewport.getContainerSize();return{x:Math.round(n.x*t),y:Math.round(n.y*t)}},_calculateSketchCanvasSize:function(){var e=this._calculateCanvasSize();if(0===this.viewport.getRotation())return e;var t=Math.ceil(Math.sqrt(e.x*e.x+e.y*e.y));return{x:t,y:t}}}}(t),function(e){e.Viewport=function(t){var n=arguments;n.length&&n[0]instanceof e.Point&&(t={containerSize:n[0],contentSize:n[1],config:n[2]}),t.config&&(e.extend(!0,t,t.config),delete t.config),this._margins=e.extend({left:0,top:0,right:0,bottom:0},t.margins||{}),delete t.margins,e.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,viewer:null,springStiffness:e.DEFAULT_SETTINGS.springStiffness,animationTime:e.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:e.DEFAULT_SETTINGS.minZoomImageRatio,maxZoomPixelRatio:e.DEFAULT_SETTINGS.maxZoomPixelRatio,visibilityRatio:e.DEFAULT_SETTINGS.visibilityRatio,wrapHorizontal:e.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:e.DEFAULT_SETTINGS.wrapVertical,defaultZoomLevel:e.DEFAULT_SETTINGS.defaultZoomLevel,minZoomLevel:e.DEFAULT_SETTINGS.minZoomLevel,maxZoomLevel:e.DEFAULT_SETTINGS.maxZoomLevel,degrees:e.DEFAULT_SETTINGS.degrees,flipped:e.DEFAULT_SETTINGS.flipped,homeFillsViewer:e.DEFAULT_SETTINGS.homeFillsViewer},t),this._updateContainerInnerSize(),this.centerSpringX=new e.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.centerSpringY=new e.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.zoomSpring=new e.Spring({exponential:!0,initial:1,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._setContentBounds(new e.Rect(0,0,1,1),1),this.goHome(!0),this.update()},e.Viewport.prototype={resetContentSize:function(t){return e.console.assert(t,"[Viewport.resetContentSize] contentSize is required"),e.console.assert(t instanceof e.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),e.console.assert(t.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),e.console.assert(t.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new e.Rect(0,0,1,t.y/t.x),t.x),this},setHomeBounds:function(t,n){e.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(t,n)},_setContentBounds:function(t,n){e.console.assert(t,"[Viewport._setContentBounds] bounds is required"),e.console.assert(t instanceof e.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),e.console.assert(t.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),e.console.assert(t.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=t.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(n),this._contentBounds=t.rotate(this.degrees).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(n),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:n,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var e=this._contentAspectRatio/this.getAspectRatio();return(this.homeFillsViewer?e>=1?e:1:e>=1?1:e)/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var t=this._contentBounds.getCenter(),n=1/this.getHomeZoom(),r=n/this.getAspectRatio();return new e.Rect(t.x-n/2,t.y-r/2,n,r)},goHome:function(e){return this.viewer&&this.viewer.raiseEvent("home",{immediately:e}),this.fitBounds(this.getHomeBounds(),e)},getMinZoom:function(){var e=this.getHomeZoom();return this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*e},getMaxZoom:function(){var e=this.maxZoomLevel;return e||(e=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,e/=this._contentBounds.width),Math.max(e,this.getHomeZoom())},getAspectRatio:function(){return this._containerInnerSize.x/this._containerInnerSize.y},getContainerSize:function(){return new e.Point(this.containerSize.x,this.containerSize.y)},getMargins:function(){return e.extend({},this._margins)},setMargins:function(t){e.console.assert("object"===e.type(t),"[Viewport.setMargins] margins must be an object"),this._margins=e.extend({left:0,top:0,right:0,bottom:0},t),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(e){return this.getBoundsNoRotate(e).rotate(-this.getRotation())},getBoundsNoRotate:function(t){var n=this.getCenter(t),r=1/this.getZoom(t),i=r/this.getAspectRatio();return new e.Rect(n.x-r/2,n.y-i/2,r,i)},getBoundsWithMargins:function(e){return this.getBoundsNoRotateWithMargins(e).rotate(-this.getRotation(),this.getCenter(e))},getBoundsNoRotateWithMargins:function(e){var t=this.getBoundsNoRotate(e),n=this._containerInnerSize.x*this.getZoom(e);return t.x-=this._margins.left/n,t.y-=this._margins.top/n,t.width+=(this._margins.left+this._margins.right)/n,t.height+=(this._margins.top+this._margins.bottom)/n,t},getCenter:function(t){var n,r,i,o,a,s,l=new e.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),c=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return t?l:this.zoomPoint?(n=this.pixelFromPoint(this.zoomPoint,!0),o=(i=1/(r=this.getZoom()))/this.getAspectRatio(),a=new e.Rect(l.x-i/2,l.y-o/2,i,o),s=this._pixelFromPoint(this.zoomPoint,a).minus(n).divide(this._containerInnerSize.x*r),c.plus(s)):c},getZoom:function(e){return e?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(e){return Math.max(Math.min(e,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(t){var n=new e.Rect(t.x,t.y,t.width,t.height);if(!this.wrapHorizontal){var r=this.visibilityRatio*n.width,i=n.x+n.width,o=this._contentBoundsNoRotate.x+this._contentBoundsNoRotate.width,a=this._contentBoundsNoRotate.x-i+r,s=o-n.x-r;r>this._contentBoundsNoRotate.width?n.x+=(a+s)/2:s<0?n.x+=s:a>0&&(n.x+=a)}if(!this.wrapVertical){var l=this.visibilityRatio*n.height,c=n.y+n.height,u=this._contentBoundsNoRotate.y+this._contentBoundsNoRotate.height,d=this._contentBoundsNoRotate.y-c+l,p=u-n.y-l;l>this._contentBoundsNoRotate.height?n.y+=(d+p)/2:p<0?n.y+=p:d>0&&(n.y+=d)}return n},_raiseConstraintsEvent:function(e){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:e})},applyConstraints:function(e){var t=this.getZoom(),n=this._applyZoomConstraints(t);t!==n&&this.zoomTo(n,this.zoomPoint,e);var r=this.getBoundsNoRotate(),i=this._applyBoundaryConstraints(r);return this._raiseConstraintsEvent(e),(r.x!==i.x||r.y!==i.y||e)&&this.fitBounds(i.rotate(-this.getRotation()),e),this},ensureVisible:function(e){return this.applyConstraints(e)},_fitBounds:function(t,n){var r=(n=n||{}).immediately||!1,i=n.constraints||!1,o=this.getAspectRatio(),a=t.getCenter(),s=new e.Rect(t.x,t.y,t.width,t.height,t.degrees+this.getRotation()).getBoundingBox();s.getAspectRatio()>=o?s.height=s.width/o:s.width=s.height*o,s.x=a.x-s.width/2,s.y=a.y-s.height/2;var l=1/s.width;if(i){var c=s.getAspectRatio(),u=this._applyZoomConstraints(l);l!==u&&(l=u,s.width=1/l,s.x=a.x-s.width/2,s.height=s.width/c,s.y=a.y-s.height/2),a=(s=this._applyBoundaryConstraints(s)).getCenter(),this._raiseConstraintsEvent(r)}if(r)return this.panTo(a,!0),this.zoomTo(l,null,!0);this.panTo(this.getCenter(!0),!0),this.zoomTo(this.getZoom(!0),null,!0);var d=this.getBounds(),p=this.getZoom();if(0===p||Math.abs(l/p-1)<1e-8)return this.zoomTo(l,!0),this.panTo(a,r);var h=(s=s.rotate(-this.getRotation())).getTopLeft().times(l).minus(d.getTopLeft().times(p)).divide(l-p);return this.zoomTo(l,h,r)},fitBounds:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!1})},fitBoundsWithConstraints:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!0})},fitVertically:function(t){var n=new e.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(n,t)},fitHorizontally:function(t){var n=new e.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(n,t)},getConstrainedBounds:function(e){var t;return t=this.getBounds(e),this._applyBoundaryConstraints(t)},panBy:function(t,n){var r=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(r.plus(t),n)},panTo:function(e,t){return t?(this.centerSpringX.resetTo(e.x),this.centerSpringY.resetTo(e.y)):(this.centerSpringX.springTo(e.x),this.centerSpringY.springTo(e.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:e,immediately:t}),this},zoomBy:function(e,t,n){return this.zoomTo(this.zoomSpring.target.value*e,t,n)},zoomTo:function(t,n,r){var i=this;return this.zoomPoint=n instanceof e.Point&&!isNaN(n.x)&&!isNaN(n.y)?n:null,r?this._adjustCenterSpringsForZoomPoint((function(){i.zoomSpring.resetTo(t)})):this.zoomSpring.springTo(t),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:t,refPoint:n,immediately:r}),this},setRotation:function(t){return this.viewer&&this.viewer.drawer.canRotate()?(this.degrees=e.positiveModulo(t,360),this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:t}),this):this},getRotation:function(){return this.degrees},resize:function(e,t){var n,r=this.getBoundsNoRotate(),i=r;return this.containerSize.x=e.x,this.containerSize.y=e.y,this._updateContainerInnerSize(),t&&(n=e.x/this.containerSize.x,i.width=r.width*n,i.height=i.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:e,maintain:t}),this.fitBounds(i,!0)},_updateContainerInnerSize:function(){this._containerInnerSize=new e.Point(Math.max(1,this.containerSize.x-(this._margins.left+this._margins.right)),Math.max(1,this.containerSize.y-(this._margins.top+this._margins.bottom)))},update:function(){var e=this;this._adjustCenterSpringsForZoomPoint((function(){e.zoomSpring.update()})),this.centerSpringX.update(),this.centerSpringY.update();var t=this.centerSpringX.current.value!==this._oldCenterX||this.centerSpringY.current.value!==this._oldCenterY||this.zoomSpring.current.value!==this._oldZoom;return this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,t},_adjustCenterSpringsForZoomPoint:function(e){if(this.zoomPoint){var t=this.pixelFromPoint(this.zoomPoint,!0);e();var n=this.pixelFromPoint(this.zoomPoint,!0).minus(t),r=this.deltaPointsFromPixels(n,!0);this.centerSpringX.shiftBy(r.x),this.centerSpringY.shiftBy(r.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else e()},deltaPixelsFromPointsNoRotate:function(e,t){return e.times(this._containerInnerSize.x*this.getZoom(t))},deltaPixelsFromPoints:function(e,t){return this.deltaPixelsFromPointsNoRotate(e.rotate(this.getRotation()),t)},deltaPointsFromPixelsNoRotate:function(e,t){return e.divide(this._containerInnerSize.x*this.getZoom(t))},deltaPointsFromPixels:function(e,t){return this.deltaPointsFromPixelsNoRotate(e,t).rotate(-this.getRotation())},pixelFromPointNoRotate:function(e,t){return this._pixelFromPointNoRotate(e,this.getBoundsNoRotate(t))},pixelFromPoint:function(e,t){return this._pixelFromPoint(e,this.getBoundsNoRotate(t))},_pixelFromPointNoRotate:function(t,n){return t.minus(n.getTopLeft()).times(this._containerInnerSize.x/n.width).plus(new e.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(e,t){return this._pixelFromPointNoRotate(e.rotate(this.getRotation(),this.getCenter(!0)),t)},pointFromPixelNoRotate:function(t,n){var r=this.getBoundsNoRotate(n);return t.minus(new e.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/r.width).plus(r.getTopLeft())},pointFromPixel:function(e,t){return this.pointFromPixelNoRotate(e,t).rotate(-this.getRotation(),this.getCenter(!0))},_viewportToImageDelta:function(t,n){var r=this._contentBoundsNoRotate.width;return new e.Point(t*this._contentSizeNoRotate.x/r,n*this._contentSizeNoRotate.x/r)},viewportToImageCoordinates:function(t,n){if(t instanceof e.Point)return this.viewportToImageCoordinates(t.x,t.y);if(this.viewer){var r=this.viewer.world.getItemCount();if(r>1)e.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(1===r)return this.viewer.world.getItemAt(0).viewportToImageCoordinates(t,n,!0)}return this._viewportToImageDelta(t-this._contentBoundsNoRotate.x,n-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(t,n){var r=this._contentBoundsNoRotate.width;return new e.Point(t/this._contentSizeNoRotate.x*r,n/this._contentSizeNoRotate.x*r)},imageToViewportCoordinates:function(t,n){if(t instanceof e.Point)return this.imageToViewportCoordinates(t.x,t.y);if(this.viewer){var r=this.viewer.world.getItemCount();if(r>1)e.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(1===r)return this.viewer.world.getItemAt(0).imageToViewportCoordinates(t,n,!0)}var i=this._imageToViewportDelta(t,n);return i.x+=this._contentBoundsNoRotate.x,i.y+=this._contentBoundsNoRotate.y,i},imageToViewportRectangle:function(t,n,r,i){var o=t;if(o instanceof e.Rect||(o=new e.Rect(t,n,r,i)),this.viewer){var a=this.viewer.world.getItemCount();if(a>1)e.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(1===a)return this.viewer.world.getItemAt(0).imageToViewportRectangle(t,n,r,i,!0)}var s=this.imageToViewportCoordinates(o.x,o.y),l=this._imageToViewportDelta(o.width,o.height);return new e.Rect(s.x,s.y,l.x,l.y,o.degrees)},viewportToImageRectangle:function(t,n,r,i){var o=t;if(o instanceof e.Rect||(o=new e.Rect(t,n,r,i)),this.viewer){var a=this.viewer.world.getItemCount();if(a>1)e.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(1===a)return this.viewer.world.getItemAt(0).viewportToImageRectangle(t,n,r,i,!0)}var s=this.viewportToImageCoordinates(o.x,o.y),l=this._viewportToImageDelta(o.width,o.height);return new e.Rect(s.x,s.y,l.x,l.y,o.degrees)},viewerElementToImageCoordinates:function(e){var t=this.pointFromPixel(e,!0);return this.viewportToImageCoordinates(t)},imageToViewerElementCoordinates:function(e){var t=this.imageToViewportCoordinates(e);return this.pixelFromPoint(t,!0)},windowToImageCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var n=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(n)},imageToWindowCoordinates:function(t){return e.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer."),this.imageToViewerElementCoordinates(t).plus(e.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(e){return this.pointFromPixel(e,!0)},viewportToViewerElementCoordinates:function(e){return this.pixelFromPoint(e,!0)},viewerElementToViewportRectangle:function(t){return e.Rect.fromSummits(this.pointFromPixel(t.getTopLeft(),!0),this.pointFromPixel(t.getTopRight(),!0),this.pointFromPixel(t.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(t){return e.Rect.fromSummits(this.pixelFromPoint(t.getTopLeft(),!0),this.pixelFromPoint(t.getTopRight(),!0),this.pixelFromPoint(t.getBottomLeft(),!0))},windowToViewportCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var n=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(n)},viewportToWindowCoordinates:function(t){return e.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer."),this.viewportToViewerElementCoordinates(t).plus(e.getElementPosition(this.viewer.element))},viewportToImageZoom:function(t){if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)e.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(1===n)return this.viewer.world.getItemAt(0).viewportToImageZoom(t)}var r=this._contentSizeNoRotate.x;return t*(this._containerInnerSize.x/r*this._contentBoundsNoRotate.width)},imageToViewportZoom:function(t){if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)e.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(1===n)return this.viewer.world.getItemAt(0).imageToViewportZoom(t)}return t*(this._contentSizeNoRotate.x/this._containerInnerSize.x/this._contentBoundsNoRotate.width)},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(e){return this.flipped===e||(this.flipped=e,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:e})),this}}}(t),function(e){function n(e,t,n,i,o,a,s,l,c){var u=s.getBoundingBox().getTopLeft(),d=s.getBoundingBox().getBottomRight();e.viewer&&e.viewer.raiseEvent("update-level",{tiledImage:e,havedrawn:t,level:i,opacity:o,visibility:a,drawArea:s,topleft:u,bottomright:d,currenttime:l,best:c}),h(e.coverage,i),h(e.loadingCoverage,i);var p=e._getCornerTiles(i,u,d),f=p.topLeft,m=p.bottomRight,g=e.source.getNumTiles(i),v=e.viewport.pixelFromPoint(e.viewport.getCenter());e.getFlip()&&(m.x+=1,e.wrapHorizontal||(m.x=Math.min(m.x,g.x-1)));for(var y=f.x;y<=m.x;y++)for(var b=f.y;b<=m.y;b++){var w;if(e.getFlip()){var x=(g.x+y%g.x)%g.x;w=y+g.x-x-x-1}else w=y;null!==s.intersection(e.getTileBounds(i,w,b))&&(c=r(e,n,t,w,b,i,o,a,v,g,l,c))}return c}function r(e,t,n,r,o,a,u,h,m,g,v,y){var b=i(r,o,a,e,e.source,e.tilesMatrix,v,g,e._worldWidthCurrent,e._worldHeightCurrent),w=n;e.viewer&&e.viewer.raiseEvent("update-tile",{tiledImage:e,tile:b}),p(e.coverage,a,r,o,!1);var x=b.loaded||b.loading||d(e.loadingCoverage,a,r,o);if(p(e.loadingCoverage,a,r,o,x),!b.exists||(t&&!w&&(d(e.coverage,a,r,o)?p(e.coverage,a,r,o,!0):w=!0),!w))return y;if(l(b,e.source.tileOverlap,e.viewport,m,h,e),!b.loaded)if(b.context2D)s(e,b);else{var S=e._tileCache.getImageRecord(b.cacheKey);S&&s(e,b,S.getImage())}return b.loaded?c(e,b,r,o,a,u,v)&&(e._needsDraw=!0):b.loading?e._tilesLoading++:x||(y=f(y,b)),y}function i(t,n,r,i,o,a,s,l,c,u){var d,p,h,f,m,g,v,y,b;return a[r]||(a[r]={}),a[r][t]||(a[r][t]={}),(!a[r][t][n]||!a[r][t][n].flipped!=!i.flipped)&&(d=(l.x+t%l.x)%l.x,p=(l.y+n%l.y)%l.y,h=i.getTileBounds(r,t,n),f=o.getTileBounds(r,d,p,!0),m=o.tileExists(r,d,p),g=o.getTileUrl(r,d,p),i.loadTilesWithAjax?(v=o.getTileAjaxHeaders(r,d,p),e.isPlainObject(i.ajaxHeaders)&&(v=e.extend({},i.ajaxHeaders,v))):v=null,y=o.getContext2D?o.getContext2D(r,d,p):void 0,b=new e.Tile(r,t,n,h,m,g,y,i.loadTilesWithAjax,v,f),i.getFlip()?0===d&&(b.isRightMost=!0):d===l.x-1&&(b.isRightMost=!0),p===l.y-1&&(b.isBottomMost=!0),b.flipped=i.flipped,a[r][t][n]=b),(b=a[r][t][n]).lastTouchTime=s,b}function o(e,t,n){t.loading=!0,e._imageLoader.addJob({src:t.url,loadWithAjax:t.loadWithAjax,ajaxHeaders:t.ajaxHeaders,crossOriginPolicy:e.crossOriginPolicy,ajaxWithCredentials:e.ajaxWithCredentials,callback:function(r,i,o){a(e,t,n,r,i,o)},abort:function(){t.loading=!1}})}function a(t,n,r,i,o,a){if(!i)return e.console.log("Tile %s failed to load: %s - error: %s",n,n.url,o),t.viewer.raiseEvent("tile-load-failed",{tile:n,tiledImage:t,time:r,message:o,tileRequest:a}),n.loading=!1,void(n.exists=!1);if(r<t.lastResetTime)return e.console.log("Ignoring tile %s loaded before reset: %s",n,n.url),void(n.loading=!1);var l=function(){var e=t.source.getClosestLevel();s(t,n,i,e,a)};t._midDraw?window.setTimeout(l,1):l()}function s(e,t,n,r,i){var o=0;function a(){return o++,s}function s(){0==--o&&(t.loading=!1,t.loaded=!0,t.context2D||e._tileCache.cacheTile({image:n,tile:t,cutoff:r,tiledImage:e}),e._needsDraw=!0)}e.viewer.raiseEvent("tile-loaded",{tile:t,tiledImage:e,tileRequest:i,image:n,getCompletionCallback:a}),a()()}function l(t,n,r,i,o,a){var s=t.bounds.getTopLeft();s.x*=a._scaleSpring.current.value,s.y*=a._scaleSpring.current.value,s.x+=a._xSpring.current.value,s.y+=a._ySpring.current.value;var l=t.bounds.getSize();l.x*=a._scaleSpring.current.value,l.y*=a._scaleSpring.current.value;var c=r.pixelFromPointNoRotate(s,!0),u=r.pixelFromPointNoRotate(s,!1),d=r.deltaPixelsFromPointsNoRotate(l,!0),p=r.deltaPixelsFromPointsNoRotate(l,!1),h=u.plus(p.divide(2)),f=i.squaredDistanceTo(h);n||(d=d.plus(new e.Point(1,1))),t.isRightMost&&a.wrapHorizontal&&(d.x+=.75),t.isBottomMost&&a.wrapVertical&&(d.y+=.75),t.position=c,t.size=d,t.squaredDistance=f,t.visibility=o}function c(e,t,n,r,i,o,a){var s,l,c=1e3*e.blendTime;if(t.blendStart||(t.blendStart=a),s=a-t.blendStart,l=c?Math.min(1,s/c):1,e.alwaysBlend&&(l*=o),t.opacity=l,e.lastDrawn.push(t),1===l)p(e.coverage,i,n,r,!0),e._hasOpaqueTile=!0;else if(s<c)return!0;return!1}function u(e,t,n,r){var i,o,a,s;if(!e[t])return!1;if(void 0===n||void 0===r){for(a in i=e[t])if(Object.prototype.hasOwnProperty.call(i,a))for(s in o=i[a])if(Object.prototype.hasOwnProperty.call(o,s)&&!o[s])return!1;return!0}return void 0===e[t][n]||void 0===e[t][n][r]||!0===e[t][n][r]}function d(e,t,n,r){return void 0===n||void 0===r?u(e,t+1):u(e,t+1,2*n,2*r)&&u(e,t+1,2*n,2*r+1)&&u(e,t+1,2*n+1,2*r)&&u(e,t+1,2*n+1,2*r+1)}function p(t,n,r,i,o){t[n]?(t[n][r]||(t[n][r]={}),t[n][r][i]=o):e.console.warn("Setting coverage for a tile before its level's coverage has been reset: %s",n)}function h(e,t){e[t]={}}function f(e,t){return!e||t.visibility>e.visibility||t.visibility===e.visibility&&t.squaredDistance<e.squaredDistance?t:e}function m(t,n){if(0!==t.opacity&&(0!==n.length||t.placeholderFillStyle)){var r,i=n[0];i&&(r=t.opacity<1||t.compositeOperation&&"source-over"!==t.compositeOperation||!t._isBottomItem()&&i._hasTransparencyChannel());var o,a,s,l=t.viewport.getZoom(!0),c=t.viewportToImageZoom(l);n.length>1&&c>t.smoothTileEdgesMinZoom&&!t.iOSDevice&&t.getRotation(!0)%360==0&&e.supportsCanvas&&(r=!0,o=i.getScaleForEdgeSmoothing(),a=i.getTranslationForEdgeSmoothing(o,t._drawer.getCanvasSize(!1),t._drawer.getCanvasSize(!0))),r&&(o||(s=t.viewport.viewportToViewerElementRectangle(t.getClippedBounds(!0)).getIntegerBoundingBox(),t._drawer.viewer.viewport.getFlip()&&(0!==t.viewport.degrees||t.getRotation(!0)%360!=0)&&(s.x=t._drawer.viewer.container.clientWidth-(s.x+s.width)),s=s.times(e.pixelDensityRatio)),t._drawer._clear(!0,s)),o||(0!==t.viewport.degrees&&t._drawer._offsetForRotation({degrees:t.viewport.degrees,useSketch:r}),t.getRotation(!0)%360!=0&&t._drawer._offsetForRotation({degrees:t.getRotation(!0),point:t.viewport.pixelFromPointNoRotate(t._getRotationPoint(!0),!0),useSketch:r}),0===t.viewport.degrees&&t.getRotation(!0)%360==0&&t._drawer.viewer.viewport.getFlip()&&t._drawer._flip());var u=!1;if(t._clip){t._drawer.saveContext(r);var d=t.imageToViewportRectangle(t._clip,!0);d=d.rotate(-t.getRotation(!0),t._getRotationPoint(!0));var p=t._drawer.viewportToDrawerRectangle(d);o&&(p=p.times(o)),a&&(p=p.translate(a)),t._drawer.setClip(p,r),u=!0}if(t._croppingPolygons){t._drawer.saveContext(r);try{var h=t._croppingPolygons.map((function(e){return e.map((function(e){var n=t.imageToViewportCoordinates(e.x,e.y,!0).rotate(-t.getRotation(!0),t._getRotationPoint(!0)),r=t._drawer.viewportCoordToDrawerCoord(n);return o&&(r=r.times(o)),r}))}));t._drawer.clipWithPolygons(h,r)}catch(t){e.console.error(t)}u=!0}if(t.placeholderFillStyle&&!1===t._hasOpaqueTile){var f=t._drawer.viewportToDrawerRectangle(t.getBounds(!0));o&&(f=f.times(o)),a&&(f=f.translate(a));var m=null;m="function"==typeof t.placeholderFillStyle?t.placeholderFillStyle(t,t._drawer.context):t.placeholderFillStyle,t._drawer.drawRectangle(f,m,r)}for(var v=n.length-1;v>=0;v--)i=n[v],t._drawer.drawTile(i,t._drawingHandler,r,o,a),i.beingDrawn=!0,t.viewer&&t.viewer.raiseEvent("tile-drawn",{tiledImage:t,tile:i});u&&t._drawer.restoreContext(r),o||(t.getRotation(!0)%360!=0&&t._drawer._restoreRotationChanges(r),0!==t.viewport.degrees&&t._drawer._restoreRotationChanges(r)),r&&(o&&(0!==t.viewport.degrees&&t._drawer._offsetForRotation({degrees:t.viewport.degrees,useSketch:!1}),t.getRotation(!0)%360!=0&&t._drawer._offsetForRotation({degrees:t.getRotation(!0),point:t.viewport.pixelFromPointNoRotate(t._getRotationPoint(!0),!0),useSketch:!1})),t._drawer.blendSketch({opacity:t.opacity,scale:o,translate:a,compositeOperation:t.compositeOperation,bounds:s}),o&&(t.getRotation(!0)%360!=0&&t._drawer._restoreRotationChanges(!1),0!==t.viewport.degrees&&t._drawer._restoreRotationChanges(!1))),o||0===t.viewport.degrees&&t.getRotation(!0)%360==0&&t._drawer.viewer.viewport.getFlip()&&t._drawer._flip(),g(t,n)}}function g(t,n){if(t.debugMode)for(var r=n.length-1;r>=0;r--){var i=n[r];try{t._drawer.drawDebugInfo(i,n.length,r,t)}catch(t){e.console.error(t)}}}e.TiledImage=function(n){var r=this;e.console.assert(n.tileCache,"[TiledImage] options.tileCache is required"),e.console.assert(n.drawer,"[TiledImage] options.drawer is required"),e.console.assert(n.viewer,"[TiledImage] options.viewer is required"),e.console.assert(n.imageLoader,"[TiledImage] options.imageLoader is required"),e.console.assert(n.source,"[TiledImage] options.source is required"),e.console.assert(!n.clip||n.clip instanceof e.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),e.EventSource.call(this),this._tileCache=n.tileCache,delete n.tileCache,this._drawer=n.drawer,delete n.drawer,this._imageLoader=n.imageLoader,delete n.imageLoader,n.clip instanceof e.Rect&&(this._clip=n.clip.clone()),delete n.clip;var i=n.x||0;delete n.x;var o=n.y||0;delete n.y,this.normHeight=n.source.dimensions.y/n.source.dimensions.x,this.contentAspectX=n.source.dimensions.x/n.source.dimensions.y;var a=1;n.width?(a=n.width,delete n.width,n.height&&(e.console.error("specifying both width and height to a tiledImage is not supported"),delete n.height)):n.height&&(a=n.height/this.normHeight,delete n.height);var s=n.fitBounds;delete n.fitBounds;var l=n.fitBoundsPlacement||t.Placement.CENTER;delete n.fitBoundsPlacement;var c=n.degrees||0;delete n.degrees,e.extend(!0,this,{viewer:null,tilesMatrix:{},coverage:{},loadingCoverage:{},lastDrawn:[],lastResetTime:0,_midDraw:!1,_needsDraw:!0,_hasOpaqueTile:!1,_tilesLoading:0,springStiffness:e.DEFAULT_SETTINGS.springStiffness,animationTime:e.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:e.DEFAULT_SETTINGS.minZoomImageRatio,wrapHorizontal:e.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:e.DEFAULT_SETTINGS.wrapVertical,immediateRender:e.DEFAULT_SETTINGS.immediateRender,blendTime:e.DEFAULT_SETTINGS.blendTime,alwaysBlend:e.DEFAULT_SETTINGS.alwaysBlend,minPixelRatio:e.DEFAULT_SETTINGS.minPixelRatio,smoothTileEdgesMinZoom:e.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,iOSDevice:e.DEFAULT_SETTINGS.iOSDevice,debugMode:e.DEFAULT_SETTINGS.debugMode,crossOriginPolicy:e.DEFAULT_SETTINGS.crossOriginPolicy,ajaxWithCredentials:e.DEFAULT_SETTINGS.ajaxWithCredentials,placeholderFillStyle:e.DEFAULT_SETTINGS.placeholderFillStyle,opacity:e.DEFAULT_SETTINGS.opacity,preload:e.DEFAULT_SETTINGS.preload,compositeOperation:e.DEFAULT_SETTINGS.compositeOperation},n),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new e.Spring({initial:i,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new e.Spring({initial:o,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new e.Spring({initial:a,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new e.Spring({initial:c,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),s&&this.fitBounds(s,l,!0),this._drawingHandler=function(t){r.viewer.raiseEvent("tile-drawing",e.extend({tiledImage:r},t))}},e.extend(e.TiledImage.prototype,e.EventSource.prototype,{needsDraw:function(){return this._needsDraw},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(e){e!==this._fullyLoaded&&(this._fullyLoaded=e,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=e.now(),this._needsDraw=!0},update:function(){var e=this._xSpring.update(),t=this._ySpring.update(),n=this._scaleSpring.update(),r=this._degreesSpring.update();return!!(e||t||n||r)&&(this._updateForScale(),this._needsDraw=!0,!0)},draw:function(){0!==this.opacity||this._preload?(this._midDraw=!0,this._updateViewport(),this._midDraw=!1):this._needsDraw=!1},destroy:function(){this.reset(),this.source.destroy&&this.source.destroy()},getBounds:function(e){return this.getBoundsNoRotate(e).rotate(this.getRotation(e),this._getRotationPoint(e))},getBoundsNoRotate:function(t){return t?new e.Rect(this._xSpring.current.value,this._ySpring.current.value,this._worldWidthCurrent,this._worldHeightCurrent):new e.Rect(this._xSpring.target.value,this._ySpring.target.value,this._worldWidthTarget,this._worldHeightTarget)},getWorldBounds:function(){return e.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"),this.getBounds()},getClippedBounds:function(t){var n=this.getBoundsNoRotate(t);if(this._clip){var r=(t?this._worldWidthCurrent:this._worldWidthTarget)/this.source.dimensions.x,i=this._clip.times(r);n=new e.Rect(n.x+i.x,n.y+i.y,i.width,i.height)}return n.rotate(this.getRotation(t),this._getRotationPoint(t))},getTileBounds:function(e,t,n){var r=this.source.getNumTiles(e),i=(r.x+t%r.x)%r.x,o=(r.y+n%r.y)%r.y,a=this.source.getTileBounds(e,i,o);return this.getFlip()&&(a.x=1-a.x-a.width),a.x+=(t-i)/r.x,a.y+=this._worldHeightCurrent/this._worldWidthCurrent*((n-o)/r.y),a},getContentSize:function(){return new e.Point(this.source.dimensions.x,this.source.dimensions.y)},getSizeInWindowCoordinates:function(){var t=this.imageToWindowCoordinates(new e.Point(0,0)),n=this.imageToWindowCoordinates(this.getContentSize());return new e.Point(n.x-t.x,n.y-t.y)},_viewportToImageDelta:function(t,n,r){var i=r?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(t*(this.source.dimensions.x/i),n*(this.source.dimensions.y*this.contentAspectX/i))},viewportToImageCoordinates:function(t,n,r){var i;return t instanceof e.Point?(r=n,i=t):i=new e.Point(t,n),i=i.rotate(-this.getRotation(r),this._getRotationPoint(r)),r?this._viewportToImageDelta(i.x-this._xSpring.current.value,i.y-this._ySpring.current.value):this._viewportToImageDelta(i.x-this._xSpring.target.value,i.y-this._ySpring.target.value)},_imageToViewportDelta:function(t,n,r){var i=r?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(t/this.source.dimensions.x*i,n/this.source.dimensions.y/this.contentAspectX*i)},imageToViewportCoordinates:function(t,n,r){t instanceof e.Point&&(r=n,n=t.y,t=t.x);var i=this._imageToViewportDelta(t,n);return r?(i.x+=this._xSpring.current.value,i.y+=this._ySpring.current.value):(i.x+=this._xSpring.target.value,i.y+=this._ySpring.target.value),i.rotate(this.getRotation(r),this._getRotationPoint(r))},imageToViewportRectangle:function(t,n,r,i,o){var a=t;a instanceof e.Rect?o=n:a=new e.Rect(t,n,r,i);var s=this.imageToViewportCoordinates(a.getTopLeft(),o),l=this._imageToViewportDelta(a.width,a.height,o);return new e.Rect(s.x,s.y,l.x,l.y,a.degrees+this.getRotation(o))},viewportToImageRectangle:function(t,n,r,i,o){var a=t;t instanceof e.Rect?o=n:a=new e.Rect(t,n,r,i);var s=this.viewportToImageCoordinates(a.getTopLeft(),o),l=this._viewportToImageDelta(a.width,a.height,o);return new e.Rect(s.x,s.y,l.x,l.y,a.degrees-this.getRotation(o))},viewerElementToImageCoordinates:function(e){var t=this.viewport.pointFromPixel(e,!0);return this.viewportToImageCoordinates(t)},imageToViewerElementCoordinates:function(e){var t=this.imageToViewportCoordinates(e);return this.viewport.pixelFromPoint(t,!0)},windowToImageCoordinates:function(e){var n=e.minus(t.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(n)},imageToWindowCoordinates:function(e){return this.imageToViewerElementCoordinates(e).plus(t.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(t){var n=this._scaleSpring.current.value;return t=t.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new e.Rect((t.x-this._xSpring.current.value)/n,(t.y-this._ySpring.current.value)/n,t.width/n,t.height/n,t.degrees)},viewportToImageZoom:function(e){return this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x*e},imageToViewportZoom:function(e){return e/(this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x)},setPosition:function(e,t){var n=this._xSpring.target.value===e.x&&this._ySpring.target.value===e.y;if(t){if(n&&this._xSpring.current.value===e.x&&this._ySpring.current.value===e.y)return;this._xSpring.resetTo(e.x),this._ySpring.resetTo(e.y),this._needsDraw=!0}else{if(n)return;this._xSpring.springTo(e.x),this._ySpring.springTo(e.y),this._needsDraw=!0}n||this._raiseBoundsChange()},setWidth:function(e,t){this._setScale(e,t)},setHeight:function(e,t){this._setScale(e/this.normHeight,t)},setCroppingPolygons:function(t){var n=function(t){return t instanceof e.Point||"number"==typeof t.x&&"number"==typeof t.y},r=function(e){return e.map((function(e){try{if(n(e))return{x:e.x,y:e.y};throw new Error}catch(e){throw new Error("A Provided cropping polygon point is not supported")}}))};try{if(!e.isArray(t))throw new Error("Provided cropping polygon is not an array");this._croppingPolygons=t.map((function(e){return r(e)}))}catch(t){e.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),e.console.error(t),this._croppingPolygons=null}},resetCroppingPolygons:function(){this._croppingPolygons=null},fitBounds:function(t,n,r){n=n||e.Placement.CENTER;var i=e.Placement.properties[n],o=this.contentAspectX,a=0,s=0,l=1,c=1;if(this._clip&&(o=this._clip.getAspectRatio(),l=this._clip.width/this.source.dimensions.x,c=this._clip.height/this.source.dimensions.y,t.getAspectRatio()>o?(a=this._clip.x/this._clip.height*t.height,s=this._clip.y/this._clip.height*t.height):(a=this._clip.x/this._clip.width*t.width,s=this._clip.y/this._clip.width*t.width)),t.getAspectRatio()>o){var u=t.height/c,d=0;i.isHorizontallyCentered?d=(t.width-t.height*o)/2:i.isRight&&(d=t.width-t.height*o),this.setPosition(new e.Point(t.x-a+d,t.y-s),r),this.setHeight(u,r)}else{var p=t.width/l,h=0;i.isVerticallyCentered?h=(t.height-t.width/o)/2:i.isBottom&&(h=t.height-t.width/o),this.setPosition(new e.Point(t.x-a,t.y-s+h),r),this.setWidth(p,r)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(t){e.console.assert(!t||t instanceof e.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),t instanceof e.Rect?this._clip=t.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getFlip:function(){return!!this.flipped},setFlip:function(e){this.flipped=!!e,this._needsDraw=!0,this._raiseBoundsChange()},getOpacity:function(){return this.opacity},setOpacity:function(e){e!==this.opacity&&(this.opacity=e,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(e){this._preload=!!e,this._needsDraw=!0},getRotation:function(e){return e?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(e,t){this._degreesSpring.target.value===e&&this._degreesSpring.isAtTargetValue()||(t?this._degreesSpring.resetTo(e):this._degreesSpring.springTo(e),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(e){return this.getBoundsNoRotate(e).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(e){e!==this.compositeOperation&&(this.compositeOperation=e,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},_setScale:function(e,t){var n=this._scaleSpring.target.value===e;if(t){if(n&&this._scaleSpring.current.value===e)return;this._scaleSpring.resetTo(e),this._updateForScale(),this._needsDraw=!0}else{if(n)return;this._scaleSpring.springTo(e),this._updateForScale(),this._needsDraw=!0}n||this._raiseBoundsChange()},_updateForScale:function(){this._worldWidthTarget=this._scaleSpring.target.value,this._worldHeightTarget=this.normHeight*this._scaleSpring.target.value,this._worldWidthCurrent=this._scaleSpring.current.value,this._worldHeightCurrent=this.normHeight*this._scaleSpring.current.value},_raiseBoundsChange:function(){this.raiseEvent("bounds-change")},_isBottomItem:function(){return this.viewer.world.getItemAt(0)===this},_getLevelsInterval:function(){var e=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),t=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,n=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(t/this.minPixelRatio)/Math.log(2))));return n=Math.max(n,this.source.minLevel||0),{lowestLevel:e=Math.min(e,n),highestLevel:n}},_updateViewport:function(){for(this._needsDraw=!1,this._tilesLoading=0,this.loadingCoverage={};this.lastDrawn.length>0;)this.lastDrawn.pop().beingDrawn=!1;var t=this.viewport,r=this._viewportToTiledImageRectangle(t.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var i=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(null===(r=r.intersection(i)))return}for(var a=this._getLevelsInterval(),s=a.lowestLevel,l=a.highestLevel,c=null,d=!1,p=e.now(),h=l;h>=s;h--){var f=!1,g=t.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(h),!0).x*this._scaleSpring.current.value;if(h===s||!d&&g>=this.minPixelRatio)f=!0,d=!0;else if(!d)continue;var v=t.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(h),!1).x*this._scaleSpring.current.value,y=t.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,b=this.immediateRender?1:y;if(c=n(this,d,f,h,Math.min(1,(g-.5)/.5),b/Math.abs(b-v),r,p,c),u(this.coverage,h))break}m(this,this.lastDrawn),c&&!c.context2D?(o(this,c,p),this._needsDraw=!0,this._setFullyLoaded(!1)):this._setFullyLoaded(0===this._tilesLoading)},_getCornerTiles:function(t,n,r){var i,o;this.wrapHorizontal?(i=e.positiveModulo(n.x,1),o=e.positiveModulo(r.x,1)):(i=Math.max(0,n.x),o=Math.min(1,r.x));var a,s,l=1/this.source.aspectRatio;this.wrapVertical?(a=e.positiveModulo(n.y,l),s=e.positiveModulo(r.y,l)):(a=Math.max(0,n.y),s=Math.min(l,r.y));var c=this.source.getTileAtPoint(t,new e.Point(i,a)),u=this.source.getTileAtPoint(t,new e.Point(o,s)),d=this.source.getNumTiles(t);return this.wrapHorizontal&&(c.x+=d.x*Math.floor(n.x),u.x+=d.x*Math.floor(r.x)),this.wrapVertical&&(c.y+=d.y*Math.floor(n.y/l),u.y+=d.y*Math.floor(r.y/l)),{topLeft:c,bottomRight:u}}})}(t),function(e){var t=function(t){e.console.assert(t,"[TileCache.cacheTile] options is required"),e.console.assert(t.tile,"[TileCache.cacheTile] options.tile is required"),e.console.assert(t.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=t.tile,this.tiledImage=t.tiledImage},n=function(t){e.console.assert(t,"[ImageRecord] options is required"),e.console.assert(t.image,"[ImageRecord] options.image is required"),this._image=t.image,this._tiles=[]};n.prototype={destroy:function(){this._image=null,this._renderedContext=null,this._tiles=null},getImage:function(){return this._image},getRenderedContext:function(){if(!this._renderedContext){var e=document.createElement("canvas");e.width=this._image.width,e.height=this._image.height,this._renderedContext=e.getContext("2d"),this._renderedContext.drawImage(this._image,0,0),this._image=null}return this._renderedContext},setRenderedContext:function(t){e.console.error("ImageRecord.setRenderedContext is deprecated. The rendered context should be created by the ImageRecord itself when calling ImageRecord.getRenderedContext."),this._renderedContext=t},addTile:function(t){e.console.assert(t,"[ImageRecord.addTile] tile is required"),this._tiles.push(t)},removeTile:function(t){for(var n=0;n<this._tiles.length;n++)if(this._tiles[n]===t)return void this._tiles.splice(n,1);e.console.warn("[ImageRecord.removeTile] trying to remove unknown tile",t)},getTileCount:function(){return this._tiles.length}},e.TileCache=function(t){t=t||{},this._maxImageCacheCount=t.maxImageCacheCount||e.DEFAULT_SETTINGS.maxImageCacheCount,this._tilesLoaded=[],this._imagesLoaded=[],this._imagesLoadedCount=0},e.TileCache.prototype={numTilesLoaded:function(){return this._tilesLoaded.length},cacheTile:function(r){e.console.assert(r,"[TileCache.cacheTile] options is required"),e.console.assert(r.tile,"[TileCache.cacheTile] options.tile is required"),e.console.assert(r.tile.cacheKey,"[TileCache.cacheTile] options.tile.cacheKey is required"),e.console.assert(r.tiledImage,"[TileCache.cacheTile] options.tiledImage is required");var i=r.cutoff||0,o=this._tilesLoaded.length,a=this._imagesLoaded[r.tile.cacheKey];if(a||(e.console.assert(r.image,"[TileCache.cacheTile] options.image is required to create an ImageRecord"),a=this._imagesLoaded[r.tile.cacheKey]=new n({image:r.image}),this._imagesLoadedCount++),a.addTile(r.tile),r.tile.cacheImageRecord=a,this._imagesLoadedCount>this._maxImageCacheCount){for(var s,l,c,u,d,p,h=null,f=-1,m=null,g=this._tilesLoaded.length-1;g>=0;g--)if(!((s=(p=this._tilesLoaded[g]).tile).level<=i||s.beingDrawn)){if(!h){h=s,f=g,m=p;continue}u=s.lastTouchTime,l=h.lastTouchTime,d=s.level,c=h.level,(u<l||u===l&&d>c)&&(h=s,f=g,m=p)}h&&f>=0&&(this._unloadTile(m),o=f)}this._tilesLoaded[o]=new t({tile:r.tile,tiledImage:r.tiledImage})},clearTilesFor:function(t){e.console.assert(t,"[TileCache.clearTilesFor] tiledImage is required");for(var n,r=0;r<this._tilesLoaded.length;++r)(n=this._tilesLoaded[r]).tiledImage===t&&(this._unloadTile(n),this._tilesLoaded.splice(r,1),r--)},getImageRecord:function(t){return e.console.assert(t,"[TileCache.getImageRecord] cacheKey is required"),this._imagesLoaded[t]},_unloadTile:function(t){e.console.assert(t,"[TileCache._unloadTile] tileRecord is required");var n=t.tile,r=t.tiledImage;n.unload(),n.cacheImageRecord=null;var i=this._imagesLoaded[n.cacheKey];i.removeTile(n),i.getTileCount()||(i.destroy(),delete this._imagesLoaded[n.cacheKey],this._imagesLoadedCount--),r.viewer.raiseEvent("tile-unloaded",{tile:n,tiledImage:r})}}}(t),function(e){e.World=function(t){var n=this;e.console.assert(t.viewer,"[World] options.viewer is required"),e.EventSource.call(this),this.viewer=t.viewer,this._items=[],this._needsDraw=!1,this._autoRefigureSizes=!0,this._needsSizesFigured=!1,this._delegatedFigureSizes=function(e){n._autoRefigureSizes?n._figureSizes():n._needsSizesFigured=!0},this._figureSizes()},e.extend(e.World.prototype,e.EventSource.prototype,{addItem:function(t,n){if(e.console.assert(t,"[World.addItem] item is required"),e.console.assert(t instanceof e.TiledImage,"[World.addItem] only TiledImages supported at this time"),void 0!==(n=n||{}).index){var r=Math.max(0,Math.min(this._items.length,n.index));this._items.splice(r,0,t)}else this._items.push(t);this._autoRefigureSizes?this._figureSizes():this._needsSizesFigured=!0,this._needsDraw=!0,t.addHandler("bounds-change",this._delegatedFigureSizes),t.addHandler("clip-change",this._delegatedFigureSizes),this.raiseEvent("add-item",{item:t})},getItemAt:function(t){return e.console.assert(void 0!==t,"[World.getItemAt] index is required"),this._items[t]},getIndexOfItem:function(t){return e.console.assert(t,"[World.getIndexOfItem] item is required"),e.indexOf(this._items,t)},getItemCount:function(){return this._items.length},setItemIndex:function(t,n){e.console.assert(t,"[World.setItemIndex] item is required"),e.console.assert(void 0!==n,"[World.setItemIndex] index is required");var r=this.getIndexOfItem(t);if(n>=this._items.length)throw new Error("Index bigger than number of layers.");n===r||-1===r||(this._items.splice(r,1),this._items.splice(n,0,t),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:t,previousIndex:r,newIndex:n}))},removeItem:function(t){e.console.assert(t,"[World.removeItem] item is required");var n=e.indexOf(this._items,t);-1!==n&&(t.removeHandler("bounds-change",this._delegatedFigureSizes),t.removeHandler("clip-change",this._delegatedFigureSizes),t.destroy(),this._items.splice(n,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(t))},removeAll:function(){var e,t;for(this.viewer._cancelPendingImages(),t=0;t<this._items.length;t++)(e=this._items[t]).removeHandler("bounds-change",this._delegatedFigureSizes),e.removeHandler("clip-change",this._delegatedFigureSizes),e.destroy();var n=this._items;for(this._items=[],this._figureSizes(),this._needsDraw=!0,t=0;t<n.length;t++)e=n[t],this._raiseRemoveItem(e)},resetItems:function(){for(var e=0;e<this._items.length;e++)this._items[e].reset()},update:function(){for(var e=!1,t=0;t<this._items.length;t++)e=this._items[t].update()||e;return e},draw:function(){for(var e=0;e<this._items.length;e++)this._items[e].draw();this._needsDraw=!1},needsDraw:function(){for(var e=0;e<this._items.length;e++)if(this._items[e].needsDraw())return!0;return this._needsDraw},getHomeBounds:function(){return this._homeBounds.clone()},getContentFactor:function(){return this._contentFactor},setAutoRefigureSizes:function(e){this._autoRefigureSizes=e,e&this._needsSizesFigured&&(this._figureSizes(),this._needsSizesFigured=!1)},arrange:function(t){var n,r=(t=t||{}).immediately||!1,i=t.layout||e.DEFAULT_SETTINGS.collectionLayout,o=t.rows||e.DEFAULT_SETTINGS.collectionRows,a=t.columns||e.DEFAULT_SETTINGS.collectionColumns,s=t.tileSize||e.DEFAULT_SETTINGS.collectionTileSize,l=s+(t.tileMargin||e.DEFAULT_SETTINGS.collectionTileMargin);n=!t.rows&&a?a:Math.ceil(this._items.length/o);var c,u,d,p,h,f=0,m=0;this.setAutoRefigureSizes(!1);for(var g=0;g<this._items.length;g++)g&&g%n==0&&("horizontal"===i?(m+=l,f=0):(f+=l,m=0)),p=(d=(u=(c=this._items[g]).getBounds()).width>u.height?s:s*(u.width/u.height))*(u.height/u.width),h=new e.Point(f+(s-d)/2,m+(s-p)/2),c.setPosition(h,r),c.setWidth(d,r),"horizontal"===i?f+=l:m+=l;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var t=this._homeBounds?this._homeBounds.clone():null,n=this._contentSize?this._contentSize.clone():null,r=this._contentFactor||0;if(this._items.length){var i=this._items[0],o=i.getBounds();this._contentFactor=i.getContentSize().x/o.width;for(var a=i.getClippedBounds().getBoundingBox(),s=a.x,l=a.y,c=a.x+a.width,u=a.y+a.height,d=1;d<this._items.length;d++)o=(i=this._items[d]).getBounds(),this._contentFactor=Math.max(this._contentFactor,i.getContentSize().x/o.width),a=i.getClippedBounds().getBoundingBox(),s=Math.min(s,a.x),l=Math.min(l,a.y),c=Math.max(c,a.x+a.width),u=Math.max(u,a.y+a.height);this._homeBounds=new e.Rect(s,l,c-s,u-l),this._contentSize=new e.Point(this._homeBounds.width*this._contentFactor,this._homeBounds.height*this._contentFactor)}else this._homeBounds=new e.Rect(0,0,1,1),this._contentSize=new e.Point(1,1),this._contentFactor=1;(this._contentFactor!==r||!this._homeBounds.equals(t)||!this._contentSize.equals(n))&&this.raiseEvent("metrics-change",{})},_raiseRemoveItem:function(e){this.raiseEvent("remove-item",{item:e})}})}(t)}(Cw);var kw=Cw.exports,Ow="http://www.w3.org/2000/svg",_w=function(e){var t=e.getAttribute("class");return t?new Set(t.split(" ")):new Set},Rw=function(e,t){var n=_w(e);n.add(t),e.setAttribute("class",Array.from(n).join(" "))},Aw=function(e,t){var n=_w(e);n.delete(t),0===n.size?e.removeAttribute("class"):e.setAttribute("class",Array.from(n).join(" "))},Dw=function(e,t){return _w(e).has(t)},Iw=function(e,t){var n=e.selector("FragmentSelector");if(null!=n&&n.conformsTo.startsWith("http://www.w3.org/TR/media-frags")){var r=n.value,i=r.includes(":")?r.substring(r.indexOf("=")+1,r.indexOf(":")):"pixel",o=u((r.includes(":")?r.substring(r.indexOf(":")+1):r.substring(r.indexOf("=")+1)).split(",").map(parseFloat),4),a=o[0],s=o[1],l=o[2],c=o[3];return"percent"===i.toLowerCase()&&(a=a*t.naturalWidth/100,s=s*t.naturalHeight/100,l=l*t.naturalWidth/100,c=c*t.naturalHeight/100),{x:a,y:s,w:l,h:c}}},Mw=function(e,t,n,r,i){return{source:null==i?void 0:i.src,selector:{type:"FragmentSelector",conformsTo:"http://www.w3.org/TR/media-frags/",value:"xywh=pixel:".concat(e,",").concat(t,",").concat(n,",").concat(r)}}},Lw=function(e,t,n,r,i){var o=e/i.naturalWidth*100,a=t/i.naturalHeight*100,s=n/i.naturalWidth*100,l=r/i.naturalHeight*100;return{source:i.src,selector:{type:"FragmentSelector",conformsTo:"http://www.w3.org/TR/media-frags/",value:"xywh=percent:".concat(o,",").concat(a,",").concat(s,",").concat(l)}}},jw=function(e,t,n,r,i,o){return"percent"===(null==o?void 0:o.toLowerCase())?Lw(e,t,n,r,i):Mw(e,t,n,r,i)},Nw=function(e,t,n,r,i){e.setAttribute("x",t),e.setAttribute("y",n),e.setAttribute("width",r),e.setAttribute("height",i)},Fw=function(e,t,n){e.setAttribute("cx",t),e.setAttribute("cy",n),e.setAttribute("r",7)},Bw=function(e,t,n,r,i){var o=document.createElementNS(Ow,"path");o.setAttribute("fill-rule","evenodd");var a=e.naturalWidth,s=e.naturalHeight;return o.setAttribute("d","M0 0 h".concat(a," v").concat(s," h-").concat(a," z M").concat(t," ").concat(n," h").concat(r," v").concat(i," h-").concat(r," z")),o},zw=function(e,t,n,r,i,o){var a=t.naturalWidth,s=t.naturalHeight;e.setAttribute("d","M0 0 h".concat(a," v").concat(s," h-").concat(a," z M").concat(n," ").concat(r," h").concat(i," v").concat(o," h-").concat(i," z"))},Hw=function(e,t,n,r){var i="Annotation"===e.type||"Selection"===e.type?Iw(e,t):{x:e,y:t,w:n,h:r},o=i.x,a=i.y,s=i.w,l=i.h,c=document.createElementNS(Ow,"g");if(0===s&&0===l){Rw(c,"a9s-point"),Rw(c,"a9s-non-scaling"),c.setAttribute("transform-origin","".concat(o," ").concat(a));var u=document.createElementNS(Ow,"circle"),d=document.createElementNS(Ow,"circle");d.setAttribute("class","a9s-inner"),Fw(d,o,a),u.setAttribute("class","a9s-outer"),Fw(u,o,a),c.appendChild(u),c.appendChild(d)}else{var p=document.createElementNS(Ow,"rect"),h=document.createElementNS(Ow,"rect");h.setAttribute("class","a9s-inner"),Nw(h,o,a,s,l),p.setAttribute("class","a9s-outer"),Nw(p,o,a,s,l),c.appendChild(p),c.appendChild(h)}return c},Uw=function(e){var t=e.querySelector(".a9s-outer");return"rect"===t.nodeName?{x:parseFloat(t.getAttribute("x")),y:parseFloat(t.getAttribute("y")),w:parseFloat(t.getAttribute("width")),h:parseFloat(t.getAttribute("height"))}:{x:parseFloat(t.getAttribute("cx")),y:parseFloat(t.getAttribute("cy")),w:0,h:0}},Vw=function(e,t,n,r,i){var o=e.querySelector(".a9s-inner"),a=e.querySelector(".a9s-outer");"rect"===a.nodeName?(Nw(o,t,n,r,i),Nw(a,t,n,r,i)):(Fw(o,t,n),Fw(a,t,n))},Ww=function(e,t){var n=Iw(e,t);return n.w*n.h},Gw=function(){function e(t,n,r,i,o){var a=this;m(this,e),D(this,"dragTo",(function(e,t){a.group.style.display=null,a.opposite=[e,t];var n=a.bbox,r=n.x,i=n.y,o=n.w,s=n.h;zw(a.mask,a.env.image,r,i,o,s),Vw(a.rect,r,i,o,s)})),D(this,"getBoundingClientRect",(function(){return a.rect.getBoundingClientRect()})),D(this,"toSelection",(function(){var e=a.bbox,t=e.x,n=e.y,r=e.w,i=e.h;return new Sw(jw(t,n,r,i,a.env.image,a.config.fragmentUnit))})),D(this,"destroy",(function(){a.group.parentNode.removeChild(a.group),a.mask=null,a.rect=null,a.group=null})),this.anchor=[t,n],this.opposite=[t,n],this.config=i,this.env=o,this.group=document.createElementNS(Ow,"g"),this.mask=Bw(o.image,t,n,2,2),this.mask.setAttribute("class","a9s-selection-mask"),this.rect=Hw(t,n,2,2),this.rect.setAttribute("class","a9s-selection"),this.group.style.pointerEvents="none",this.group.style.display="none",this.group.appendChild(this.mask),this.group.appendChild(this.rect),r.appendChild(this.group)}return v(e,[{key:"bbox",get:function(){var e=this.opposite[0]-this.anchor[0],t=this.opposite[1]-this.anchor[1];return{x:e>0?this.anchor[0]:this.opposite[0],y:t>0?this.anchor[1]:this.opposite[1],w:Math.max(1,Math.abs(e)),h:Math.max(1,Math.abs(t))}}},{key:"element",get:function(){return this.rect}}]),e}(),qw={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"},Xw=function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0},Zw=function(e){var t=null,n=function(e,t){return new MouseEvent(e,{screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,bubbles:!0})},r=function(e){var r=e.changedTouches[0],i=n(qw[e.type],r);r.target.dispatchEvent(i),e.preventDefault(),("touchstart"===e.type||"touchmove"===e.type)&&(t&&clearTimeout(t),t=setTimeout((function(){var e=n("dblclick",r);r.target.dispatchEvent(e)}),800)),"touchend"===e.type&&t&&clearTimeout(t)};e.addEventListener("touchstart",r,!0),e.addEventListener("touchmove",r,!0),e.addEventListener("touchend",r,!0),e.addEventListener("touchcancel",r,!0)},Yw="An implementation is missing",Kw=Xw(),Jw=function(e){y(n,e);var t=w(n);function n(e,r,i){var o;m(this,n),o=t.call(this),D(x(o),"enableResponsive",(function(){window.ResizeObserver&&(o.resizeObserver=new ResizeObserver((function(){var e=o.svg.getBoundingClientRect(),t=o.svg.viewBox.baseVal,n=t.width,r=t.height;o.scale=Math.max(n/e.width,r/e.height),o.onScaleChanged&&o.onScaleChanged(o.scale)})),o.resizeObserver.observe(o.svg.parentNode))})),D(x(o),"getSVGPoint",(function(e){var t=o.svg.createSVGPoint();if(Kw){var n=o.svg.getBoundingClientRect(),r=e.clientX-n.x,i=e.clientY-n.y,a=o.svg.getBoundingClientRect(),s=a.left,l=a.top;return t.x=r+s,t.y=i+l,t.matrixTransform(o.g.getScreenCTM().inverse())}return t.x=e.offsetX,t.y=e.offsetY,t.matrixTransform(o.g.getCTM().inverse())})),D(x(o),"drawHandle",(function(e,t){var n=document.createElementNS(Ow,"g");n.setAttribute("class","a9s-handle");var r=document.createElementNS(Ow,"g"),i=function(n){var r=document.createElementNS(Ow,"circle");return r.setAttribute("cx",e),r.setAttribute("cy",t),r.setAttribute("r",n),r.setAttribute("transform-origin","".concat(e," ").concat(t)),r},a=o.config.handleRadius||6,s=i(a);s.setAttribute("class","a9s-handle-inner");var l=i(a+1);return l.setAttribute("class","a9s-handle-outer"),r.appendChild(l),r.appendChild(s),n.appendChild(r),n})),D(x(o),"setHandleXY",(function(e,t,n){var r=e.querySelector(".a9s-handle-inner");r.setAttribute("cx",t),r.setAttribute("cy",n),r.setAttribute("transform-origin","".concat(t," ").concat(n));var i=e.querySelector(".a9s-handle-outer");i.setAttribute("cx",t),i.setAttribute("cy",n),i.setAttribute("transform-origin","".concat(t," ").concat(n))})),D(x(o),"getHandleXY",(function(e){var t=e.querySelector(".a9s-handle-outer");return{x:parseFloat(t.getAttribute("cx")),y:parseFloat(t.getAttribute("cy"))}})),D(x(o),"scaleHandle",(function(e){var t=e.querySelector(".a9s-handle-inner"),n=e.querySelector(".a9s-handle-outer"),r=o.scale*(o.config.handleRadius||6);t.setAttribute("r",r),n.setAttribute("r",r)})),o.svg=e.closest("svg"),o.g=e,o.config=r,o.env=i,o.scale=1;var a=i.image;return(a instanceof Element||a instanceof HTMLDocument)&&o.enableResponsive(),o}return v(n,[{key:"destroy",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.resizeObserver=null}}]),n}(jt),Qw=function(e){y(n,e);var t=w(n);function n(e,r,i){var o;return m(this,n),o=t.call(this,e,r,i),D(x(o),"attachListeners",(function(e){var t=e.mouseMove,n=e.mouseUp,r=e.dblClick;t&&(o.mouseMove=function(e){var n=o.getSVGPoint(e),r=n.x,i=n.y;o.started||(o.emit("startSelection",{x:r,y:i}),o.started=!0),t(r,i,e)},o.svg.addEventListener("mousemove",o.mouseMove)),n&&(o.mouseUp=function(e){if(0===e.button){var t=o.getSVGPoint(e),r=t.x,i=t.y;n(r,i,e)}},document.addEventListener("mouseup",o.mouseUp)),r&&(o.dblClick=function(e){var t=o.getSVGPoint(e),n=t.x,i=t.y;r(n,i,e)},document.addEventListener("dblclick",o.dblClick))})),D(x(o),"detachListeners",(function(){o.mouseMove&&o.svg.removeEventListener("mousemove",o.mouseMove),o.mouseUp&&document.removeEventListener("mouseup",o.mouseUp),o.dblClick&&document.removeEventListener("dblclick",o.dblClick)})),D(x(o),"start",(function(e,t){var n=o.getSVGPoint(e),r=n.x,i=n.y;o.startDrawing(r,i,t,e)})),D(x(o),"startDrawing",(function(e){throw new Error(Yw)})),D(x(o),"createEditableShape",(function(e,t){throw new Error(Yw)})),o.started=!1,o}return v(n,[{key:"isDrawing",get:function(){throw new Error(Yw)}}]),n}(Jw);Qw.supports=function(e){throw new Error(Yw)};var $w="An implementation is missing",ex=function(e){y(n,e);var t=w(n);function n(e,r,i,o){var a;return m(this,n),a=t.call(this,r,i,o),D(x(a),"updateState",(function(e){throw new Error($w)})),a.annotation=e,a}return v(n,[{key:"element",get:function(){throw new Error($w)}}]),n}(Jw),tx=/firefox/i.test(navigator.userAgent),nx=function(e,t,n,r,i){e.setAttribute("width",r),e.setAttribute("height",i),tx?(e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("transform","translate(".concat(t,", ").concat(n,")"))):(e.setAttribute("x",t),e.setAttribute("y",n))},rx=function(e,t){var n=t.getBBox(),r=n.x,i=n.y,o=n.width,a=n.height,s=document.createElementNS(Ow,"svg");s.setAttribute("class","a9s-formatter-el"),nx(s,r,i,o,a);var l=document.createElementNS(Ow,"g");l.appendChild(e),s.appendChild(l),t.append(s)},ix=function(e,t,n){if(!n)return e;var r=n.reduce((function(e,n){var r=n(t);if(!r)return e;if("string"==typeof r||r instanceof String)e.className=e.className?"".concat(e.className," ").concat(r):r;else if(r.nodeType===Node.ELEMENT_NODE)e.elements=e.elements?[].concat(s(e.elements),[r]):[r];else{var i=r.className,o=r.style,a=r.element;i&&(e.className=e.className?"".concat(e.className," ").concat(i):i),o&&(e.style=e.style?"".concat(e.style," ").concat(o):o),a&&(e.elements=e.elements?[].concat(s(e.elements),[a]):[a])}for(var l in r)r.hasOwnProperty(l)&&l.startsWith("data-")&&(e[l]=r[l]);return e}),{}),i=r.className,o=r.style,a=r.elements;if(i&&Rw(e,i),o){var l=e.querySelector(".a9s-outer"),c=e.querySelector(".a9s-inner");l&&c?(l.setAttribute("style","display:none"),c.setAttribute("style",o)):e.setAttribute("style",o)}for(var u in a&&a.forEach((function(t){return rx(t,e)})),r)r.hasOwnProperty(u)&&u.startsWith("data-")&&e.setAttribute(u,r[u])},ox=function(e,t,n,r,i){var o=e.querySelector(".a9s-formatter-el");o&&nx(o,t,n,r,i)},ax="corner",sx="edge",lx=function(e){y(n,e);var t=w(n);function n(e,r,i,o){var a;m(this,n),a=t.call(this,e,r,i,o),D(x(a),"onScaleChanged",(function(){return a.handles.map(a.scaleHandle)})),D(x(a),"setSize",(function(e,t,n,r){Vw(a.rectangle,e,t,n,r),zw(a.mask,a.env.image,e,t,n,r),ox(a.elementGroup,e,t,n,r);var i=u(a.handles,8),o=i[0],s=i[1],l=i[2],c=i[3],d=i[4],p=i[5],h=i[6],f=i[7];a.setHandleXY(o,e,t),a.setHandleXY(s,e+n,t),a.setHandleXY(l,e+n,t+r),a.setHandleXY(c,e,t+r),a.enableEdgeControls&&(a.setHandleXY(d,e+n/2,t),a.setHandleXY(p,e+n,t+r/2),a.setHandleXY(h,e+n/2,t+r),a.setHandleXY(f,e,t+r/2))})),D(x(a),"stretchCorners",(function(e,t,n){var r=a.getHandleXY(t),i=n.x-r.x,o=n.y-r.y,s=i>0?r.x:n.x,l=o>0?r.y:n.y,c=Math.abs(i),u=Math.abs(o);return a.setSize(s,l,c,u),{x:s,y:l,w:c,h:u}})),D(x(a),"stretchEdge",(function(e,t,n){var r=a.getHandleXY(t),i=Uw(a.rectangle),o=e%2==0,s=o?i.w:n.x-r.x,l=o?n.y-r.y:i.h,c=o?i.x:s>0?r.x:n.x,u=o?l>0?r.y:n.y:i.y,d=Math.abs(s),p=Math.abs(l);return a.setSize(c,u,d,p),{x:c,y:u,w:d,h:p}})),D(x(a),"onGrab",(function(e,t){return function(n){if(0===n.button){a.grabbedElem=e,a.grabbedType=t;var r=a.getSVGPoint(n),i=Uw(a.rectangle),o=i.x,s=i.y;a.mouseOffset={x:r.x-o,y:r.y-s}}}})),D(x(a),"onMouseMove",(function(e){if(0===e.button){var t=function(e,t){return e<0?0:e>t?t:e};if(a.grabbedElem){var n=a.getSVGPoint(e);if(a.grabbedElem===a.rectangle){var r=Uw(a.rectangle),i=r.w,o=r.h,s=a.env.image,l=s.naturalWidth,c=s.naturalHeight,u=t(n.x-a.mouseOffset.x,l-i),d=t(n.y-a.mouseOffset.y,c-o);a.setSize(u,d,i,o),a.emit("update",jw(u,d,i,o,a.env.image,a.config.fragmentUnit))}else{var p=a.handles.indexOf(a.grabbedElem),h=a.handles[2^p],f=a.grabbedType===ax?a.stretchCorners(p,h,n):a.stretchEdge(p,h,n),m=f.x,g=f.y,v=f.w,y=f.h;a.emit("update",jw(m,g,v,y,a.env.image,a.config.fragmentUnit))}}}})),D(x(a),"onMouseUp",(function(e){a.grabbedElem=null,a.grabbedType=null,a.mouseOffset=null})),D(x(a),"updateState",(function(e){var t=Iw(e,a.env.image),n=t.x,r=t.y,i=t.w,o=t.h;a.setSize(n,r,i,o)})),a.svg.addEventListener("mousemove",a.onMouseMove),a.svg.addEventListener("mouseup",a.onMouseUp);var s=Iw(e,o.image),l=s.x,c=s.y,d=s.w,p=s.h;a.containerGroup=document.createElementNS(Ow,"g"),a.mask=Bw(o.image,l,c,d,p),a.mask.setAttribute("class","a9s-selection-mask"),a.containerGroup.appendChild(a.mask),a.elementGroup=document.createElementNS(Ow,"g"),a.elementGroup.setAttribute("class","a9s-annotation editable selected"),a.elementGroup.setAttribute("data-id",e.id),a.rectangle=Hw(l,c,d,p),a.rectangle.querySelector(".a9s-inner").addEventListener("mousedown",a.onGrab(a.rectangle)),a.elementGroup.appendChild(a.rectangle),a.enableEdgeControls=i.enableEdgeControls;var h=a.enableEdgeControls?[[l+d/2,c,sx],[l+d,c+p/2,sx],[l+d/2,c+p,sx],[l,c+p/2,sx]]:[];return a.handles=[[l,c,ax],[l+d,c,ax],[l+d,c+p,ax],[l,c+p,ax]].concat(h).map((function(e){var t=u(e,3),n=t[0],r=t[1],i=t[2],o=a.drawHandle(n,r);return o.addEventListener("mousedown",a.onGrab(o,i)),a.elementGroup.appendChild(o),o})),a.containerGroup.appendChild(a.elementGroup),r.appendChild(a.containerGroup),ix(a.rectangle,e,i.formatters),a.grabbedElem=null,a.grabbedType=null,a.mouseOffset=null,a}return v(n,[{key:"element",get:function(){return this.elementGroup}},{key:"destroy",value:function(){this.containerGroup.parentNode.removeChild(this.containerGroup),a(S(n.prototype),"destroy",this).call(this)}}]),n}(ex),cx=function(e){y(n,e);var t=w(n);function n(e,r,i){var o;return m(this,n),o=t.call(this,e,r,i),D(x(o),"startDrawing",(function(e,t){o.attachListeners({mouseMove:o.onMouseMove,mouseUp:o.onMouseUp}),o.rubberband=new Gw(e,t,o.g,o.config,o.env)})),D(x(o),"stop",(function(){o.rubberband&&(o.rubberband.destroy(),o.rubberband=null)})),D(x(o),"onMouseMove",(function(e,t){return o.rubberband.dragTo(e,t)})),D(x(o),"onMouseUp",(function(){o.detachListeners(),o.started=!1;var e=o.rubberband.getBoundingClientRect(),t=e.width,n=e.height,r=o.config.minSelectionWidth||4,i=o.config.minSelectionHeight||4;if(t>=r&&n>=i){var a=o.rubberband.element;a.annotation=o.rubberband.toSelection(),o.emit("complete",a)}else o.emit("cancel");o.stop()})),D(x(o),"createEditableShape",(function(e,t){return new lx(e,o.g,T(T({},o.config),{},{formatters:t}),o.env)})),o.rubberband=null,o}return v(n,[{key:"isDrawing",get:function(){return null!=this.rubberband}}]),n}(Qw);cx.identifier="rect",cx.supports=function(e){var t=e.selector("FragmentSelector");return null==t?void 0:t.conformsTo.startsWith("http://www.w3.org/TR/media-frags")};var ux=function(e){for(var t=0,n=e.length-1,r=0;r<e.length;r++)t+=(e[n][0]+e[r][0])*(e[n][1]-e[r][1]),n=r;return Math.abs(.5*t)},dx=function(e,t,n,r){var i=e[0]-t,o=e[1]-n;return Math.sqrt(i*i+o*o)<=r},px=function(e,t,n,r,i,o){var a=o||0,s=Math.cos(a),l=Math.sin(a),c=e[0]-t,u=e[1]-n,d=s*c+l*u,p=l*c-s*u;return d*d/(r*r)+p*p/(i*i)<=1},hx=function(e,t){for(var n=e[0],r=e[1],i=!1,o=0,a=t.length-1;o<t.length;a=o++){var s=t[o][0],l=t[o][1],c=t[a][0],u=t[a][1];l>r!=u>r&&n<(c-s)*(r-l)/(u-l)+s&&(i=!i)}return i},fx=function(e,t){var n,r=o(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!hx(i,t))return!1}}catch(e){r.e(e)}finally{r.f()}return!0},mx=function(e,t,n,r,i,o){var a=e[0],s=e[1],l=r-t,c=i-n,u=Math.sqrt(l*l+c*c);return Math.abs((a-t)*c-(s-n)*l)/u<=o},gx=function(e){var t,n=e.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map((function(e){return e.trim()})),r=[],i=[],a=o(n);try{for(a.s();!(t=a.n()).done;){var l=t.value,c=l.substring(0,1);if("z"===c.toLowerCase())r.push(s(i)),i=[];else{var u=l.substring(1).split(" ").map((function(e){return parseFloat(e.trim())})),d=c===c.toUpperCase(),p=d?u[0]:u[0]+i[i.length-1][0],h=d?u[1]:u[1]+i[i.length-1][1];i.push([p,h])}}}catch(e){a.e(e)}finally{a.f()}return i.length>0&&r.push(s(i)),r},vx=function(e){var t=(new XMLSerializer).serializeToString(e.documentElement).replace("<svg>",'<svg xmlns="'.concat(Ow,'">'));return(new DOMParser).parseFromString(t,"image/svg+xml").documentElement},yx=function(e){var t=function(e){Array.from(e.attributes).forEach((function(t){t.name.startsWith("on")&&e.removeAttribute(t.name)}))},n=e.getElementsByTagName("script");return Array.from(n).reverse().forEach((function(e){return e.parentNode.removeChild(e)})),t(e),Array.from(e.querySelectorAll("*")).forEach(t),e},bx=function(e){var t=e.selector("SvgSelector");if(t){var n=new DOMParser,r=t.value,i=n.parseFromString(r,"image/svg+xml"),o=i.lookupPrefix(Ow),a=i.lookupNamespaceURI(null);return o||a?yx(i).firstChild:yx(vx(i)).firstChild}},wx=function(e){var t=bx(e),n=document.createElementNS(Ow,"g"),r=t.cloneNode(!0);r.setAttribute("class","a9s-inner");var i=t.cloneNode(!0);return i.setAttribute("class","a9s-outer"),n.appendChild(i),n.appendChild(r),n},xx=function(e,t){var n=e.querySelector(".a9s-inner").cloneNode(!0);n.removeAttribute("class"),n.removeAttribute("xmlns");var r=n.outerHTML||(new XMLSerializer).serializeToString(n);return r=r.replace(' xmlns="'.concat(Ow,'"'),""),{source:null==t?void 0:t.src,selector:{type:"SvgSelector",value:"<svg>".concat(r,"</svg>")}}},Sx=function(e){var t=bx(e),n=t.nodeName.toLowerCase();if("polygon"===n)return Ex(t);if("circle"===n)return Tx(t);if("ellipse"===n)return Px(t);if("path"==n)return Cx(t);if("line"==n)return 0;throw"Unsupported SVG shape type: ".concat(n)},Ex=function(e){var t=e.getAttribute("points").trim().split(" ").map((function(e){return e.split(",").map((function(e){return parseFloat(e.trim())}))}));return ux(t)},Tx=function(e){var t=e.getAttribute("r");return t*t*Math.PI},Px=function(e){return e.getAttribute("rx")*e.getAttribute("ry")*Math.PI},Cx=function(e){var t=gx(e);if(1==t.length)return ux(t[0]);var n,r=function(e){return t.find((function(t){if(e!==t)return fx(e,t)}))},i=0,a=o(t);try{for(a.s();!(n=a.n()).done;){var s=n.value;r(s)?i-=ux(s):i+=ux(s)}}catch(e){a.e(e)}finally{a.f()}return i},kx=function(){function e(t,n){var r=this;m(this,e),D(this,"redraw",(function(){r.mask.setAttribute("d","M0 0 h".concat(r.w," v").concat(r.h," h-").concat(r.w," z M").concat(r.polygon.getAttribute("points")," z"))})),D(this,"destroy",(function(){return r.mask.parentNode.removeChild(r.mask)})),this.w=t.naturalWidth,this.h=t.naturalHeight,this.polygon=n,this.mask=document.createElementNS(Ow,"path"),this.mask.setAttribute("fill-rule","evenodd"),this.mask.setAttribute("class","a9s-selection-mask"),this.mask.setAttribute("d","M0 0 h".concat(this.w," v").concat(this.h," h-").concat(this.w," z M").concat(this.polygon.getAttribute("points")," z"))}return v(e,[{key:"element",get:function(){return this.mask}}]),e}(),Ox=function(){function e(t,n,r){var i=this;m(this,e),D(this,"setPoints",(function(e){var t=e.map((function(e){return"".concat(e[0],",").concat(e[1])})).join(" ");i.outer.setAttribute("points",t),i.inner.setAttribute("points",t)})),D(this,"getBoundingClientRect",(function(){return i.outer.getBoundingClientRect()})),D(this,"dragTo",(function(e){i.group.style.display=null,i.mousepos=e;var t=[].concat(s(i.points),[e]);i.setPoints(t),i.mask.redraw()})),D(this,"addPoint",(function(){var e=u(i.mousepos,2),t=e[0],n=e[1],r=i.points[i.points.length-1];Math.pow(t-r[0],2)+Math.pow(n-r[1],2)>4&&(i.points=[].concat(s(i.points),[i.mousepos]),i.setPoints(i.points),i.mask.redraw())})),D(this,"destroy",(function(){i.group.parentNode.removeChild(i.group),i.polygon=null,i.group=null})),D(this,"toSelection",(function(){return new Sw(xx(i.group,i.env.image))})),this.points=[t],this.env=r,this.mousepos=t,this.group=document.createElementNS(Ow,"g"),this.polygon=document.createElementNS(Ow,"g"),this.polygon.setAttribute("class","a9s-selection"),this.outer=document.createElementNS(Ow,"polygon"),this.outer.setAttribute("class","a9s-outer"),this.inner=document.createElementNS(Ow,"polygon"),this.inner.setAttribute("class","a9s-inner"),this.setPoints(this.points),this.mask=new kx(r.image,this.inner),this.polygon.appendChild(this.outer),this.polygon.appendChild(this.inner),this.group.style.display="none",this.group.appendChild(this.mask.element),this.group.appendChild(this.polygon),n.appendChild(this.group)}return v(e,[{key:"element",get:function(){return this.polygon}}]),e}(),_x=function(e){for(var t=e.querySelector(".a9s-inner").points,n=[],r=0;r<t.numberOfItems;r++)n.push(t.getItem(r));return n},Rx=function(e){return e.querySelector(".a9s-inner").getBBox()},Ax=function(e){y(n,e);var t=w(n);function n(e,r,i,o){var s,l;return m(this,n),l=t.call(this,e,r,i,o),D(x(l),"onScaleChanged",(function(){return l.handles.map(l.scaleHandle)})),D(x(l),"setPoints",(function(e){var t=function(e){return Math.round(10*e)/10},n=e.map((function(e){return"".concat(t(e.x),",").concat(t(e.y))})).join(" ");l.shape.querySelector(".a9s-inner").setAttribute("points",n);var r=l.shape.querySelector(".a9s-outer");r.setAttribute("points",n),l.mask.redraw();var i=r.getBBox(),o=i.x,a=i.y,s=i.width,c=i.height;ox(l.elementGroup,o,a,s,c)})),D(x(l),"onGrab",(function(e){return function(t){0===t.button&&(l.grabbedElem=e,l.grabbedAt=l.getSVGPoint(t))}})),D(x(l),"onMouseMove",(function(e){var t=function(e,t,n){return e+t<0?-e:e+t>n?n-e:t};if(l.grabbedElem){var n=l.getSVGPoint(e);if(l.grabbedElem===l.shape){var r=Rx(l.shape),i=r.x,o=r.y,a=r.width,s=r.height,c=l.env.image,u=c.naturalWidth,d=c.naturalHeight,p=t(i,n.x-l.grabbedAt.x,u-a),h=t(o,n.y-l.grabbedAt.y,d-s),f=_x(l.shape).map((function(e){return{x:e.x+p,y:e.y+h}}));l.grabbedAt=n,l.setPoints(f),f.forEach((function(e,t){return l.setHandleXY(l.handles[t],e.x,e.y)})),l.emit("update",xx(l.shape,l.env.image))}else{var m=l.handles.indexOf(l.grabbedElem),g=_x(l.shape).map((function(e,t){return t===m?n:e}));l.setPoints(g),l.setHandleXY(l.handles[m],n.x,n.y),l.emit("update",xx(l.shape,l.env.image))}}})),D(x(l),"onMouseUp",(function(e){l.grabbedElem=null,l.grabbedAt=null})),D(x(l),"updateState",(function(e){var t=bx(e).getAttribute("points").split(" ").map((function(e){var t=u(e.split(",").map((function(e){return parseFloat(e.trim())})),2);return{x:t[0],y:t[1]}}));l.setPoints(t),t.forEach((function(e,t){return l.setHandleXY(l.handles[t],e.x,e.y)}))})),D(x(l),"destroy",(function(){l.containerGroup.parentNode.removeChild(l.containerGroup),a((s=x(l),S(n.prototype)),"destroy",s).call(s)})),l.svg.addEventListener("mousemove",l.onMouseMove),l.svg.addEventListener("mouseup",l.onMouseUp),l.containerGroup=document.createElementNS(Ow,"g"),l.shape=wx(e),l.shape.querySelector(".a9s-inner").addEventListener("mousedown",l.onGrab(l.shape)),l.mask=new kx(o.image,l.shape.querySelector(".a9s-inner")),l.containerGroup.appendChild(l.mask.element),l.elementGroup=document.createElementNS(Ow,"g"),l.elementGroup.setAttribute("class","a9s-annotation editable selected"),l.elementGroup.setAttribute("data-id",e.id),l.elementGroup.appendChild(l.shape),l.handles=_x(l.shape).map((function(e){var t=l.drawHandle(e.x,e.y);return t.addEventListener("mousedown",l.onGrab(t)),l.elementGroup.appendChild(t),t})),l.containerGroup.appendChild(l.elementGroup),r.appendChild(l.containerGroup),ix(l.shape,e,i.formatters),l.grabbedElem=null,l.grabbedAt=null,l}return v(n,[{key:"element",get:function(){return this.elementGroup}}]),n}(ex),Dx=function(e){y(n,e);var t=w(n);function n(e,r,i){var o;return m(this,n),o=t.call(this,e,r,i),D(x(o),"startDrawing",(function(e,t,n){o._isDrawing=!0,o._startOnSingleClick=n,o.attachListeners({mouseMove:o.onMouseMove,mouseUp:o.onMouseUp,dblClick:o.onDblClick}),o.rubberband=new Ox([e,t],o.g,o.env)})),D(x(o),"stop",(function(){o.detachListeners(),o._isDrawing=!1,o.rubberband&&(o.rubberband.destroy(),o.rubberband=null)})),D(x(o),"onMouseMove",(function(e,t){return o.rubberband.dragTo([e,t])})),D(x(o),"onMouseUp",(function(){var e=o.rubberband.getBoundingClientRect(),t=e.width,n=e.height,r=o.config.minSelectionWidth||4,i=o.config.minSelectionHeight||4;t>=r||n>=i?o.rubberband.addPoint():o._startOnSingleClick||(o.emit("cancel"),o.stop())})),D(x(o),"onDblClick",(function(){o._isDrawing=!1;var e=o.rubberband.element;e.annotation=o.rubberband.toSelection(),o.emit("complete",e),o.stop()})),D(x(o),"createEditableShape",(function(e,t){return new Ax(e,o.g,T(T({},o.config),{},{formatters:t}),o.env)})),o._isDrawing=!1,o._startOnSingleClick=!1,o}return v(n,[{key:"isDrawing",get:function(){return this._isDrawing}}]),n}(Qw);Dx.identifier="polygon",Dx.supports=function(e){var t,n=e.selector("SvgSelector");if(n)return null==(t=n.value)?void 0:t.match(/^<svg.*<polygon/g)};var Ix=function(e){y(n,e);var t=w(n);function n(e,r,i){var o;return m(this,n),o=t.call(this),D(x(o),"listTools",(function(){return o._registered.map((function(e){return e.identifier}))})),D(x(o),"registerTool",(function(e){var t=e.identifier;o.listTools().includes(t)&&o.unregisterTool(t),o._registered.unshift(e)})),D(x(o),"unregisterTool",(function(e){return o._registered=o._registered.filter((function(t){return t.identifier!==e}))})),D(x(o),"setCurrent",(function(e){o._current&&o._current.destroy();var t="string"==typeof e||e instanceof String?o._registered.find((function(t){return t.identifier===e})):e;o._current=new t(o._g,o._config,o._env),o._current.on("startSelection",(function(e){return o.emit("startSelection",e)})),o._current.on("complete",(function(e){return o.emit("complete",e)})),o._current.on("cancel",(function(e){return o.emit("cancel",e)}))})),D(x(o),"forAnnotation",(function(e){var t,n,r=f(n=e.targets)||l(n)||p(n)||d(),i=r[0],a=(r.slice(1),null==(t=i.renderedVia)?void 0:t.name),s=a?o._registered.find((function(e){return e.identifier===a})):o._registered.find((function(t){return t.supports(e)}));return s?new s(o._g,o._config,o._env):null})),o._g=e,o._config=r,o._env=i,o._registered=[cx,Dx],o.setCurrent(cx),o}return v(n,[{key:"current",get:function(){return this._current}}]),n}(jt),Mx={FragmentSelector:Hw,SvgSelector:wx},Lx={FragmentSelector:Ww,SvgSelector:Sx},jx=function(e){var t=e.targets[0];if(t)return Array.isArray(t.selector)?t.selector[0]:t.selector},Nx=function(e,t){return Mx[jx(e).type](e,t)},Fx=function(e,t){return Lx[jx(e).type](e,t)},Bx=v((function e(t){m(this,e);var n=document.createElementNS(Ow,"svg");n.setAttribute("class","a9s-osd-crosshair-container");var r=document.createElementNS(Ow,"g");r.setAttribute("class","a9s-crosshair"),n.appendChild(r);var i=document.createElementNS(Ow,"line"),o=document.createElementNS(Ow,"line");r.appendChild(i),r.appendChild(o),t.parentElement.appendChild(n);var a=function(e){var n=e.offsetX,r=e.offsetY,a=t.parentElement.offsetWidth,s=t.parentElement.offsetHeight;i.setAttribute("x1",0),i.setAttribute("y1",r),i.setAttribute("x2",a),i.setAttribute("y2",r),o.setAttribute("x1",n),o.setAttribute("y1",0),o.setAttribute("x2",n),o.setAttribute("y2",s)};t.addEventListener("pointermove",a),t.parentElement.addEventListener("pointermove",a)}));function zx(e,t,n,r,i){Hx(e,t,n||0,r||e.length-1,i||Vx)}function Hx(e,t,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,a=t-n+1,s=Math.log(o),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);Hx(e,t,Math.max(n,Math.floor(t-a*l/o+c)),Math.min(r,Math.floor(t+(o-a)*l/o+c)),i)}var u=e[t],d=n,p=r;for(Ux(e,n,t),i(e[r],u)>0&&Ux(e,n,r);d<p;){for(Ux(e,d,p),d++,p--;i(e[d],u)<0;)d++;for(;i(e[p],u)>0;)p--}0===i(e[n],u)?Ux(e,n,p):Ux(e,++p,r),p<=t&&(n=p+1),t<=p&&(r=p-1)}}function Ux(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Vx(e,t){return e<t?-1:e>t?1:0}var Wx=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:9;m(this,e),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}return v(e,[{key:"all",value:function(){return this._all(this.data,[])}},{key:"search",value:function(e){var t=this.data,n=[];if(!nS(e,t))return n;for(var r=this.toBBox,i=[];t;){for(var o=0;o<t.children.length;o++){var a=t.children[o],s=t.leaf?r(a):a;nS(e,s)&&(t.leaf?n.push(a):tS(e,s)?this._all(a,n):i.push(a))}t=i.pop()}return n}},{key:"collides",value:function(e){var t=this.data;if(!nS(e,t))return!1;for(var n=[];t;){for(var r=0;r<t.children.length;r++){var i=t.children[r],o=t.leaf?this.toBBox(i):i;if(nS(e,o)){if(t.leaf||tS(e,o))return!0;n.push(i)}}t=n.pop()}return!1}},{key:"load",value:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0;t<e.length;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this}},{key:"insert",value:function(e){return e&&this._insert(e,this.data.height-1),this}},{key:"clear",value:function(){return this.data=rS([]),this}},{key:"remove",value:function(e,t){if(!e)return this;for(var n,r,i,o=this.data,a=this.toBBox(e),s=[],l=[];o||s.length;){if(o||(o=s.pop(),r=s[s.length-1],n=l.pop(),i=!0),o.leaf){var c=Gx(e,o.children,t);if(-1!==c)return o.children.splice(c,1),s.push(o),this._condense(s),this}i||o.leaf||!tS(o,a)?r?(n++,o=r.children[n],i=!1):o=null:(s.push(o),l.push(n),n=0,r=o,o=o.children[0])}return this}},{key:"toBBox",value:function(e){return e}},{key:"compareMinX",value:function(e,t){return e.minX-t.minX}},{key:"compareMinY",value:function(e,t){return e.minY-t.minY}},{key:"toJSON",value:function(){return this.data}},{key:"fromJSON",value:function(e){return this.data=e,this}},{key:"_all",value:function(e,t){for(var n=[];e;)e.leaf?t.push.apply(t,s(e.children)):n.push.apply(n,s(e.children)),e=n.pop();return t}},{key:"_build",value:function(e,t,n,r){var i,o=n-t+1,a=this._maxEntries;if(o<=a)return qx(i=rS(e.slice(t,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,r-1))),(i=rS([])).leaf=!1,i.height=r;var s=Math.ceil(o/a),l=s*Math.ceil(Math.sqrt(a));iS(e,t,n,l,this.compareMinX);for(var c=t;c<=n;c+=l){var u=Math.min(c+l-1,n);iS(e,c,u,s,this.compareMinY);for(var d=c;d<=u;d+=s){var p=Math.min(d+s-1,u);i.children.push(this._build(e,d,p,r-1))}}return qx(i,this.toBBox),i}},{key:"_chooseSubtree",value:function(e,t,n,r){for(;r.push(t),!t.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,a=void 0,s=0;s<t.children.length;s++){var l=t.children[s],c=Jx(l),u=$x(e,l)-c;u<o?(o=u,i=c<i?c:i,a=l):u===o&&c<i&&(i=c,a=l)}t=a||t.children[0]}return t}},{key:"_insert",value:function(e,t,n){var r=n?e:this.toBBox(e),i=[],o=this._chooseSubtree(r,this.data,t,i);for(o.children.push(e),Zx(o,r);t>=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(r,i,t)}},{key:"_split",value:function(e,t){var n=e[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var o=this._chooseSplitIndex(n,i,r),a=rS(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,qx(n,this.toBBox),qx(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(n,a)}},{key:"_splitRoot",value:function(e,t){this.data=rS([e,t]),this.data.height=e.height+1,this.data.leaf=!1,qx(this.data,this.toBBox)}},{key:"_chooseSplitIndex",value:function(e,t,n){for(var r,i=1/0,o=1/0,a=t;a<=n-t;a++){var s=Xx(e,0,a,this.toBBox),l=Xx(e,a,n,this.toBBox),c=eS(s,l),u=Jx(s)+Jx(l);c<i?(i=c,r=a,o=u<o?u:o):c===i&&u<o&&(o=u,r=a)}return r||n-t}},{key:"_chooseSplitAxis",value:function(e,t,n){var r=e.leaf?this.compareMinX:Yx,i=e.leaf?this.compareMinY:Kx;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)}},{key:"_allDistMargin",value:function(e,t,n,r){e.children.sort(r);for(var i=this.toBBox,o=Xx(e,0,t,i),a=Xx(e,n-t,n,i),s=Qx(o)+Qx(a),l=t;l<n-t;l++){var c=e.children[l];Zx(o,e.leaf?i(c):c),s+=Qx(o)}for(var u=n-t-1;u>=t;u--){var d=e.children[u];Zx(a,e.leaf?i(d):d),s+=Qx(a)}return s}},{key:"_adjustParentBBoxes",value:function(e,t,n){for(var r=n;r>=0;r--)Zx(t[r],e)}},{key:"_condense",value:function(e){for(var t,n=e.length-1;n>=0;n--)0===e[n].children.length?n>0?(t=e[n-1].children).splice(t.indexOf(e[n]),1):this.clear():qx(e[n],this.toBBox)}}]),e}();function Gx(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r<t.length;r++)if(n(e,t[r]))return r;return-1}function qx(e,t){Xx(e,0,e.children.length,t,e)}function Xx(e,t,n,r,i){i||(i=rS(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=t;o<n;o++){var a=e.children[o];Zx(i,e.leaf?r(a):a)}return i}function Zx(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function Yx(e,t){return e.minX-t.minX}function Kx(e,t){return e.minY-t.minY}function Jx(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function Qx(e){return e.maxX-e.minX+(e.maxY-e.minY)}function $x(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function eS(e,t){var n=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function tS(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function nS(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function rS(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function iS(e,t,n,r,i){for(var o=[t,n];o.length;)if(!((n=o.pop())-(t=o.pop())<=r)){var a=t+Math.ceil((n-t)/r/2)*r;zx(e,a,t,n,i),o.push(t,a,a,n)}}var oS=function(e,t){if("FragmentSelector"===e.targets[0].selector.type){var n=Iw(e),r=n.x,i=n.y;return{minX:r,minY:i,maxX:r+n.w,maxY:i+n.h}}var o=Nx(e,t),a=document.createElementNS(Ow,"svg");a.style.position="absolute",a.style.opacity=0,a.style.top=0,a.style.left=0,a.appendChild(o),document.body.appendChild(a);var s=o.getBBox(),l=s.x,c=s.y,u=s.width,d=s.height;return document.body.removeChild(a),{minX:l,minY:c,maxX:l+u,maxY:c+d}},aS=function(e){var t,n=e.targets[0];return Array.isArray(n.selector)?n.selector[0].type:null==(t=n.selector)?void 0:t.type},sS=function(e,t,n,r){var i=bx(n),o=i.nodeName.toLowerCase(),a=[e,t];if("polygon"===o){var s=Array.from(i.points).map((function(e){return[e.x,e.y]}));return hx(a,s)}if("circle"===o){var l=i.getAttribute("cx"),c=i.getAttribute("cy"),u=i.getAttribute("r");return dx(a,l,c,u)}if("ellipse"===o){var d=i.getAttribute("cx"),p=i.getAttribute("cy"),h=i.getAttribute("rx"),f=i.getAttribute("ry");return px(a,d,p,h,f)}if("path"===o)return gx(i).find((function(e){return hx(a,e)}));if("line"===o){var m=parseInt(i.getAttribute("x1")),g=parseInt(i.getAttribute("y1")),v=parseInt(i.getAttribute("x2")),y=parseInt(i.getAttribute("y2"));return mx(a,m,g,v,y,r)}throw"Unsupported SVG shape type: ".concat(o)},lS=v((function e(t){var n=this;m(this,e),D(this,"clear",(function(){return n.spatial_index.clear()})),D(this,"getAnnotationAt",(function(e,t,r){var i=r?5/r:5,o=n.spatial_index.search({minX:e-i,minY:t-i,maxX:e+i,maxY:t+i}).map((function(e){return e.annotation})).filter((function(n){var r=aS(n);if("FragmentSelector"===r)return!0;if("SvgSelector"===r)return sS(e,t,n,i);throw"Unsupported selector type: ".concat(r)}));if(o.length>0)return o.sort((function(e,t){return Fx(e,n.env.image)-Fx(t,n.env.image)})),o[0]})),D(this,"getAnnotationsIntersecting",(function(e){var t=e.minX,r=t?e:oS(e,n.env.image),i=n.spatial_index.search(r).map((function(e){return e.annotation}));return t?i:i.filter((function(t){return!t.isEqual(e)}))})),D(this,"insert",(function(e){(Array.isArray(e)?e:[e]).forEach((function(e){n.spatial_index.insert(T(T({},oS(e,n.env.image)),{},{annotation:e}))}))})),D(this,"getBounds",(function(e){return n.getBounds(e,n.env.image)})),D(this,"remove",(function(e){var t=T(T({},oS(e,n.env.image)),{},{annotation:e});n.spatial_index.remove(t,(function(e,t){return e.annotation.id===t.annotation.id}))})),this.env=t,t.store=this,this.spatial_index=new Wx})),cS=function(e,t){var n=(Dw(t,".a9s-annotation")?t:t.closest(".a9s-annotation")).querySelector(".a9s-outer").getBoundingClientRect(),r=e.drawer.canvas,i=r.getBoundingClientRect(),o=r.width/i.width,a=r.height/i.height,s=n.x-i.x,l=n.y-i.y,c=n.width,u=n.height,d=document.createElement("CANVAS"),p=d.getContext("2d");d.width=c,d.height=u,p.drawImage(r,s*o,l*a,c*o,u*a,0,0,c,u);var h=e.viewport.viewerElementToImageCoordinates(new OpenSeadragon.Point(s,l)),f=e.viewport.viewportToImageZoom(e.viewport.getZoom());return{snippet:d,transform:function(e){return[h.x+e[0]/o/f,h.y+e[1]/a/f]}}},uS=Xw(),dS=function(e){y(n,e);var t=w(n);function n(e){var r;m(this,n),r=t.call(this),D(x(r),"_getShapeAt",(function(e){var t=function(e){var t=r.svg.createSVGPoint();if(window.TouchEvent&&e instanceof TouchEvent){var n=r.svg.getBoundingClientRect(),i=e.touches[0],o=i.clientX-n.x,a=i.clientY-n.y,s=r.svg.getBoundingClientRect(),l=s.left,c=s.top;return t.x=o+l,t.y=a+c,t.matrixTransform(r.g.getScreenCTM().inverse())}return t.x=e.offsetX,t.y=e.offsetY,t.matrixTransform(r.g.getCTM().inverse())}(e),n=t.x,i=t.y,o=r.store.getAnnotationAt(n,i,r.currentScale());if(o)return r.findShape(o)})),D(x(r),"_initDrawingTools",(function(e){var t,n=!1,i=!1,o=!1;r.tools=new Ix(r.g,r.config,r.env),r.tools.on("complete",(function(e){i=!1,r.onDrawingComplete(e)})),r.mouseTracker=new kw.MouseTracker({element:r.svg,preProcessEventHandler:function(e){r.mouseTracker.enabled||(e.preventDefault=!1,e.preventGesture=!0),r.selectedShape&&"wheel"===e.eventType&&(e.preventDefault=!1,r.viewer.canvas.dispatchEvent(new e.originalEvent.constructor(e.eventType,e.originalEvent)))},pressHandler:function(t){r.tools.current.isDrawing||(r.tools.current.start(t.originalEvent,r.drawOnSingleClick&&!r.hoveredShape),e||r.scaleTool(r.tools.current))},moveHandler:function(e){if(r.tools.current.isDrawing){var t=r.tools.current.getSVGPoint(e.originalEvent),a=t.x,s=t.y;e.buttons&&i?(!o&&r.tools.current.onDragStart&&r.tools.current.onDragStart(a,s,e.originalEvent),o=!0):(e.originalEvent.stopPropagation(),r.tools.current.onMouseMove(a,s,e.originalEvent),n||(r.emit("startSelection",{x:a,y:s}),n=!0))}},releaseHandler:function(e){if(r.tools.current.isDrawing){i=!0;var t=r.tools.current.getSVGPoint(e.originalEvent),a=t.x,s=t.y;n&&r.emit("endSelection",{x:a,y:s}),r.tools.current.onMouseUp(a,s,e.originalEvent),o&&r.tools.current.onDragEnd&&r.tools.current.onDragEnd()}n=!1,o=!1}});var a=r.config.hotkey?r.config.hotkey.key?r.config.hotkey.key.toLowerCase():r.config.hotkey.toLowerCase():"shift",s=null==(t=r.config.hotkey)?void 0:t.inverted;r.mouseTracker.enabled=s,r.onKeyDown&&document.removeEventListener("keydown",r.onKeyDown),r.onKeyUp&&document.removeEventListener("keydown",r.onKeyDown),r.onKeyDown=function(e){if(e.key.toLowerCase()===a&&!r.selectedShape){var t=!r.readOnly&&!s;r.mouseTracker.enabled=t,r.tools.current.enabled=t}},r.onKeyUp=function(e){e.key.toLowerCase()===a&&!r.tools.current.isDrawing&&(r.mouseTracker.enabled=s,r.tools.current.enabled=s)},document.addEventListener("keydown",r.onKeyDown),document.addEventListener("keyup",r.onKeyUp)})),D(x(r),"_initMouseEvents",(function(){r.svg.addEventListener("mousemove",(function(e){var t,n;if(!(null!=(t=r.tools)&&t.current.isDrawing||e.target.closest(".a9s-annotation.editable.selected"))){var i=r._getShapeAt(e);if((null==i?void 0:i.annotation)!==(null==(n=r.hoveredShape)?void 0:n.annotation)){if(r.hoveredShape){var o=r.hoveredShape.element||r.hoveredShape;Aw(o,"hover"),r.emit("mouseLeaveAnnotation",r.hoveredShape.annotation,r.hoveredShape)}i&&(Rw(i,"hover"),r.emit("mouseEnterAnnotation",i.annotation,i))}r.hoveredShape=i}})),r.svg.parentElement.addEventListener("mouseleave",(function(){r.hoveredShape&&(Aw(r.hoveredShape,"hover"),r.emit("mouseLeaveAnnotation",r.hoveredShape.annotation,r.hoveredShape),r.hoveredShape=null)}));var e=null;r.viewer.addHandler("canvas-press",(function(){return e=(new Date).getTime()})),r.viewer.addHandler("canvas-click",(function(t){var n,i=t.originalEvent;if(!(null==(n=r.tools.current)?void 0:n.isDrawing)&&!r.disableSelect&&(new Date).getTime()-e<250){var o=i.target.closest(".a9s-annotation.editable.selected")?r.selectedShape:r._getShapeAt(i);o?(t.preventDefaultAction=!0,r.selectShape(o)):o||(r.deselect(),r.emit("select",{}))}r.disableSelect&&r.hoveredShape&&r.emit("clickAnnotation",r.hoveredShape.annotation,r.hoveredShape)}))})),D(x(r),"_lazy",(function(e){if(r.viewer.world.getItemAt(0))e();else{var t=function t(){e(),r.viewer.removeHandler("open",t),r.viewer.world.removeHandler("add-item",t)};r.viewer.addHandler("open",t),r.viewer.world.addHandler("add-item",t)}})),D(x(r),"_refreshNonScalingAnnotations",(function(){var e=r.currentScale();Array.from(r.svg.querySelectorAll(".a9s-non-scaling")).forEach((function(t){return t.setAttribute("transform","scale(".concat(1/e,")"))}))})),D(x(r),"addAnnotation",(function(e,t){var n=t||r.g,i=Nx(e,r.env.image);return Rw(i,"a9s-annotation"),i.setAttribute("data-id",e.id),i.annotation=e,n.appendChild(i),ix(i,e,r.formatters),r.scaleFormatterElements(i),i})),D(x(r),"addDrawingTool",(function(e){return r.tools.registerTool(e)})),D(x(r),"addOrUpdateAnnotation",(function(e,t){var n,i=null==(n=r.selectedShape)?void 0:n.annotation;(i===e||(null==i?void 0:i.isSelection)||i==t)&&r.deselect(),t&&r.removeAnnotation(e),r.removeAnnotation(e);var o=r.addAnnotation(e);Dw(o,"a9s-non-scaling")&&o.setAttribute("transform","scale(".concat(1/r.currentScale(),")")),r.store.insert(e)})),D(x(r),"currentScale",(function(){var e=r.viewer.viewport.getContainerSize().x;return r.viewer.viewport.getZoom(!0)*e/r.viewer.world.getContentFactor()})),D(x(r),"deselect",(function(){var e;if(null==(e=r.tools)||e.current.stop(),r.selectedShape){var t=r.selectedShape.annotation;if(r.selectedShape.destroy){if(r.selectedShape.mouseTracker.destroy(),r.selectedShape.destroy(),!t.isSelection){var n=r.addAnnotation(t);Dw(n,"a9s-non-scaling")&&n.setAttribute("transform","scale(".concat(1/r.currentScale(),")"))}}else Aw(r.selectedShape,"selected");r.selectedShape=null}})),D(x(r),"destroy",(function(){r.deselect(),r.svg.parentNode.removeChild(r.svg)})),D(x(r),"findShape",(function(e){var t=null!=e&&e.id?e.id:e;return r.g.querySelector('.a9s-annotation[data-id="'.concat(t,'"]'))})),D(x(r),"_fit",(function(e,t,n){var i=r.findShape(e);if(i){var o=!!t&&("boolean"==typeof t?t:t.immediately),a=(null==t?void 0:t.padding)||0,s=r.viewer.container.getBoundingClientRect(),l=Math.min(2*a/s.width,2*a/s.height),c=i.getBBox(),u=c.x,d=c.y,p=c.width,h=c.height,f=u-l*p,m=d-l*h,g=p+2*l*p,v=h+2*l*h,y=r.viewer.viewport.imageToViewportRectangle(f,m,g,v);r.viewer.viewport[n](y,o)}})),D(x(r),"fitBounds",(function(e,t){return r._fit(e,t,"fitBounds")})),D(x(r),"fitBoundsWithConstraints",(function(e,t){return r._fit(e,t,"fitBoundsWithConstraints")})),D(x(r),"getAnnotations",(function(){return Array.from(r.g.querySelectorAll(".a9s-annotation")).map((function(e){return e.annotation}))})),D(x(r),"getAnnotationsIntersecting",(function(e){var t=e.id?e:r.findShape(e).annotation;return r.store.getAnnotationsIntersecting(t)})),D(x(r),"getImageSnippetById",(function(e){var t=r.findShape(e);if(t)return cS(r.viewer,t)})),D(x(r),"getSelectedImageSnippet",(function(){var e;if(r.selectedShape){var t=null!=(e=r.selectedShape.element)?e:r.selectedShape;return cS(r.viewer,t)}})),D(x(r),"init",(function(e){r.deselect(),Array.from(r.g.querySelectorAll(".a9s-annotation")).forEach((function(e){return r.g.removeChild(e)})),r.store.clear(),r._lazy((function(){console.time("Took"),console.log("Drawing..."),r.loaded||(r.g.style.display="none"),e.forEach((function(e){return r.addAnnotation(e)})),console.log("Indexing..."),r.store.insert(e),console.timeEnd("Took"),r.resize()}))})),D(x(r),"listDrawingTools",(function(){return r.tools.listTools()})),D(x(r),"overrideId",(function(e,t){var n=r.findShape(e);n.setAttribute("data-id",t);var i=n.annotation,o=i.clone({id:t});return n.annotation=o,r.store.remove(i),r.store.insert(o),o})),D(x(r),"panTo",(function(e,t){var n=r.findShape(e);if(n){var i=n.getBoundingClientRect(),o=i.top,a=i.left,s=i.width,l=i.height,c=a+s/2+window.scrollX,u=o+l/2+window.scrollY,d=r.viewer.viewport.windowToViewportCoordinates(new kw.Point(c,u));r.viewer.viewport.panTo(d,t)}})),D(x(r),"removeAnnotation",(function(e){var t,n,i=e.type?e.id:e;(null==(t=r.selectedShape)?void 0:t.annotation.id)===i&&r.deselect();var o=r.findShape(e);if(o){var a=o.annotation;(null==(n=r.selectedShape)?void 0:n.annotation)===a&&r.deselect(),o.parentNode.removeChild(o),r.store.remove(a)}})),D(x(r),"removeDrawingTool",(function(e){var t;return null==(t=r.tools)?void 0:t.unregisterTool(e)})),D(x(r),"scaleFormatterElements",(function(e){var t=1/r.currentScale();if(e){var n=e.querySelector(".a9s-formatter-el");n&&n.firstChild.setAttribute("transform","scale(".concat(t,")"))}else Array.from(r.g.querySelectorAll(".a9s-formatter-el")).forEach((function(e){return e.firstChild.setAttribute("transform","scale(".concat(t,")"))}))})),D(x(r),"scaleTool",(function(e){if(e){var t=1/r.currentScale();e.scale=t,e.onScaleChanged&&e.onScaleChanged(t)}})),D(x(r),"selectAnnotation",(function(e,t){r.selectedShape&&r.deselect();var n=r.findShape(e);if(n){r.selectShape(n,t);var i=r.selectedShape.element?r.selectedShape.element:r.selectedShape;return{annotation:n.annotation,element:i}}r.deselect()})),D(x(r),"selectShape",(function(e,t){var n;if(!t&&!e.annotation.isSelection&&r.emit("clickAnnotation",e.annotation,e),(null==(n=r.selectedShape)?void 0:n.annotation)!==e.annotation){r.selectedShape&&r.selectedShape.annotation!==e.annotation&&r.deselect();var i=e.annotation;if(r.readOnly||i.readOnly||r.headless)r.selectedShape=e,Rw(e,"selected"),t||r.emit("select",{annotation:i,element:e,skipEvent:t});else{var o=r.tools.forAnnotation(i);if(o){setTimeout((function(){e.parentNode.removeChild(e),t||r.emit("select",{annotation:i,element:r.selectedShape.element})}),1),r.selectedShape=o.createEditableShape(i,r.formatters),r.scaleTool(r.selectedShape),r.scaleFormatterElements(r.selectedShape.element),r.selectedShape.element.annotation=i;var a=new kw.MouseTracker({element:r.svg,preProcessEventHandler:function(e){e.stopPropagation=!0,e.preventDefault=!1,e.preventGesture=!0}}).setTracking(!1);r.selectedShape.element.addEventListener("mouseenter",(function(){r.hoveredShape=r.selectedShape,a.setTracking(!0)})),r.selectedShape.element.addEventListener("mouseleave",(function(){r.hoveredShape=null,a.setTracking(!1)})),r.selectedShape.mouseTracker=a,r.selectedShape.on("update",(function(e){return r.emit("updateTarget",r.selectedShape.element,e)}))}else r.selectedShape=e,t||r.emit("select",{annotation:i,element:r.selectedShape})}}})),D(x(r),"setDrawingEnabled",(function(e){if(r.mouseTracker){var t=e&&!r.readOnly;r.mouseTracker.enabled=t,r.mouseTracker.setTracking(t),r.tools.current&&(r.tools.current.enabled=t)}})),D(x(r),"setDrawingTool",(function(e){var t;r.tools&&(null==(t=r.tools.current)||t.stop(),r.tools.setCurrent(e))})),D(x(r),"setVisible",(function(e){e?r.svg.style.display=null:(r.deselect(),r.svg.style.display="none")})),D(x(r),"stopDrawing",(function(){var e;null!=(e=r.tools)&&e.current&&(r.tools.current.isDrawing&&r.tools.current.stop(),r.mouseTracker.enabled=!1,r.tools.current.enabled=!1)})),r.viewer=e.viewer,r.config=e.config,r.env=e.env,r.readOnly=e.config.readOnly,r.headless=e.config.headless,e.config.formatter?r.formatters=[e.config.formatter]:e.config.formatters&&(r.formatters=Array.isArray(e.config.formatters)?e.config.formatters:[e.config.formatters]),r.disableSelect=e.config.disableSelect,r.drawOnSingleClick=e.config.drawOnSingleClick,r.svg=document.createElementNS(Ow,"svg"),uS?(r.svg.setAttribute("class","a9s-annotationlayer a9s-osd-annotationlayer touch"),Zw(r.svg)):r.svg.setAttribute("class","a9s-annotationlayer a9s-osd-annotationlayer"),r.g=document.createElementNS(Ow,"g"),r.svg.appendChild(r.g),r.viewer.canvas.appendChild(r.svg),r.viewer.addHandler("animation",(function(){return r.resize()})),r.viewer.addHandler("rotate",(function(){return r.resize()})),r.viewer.addHandler("resize",(function(){return r.resize()})),r.viewer.addHandler("flip",(function(){return r.resize()})),r.loaded=!1;var i=function(){var t=r.viewer.world.getItemAt(0).source.dimensions,n=t.x,i=t.y,o=r.viewer.world.getItemAt(0).source["@id"]||new URL(r.viewer.world.getItemAt(0).source.url,document.baseURI).href;r.env.image={src:o,naturalWidth:n,naturalHeight:i},e.config.crosshair&&(r.crosshair||(r.crosshair=new Bx(r.svg),Rw(r.svg,"no-cursor"))),r.loaded||r.emit("load",o),r.loaded=!0,r.g.style.display="inline",r.resize()};return r.viewer.addHandler("open",i),r.viewer.world.addHandler("add-item",i),r.viewer.world.getItemAt(0)&&i(),r.store=new lS(r.env),r.selectedShape=null,r.hoveredShape=null,r._initMouseEvents(),r}return v(n,[{key:"resize",value:function(){var e,t=this.viewer.viewport.getFlip(),n=this.viewer.viewport.pixelFromPoint(new kw.Point(0,0),!0);t&&(n.x=this.viewer.viewport._containerInnerSize.x-n.x);var r=this.currentScale(),i=t?-r:r,o=this.viewer.viewport.getRotation();this.g.setAttribute("transform","translate(".concat(n.x,", ").concat(n.y,") scale(").concat(i,", ").concat(r,") rotate(").concat(o,")")),this._refreshNonScalingAnnotations(),this.scaleFormatterElements(),this.selectedShape&&(this.selectedShape.element?(this.scaleTool(this.selectedShape),this.emit("viewportChange",this.selectedShape.element)):this.emit("viewportChange",this.selectedShape)),null!=(e=this.tools)&&e.current&&this.scaleTool(this.tools.current)}}]),n}(jt),pS=function(e){y(n,e);var t=w(n);function n(e){var r;return m(this,n),r=t.call(this,e),D(x(r),"onDrawingComplete",(function(e){var t;r.mouseTracker.enabled=null==(t=r.config.hotkey)?void 0:t.inverted,r.selectShape(e),r.emit("createSelection",e.annotation)})),r._initDrawingTools(),r}return v(n)}(dS),hS=function(e){var t=e.viewport.viewportToImageRectangle(e.viewport.getBounds(!0)),n=e.viewport.getContainerSize().x;return{extent:t,scale:e.viewport.getZoom(!0)*n/e.world.getContentFactor()}},fS=function(e){var t,n=e.targets[0];return n?Array.isArray(n.selector)?n.selector[0].type:null==(t=n.selector)?void 0:t.type:null},mS=function(e,t){var n=hS(e),r=n.extent,i=n.scale,o=t.selector,a=xw.create({target:t});if("SvgSelector"===o.type){var s=bx(a),l=s.nodeName.toLowerCase(),c=null;if("polygon"===l)c=gS(s,r,i);else if("circle"===l)c=vS(s,r,i);else if("ellipse"===l)c=yS(s,r,i);else{if("path"!==l)throw"Unsupported SVG shape type: ".concat(l);c=bS(s,r,i)}var u=c.outerHTML||(new XMLSerializer).serializeToString(c);return u=u.replace(' xmlns="'.concat(Ow,'"'),""),T(T({},t),{},{selector:{type:"SvgSelector",value:"<svg>".concat(u,"</svg>")}})}if("FragmentSelector"===o.type){var d=Iw(a),p=d.x,h=d.y,f=d.w,m=d.h,g=r.x+p/i,v=r.y+h/i,y=f/i,b=m/i;return 0===f&&0===m?T(T({},jw(g,v,y,b)),{},{renderedVia:{name:"point"}}):jw(g,v,y,b)}throw"Unsupported selector type: ".concat(o.type)},gS=function(e,t,n){var r=Array.from(e.points).map((function(e){return t.x+e.x/n+","+(t.y+e.y/n)})).join(" ");return e.setAttribute("points",r),e},vS=function(e,t,n){var r=parseFloat(e.getAttribute("cx")),i=parseFloat(e.getAttribute("cy")),o=parseFloat(e.getAttribute("r"));return e.setAttribute("cx",t.x+r/n),e.setAttribute("cy",t.y+i/n),e.setAttribute("r",o/n),e},yS=function(e,t,n){var r=parseFloat(e.getAttribute("cx")),i=parseFloat(e.getAttribute("cy")),o=parseFloat(e.getAttribute("rx")),a=parseFloat(e.getAttribute("ry"));return e.setAttribute("cx",t.x+r/n),e.setAttribute("cy",t.y+i/n),e.setAttribute("rx",o/n),e.setAttribute("ry",a/n),e},bS=function(e,t,n){var r=e.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map((function(e){return e.trim()})).map((function(e){var r=e.substring(0,1);if("z"===r.toLowerCase())return r;var i=e.substring(1).split(" ").map((function(e){return parseFloat(e.trim())})),o=r===r.toUpperCase();return r+" "+(o?t.x+i[0]/n:i[0]/n)+" "+(o?t.y+i[1]/n:i[1]/n)})).join(" ");return e.setAttribute("d",r),e},wS=function(e,t){var n=hS(e),r=n.extent,i=n.scale,o=t.selector("FragmentSelector");if(t.selector("SvgSelector")){var a=bx(t),s=a.nodeName.toLowerCase(),l=null;if("polygon"===s)l=xS(a,r,i);else if("circle"===s)l=SS(a,r,i);else if("ellipse"===s)l=ES(a,r,i);else{if("path"!==s)throw"Unsupported SVG shape type: ".concat(s);l=TS(a,r,i)}var c=l.outerHTML||(new XMLSerializer).serializeToString(l);c=c.replace(' xmlns="'.concat(Ow,'"'),"");var u={selector:{type:"SvgSelector",value:"<svg>".concat(c,"</svg>")}};return t.clone({target:u})}if(o){var d=Iw(t),p=d.x,h=d.y,f=d.w,m=d.h,g=(p-r.x)*i,v=(h-r.y)*i,y=jw(g,v,f*i,m*i);return t.clone({target:y})}},xS=function(e,t,n){var r=Array.from(e.points).map((function(e){return n*(e.x-t.x)+","+n*(e.y-t.y)})).join(" ");return e.setAttribute("points",r),e},SS=function(e,t,n){var r=e.getAttribute("cx"),i=e.getAttribute("cy"),o=e.getAttribute("r");return e.setAttribute("cx",n*(r-t.x)),e.setAttribute("cy",n*(i-t.y)),e.setAttribute("r",o*n),e},ES=function(e,t,n){var r=e.getAttribute("cx"),i=e.getAttribute("cy"),o=e.getAttribute("rx"),a=e.getAttribute("ry");return e.setAttribute("cx",n*(r-t.x)),e.setAttribute("cy",n*(i-t.y)),e.setAttribute("rx",o*n),e.setAttribute("ry",a*n),e},TS=function(e,t,n){var r=e.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map((function(e){return e.trim()})).map((function(e){var r=e.substring(0,1);if("z"===r.toLowerCase())return r;var i=e.substring(1).split(" ").filter((function(e){return e})).map((function(e){return parseFloat(e.trim())})),o=r===r.toUpperCase();return r+" "+(o?n*(i[0]-t.x):n*i[0])+" "+(o?n*(i[1]-t.y):n*i[1])})).join(" ");return e.setAttribute("d",r),e},PS=function(e,t){var n=hS(e),r=n.extent,i=n.scale,o=fS(t.annotation);if("FragmentSelector"===o)CS(t,r,i);else{if("SvgSelector"!==o)throw"Unsupported selector type type: ".concat(o);kS(t,r,i)}var a=t.querySelector(".a9s-formatter-el");if(a){var s=t.querySelector(".a9s-inner").getBBox(),l=s.x,c=s.y;a.setAttribute("x",l),a.setAttribute("y",c)}},CS=function(e,t,n){var r=Iw(e.annotation),i=r.x,o=r.y,a=r.w,s=r.h,l=e.querySelector(".a9s-outer"),c=e.querySelector(".a9s-inner"),u=n*(i-t.x),d=n*(o-t.y);[l,c].forEach(0===a&&0===s?function(e){e.setAttribute("cx",u),e.setAttribute("cy",d)}:function(e){e.setAttribute("x",u),e.setAttribute("y",d),e.setAttribute("width",a*n),e.setAttribute("height",s*n)})},kS=function(e,t,n){var r=bx(e.annotation),i=r.nodeName.toLowerCase();if("polygon"===i)OS(e,r,t,n);else if("circle"===i)_S(e,r,t,n);else if("ellipse"===i)RS(e,r,t,n);else{if("path"!==i)throw"Unsupported SVG shape type: ".concat(i);AS(e,r,t,n)}},OS=function(e,t,n,r){var i=Array.from(t.points).map((function(e){return r*(e.x-n.x)+","+r*(e.y-n.y)})).join(" ");e.querySelector(".a9s-outer").setAttribute("points",i),e.querySelector(".a9s-inner").setAttribute("points",i)},_S=function(e,t,n,r){var i=r*(t.getAttribute("cx")-n.x),o=r*(t.getAttribute("cy")-n.y),a=r*t.getAttribute("r"),s=e.querySelector(".a9s-outer");s.setAttribute("cx",i),s.setAttribute("cy",o),s.setAttribute("r",a);var l=e.querySelector(".a9s-inner");l.setAttribute("cx",i),l.setAttribute("cy",o),l.setAttribute("r",a)},RS=function(e,t,n,r){var i=r*(t.getAttribute("cx")-n.x),o=r*(t.getAttribute("cy")-n.y),a=r*t.getAttribute("rx"),s=r*t.getAttribute("ry"),l=e.querySelector(".a9s-outer");l.setAttribute("cx",i),l.setAttribute("cy",o),l.setAttribute("rx",a),l.setAttribute("ry",s);var c=e.querySelector(".a9s-inner");c.setAttribute("cx",i),c.setAttribute("cy",o),c.setAttribute("rx",a),c.setAttribute("ry",s)},AS=function(e,t,n,r){var i=t.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map((function(e){return e.trim()})).map((function(e){var t=e.substring(0,1);if("z"===t.toLowerCase())return t;var i=e.substring(1).split(" ").filter((function(e){return e})).map((function(e){return parseFloat(e.trim())})),o=t===t.toUpperCase();return t+" "+(o?r*(i[0]-n.x):r*i[0])+" "+(o?r*(i[1]-n.y):r*i[1])})).join(" ");e.querySelector(".a9s-inner").setAttribute("d",i),e.querySelector(".a9s-outer").setAttribute("d",i)},DS=Xw(),IS=function(e){y(n,e);var t=w(n);function n(e){var r;return m(this,n),r=t.call(this,e),D(x(r),"_fit",(function(e,t,n){var i=!!t&&("boolean"==typeof t?t:t.immediately),o=(null==t?void 0:t.padding)||0,a=r.findShape(e);if(a){var s=r.viewer.container.getBoundingClientRect(),l=a.getBoundingClientRect(),c=l.x-s.x-o,u=l.y-s.y-o,d=l.width+2*o,p=l.height+2*o,h=r.viewer.viewport.viewerElementToViewportRectangle(new kw.Rect(c,u,d,p));r.viewer.viewport[n](h,i)}})),D(x(r),"_getShapeAt",(function(e){var t=function(e){if(DS){var t=r.svg.getBoundingClientRect(),n=e.clientX-t.x,i=e.clientY-t.y;return new kw.Point(n,i)}return new kw.Point(e.offsetX,e.offsetY)},n=r.viewer.viewport.viewerElementToViewportCoordinates(t(e)),i=r.viewer.viewport.viewportToImageCoordinates(n.x,n.y),o=i.x,a=i.y,s=r.store.getAnnotationAt(o,a,r.currentScale());if(s)return r.findShape(s)})),D(x(r),"_refreshNonScalingAnnotations",(function(){})),D(x(r),"addAnnotation",(function(e,t){var n=t||r.g,i=Nx(e,r.env.image);return Rw(i,"a9s-annotation"),i.setAttribute("data-id",e.id),i.annotation=e,PS(r.viewer,i),n.appendChild(i),ix(i,e,r.formatters),i})),D(x(r),"addOrUpdateAnnotation",(function(e,t){var n,i=null==(n=r.selectedShape)?void 0:n.annotation;(i===e||(null==i?void 0:i.isSelection)||i==t)&&r.deselect(),t&&r.removeAnnotation(e),r.removeAnnotation(e),r.addAnnotation(e),r.store.insert(e)})),D(x(r),"deselect",(function(){var e;if(null==(e=r.tools)||e.current.stop(),r.selectedShape){var t=r.selectedShape.annotation;r.selectedShape.destroy?(r.selectedShape.mouseTracker.destroy(),r.selectedShape.destroy(),t.isSelection||r.addAnnotation(t)):Aw(r.selectedShape,"selected"),r.selectedShape=null}})),D(x(r),"onDrawingComplete",(function(e){var t=e.annotation.clone({target:mS(r.viewer,e.annotation.target)});e.annotation=t,r.selectShape(e),r.emit("createSelection",e.annotation),r.mouseTracker.enabled=!1})),D(x(r),"selectShape",(function(e,t){var n;if(!t&&!e.annotation.isSelection&&r.emit("clickAnnotation",e.annotation,e),(null==(n=r.selectedShape)?void 0:n.annotation)!==e.annotation){r.selectedShape&&r.selectedShape.annotation!==e.annotation&&r.deselect(!0);var i=e.annotation;if(r.readOnly||i.readOnly||r.headless)r.selectedShape=e,Rw(e,"selected"),t||r.emit("select",{annotation:i,element:e,skipEvent:t});else{setTimeout((function(){e.parentNode.removeChild(e),t||r.emit("select",{annotation:i,element:r.selectedShape.element})}),1);var o=r.tools.forAnnotation(i);r.selectedShape=o.createEditableShape(i),r.selectedShape.element.annotation=i;var a=wS(r.viewer,i);r.selectedShape.updateState(a);var s=new kw.MouseTracker({element:r.svg,preProcessEventHandler:function(e){e.stopPropagation=!0,e.preventDefault=!1,e.preventGesture=!0}}).setTracking(!1);r.selectedShape.element.addEventListener("mouseenter",(function(){r.hoveredShape=r.selectedShape,s.setTracking(!0)})),r.selectedShape.element.addEventListener("mouseleave",(function(){r.hoveredShape=null,s.setTracking(!1)})),r.selectedShape.mouseTracker=s,r.selectedShape.on("update",(function(e){var t=mS(r.viewer,e);r.selectedShape.element.annotation=r.selectedShape.annotation.clone({target:t}),r.emit("updateTarget",r.selectedShape.element,t)}))}}})),r._initDrawingTools(!0),r}return v(n,[{key:"resize",value:function(){var e=this;if(this.store&&(Array.from(this.g.querySelectorAll(".a9s-annotation:not(.selected)")).forEach((function(t){return PS(e.viewer,t)})),this.selectedShape))if(this.selectedShape.element){var t=wS(this.viewer,this.selectedShape.element.annotation);this.selectedShape.updateState&&this.selectedShape.updateState(t),this.emit("viewportChange",this.selectedShape.element)}else this.emit("viewportChange",this.selectedShape)}}]),n}(dS),MS=0;function LS(e,t,n,r,i){var o,a,s={};for(a in t)"ref"==a?o=t[a]:s[a]=t[a];var l={type:e,props:s,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--MS,__source:r,__self:i};if("function"==typeof e&&(o=e.defaultProps))for(a in o)void 0===s[a]&&(s[a]=o[a]);return b.vnode&&b.vnode(l),l}var jS=function(e){y(n,e);var t=w(n);function n(e){var r;return m(this,n),r=t.call(this,e),D(x(r),"clearState",(function(e){return r.setState({selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null,beforeHeadlessModify:null},e)})),D(x(r),"forwardEvent",(function(e,t){r.annotationLayer.on(e,(function(e,n){r.props[t](e.clone(),n)}))})),D(x(r),"onKeyUp",(function(e){if(27===e.which){r.annotationLayer.stopDrawing();var t=r.state.selectedAnnotation;t&&(r.cancelSelected(),r.props.onCancelSelected(t))}else if(46===e.which&&!r.props.config.disableDeleteKey){var n=r.state.selectedAnnotation;n&&(n.isSelection?r.onCancelAnnotation(n):r.onDeleteAnnotation(n))}})),D(x(r),"handleStartSelect",(function(e){return r.props.onSelectionStarted(e)})),D(x(r),"handleEndSelect",(function(e){return r.props.onSelectionEnded(e)})),D(x(r),"handleSelect",(function(e,t){r.state.editorDisabled?r.onHeadlessSelect(e,t):r.onNormalSelect(e,t)})),D(x(r),"onNormalSelect",(function(e,t){var n=e.annotation,i=e.element;if(n){var o=function(){r.setState({selectedAnnotation:n,selectedDOMElement:i,modifiedTarget:null},(function(){t||(n.isSelection?r.props.onSelectionCreated(n.clone()):r.props.onAnnotationSelected(n.clone(),i))}))},a=r.state.selectedAnnotation;a&&!a.isEqual(n)?r.clearState((function(){r.props.onCancelSelected(a),o()})):o()}else{var s=r.state.selectedAnnotation;s?r.clearState((function(){return r.props.onCancelSelected(s)})):r.clearState()}})),D(x(r),"onHeadlessSelect",(function(e,t){r.saveSelected().then((function(){r.onNormalSelect(e,t)}))})),D(x(r),"handleUpdateTarget",(function(e,t){r.setState({selectedDOMElement:e,modifiedTarget:t});var n=JSON.parse(JSON.stringify(t));r.props.onSelectionTargetChanged(n)})),D(x(r),"handleViewportChange",(function(e){return r.setState({selectedDOMElement:e})})),D(x(r),"overrideAnnotationId",(function(e){return function(t){var n=e.id;r.state.selectedAnnotation?r.setState({selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null},(function(){r.annotationLayer.overrideId(n,t)})):r.annotationLayer.overrideId(n,t)}})),D(x(r),"onCreateOrUpdateAnnotation",(function(e,t){return function(n,i){var o=n.isSelection?n.toAnnotation():n;o=r.state.modifiedTarget?o.clone({target:r.state.modifiedTarget}):o.clone(),r.clearState((function(){r.annotationLayer.addOrUpdateAnnotation(o,i),i?r.props[e](o,i.clone()):r.props[e](o,r.overrideAnnotationId(o)),t&&t()}))}})),D(x(r),"onDeleteAnnotation",(function(e){r.clearState(),r.annotationLayer.removeAnnotation(e),r.props.onAnnotationDeleted(e)})),D(x(r),"onCancelAnnotation",(function(e,t){r.state.editorDisabled||r.annotationLayer.deselect(),r.props.onCancelSelected(e),r.clearState(t)})),D(x(r),"addAnnotation",(function(e){var t;e.id===(null==(t=r.state.selectedAnnotation)?void 0:t.id)&&(r.annotationLayer.deselect(),r.clearState()),r.annotationLayer.addOrUpdateAnnotation(e.clone())})),D(x(r),"addDrawingTool",(function(e){return r.annotationLayer.addDrawingTool(e)})),D(x(r),"cancelSelected",(function(){return new Promise((function(e){r.annotationLayer.deselect(),r.state.selectedAnnotation?r.clearState(e):e()}))})),D(x(r),"fitBounds",(function(e,t){return r.annotationLayer.fitBounds(e,t)})),D(x(r),"fitBoundsWithConstraints",(function(e,t){return r.annotationLayer.fitBoundsWithConstraints(e,t)})),D(x(r),"getAnnotationById",(function(e){var t;return null==(t=r.annotationLayer.findShape(e))?void 0:t.annotation})),D(x(r),"getAnnotations",(function(){return r.annotationLayer.getAnnotations().map((function(e){return e.clone()}))})),D(x(r),"getAnnotationsIntersecting",(function(e){return r.annotationLayer.getAnnotationsIntersecting(e)})),D(x(r),"getImageSnippetById",(function(e){return r.annotationLayer.getImageSnippetById(e)})),D(x(r),"getSelected",(function(){var e;if(r.state.selectedAnnotation)return r.state.editorDisabled?r.state.selectedAnnotation:null==(e=r._editor.current)?void 0:e.getCurrentAnnotation()})),D(x(r),"getSelectedImageSnippet",(function(){return r.annotationLayer.getSelectedImageSnippet()})),D(x(r),"listDrawingTools",(function(){return r.annotationLayer.listDrawingTools()})),D(x(r),"panTo",(function(e,t){return r.annotationLayer.panTo(e,t)})),D(x(r),"removeAnnotation",(function(e){return r.annotationLayer.removeAnnotation(e)})),D(x(r),"removeDrawingTool",(function(e){return r.annotationLayer.removeDrawingTool(e)})),D(x(r),"saveSelected",(function(){return new Promise((function(e){var t=r.state.selectedAnnotation;if(t)if(r._editor.current)r._editor.current.onOk(),e();else if(t.isSelection)t.bodies.length>0||r.props.config.allowEmpty?r.onCreateOrUpdateAnnotation("onAnnotationCreated",e)(t):(r.annotationLayer.deselect(),e());else{var n=r.state,i=n.beforeHeadlessModify,o=n.modifiedTarget;i?r.onCreateOrUpdateAnnotation("onAnnotationUpdated",e)(t,i):o?r.onCreateOrUpdateAnnotation("onAnnotationUpdated",e)(t,t):r.onCancelAnnotation(t,e)}else e()}))})),D(x(r),"selectAnnotation",(function(e){var t=r.annotationLayer.selectAnnotation(e,!0);if(t)return r.handleSelect(t,!0),t.annotation.clone();r.clearState()})),D(x(r),"setAnnotations",(function(e){return r.annotationLayer.init(e.map((function(e){return e.clone()})))})),D(x(r),"setDrawingEnabled",(function(e){return r.annotationLayer.setDrawingEnabled(e)})),D(x(r),"setDrawingTool",(function(e){return r.annotationLayer.setDrawingTool(e)})),D(x(r),"setVisible",(function(e){r.annotationLayer.setVisible(e),e||r.clearState()})),D(x(r),"updateSelected",(function(e,t){return new Promise((function(n){r.state.selectedAnnotation&&(t?r.state.selectedAnnotation.isSelection?r.onCreateOrUpdateAnnotation("onAnnotationCreated",n)(e):r.onCreateOrUpdateAnnotation("onAnnotationUpdated",n)(e,r.state.selectedAnnotation):r.setState({selectedAnnotation:e,beforeHeadlessModify:r.state.beforeHeadlessModify||r.state.selectedAnnotation},n))}))})),r.state={selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null,readOnly:e.config.readOnly,editorDisabled:e.config.disableEditor,widgets:e.config.widgets,beforeHeadlessModify:null},r._editor=_t.createRef(),r}return v(n,[{key:"componentDidMount",value:function(){this.annotationLayer=this.props.config.gigapixelMode?new IS(this.props):new pS(this.props),this.annotationLayer.on("load",this.props.onLoad),this.annotationLayer.on("startSelection",this.handleStartSelect),this.annotationLayer.on("endSelection",this.handleEndSelect),this.annotationLayer.on("select",this.handleSelect),this.annotationLayer.on("updateTarget",this.handleUpdateTarget),this.annotationLayer.on("viewportChange",this.handleViewportChange),this.forwardEvent("clickAnnotation","onClickAnnotation"),this.forwardEvent("mouseEnterAnnotation","onMouseEnterAnnotation"),this.forwardEvent("mouseLeaveAnnotation","onMouseLeaveAnnotation"),document.addEventListener("keyup",this.onKeyUp)}},{key:"componentWillUnmount",value:function(){this.annotationLayer.destroy(),document.removeEventListener("keyup",this.onKeyUp)}},{key:"disableEditor",get:function(){return this.state.editorDisabled},set:function(e){this.setState({editorDisabled:e})}},{key:"disableSelect",get:function(){return this.annotationLayer.disableSelect},set:function(e){this.annotationLayer.disableSelect=e}},{key:"formatters",get:function(){return this.annotationLayer.formatters},set:function(e){this.annotationLayer.formatters=e}},{key:"readOnly",get:function(){return this.state.readOnly},set:function(e){this.annotationLayer.readOnly=e,this.setState({readOnly:e})}},{key:"widgets",get:function(){return this.state.widgets},set:function(e){this.setState({widgets:e})}},{key:"render",value:function(){var e,t=this.state.selectedAnnotation&&!this.state.editorDisabled,n=this.state.readOnly||(null==(e=this.state.selectedAnnotation)?void 0:e.readOnly);return t&&LS(uw,{ref:this._editor,detachable:!0,wrapperEl:this.props.wrapperEl,annotation:this.state.selectedAnnotation,modifiedTarget:this.state.modifiedTarget,selectedElement:this.state.selectedDOMElement,readOnly:n,allowEmpty:this.props.config.allowEmpty,widgets:this.state.widgets,env:this.props.env,onAnnotationCreated:this.onCreateOrUpdateAnnotation("onAnnotationCreated"),onAnnotationUpdated:this.onCreateOrUpdateAnnotation("onAnnotationUpdated"),onAnnotationDeleted:this.onDeleteAnnotation,onCancel:this.onCancelAnnotation})}}]),n}(U),NS=function(){function e(t,n){var r=this;m(this,e),D(this,"handleAnnotationCreated",(function(e,t){return r._emitter.emit("createAnnotation",e.underlying,t)})),D(this,"handleAnnotationDeleted",(function(e){return r._emitter.emit("deleteAnnotation",e.underlying)})),D(this,"handleAnnotationSelected",(function(e,t){return r._emitter.emit("selectAnnotation",e.underlying,t)})),D(this,"handleAnnotationUpdated",(function(e,t){return r._emitter.emit("updateAnnotation",e.underlying,t.underlying)})),D(this,"handleCancelSelected",(function(e){return r._emitter.emit("cancelSelected",e.underlying)})),D(this,"handleClickAnnotation",(function(e,t){return r._emitter.emit("clickAnnotation",e.underlying,t)})),D(this,"handleLoad",(function(e){return r._emitter.emit("load",e)})),D(this,"handleSelectionCreated",(function(e){return r._emitter.emit("createSelection",e.underlying)})),D(this,"handleSelectionStarted",(function(e){return r._emitter.emit("startSelection",e)})),D(this,"handleSelectionEnded",(function(e){return r._emitter.emit("endSelection",e)})),D(this,"handleSelectionTargetChanged",(function(e){return r._emitter.emit("changeSelectionTarget",e)})),D(this,"handleMouseEnterAnnotation",(function(e,t){return r._emitter.emit("mouseEnterAnnotation",e.underlying,t)})),D(this,"handleMouseLeaveAnnotation",(function(e,t){return r._emitter.emit("mouseLeaveAnnotation",e.underlying,t)})),D(this,"_wrap",(function(e){return"Annotation"===(null==e?void 0:e.type)?new xw(e):e})),D(this,"addAnnotation",(function(e){return r._app.current.addAnnotation(new xw(e))})),D(this,"addDrawingTool",(function(e){return r._app.current.addDrawingTool(e)})),D(this,"cancelSelected",(function(){return r._app.current.cancelSelected()})),D(this,"clearAnnotations",(function(){return r.setAnnotations([])})),D(this,"clearAuthInfo",(function(){return r._env.user=null})),D(this,"destroy",(function(){return _t.unmountComponentAtNode(r.appContainerEl)})),D(this,"fitBounds",(function(e,t){return r._app.current.fitBounds(r._wrap(e),t)})),D(this,"fitBoundsWithConstraints",(function(e,t){return r._app.current.fitBoundsWithConstraints(r._wrap(e),t)})),D(this,"getAnnotationById",(function(e){var t=r._app.current.getAnnotationById(e);return null==t?void 0:t.underlying})),D(this,"getAnnotations",(function(){return r._app.current.getAnnotations().map((function(e){return e.underlying}))})),D(this,"getAnnotationsIntersecting",(function(e){return r._app.current.getAnnotationsIntersecting(r._wrap(e))})),D(this,"getImageSnippetById",(function(e){return r._app.current.getImageSnippetById(e)})),D(this,"getSelected",(function(){var e=r._app.current.getSelected();return null==e?void 0:e.underlying})),D(this,"getSelectedImageSnippet",(function(){return r._app.current.getSelectedImageSnippet()})),D(this,"listDrawingTools",(function(){return r._app.current.listDrawingTools()})),D(this,"loadAnnotations",(function(e){return fetch(e).then((function(e){return e.json()})).then((function(e){return r.setAnnotations(e),e}))})),D(this,"off",(function(e,t){return r._emitter.off(e,t)})),D(this,"on",(function(e,t){return r._emitter.on(e,t)})),D(this,"once",(function(e,t){return r._emitter.once(e,t)})),D(this,"panTo",(function(e,t){return r._app.current.panTo(r._wrap(e),t)})),D(this,"removeAnnotation",(function(e){return r._app.current.removeAnnotation(r._wrap(e))})),D(this,"removeDrawingTool",(function(e){return r._app.current.removeDrawingTool(e)})),D(this,"saveSelected",(function(){return r._app.current.saveSelected()})),D(this,"selectAnnotation",(function(e){var t=r._app.current.selectAnnotation(r._wrap(e));return null==t?void 0:t.underlying})),D(this,"setAnnotations",(function(e){var t=(e||[]).map((function(e){return new xw(e)}));r._app.current.setAnnotations(t)})),D(this,"setAuthInfo",(function(e){return r._env.user=e})),D(this,"setDrawingEnabled",(function(e){return r._app.current.setDrawingEnabled(e)})),D(this,"setDrawingTool",(function(e){return r._app.current.setDrawingTool(e)})),D(this,"setServerTime",(function(e){return r._env.setServerTime(e)})),D(this,"setVisible",(function(e){return r._app.current.setVisible(e)})),D(this,"updateSelected",(function(e,t){var n=null;"Annotation"===e.type?n=new xw(e):"Selection"===e.type&&(n=new Sw(e.target,e.body)),n&&r._app.current.updateSelected(n,t)}));var i=n||{};this._app=_t.createRef(),this._emitter=new jt,this._env=Tw(),this._element=t.element,"static"===window.getComputedStyle(this._element).getPropertyValue("position")&&(this._element.style.position="relative"),Pw(i.locale,i.messages),this.appContainerEl=document.createElement("DIV"),this._element.appendChild(this.appContainerEl),_t.render(LS(jS,{ref:this._app,viewer:t,wrapperEl:this._element,config:i,env:this._env,onSelectionStarted:this.handleSelectionStarted,onSelectionEnded:this.handleSelectionEnded,onSelectionCreated:this.handleSelectionCreated,onSelectionTargetChanged:this.handleSelectionTargetChanged,onAnnotationCreated:this.handleAnnotationCreated,onAnnotationSelected:this.handleAnnotationSelected,onAnnotationUpdated:this.handleAnnotationUpdated,onAnnotationDeleted:this.handleAnnotationDeleted,onCancelSelected:this.handleCancelSelected,onClickAnnotation:this.handleClickAnnotation,onLoad:this.handleLoad,onMouseEnterAnnotation:this.handleMouseEnterAnnotation,onMouseLeaveAnnotation:this.handleMouseLeaveAnnotation}),this.appContainerEl)}return v(e,[{key:"disableEditor",get:function(){return this._app.current.disableEditor},set:function(e){this._app.current.disableEditor=e}},{key:"disableSelect",get:function(){return this._app.current.disableSelect},set:function(e){this._app.current.disableSelect=e}},{key:"formatters",get:function(){return this._app.current.formatters||[]},set:function(e){if(e){var t=Array.isArray(e)?e:[e];this._app.current.formatters=t}else this._app.current.formatters=null}},{key:"readOnly",get:function(){return this._app.current.readOnly},set:function(e){this._app.current.readOnly=e}},{key:"widgets",get:function(){return this._app.current.widgets},set:function(e){this._app.current.widgets=e}}]),e}();return function(e,t){return new NS(e,t)}}()},4481:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);r&&a[u[0]]||(void 0!==o&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),t.push(u))}},t}},9924:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},9564:e=>{"use strict";e.exports=function(e){return e[1]}},8847:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7832:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var o=n(8847),a=n(4328);i(n(4328),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?o.ElementType.Tag:void 0,r=new a.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===o.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new a.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===o.ElementType.Comment)this.lastNode.data+=e;else{var t=new a.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new a.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},4328:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var a=n(8847),s=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),S(this,e)},e}();t.Node=s;var l=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return i(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(s);t.DataNode=l;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Text,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(l);t.Text=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Comment,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(l);t.Comment=u;var d=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=a.ElementType.Directive,r}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(l);t.ProcessingInstruction=d;var p=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return i(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=p;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.CDATA,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=h;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Root,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=f;var m=function(e){function t(t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var o=e.call(this,r)||this;return o.name=t,o.attribs=n,o.type=i,o}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(p);function g(e){return(0,a.isTag)(e)}function v(e){return e.type===a.ElementType.CDATA}function y(e){return e.type===a.ElementType.Text}function b(e){return e.type===a.ElementType.Comment}function w(e){return e.type===a.ElementType.Directive}function x(e){return e.type===a.ElementType.Root}function S(e,t){var n;if(void 0===t&&(t=!1),y(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(g(e)){var r=t?E(e.children):[],i=new m(e.name,o({},e.attribs),r);r.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=o({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=o({},e["x-attribsPrefix"])),n=i}else if(v(e)){r=t?E(e.children):[];var a=new h(r);r.forEach((function(e){return e.parent=a})),n=a}else if(x(e)){r=t?E(e.children):[];var s=new f(r);r.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function E(e){for(var t=e.map((function(e){return S(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=m,t.isTag=g,t.isCDATA=v,t.isText=y,t.isComment=b,t.isDirective=w,t.isDocument=x,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=S},2312:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,c,u,d=arguments[0],p=1,h=arguments.length,f=!1;for("boolean"==typeof d&&(f=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<h;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(f&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(f,u,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}},9019:(e,t,n)=>{"use strict";var r=n(1741),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(f){var i=h(n);i&&i!==f&&e(t,i,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),g=0;g<a.length;++g){var v=a[g];if(!(o[v]||r&&r[v]||m&&m[v]||s&&s[v])){var y=p(n,v);try{c(t,v,y)}catch(e){}}}}return t}},5417:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case o:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case m:case l:return e;default:return t}}case i:return t}}}function S(e){return x(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return S(e)||x(e)===u},t.isConcurrentMode=S,t.isContextConsumer=function(e){return x(e)===c},t.isContextProvider=function(e){return x(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===o},t.isLazy=function(e){return x(e)===g},t.isMemo=function(e){return x(e)===m},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===s},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===s||e===a||e===h||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===v)},t.typeOf=x},1741:(e,t,n)=>{"use strict";e.exports=n(5417)},8801:(e,t)=>{t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]},5544:e=>{var t="html",n="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,o=/<head[^]*>/i,a=/<body[^]*>/i,s=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},l=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},c="object"==typeof window&&window.DOMParser;if("function"==typeof c){var u=new c;s=l=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),u.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var d=document.implementation.createHTMLDocument();s=function(e,t){return t?(d.documentElement.querySelector(t).innerHTML=e,d):(d.documentElement.innerHTML=e,d)}}var p,h="object"==typeof document?document.createElement("template"):{};h.content&&(p=function(e){return h.innerHTML=e,h.content.childNodes}),e.exports=function(e){var c,u,d,h,f=e.match(i);switch(f&&f[1]&&(c=f[1].toLowerCase()),c){case t:return u=l(e),o.test(e)||(d=u.querySelector(n))&&d.parentNode.removeChild(d),a.test(e)||(d=u.querySelector(r))&&d.parentNode.removeChild(d),u.querySelectorAll(t);case n:case r:return h=(u=s(e)).querySelectorAll(c),a.test(e)&&o.test(e)?h[0].parentNode.childNodes:h;default:return p?p(e):(d=s(e,r).querySelector(r)).childNodes}}},8395:(e,t,n)=>{var r=n(5544),i=n(9752).formatDOM,o=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(""===e)return[];var t,n=e.match(o);return n&&n[1]&&(t=n[1]),i(r(e),null,t)}},9752:(e,t,n)=>{for(var r,i=n(7832),o=n(8801).CASE_SENSITIVE_TAG_NAMES,a=i.Comment,s=i.Element,l=i.ProcessingInstruction,c=i.Text,u={},d=0,p=o.length;d<p;d++)r=o[d],u[r.toLowerCase()]=r;function h(e){for(var t,n={},r=0,i=e.length;r<i;r++)n[(t=e[r]).name]=t.value;return n}function f(e){var t=function(e){return u[e]}(e=e.toLowerCase());return t||e}t.formatAttributes=h,t.formatDOM=function e(t,n,r){n=n||null;for(var i,o=[],u=0,d=t.length;u<d;u++){var p,m=t[u];switch(m.nodeType){case 1:i=f(m.nodeName),(p=new s(i,h(m.attributes))).children=e("template"===i?m.content.childNodes:m.childNodes,p);break;case 3:p=new c(m.nodeValue);break;case 8:p=new a(m.nodeValue);break;default:continue}var g=o[u-1]||null;g&&(g.next=p),p.parent=n,p.prev=g,p.next=null,o.push(p)}return r&&((p=new l(r.substring(0,r.indexOf(" ")).toLowerCase(),r)).next=o[0]||null,p.parent=n,o.unshift(p),o[1]&&(o[1].prev=o[0])),o}},2281:(e,t,n)=>{var r=n(7832),i=n(8395),o=n(4363),a=n(5653);i="function"==typeof i.default?i.default:i;var s={lowerCaseAttributeNames:!1};function l(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:a(i(e,(t=t||{}).htmlparser2||s),t)}l.domToReact=a,l.htmlToDOM=i,l.attributesToProps=o,l.Comment=r.Comment,l.Element=r.Element,l.ProcessingInstruction=r.ProcessingInstruction,l.Text=r.Text,e.exports=l,l.default=l},4363:(e,t,n)=>{var r=n(6032),i=n(5403),o=["checked","value"],a=["input","select","textarea"],s={reset:!0,submit:!0};function l(e){return r.possibleStandardNames[e]}e.exports=function(e,t){var n,c,u,d,p,h={},f=(e=e||{}).type&&s[e.type];for(n in e)if(u=e[n],r.isCustomAttribute(n))h[n]=u;else if(d=l(c=n.toLowerCase()))switch(p=r.getPropertyInfo(d),-1===o.indexOf(d)||-1===a.indexOf(t)||f||(d=l("default"+c)),h[d]=u,p&&p.type){case r.BOOLEAN:h[d]=!0;break;case r.OVERLOADED_BOOLEAN:""===u&&(h[d]=!0)}else i.PRESERVE_CUSTOM_ATTRIBUTES&&(h[n]=u);return i.setStyleProp(e.style,h),h}},5653:(e,t,n)=>{var r=n(4639),i=n(4363),o=n(5403),a=o.setStyleProp,s=o.canTextBeChildOfNode;function l(e){return o.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&o.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,n){for(var c,u,d,p,h,f=(n=n||{}).library||r,m=f.cloneElement,g=f.createElement,v=f.isValidElement,y=[],b="function"==typeof n.replace,w=n.transform||o.returnFirstArg,x=n.trim,S=0,E=t.length;S<E;S++)if(c=t[S],b&&v(d=n.replace(c)))E>1&&(d=m(d,{key:d.key||S})),y.push(w(d,c,S));else if("text"!==c.type){switch(p=c.attribs,l(c)?a(p.style,p):p&&(p=i(p,c.name)),h=null,c.type){case"script":case"style":c.children[0]&&(p.dangerouslySetInnerHTML={__html:c.children[0].data});break;case"tag":"textarea"===c.name&&c.children[0]?p.defaultValue=c.children[0].data:c.children&&c.children.length&&(h=e(c.children,n));break;default:continue}E>1&&(p.key=S),y.push(w(g(c.name,p,h),c,S))}else{if((u=!c.data.trim().length)&&c.parent&&!s(c.parent))continue;if(x&&u)continue;y.push(w(c.data,c,S))}return 1===y.length?y[0]:y}},5403:(e,t,n)=>{var r=n(4639),i=n(9209).default;var o=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);var a={reactCompat:!0};var s=r.version.split(".")[0]>=16,l=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);e.exports={PRESERVE_CUSTOM_ATTRIBUTES:s,ELEMENTS_WITH_NO_TEXT_CHILDREN:l,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var n="function"==typeof t,r={},i={};for(var o in e){var a=e[o];n&&(r=t(o,a))&&2===r.length?i[r[0]]=r[1]:"string"==typeof a&&(i[a]=o)}return i},isCustomComponent:function(e,t){return-1===e.indexOf("-")?t&&"string"==typeof t.is:!o.has(e)},setStyleProp:function(e,t){if(null!=e)try{t.style=i(e,a)}catch(e){t.style={}}},canTextBeChildOfNode:function(e){return!l.has(e.name)},returnFirstArg:function(e){return e}}},7892:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,p=1;function h(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");p=~r?e.length-r:p+e.length}function f(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=l.source}m.prototype.content=e;var g=[];function v(t){var n=new Error(l.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=p,n.source=e,!l.silent)throw n;g.push(n)}function y(t){var n=t.exec(e);if(n){var r=n[0];return h(r),e=e.slice(r.length),n}}function b(){y(r)}function w(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var r=e.slice(2,n-2);return p+=2,h(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function S(){var e=f(),n=y(i);if(n){if(x(),!y(o))return v("property missing ':'");var r=y(a),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return y(s),l}}return b(),function(){var e,t=[];for(w(t);e=S();)!1!==e&&(t.push(e),w(t));return t}()}},5798:e=>{e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},7948:(e,t,n)=>{var r="Expected a function",i=NaN,o="[object Symbol]",a=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,p="object"==typeof self&&self&&self.Object===Object&&self,h=d||p||Function("return this")(),f=Object.prototype.toString,m=Math.max,g=Math.min,v=function(){return h.Date.now()};function y(e,t,n){var i,o,a,s,l,c,u=0,d=!1,p=!1,h=!0;if("function"!=typeof e)throw new TypeError(r);function f(t){var n=i,r=o;return i=o=void 0,u=t,s=e.apply(r,n)}function y(e){var n=e-c;return void 0===c||n>=t||n<0||p&&e-u>=a}function x(){var e=v();if(y(e))return S(e);l=setTimeout(x,function(e){var n=t-(e-c);return p?g(n,a-(e-u)):n}(e))}function S(e){return l=void 0,h&&i?f(e):(i=o=void 0,s)}function E(){var e=v(),n=y(e);if(i=arguments,o=this,c=e,n){if(void 0===l)return function(e){return u=e,l=setTimeout(x,t),d?f(e):s}(c);if(p)return l=setTimeout(x,t),f(c)}return void 0===l&&(l=setTimeout(x,t)),s}return t=w(t)||0,b(n)&&(d=!!n.leading,a=(p="maxWait"in n)?m(w(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),E.cancel=function(){void 0!==l&&clearTimeout(l),u=0,i=c=o=l=void 0},E.flush=function(){return void 0===l?s:S(v())},E}function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function w(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&f.call(e)==o}(e))return i;if(b(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=b(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=l.test(e);return n||c.test(e)?u(e.slice(2),n?2:8):s.test(e)?i:+e}e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(r);return b(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),y(e,t,{leading:i,maxWait:t,trailing:o})}},2908:function(e,t){var n,r,i,o,a;function s(e){return new s.Viewer(e)}!function(e){e.version={versionStr:"4.1.0",major:parseInt("4",10),minor:parseInt("1",10),revision:parseInt("0",10)};var t,n={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object AsyncFunction]":"function","[object Promise]":"promise","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},r=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.isFunction=function(t){return"function"===e.type(t)},e.isArray=Array.isArray||function(t){return"array"===e.type(t)},e.isWindow=function(e){return e&&"object"==typeof e&&"setInterval"in e},e.type=function(e){return null==e?String(e):n[r.call(e)]||"object"},e.isPlainObject=function(t){if(!t||"object"!==s.type(t)||t.nodeType||e.isWindow(t))return!1;if(t.constructor&&!i.call(t,"constructor")&&!i.call(t.constructor.prototype,"isPrototypeOf"))return!1;var n;for(var r in t)n=r;return void 0===n||i.call(t,n)},e.isEmptyObject=function(e){for(var t in e)return!1;return!0},e.freezeObject=function(t){return Object.freeze?e.freezeObject=Object.freeze:e.freezeObject=function(e){return e},e.freezeObject(t)},e.supportsCanvas=(t=document.createElement("canvas"),!(!e.isFunction(t.getContext)||!t.getContext("2d"))),e.isCanvasTainted=function(e){var t=!1;try{e.getContext("2d").getImageData(0,0,1,1)}catch(e){t=!0}return t},e.supportsAddEventListener=!(!document.documentElement.addEventListener||!document.addEventListener),e.supportsRemoveEventListener=!(!document.documentElement.removeEventListener||!document.removeEventListener),e.supportsEventListenerOptions=function(){var t=0;if(e.supportsAddEventListener)try{var n={get capture(){return t++,!1},get once(){return t++,!1},get passive(){return t++,!1}};window.addEventListener("test",null,n),window.removeEventListener("test",null,n)}catch(e){t=0}return t>=3}(),e.getCurrentPixelDensityRatio=function(){if(e.supportsCanvas){var t=document.createElement("canvas").getContext("2d"),n=window.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return Math.max(n,1)/r}return 1},e.pixelDensityRatio=e.getCurrentPixelDensityRatio()}(s),function(e){e.extend=function(){var t,n,r,i,o,a,l=arguments[0]||{},c=arguments.length,u=!1,d=1;for("boolean"==typeof l&&(u=l,l=arguments[1]||{},d=2),"object"==typeof l||s.isFunction(l)||(l={}),c===d&&(l=this,--d);d<c;d++)if(null!==(t=arguments[d])||void 0!==t)for(n in t){var p=Object.getOwnPropertyDescriptor(t,n);void 0!==p?p.get||p.set?Object.defineProperty(l,n,p):l!==(i=p.value)&&(u&&i&&(s.isPlainObject(i)||(o=s.isArray(i)))?(r=l[n],o?(o=!1,a=r&&s.isArray(r)?r:[]):a=r&&s.isPlainObject(r)?r:{},l[n]=s.extend(u,a,i)):void 0!==i&&(l[n]=i)):e.console.warn('Could not copy inherited property "'+n+'".')}return l};e.extend(e,{DEFAULT_SETTINGS:{xmlPath:null,tileSources:null,tileHost:null,initialPage:0,crossOriginPolicy:!1,ajaxWithCredentials:!1,loadTilesWithAjax:!1,ajaxHeaders:{},splitHashDataForPost:!1,panHorizontal:!0,panVertical:!0,constrainDuringPan:!1,wrapHorizontal:!1,wrapVertical:!1,visibilityRatio:.5,minPixelRatio:.5,defaultZoomLevel:0,minZoomLevel:null,maxZoomLevel:null,homeFillsViewer:!1,clickTimeThreshold:300,clickDistThreshold:5,dblClickTimeThreshold:300,dblClickDistThreshold:20,springStiffness:6.5,animationTime:1.2,gestureSettingsMouse:{dragToPan:!0,scrollToZoom:!0,clickToZoom:!0,dblClickToZoom:!1,dblClickDragToZoom:!1,pinchToZoom:!1,zoomToRefPoint:!0,flickEnabled:!1,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsTouch:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!1,dblClickToZoom:!0,dblClickDragToZoom:!0,pinchToZoom:!0,zoomToRefPoint:!0,flickEnabled:!0,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsPen:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!0,dblClickToZoom:!1,dblClickDragToZoom:!1,pinchToZoom:!1,zoomToRefPoint:!0,flickEnabled:!1,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},gestureSettingsUnknown:{dragToPan:!0,scrollToZoom:!1,clickToZoom:!1,dblClickToZoom:!0,dblClickDragToZoom:!1,pinchToZoom:!0,zoomToRefPoint:!0,flickEnabled:!0,flickMinSpeed:120,flickMomentum:.25,pinchRotate:!1},zoomPerClick:2,zoomPerScroll:1.2,zoomPerDblClickDrag:1.2,zoomPerSecond:1,blendTime:0,alwaysBlend:!1,autoHideControls:!0,immediateRender:!1,minZoomImageRatio:.9,maxZoomPixelRatio:1.1,smoothTileEdgesMinZoom:1.1,iOSDevice:function(){if("object"!=typeof navigator)return!1;var e=navigator.userAgent;return"string"==typeof e&&(-1!==e.indexOf("iPhone")||-1!==e.indexOf("iPad")||-1!==e.indexOf("iPod"))}(),pixelsPerWheelLine:40,pixelsPerArrowPress:40,autoResize:!0,preserveImageSizeOnResize:!1,minScrollDeltaTime:50,rotationIncrement:90,showSequenceControl:!0,sequenceControlAnchor:null,preserveViewport:!1,preserveOverlays:!1,navPrevNextWrap:!1,showNavigationControl:!0,navigationControlAnchor:null,showZoomControl:!0,showHomeControl:!0,showFullPageControl:!0,showRotationControl:!1,showFlipControl:!1,controlsFadeDelay:2e3,controlsFadeLength:1500,mouseNavEnabled:!0,showNavigator:!1,navigatorElement:null,navigatorId:null,navigatorPosition:null,navigatorSizeRatio:.2,navigatorMaintainSizeRatio:!1,navigatorTop:null,navigatorLeft:null,navigatorHeight:null,navigatorWidth:null,navigatorAutoResize:!0,navigatorAutoFade:!0,navigatorRotate:!0,navigatorBackground:"#000",navigatorOpacity:.8,navigatorBorderColor:"#555",navigatorDisplayRegionColor:"#900",degrees:0,flipped:!1,opacity:1,preload:!1,compositeOperation:null,imageSmoothingEnabled:!0,placeholderFillStyle:null,subPixelRoundingForTransparency:null,showReferenceStrip:!1,referenceStripScroll:"horizontal",referenceStripElement:null,referenceStripHeight:null,referenceStripWidth:null,referenceStripPosition:"BOTTOM_LEFT",referenceStripSizeRatio:.2,collectionRows:3,collectionColumns:0,collectionLayout:"horizontal",collectionMode:!1,collectionTileSize:800,collectionTileMargin:80,imageLoaderLimit:0,maxImageCacheCount:200,timeout:3e4,useCanvas:!0,tileRetryMax:0,tileRetryDelay:2500,prefixUrl:"/images/",navImages:{zoomIn:{REST:"zoomin_rest.png",GROUP:"zoomin_grouphover.png",HOVER:"zoomin_hover.png",DOWN:"zoomin_pressed.png"},zoomOut:{REST:"zoomout_rest.png",GROUP:"zoomout_grouphover.png",HOVER:"zoomout_hover.png",DOWN:"zoomout_pressed.png"},home:{REST:"home_rest.png",GROUP:"home_grouphover.png",HOVER:"home_hover.png",DOWN:"home_pressed.png"},fullpage:{REST:"fullpage_rest.png",GROUP:"fullpage_grouphover.png",HOVER:"fullpage_hover.png",DOWN:"fullpage_pressed.png"},rotateleft:{REST:"rotateleft_rest.png",GROUP:"rotateleft_grouphover.png",HOVER:"rotateleft_hover.png",DOWN:"rotateleft_pressed.png"},rotateright:{REST:"rotateright_rest.png",GROUP:"rotateright_grouphover.png",HOVER:"rotateright_hover.png",DOWN:"rotateright_pressed.png"},flip:{REST:"flip_rest.png",GROUP:"flip_grouphover.png",HOVER:"flip_hover.png",DOWN:"flip_pressed.png"},previous:{REST:"previous_rest.png",GROUP:"previous_grouphover.png",HOVER:"previous_hover.png",DOWN:"previous_pressed.png"},next:{REST:"next_rest.png",GROUP:"next_grouphover.png",HOVER:"next_hover.png",DOWN:"next_pressed.png"}},debugMode:!1,debugGridColor:["#437AB2","#1B9E77","#D95F02","#7570B3","#E7298A","#66A61E","#E6AB02","#A6761D","#666666"],silenceMultiImageWarnings:!1},SIGNAL:"----seadragon----",delegate:function(e,t){return function(){var n=arguments;return void 0===n&&(n=[]),t.apply(e,n)}},BROWSERS:{UNKNOWN:0,IE:1,FIREFOX:2,SAFARI:3,CHROME:4,OPERA:5,EDGE:6,CHROMEEDGE:7},SUBPIXEL_ROUNDING_OCCURRENCES:{NEVER:0,ONLY_AT_REST:1,ALWAYS:2},_viewers:new Map,getViewer:function(t){return e._viewers.get(this.getElement(t))},getElement:function(e){return"string"==typeof e&&(e=document.getElementById(e)),e},getElementPosition:function(t){var n,r,o=new e.Point;for(r=i(t=e.getElement(t),n="fixed"===e.getElementStyle(t).position);r;)o.x+=t.offsetLeft,o.y+=t.offsetTop,n&&(o=o.plus(e.getPageScroll())),r=i(t=r,n="fixed"===e.getElementStyle(t).position);return o},getElementOffset:function(t){var n,r,i=(t=e.getElement(t))&&t.ownerDocument,o={top:0,left:0};return i?(n=i.documentElement,void 0!==t.getBoundingClientRect&&(o=t.getBoundingClientRect()),r=i===i.window?i:9===i.nodeType&&(i.defaultView||i.parentWindow),new e.Point(o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0),o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0))):new e.Point},getElementSize:function(t){return t=e.getElement(t),new e.Point(t.clientWidth,t.clientHeight)},getElementStyle:document.documentElement.currentStyle?function(t){return(t=e.getElement(t)).currentStyle}:function(t){return t=e.getElement(t),window.getComputedStyle(t,"")},getCssPropertyWithVendorPrefix:function(t){var n={};return e.getCssPropertyWithVendorPrefix=function(t){if(void 0!==n[t])return n[t];var r=document.createElement("div").style,i=null;if(void 0!==r[t])i=t;else for(var o=["Webkit","Moz","MS","O","webkit","moz","ms","o"],a=e.capitalizeFirstLetter(t),s=0;s<o.length;s++){var l=o[s]+a;if(void 0!==r[l]){i=l;break}}return n[t]=i,i},e.getCssPropertyWithVendorPrefix(t)},capitalizeFirstLetter:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},positiveModulo:function(e,t){var n=e%t;return n<0&&(n+=t),n},pointInElement:function(t,n){t=e.getElement(t);var r=e.getElementOffset(t),i=e.getElementSize(t);return n.x>=r.x&&n.x<r.x+i.x&&n.y<r.y+i.y&&n.y>=r.y},getMousePosition:function(t){if("number"==typeof t.pageX)e.getMousePosition=function(t){var n=new e.Point;return n.x=t.pageX,n.y=t.pageY,n};else{if("number"!=typeof t.clientX)throw new Error("Unknown event mouse position, no known technique.");e.getMousePosition=function(t){var n=new e.Point;return n.x=t.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,n.y=t.clientY+document.body.scrollTop+document.documentElement.scrollTop,n}}return e.getMousePosition(t)},getPageScroll:function(){var t=document.documentElement||{},n=document.body||{};if("number"==typeof window.pageXOffset)e.getPageScroll=function(){return new e.Point(window.pageXOffset,window.pageYOffset)};else if(n.scrollLeft||n.scrollTop)e.getPageScroll=function(){return new e.Point(document.body.scrollLeft,document.body.scrollTop)};else{if(!t.scrollLeft&&!t.scrollTop)return new e.Point(0,0);e.getPageScroll=function(){return new e.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)}}return e.getPageScroll()},setPageScroll:function(t){if(void 0!==window.scrollTo)e.setPageScroll=function(e){window.scrollTo(e.x,e.y)};else{var n=e.getPageScroll();if(n.x===t.x&&n.y===t.y)return;document.body.scrollLeft=t.x,document.body.scrollTop=t.y;var r=e.getPageScroll();if(r.x!==n.x&&r.y!==n.y)return void(e.setPageScroll=function(e){document.body.scrollLeft=e.x,document.body.scrollTop=e.y});if(document.documentElement.scrollLeft=t.x,document.documentElement.scrollTop=t.y,(r=e.getPageScroll()).x!==n.x&&r.y!==n.y)return void(e.setPageScroll=function(e){document.documentElement.scrollLeft=e.x,document.documentElement.scrollTop=e.y});e.setPageScroll=function(e){}}e.setPageScroll(t)},getWindowSize:function(){var t=document.documentElement||{},n=document.body||{};if("number"==typeof window.innerWidth)e.getWindowSize=function(){return new e.Point(window.innerWidth,window.innerHeight)};else if(t.clientWidth||t.clientHeight)e.getWindowSize=function(){return new e.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else{if(!n.clientWidth&&!n.clientHeight)throw new Error("Unknown window size, no known technique.");e.getWindowSize=function(){return new e.Point(document.body.clientWidth,document.body.clientHeight)}}return e.getWindowSize()},makeCenteredNode:function(t){t=e.getElement(t);var n=[e.makeNeutralElement("div"),e.makeNeutralElement("div"),e.makeNeutralElement("div")];return e.extend(n[0].style,{display:"table",height:"100%",width:"100%"}),e.extend(n[1].style,{display:"table-row"}),e.extend(n[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),n[0].appendChild(n[1]),n[1].appendChild(n[2]),n[2].appendChild(t),n[0]},makeNeutralElement:function(e){var t=document.createElement(e),n=t.style;return n.background="transparent none",n.border="none",n.margin="0px",n.padding="0px",n.position="static",t},now:function(){return Date.now?e.now=Date.now:e.now=function(){return(new Date).getTime()},e.now()},makeTransparentImage:function(t){var n=e.makeNeutralElement("img");return n.src=t,n},setElementOpacity:function(t,n,r){var i;t=e.getElement(t),r&&!e.Browser.alpha&&(n=Math.round(n)),e.Browser.opacity?t.style.opacity=n<1?n:"":n<1?(i="alpha(opacity="+Math.round(100*n)+")",t.style.filter=i):t.style.filter=""},setElementTouchActionNone:function(t){void 0!==(t=e.getElement(t)).style.touchAction?t.style.touchAction="none":void 0!==t.style.msTouchAction&&(t.style.msTouchAction="none")},setElementPointerEvents:function(t,n){void 0!==(t=e.getElement(t)).style&&void 0!==t.style.pointerEvents&&(t.style.pointerEvents=n)},setElementPointerEventsNone:function(t){e.setElementPointerEvents(t,"none")},addClass:function(t,n){(t=e.getElement(t)).className?-1===(" "+t.className+" ").indexOf(" "+n+" ")&&(t.className+=" "+n):t.className=n},indexOf:function(e,t,n){return Array.prototype.indexOf?this.indexOf=function(e,t,n){return e.indexOf(t,n)}:this.indexOf=function(e,t,n){var r,i,o=n||0;if(!e)throw new TypeError;if(0===(i=e.length)||o>=i)return-1;for(o<0&&(o=i-Math.abs(o)),r=o;r<i;r++)if(e[r]===t)return r;return-1},this.indexOf(e,t,n)},removeClass:function(t,n){var r,i,o=[];for(r=(t=e.getElement(t)).className.split(/\s+/),i=0;i<r.length;i++)r[i]&&r[i]!==n&&o.push(r[i]);t.className=o.join(" ")},normalizeEventListenerOptions:function(t){return void 0!==t?"boolean"==typeof t?e.supportsEventListenerOptions?{capture:t}:t:e.supportsEventListenerOptions?t:void 0!==t.capture&&t.capture:!!e.supportsEventListenerOptions&&{capture:!1}},addEvent:function(){if(e.supportsAddEventListener)return function(t,n,r,i){i=e.normalizeEventListenerOptions(i),(t=e.getElement(t)).addEventListener(n,r,i)};if(document.documentElement.attachEvent&&document.attachEvent)return function(t,n,r){(t=e.getElement(t)).attachEvent("on"+n,r)};throw new Error("No known event model.")}(),removeEvent:function(){if(e.supportsRemoveEventListener)return function(t,n,r,i){i=e.normalizeEventListenerOptions(i),(t=e.getElement(t)).removeEventListener(n,r,i)};if(document.documentElement.detachEvent&&document.detachEvent)return function(t,n,r){(t=e.getElement(t)).detachEvent("on"+n,r)};throw new Error("No known event model.")}(),cancelEvent:function(e){e.preventDefault()},eventIsCanceled:function(e){return e.defaultPrevented},stopEvent:function(e){e.stopPropagation()},createCallback:function(e,t){var n,r=[];for(n=2;n<arguments.length;n++)r.push(arguments[n]);return function(){var n,i=r.concat([]);for(n=0;n<arguments.length;n++)i.push(arguments[n]);return t.apply(e,i)}},getUrlParameter:function(e){var t=r[e];return t||null},getUrlProtocol:function(e){var t=e.match(/^([a-z]+:)\/\//i);return null===t?window.location.protocol:t[1].toLowerCase()},createAjaxRequest:function(t){var n;try{n=!!new ActiveXObject("Microsoft.XMLHTTP")}catch(e){n=!1}if(n)window.XMLHttpRequest?e.createAjaxRequest=function(e){return e?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest}:e.createAjaxRequest=function(){return new ActiveXObject("Microsoft.XMLHTTP")};else{if(!window.XMLHttpRequest)throw new Error("Browser doesn't support XMLHttpRequest.");e.createAjaxRequest=function(){return new XMLHttpRequest}}return e.createAjaxRequest(t)},makeAjaxRequest:function(t,n,r){var i,o,a,s;e.isPlainObject(t)&&(n=t.success,r=t.error,i=t.withCredentials,o=t.headers,a=t.responseType||null,s=t.postData||null,t=t.url);var l=e.getUrlProtocol(t),c=e.createAjaxRequest("file:"===l);if(!e.isFunction(n))throw new Error("makeAjaxRequest requires a success callback");c.onreadystatechange=function(){4===c.readyState&&(c.onreadystatechange=function(){},c.status>=200&&c.status<300||0===c.status&&"http:"!==l&&"https:"!==l?n(c):e.isFunction(r)?r(c):e.console.error("AJAX request returned %d: %s",c.status,t))};var u=s?"POST":"GET";try{if(c.open(u,t,!0),a&&(c.responseType=a),o)for(var d in o)Object.prototype.hasOwnProperty.call(o,d)&&o[d]&&c.setRequestHeader(d,o[d]);i&&(c.withCredentials=!0),c.send(s)}catch(t){e.console.error("%s while making AJAX request: %s",t.name,t.message),c.onreadystatechange=function(){},e.isFunction(r)&&r(c,t)}return c},jsonp:function(t){var n,r=t.url,i=document.head||document.getElementsByTagName("head")[0]||document.documentElement,o=t.callbackName||"openseadragon"+e.now(),a=window[o],s="$1"+o+"$2",l=t.param||"callback",c=t.callback;r=r.replace(/(=)\?(&|$)|\?\?/i,s),r+=(/\?/.test(r)?"&":"?")+l+"="+o,window[o]=function(t){if(a)window[o]=a;else try{delete window[o]}catch(e){}c&&e.isFunction(c)&&c(t)},n=document.createElement("script"),void 0===t.async&&!1===t.async||(n.async="async"),t.scriptCharset&&(n.charset=t.scriptCharset),n.src=r,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,i&&n.parentNode&&i.removeChild(n),n=void 0)},i.insertBefore(n,i.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(t){if(window.DOMParser)e.parseXml=function(e){return(new DOMParser).parseFromString(e,"text/xml")};else{if(!window.ActiveXObject)throw new Error("Browser doesn't support XML DOM.");e.parseXml=function(e){var t=null;return(t=new ActiveXObject("Microsoft.XMLDOM")).async=!1,t.loadXML(e),t}}return e.parseXml(t)},parseJSON:function(t){return e.parseJSON=window.JSON.parse,e.parseJSON(t)},imageFormatSupported:function(e){return!!n[(e=e||"").toLowerCase()]},setImageFormatsSupported:function(t){e.extend(n,t)}});var t=function(e){};e.console=window.console||{log:t,debug:t,info:t,warn:t,error:t,assert:t},e.Browser={vendor:e.BROWSERS.UNKNOWN,version:0,alpha:!0};var n={bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1},r={};function i(e,t){return t&&e!==document.body?document.body:e.offsetParent}!function(){var t=navigator.appVersion,n=navigator.userAgent;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&(e.Browser.vendor=e.BROWSERS.IE,e.Browser.version=parseFloat(n.substring(n.indexOf("MSIE")+5,n.indexOf(";",n.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(n.indexOf("Edge")>=0?(e.Browser.vendor=e.BROWSERS.EDGE,e.Browser.version=parseFloat(n.substring(n.indexOf("Edge")+5))):n.indexOf("Edg")>=0?(e.Browser.vendor=e.BROWSERS.CHROMEEDGE,e.Browser.version=parseFloat(n.substring(n.indexOf("Edg")+4))):n.indexOf("Firefox")>=0?(e.Browser.vendor=e.BROWSERS.FIREFOX,e.Browser.version=parseFloat(n.substring(n.indexOf("Firefox")+8))):n.indexOf("Safari")>=0?(e.Browser.vendor=n.indexOf("Chrome")>=0?e.BROWSERS.CHROME:e.BROWSERS.SAFARI,e.Browser.version=parseFloat(n.substring(n.substring(0,n.indexOf("Safari")).lastIndexOf("/")+1,n.indexOf("Safari")))):null!==new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(n)&&(e.Browser.vendor=e.BROWSERS.IE,e.Browser.version=parseFloat(RegExp.$1)));break;case"Opera":e.Browser.vendor=e.BROWSERS.OPERA,e.Browser.version=parseFloat(t)}var i,o,a,s=window.location.search.substring(1).split("&");for(a=0;a<s.length;a++)if((o=(i=s[a]).indexOf("="))>0){var l=i.substring(0,o),c=i.substring(o+1);try{r[l]=decodeURIComponent(c)}catch(t){e.console.error("Ignoring malformed URL parameter: %s=%s",l,c)}}e.Browser.alpha=!(e.Browser.vendor===e.BROWSERS.CHROME&&e.Browser.version<2),e.Browser.opacity=!0,e.Browser.vendor===e.BROWSERS.IE&&e.Browser.version<11&&e.console.error("Internet Explorer versions < 11 are not supported by OpenSeadragon")}(),function(t){var n=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame,r=t.cancelAnimationFrame||t.mozCancelAnimationFrame||t.webkitCancelAnimationFrame||t.msCancelAnimationFrame;if(n&&r)e.requestAnimationFrame=function(){return n.apply(t,arguments)},e.cancelAnimationFrame=function(){return r.apply(t,arguments)};else{var i,o=[],a=[],s=0;e.requestAnimationFrame=function(t){return o.push([++s,t]),i||(i=setInterval((function(){if(o.length){var t=e.now(),n=a;for(a=o,o=n;a.length;)a.shift()[1](t)}else clearInterval(i),i=void 0}),20)),s},e.cancelAnimationFrame=function(e){var t,n;for(t=0,n=o.length;t<n;t+=1)if(o[t][0]===e)return void o.splice(t,1);for(t=0,n=a.length;t<n;t+=1)if(a[t][0]===e)return void a.splice(t,1)}}}(window)}(s),r=[],void 0===(i="function"==typeof(n=function(){return s})?n.apply(t,r):n)||(e.exports=i),o=s,a={supportsFullScreen:!1,isFullScreen:function(){return!1},getFullScreenElement:function(){return null},requestFullScreen:function(){},exitFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",fullScreenErrorEventName:""},document.exitFullscreen?(a.supportsFullScreen=!0,a.getFullScreenElement=function(){return document.fullscreenElement},a.requestFullScreen=function(e){return e.requestFullscreen()},a.exitFullScreen=function(){document.exitFullscreen()},a.fullScreenEventName="fullscreenchange",a.fullScreenErrorEventName="fullscreenerror"):document.msExitFullscreen?(a.supportsFullScreen=!0,a.getFullScreenElement=function(){return document.msFullscreenElement},a.requestFullScreen=function(e){return e.msRequestFullscreen()},a.exitFullScreen=function(){document.msExitFullscreen()},a.fullScreenEventName="MSFullscreenChange",a.fullScreenErrorEventName="MSFullscreenError"):document.webkitExitFullscreen?(a.supportsFullScreen=!0,a.getFullScreenElement=function(){return document.webkitFullscreenElement},a.requestFullScreen=function(e){return e.webkitRequestFullscreen()},a.exitFullScreen=function(){document.webkitExitFullscreen()},a.fullScreenEventName="webkitfullscreenchange",a.fullScreenErrorEventName="webkitfullscreenerror"):document.webkitCancelFullScreen?(a.supportsFullScreen=!0,a.getFullScreenElement=function(){return document.webkitCurrentFullScreenElement},a.requestFullScreen=function(e){return e.webkitRequestFullScreen()},a.exitFullScreen=function(){document.webkitCancelFullScreen()},a.fullScreenEventName="webkitfullscreenchange",a.fullScreenErrorEventName="webkitfullscreenerror"):document.mozCancelFullScreen&&(a.supportsFullScreen=!0,a.getFullScreenElement=function(){return document.mozFullScreenElement},a.requestFullScreen=function(e){return e.mozRequestFullScreen()},a.exitFullScreen=function(){document.mozCancelFullScreen()},a.fullScreenEventName="mozfullscreenchange",a.fullScreenErrorEventName="mozfullscreenerror"),a.isFullScreen=function(){return null!==a.getFullScreenElement()},a.cancelFullScreen=function(){o.console.error("cancelFullScreen is deprecated. Use exitFullScreen instead."),a.exitFullScreen()},o.extend(o,a),function(e){e.EventSource=function(){this.events={}},e.EventSource.prototype={addOnceHandler:function(e,t,n,r,i){var o=this;r=r||1;var a=0;this.addHandler(e,(function n(i){return++a===r&&o.removeHandler(e,n),t(i)}),n,i)},addHandler:function(t,n,r,i){var o=this.events[t];if(o||(this.events[t]=o=[]),n&&e.isFunction(n)){var a=o.length,s={handler:n,userData:r||null,priority:i||0};for(o[a]=s;a>0&&o[a-1].priority<o[a].priority;)o[a]=o[a-1],o[a-1]=s,a--}},removeHandler:function(t,n){var r,i=this.events[t],o=[];if(i&&e.isArray(i)){for(r=0;r<i.length;r++)i[r].handler!==n&&o.push(i[r]);this.events[t]=o}},numberOfHandlers:function(e){var t=this.events[e];return t?t.length:0},removeAllHandlers:function(e){if(e)this.events[e]=[];else for(var t in this.events)this.events[t]=[]},getHandler:function(e){var t=this.events[e];return t&&t.length?(t=1===t.length?[t[0]]:Array.apply(null,t),function(e,n){var r,i=t.length;for(r=0;r<i;r++)t[r]&&(n.eventSource=e,n.userData=t[r].userData,t[r].handler(n))}):null},raiseEvent:function(e,t){var n=this.getHandler(e);if(n)return n(this,t||{})}}}(s),function(e){var t=[],n={};e.MouseTracker=function(r){t.push(this);var i=arguments;e.isPlainObject(r)||(r={element:i[0],clickTimeThreshold:i[1],clickDistThreshold:i[2]}),this.hash=Math.random(),this.element=e.getElement(r.element),this.clickTimeThreshold=r.clickTimeThreshold||e.DEFAULT_SETTINGS.clickTimeThreshold,this.clickDistThreshold=r.clickDistThreshold||e.DEFAULT_SETTINGS.clickDistThreshold,this.dblClickTimeThreshold=r.dblClickTimeThreshold||e.DEFAULT_SETTINGS.dblClickTimeThreshold,this.dblClickDistThreshold=r.dblClickDistThreshold||e.DEFAULT_SETTINGS.dblClickDistThreshold,this.userData=r.userData||null,this.stopDelay=r.stopDelay||50,this.preProcessEventHandler=r.preProcessEventHandler||null,this.contextMenuHandler=r.contextMenuHandler||null,this.enterHandler=r.enterHandler||null,this.leaveHandler=r.leaveHandler||null,this.exitHandler=r.exitHandler||null,this.overHandler=r.overHandler||null,this.outHandler=r.outHandler||null,this.pressHandler=r.pressHandler||null,this.nonPrimaryPressHandler=r.nonPrimaryPressHandler||null,this.releaseHandler=r.releaseHandler||null,this.nonPrimaryReleaseHandler=r.nonPrimaryReleaseHandler||null,this.moveHandler=r.moveHandler||null,this.scrollHandler=r.scrollHandler||null,this.clickHandler=r.clickHandler||null,this.dblClickHandler=r.dblClickHandler||null,this.dragHandler=r.dragHandler||null,this.dragEndHandler=r.dragEndHandler||null,this.pinchHandler=r.pinchHandler||null,this.stopHandler=r.stopHandler||null,this.keyDownHandler=r.keyDownHandler||null,this.keyUpHandler=r.keyUpHandler||null,this.keyHandler=r.keyHandler||null,this.focusHandler=r.focusHandler||null,this.blurHandler=r.blurHandler||null;var o=this;n[this.hash]={click:function(t){!function(t,n){var r={originalEvent:n,eventType:"click",pointerType:"mouse",isEmulated:!1};L(t,r),r.preventDefault&&!r.defaultPrevented&&e.cancelEvent(n);r.stopPropagation&&e.stopEvent(n)}(o,t)},dblclick:function(t){!function(t,n){var r={originalEvent:n,eventType:"dblclick",pointerType:"mouse",isEmulated:!1};L(t,r),r.preventDefault&&!r.defaultPrevented&&e.cancelEvent(n);r.stopPropagation&&e.stopEvent(n)}(o,t)},keydown:function(t){!function(t,n){var r=null,i={originalEvent:n,eventType:"keydown",pointerType:"",isEmulated:!1};L(t,i),!t.keyDownHandler||i.preventGesture||i.defaultPrevented||(r={eventSource:t,keyCode:n.keyCode?n.keyCode:n.charCode,ctrl:n.ctrlKey,shift:n.shiftKey,alt:n.altKey,meta:n.metaKey,originalEvent:n,preventDefault:i.preventDefault||i.defaultPrevented,userData:t.userData},t.keyDownHandler(r));(r&&r.preventDefault||i.preventDefault&&!i.defaultPrevented)&&e.cancelEvent(n);i.stopPropagation&&e.stopEvent(n)}(o,t)},keyup:function(t){!function(t,n){var r=null,i={originalEvent:n,eventType:"keyup",pointerType:"",isEmulated:!1};L(t,i),!t.keyUpHandler||i.preventGesture||i.defaultPrevented||(r={eventSource:t,keyCode:n.keyCode?n.keyCode:n.charCode,ctrl:n.ctrlKey,shift:n.shiftKey,alt:n.altKey,meta:n.metaKey,originalEvent:n,preventDefault:i.preventDefault||i.defaultPrevented,userData:t.userData},t.keyUpHandler(r));(r&&r.preventDefault||i.preventDefault&&!i.defaultPrevented)&&e.cancelEvent(n);i.stopPropagation&&e.stopEvent(n)}(o,t)},keypress:function(t){!function(t,n){var r=null,i={originalEvent:n,eventType:"keypress",pointerType:"",isEmulated:!1};L(t,i),!t.keyHandler||i.preventGesture||i.defaultPrevented||(r={eventSource:t,keyCode:n.keyCode?n.keyCode:n.charCode,ctrl:n.ctrlKey,shift:n.shiftKey,alt:n.altKey,meta:n.metaKey,originalEvent:n,preventDefault:i.preventDefault||i.defaultPrevented,userData:t.userData},t.keyHandler(r));(r&&r.preventDefault||i.preventDefault&&!i.defaultPrevented)&&e.cancelEvent(n);i.stopPropagation&&e.stopEvent(n)}(o,t)},focus:function(e){!function(e,t){var n={originalEvent:t,eventType:"focus",pointerType:"",isEmulated:!1};L(e,n),e.focusHandler&&!n.preventGesture&&e.focusHandler({eventSource:e,originalEvent:t,userData:e.userData})}(o,e)},blur:function(e){!function(e,t){var n={originalEvent:t,eventType:"blur",pointerType:"",isEmulated:!1};L(e,n),e.blurHandler&&!n.preventGesture&&e.blurHandler({eventSource:e,originalEvent:t,userData:e.userData})}(o,e)},contextmenu:function(t){!function(t,n){var r=null,i={originalEvent:n,eventType:"contextmenu",pointerType:"mouse",isEmulated:!1};L(t,i),!t.contextMenuHandler||i.preventGesture||i.defaultPrevented||(r={eventSource:t,position:w(y(n),t.element),originalEvent:i.originalEvent,preventDefault:i.preventDefault||i.defaultPrevented,userData:t.userData},t.contextMenuHandler(r));(r&&r.preventDefault||i.preventDefault&&!i.defaultPrevented)&&e.cancelEvent(n);i.stopPropagation&&e.stopEvent(n)}(o,t)},wheel:function(e){!function(e,t){E(e,t,t)}(o,e)},mousewheel:function(e){S(o,e)},DOMMouseScroll:function(e){S(o,e)},MozMousePixelScroll:function(e){S(o,e)},losecapture:function(t){!function(t,n){var r={id:e.MouseTracker.mousePointerId,type:"mouse"},i={originalEvent:n,eventType:"lostpointercapture",pointerType:"mouse",isEmulated:!1};L(t,i),n.target===t.element&&j(t,r,!1);i.stopPropagation&&e.stopEvent(n)}(o,t)},mouseenter:function(e){T(o,e)},mouseleave:function(e){P(o,e)},mouseover:function(e){C(o,e)},mouseout:function(e){k(o,e)},mousedown:function(e){O(o,e)},mouseup:function(e){_(o,e)},mousemove:function(e){A(o,e)},touchstart:function(t){!function(t,n){var r,i,o,a=n.changedTouches.length,s=t.getActivePointersListByType("touch");r=e.now(),s.getLength()>n.touches.length-a&&e.console.warn("Tracked touch contact count doesn't match event.touches.length");var l={originalEvent:n,eventType:"pointerdown",pointerType:"touch",isEmulated:!1};for(L(t,l),i=0;i<a;i++)N(t,l,o={id:n.changedTouches[i].identifier,type:"touch",isPrimary:0===s.getLength(),currentPos:y(n.changedTouches[i]),currentTime:r}),B(t,l,o,0),j(t,o,!0);l.preventDefault&&!l.defaultPrevented&&e.cancelEvent(n);l.stopPropagation&&e.stopEvent(n)}(o,t)},touchend:function(t){!function(t,n){var r,i,o,a=n.changedTouches.length;r=e.now();var s={originalEvent:n,eventType:"pointerup",pointerType:"touch",isEmulated:!1};for(L(t,s),i=0;i<a;i++)z(t,s,o={id:n.changedTouches[i].identifier,type:"touch",currentPos:y(n.changedTouches[i]),currentTime:r},0),j(t,o,!1),F(t,s,o);s.preventDefault&&!s.defaultPrevented&&e.cancelEvent(n);s.stopPropagation&&e.stopEvent(n)}(o,t)},touchmove:function(t){!function(t,n){var r,i,o=n.changedTouches.length;r=e.now();var a={originalEvent:n,eventType:"pointermove",pointerType:"touch",isEmulated:!1};for(L(t,a),i=0;i<o;i++)H(t,a,{id:n.changedTouches[i].identifier,type:"touch",currentPos:y(n.changedTouches[i]),currentTime:r});a.preventDefault&&!a.defaultPrevented&&e.cancelEvent(n);a.stopPropagation&&e.stopEvent(n)}(o,t)},touchcancel:function(t){!function(t,n){var r,i=n.changedTouches.length,o={originalEvent:n,eventType:"pointercancel",pointerType:"touch",isEmulated:!1};for(L(t,o),r=0;r<i;r++)U(t,o,{id:n.changedTouches[r].identifier,type:"touch"});o.stopPropagation&&e.stopEvent(n)}(o,t)},gesturestart:function(t){!function(t,n){e.eventIsCanceled(n)||n.preventDefault()}(0,t)},gesturechange:function(t){!function(t,n){e.eventIsCanceled(n)||n.preventDefault()}(0,t)},gotpointercapture:function(t){!function(t,n){var r={originalEvent:n,eventType:"gotpointercapture",pointerType:g(n),isEmulated:!1};L(t,r),n.target===t.element&&j(t,{id:n.pointerId,type:g(n)},!0);r.stopPropagation&&e.stopEvent(n)}(o,t)},lostpointercapture:function(t){!function(t,n){var r={originalEvent:n,eventType:"lostpointercapture",pointerType:g(n),isEmulated:!1};L(t,r),n.target===t.element&&j(t,{id:n.pointerId,type:g(n)},!1);r.stopPropagation&&e.stopEvent(n)}(o,t)},pointerenter:function(e){T(o,e)},pointerleave:function(e){P(o,e)},pointerover:function(e){C(o,e)},pointerout:function(e){k(o,e)},pointerdown:function(e){O(o,e)},pointerup:function(e){_(o,e)},pointermove:function(e){A(o,e)},pointercancel:function(t){!function(t,n){var r={id:n.pointerId,type:g(n)},i={originalEvent:n,eventType:"pointercancel",pointerType:r.type,isEmulated:!1};L(t,i),U(t,i,r),i.stopPropagation&&e.stopEvent(n)}(o,t)},pointerupcaptured:function(t){!function(t,n){var r=t.getActivePointersListByType(g(n));r.getById(n.pointerId)&&R(t,n);e.stopEvent(n)}(o,t)},pointermovecaptured:function(t){!function(t,n){var r=t.getActivePointersListByType(g(n));r.getById(n.pointerId)&&D(t,n);e.stopEvent(n)}(o,t)},tracking:!1,activePointersLists:[],lastClickPos:null,dblClickTimeOut:null,pinchGPoints:[],lastPinchDist:0,currentPinchDist:0,lastPinchCenter:null,currentPinchCenter:null,sentDragEvent:!1},this.hasGestureHandlers=!!(this.pressHandler||this.nonPrimaryPressHandler||this.releaseHandler||this.nonPrimaryReleaseHandler||this.clickHandler||this.dblClickHandler||this.dragHandler||this.dragEndHandler||this.pinchHandler),this.hasScrollHandler=!!this.scrollHandler,e.MouseTracker.havePointerEvents&&e.setElementPointerEvents(this.element,"auto"),this.exitHandler&&e.console.error("MouseTracker.exitHandler is deprecated. Use MouseTracker.leaveHandler instead."),r.startDisabled||this.setTracking(!0)},e.MouseTracker.prototype={destroy:function(){var e;for(p(this),this.element=null,e=0;e<t.length;e++)if(t[e]===this){t.splice(e,1);break}n[this.hash]=null,delete n[this.hash]},isTracking:function(){return n[this.hash].tracking},setTracking:function(t){return t?function(t){var r,i,o=n[t.hash];if(!o.tracking){for(i=0;i<e.MouseTracker.subscribeEvents.length;i++)r=e.MouseTracker.subscribeEvents[i],e.addEvent(t.element,r,o[r],r===e.MouseTracker.wheelEventName&&{passive:!1,capture:!1});d(t),o.tracking=!0}}(this):p(this),this},getActivePointersListByType:function(t){var r,i,o=n[this.hash],a=o.activePointersLists.length;for(r=0;r<a;r++)if(o.activePointersLists[r].type===t)return o.activePointersLists[r];return i=new e.MouseTracker.GesturePointList(t),o.activePointersLists.push(i),i},getActivePointerCount:function(){var e,t=n[this.hash],r=t.activePointersLists.length,i=0;for(e=0;e<r;e++)i+=t.activePointersLists[e].getLength();return i},preProcessEventHandler:function(){},contextMenuHandler:function(){},enterHandler:function(){},leaveHandler:function(){},exitHandler:function(){},overHandler:function(){},outHandler:function(){},pressHandler:function(){},nonPrimaryPressHandler:function(){},releaseHandler:function(){},nonPrimaryReleaseHandler:function(){},moveHandler:function(){},scrollHandler:function(){},clickHandler:function(){},dblClickHandler:function(){},dragHandler:function(){},dragEndHandler:function(){},pinchHandler:function(){},stopHandler:function(){},keyDownHandler:function(){},keyUpHandler:function(){},keyHandler:function(){},focusHandler:function(){},blurHandler:function(){}};var r,i,o,a,s,l,c=function(){try{return window.self!==window.top}catch(e){return!0}}();function u(e){try{return e.addEventListener&&e.removeEventListener}catch(e){return!1}}function d(e){var t,r,i,o,a,s=n[e.hash],l=s.activePointersLists.length;for(t=0;t<l;t++)if((i=s.activePointersLists[t]).getLength()>0){for(a=[],o=i.asArray(),r=0;r<o.length;r++)a.push(o[r]);for(r=0;r<a.length;r++)M(e,i,a[r])}for(t=0;t<l;t++)s.activePointersLists.pop();s.sentDragEvent=!1}function p(t){var r,i,o=n[t.hash];if(o.tracking){for(i=0;i<e.MouseTracker.subscribeEvents.length;i++)r=e.MouseTracker.subscribeEvents[i],e.removeEvent(t.element,r,o[r],!1);d(t),o.tracking=!1}}function h(e,t){var r=n[e.hash];if("pointerevent"===t)return{upName:"pointerup",upHandler:r.pointerupcaptured,moveName:"pointermove",moveHandler:r.pointermovecaptured};if("mouse"===t)return{upName:"pointerup",upHandler:r.pointerupcaptured,moveName:"pointermove",moveHandler:r.pointermovecaptured};if("touch"===t)return{upName:"touchend",upHandler:r.touchendcaptured,moveName:"touchmove",moveHandler:r.touchmovecaptured};throw new Error("MouseTracker.getCaptureEventParams: Unknown pointer type.")}function f(t,n){var r,i;if(e.MouseTracker.havePointerCapture)if(e.MouseTracker.havePointerEvents){if(!(i=t.getActivePointersListByType(n.type).getById(n.id))||!i.captured)return;try{t.element.releasePointerCapture(n.id)}catch(e){}}else t.element.releaseCapture();else r=h(t,e.MouseTracker.havePointerEvents?"pointerevent":n.type),c&&u(window.top)&&e.removeEvent(window.top,r.upName,r.upHandler,!0),e.removeEvent(e.MouseTracker.captureElement,r.moveName,r.moveHandler,!0),e.removeEvent(e.MouseTracker.captureElement,r.upName,r.upHandler,!0);j(t,n,!1)}function m(t){return e.MouseTracker.havePointerEvents?t.pointerId:e.MouseTracker.mousePointerId}function g(t){return e.MouseTracker.havePointerEvents?t.pointerType||(e.Browser.vendor===e.BROWSERS.IE?"mouse":""):"mouse"}function v(t){return!e.MouseTracker.havePointerEvents||t.isPrimary}function y(t){return e.getMousePosition(t)}function b(e,t){return w(y(e),t)}function w(t,n){var r=e.getElementOffset(n);return t.minus(r)}function x(t,n){return new e.Point((t.x+n.x)/2,(t.y+n.y)/2)}function S(t,n){var r={target:n.target||n.srcElement,type:"wheel",shiftKey:n.shiftKey||!1,clientX:n.clientX,clientY:n.clientY,pageX:n.pageX?n.pageX:n.clientX,pageY:n.pageY?n.pageY:n.clientY,deltaMode:"MozMousePixelScroll"===n.type?0:1,deltaX:0,deltaZ:0};"mousewheel"===e.MouseTracker.wheelEventName?r.deltaY=-n.wheelDelta/e.DEFAULT_SETTINGS.pixelsPerWheelLine:r.deltaY=n.detail,E(t,r,n)}function E(t,n,r){var i,o,a=null;i=n.deltaY<0?1:-1,L(t,o={originalEvent:n,eventType:"wheel",pointerType:"mouse",isEmulated:n!==r}),!t.scrollHandler||o.preventGesture||o.defaultPrevented||(a={eventSource:t,pointerType:"mouse",position:b(n,t.element),scroll:i,shift:n.shiftKey,isTouchEvent:!1,originalEvent:r,preventDefault:o.preventDefault||o.defaultPrevented,userData:t.userData},t.scrollHandler(a)),o.stopPropagation&&e.stopEvent(r),(a&&a.preventDefault||o.preventDefault&&!o.defaultPrevented)&&e.cancelEvent(r)}function T(t,n){var r={id:m(n),type:g(n),isPrimary:v(n),currentPos:y(n),currentTime:e.now()},i={originalEvent:n,eventType:"pointerenter",pointerType:r.type,isEmulated:!1};L(t,i),N(t,i,r)}function P(t,n){var r={id:m(n),type:g(n),isPrimary:v(n),currentPos:y(n),currentTime:e.now()},i={originalEvent:n,eventType:"pointerleave",pointerType:r.type,isEmulated:!1};L(t,i),F(t,i,r)}function C(t,n){var r={id:m(n),type:g(n),isPrimary:v(n),currentPos:y(n),currentTime:e.now()},i={originalEvent:n,eventType:"pointerover",pointerType:r.type,isEmulated:!1};L(t,i),function(e,t,n){var r,i;r=e.getActivePointersListByType(n.type),i=r.getById(n.id),i?n=i:(n.captured=!1,n.insideElementPressed=!1);e.overHandler&&e.overHandler({eventSource:e,pointerType:n.type,position:w(n.currentPos,e.element),buttons:r.buttons,pointers:e.getActivePointerCount(),insideElementPressed:n.insideElementPressed,buttonDownAny:0!==r.buttons,isTouchEvent:"touch"===n.type,originalEvent:t.originalEvent,userData:e.userData})}(t,i,r),i.preventDefault&&!i.defaultPrevented&&e.cancelEvent(n),i.stopPropagation&&e.stopEvent(n)}function k(t,n){var r={id:m(n),type:g(n),isPrimary:v(n),currentPos:y(n),currentTime:e.now()},i={originalEvent:n,eventType:"pointerout",pointerType:r.type,isEmulated:!1};L(t,i),function(e,t,n){var r,i;r=e.getActivePointersListByType(n.type),i=r.getById(n.id),i?n=i:(n.captured=!1,n.insideElementPressed=!1);e.outHandler&&e.outHandler({eventSource:e,pointerType:n.type,position:n.currentPos&&w(n.currentPos,e.element),buttons:r.buttons,pointers:e.getActivePointerCount(),insideElementPressed:n.insideElementPressed,buttonDownAny:0!==r.buttons,isTouchEvent:"touch"===n.type,originalEvent:t.originalEvent,userData:e.userData})}(t,i,r),i.preventDefault&&!i.defaultPrevented&&e.cancelEvent(n),i.stopPropagation&&e.stopEvent(n)}function O(t,n){var r={id:m(n),type:g(n),isPrimary:v(n),currentPos:y(n),currentTime:e.now()},i=e.MouseTracker.havePointerEvents&&"touch"===r.type&&e.Browser.vendor!==e.BROWSERS.IE,o={originalEvent:n,eventType:"pointerdown",pointerType:r.type,isEmulated:!1};L(t,o),B(t,o,r,n.button),o.preventDefault&&!o.defaultPrevented&&e.cancelEvent(n),o.stopPropagation&&e.stopEvent(n),o.shouldCapture&&(i?j(t,r,!0):function(t,n){var r;if(e.MouseTracker.havePointerCapture)if(e.MouseTracker.havePointerEvents)try{t.element.setPointerCapture(n.id)}catch(t){return void e.console.warn("setPointerCapture() called on invalid pointer ID")}else t.element.setCapture(!0);else r=h(t,e.MouseTracker.havePointerEvents?"pointerevent":n.type),c&&u(window.top)&&e.addEvent(window.top,r.upName,r.upHandler,!0),e.addEvent(e.MouseTracker.captureElement,r.upName,r.upHandler,!0),e.addEvent(e.MouseTracker.captureElement,r.moveName,r.moveHandler,!0);j(t,n,!0)}(t,r))}function _(e,t){R(e,t)}function R(t,n){var r,i={originalEvent:n,eventType:"pointerup",pointerType:(r={id:m(n),type:g(n),isPrimary:v(n),currentPos:y(n),currentTime:e.now()}).type,isEmulated:!1};L(t,i),z(t,i,r,n.button),i.preventDefault&&!i.defaultPrevented&&e.cancelEvent(n),i.stopPropagation&&e.stopEvent(n),i.shouldReleaseCapture&&(n.target===t.element?f(t,r):j(t,r,!1))}function A(e,t){D(e,t)}function D(t,n){var r={id:m(n),type:g(n),isPrimary:v(n),currentPos:y(n),currentTime:e.now()},i={originalEvent:n,eventType:"pointermove",pointerType:r.type,isEmulated:!1};L(t,i),H(t,i,r),i.preventDefault&&!i.defaultPrevented&&e.cancelEvent(n),i.stopPropagation&&e.stopEvent(n)}function I(e,t){return t.speed=0,t.direction=0,t.contactPos=t.currentPos,t.contactTime=t.currentTime,t.lastPos=t.currentPos,t.lastTime=t.currentTime,e.add(t)}function M(t,n,r){var i,o=n.getById(r.id);return o?(o.captured&&(e.console.warn("stopTrackingPointer() called on captured pointer"),f(t,o)),n.removeContact(),i=n.removeById(r.id)):i=n.getLength(),i}function L(t,n){n.eventSource=t,n.eventPhase=n.originalEvent&&void 0!==n.originalEvent.eventPhase?n.originalEvent.eventPhase:0,n.defaultPrevented=e.eventIsCanceled(n.originalEvent),n.shouldCapture=!1,n.shouldReleaseCapture=!1,n.userData=t.userData,function(e,t){switch(t.eventType){case"pointermove":case"pointerdown":case"pointerup":t.isStoppable=!0,t.isCancelable=!0,t.preventDefault=!1,t.preventGesture=!e.hasGestureHandlers,t.stopPropagation=!1;break;case"pointerover":case"pointerout":case"contextmenu":case"keydown":case"keyup":case"keypress":t.isStoppable=!0,t.isCancelable=!0,t.preventDefault=!1,t.preventGesture=!1,t.stopPropagation=!1;break;case"wheel":t.isStoppable=!0,t.isCancelable=!0,t.preventDefault=!1,t.preventGesture=!e.hasScrollHandler,t.stopPropagation=!1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":t.isStoppable=!0,t.isCancelable=!1,t.preventDefault=!1,t.preventGesture=!1,t.stopPropagation=!1;break;case"click":t.isStoppable=!0,t.isCancelable=!0,t.preventDefault=!!e.clickHandler,t.preventGesture=!1,t.stopPropagation=!1;break;case"dblclick":t.isStoppable=!0,t.isCancelable=!0,t.preventDefault=!!e.dblClickHandler,t.preventGesture=!1,t.stopPropagation=!1;break;default:t.isStoppable=!1,t.isCancelable=!1,t.preventDefault=!1,t.preventGesture=!1,t.stopPropagation=!1}}(t,n),t.preProcessEventHandler&&t.preProcessEventHandler(n)}function j(t,n,r){var i=t.getActivePointersListByType(n.type),o=i.getById(n.id);o?r&&!o.captured?(o.captured=!0,i.captureCount++):!r&&o.captured&&(o.captured=!1,i.captureCount--,i.captureCount<0&&(i.captureCount=0,e.console.warn("updatePointerCaptured() - pointsList.captureCount went negative"))):e.console.warn("updatePointerCaptured() called on untracked pointer")}function N(e,t,n){var r,i=e.getActivePointersListByType(n.type);(r=i.getById(n.id))?(r.insideElement=!0,r.lastPos=r.currentPos,r.lastTime=r.currentTime,r.currentPos=n.currentPos,r.currentTime=n.currentTime,n=r):(n.captured=!1,n.insideElementPressed=!1,n.insideElement=!0,I(i,n)),e.enterHandler&&e.enterHandler({eventSource:e,pointerType:n.type,position:w(n.currentPos,e.element),buttons:i.buttons,pointers:e.getActivePointerCount(),insideElementPressed:n.insideElementPressed,buttonDownAny:0!==i.buttons,isTouchEvent:"touch"===n.type,originalEvent:t.originalEvent,userData:e.userData})}function F(e,t,n){var r,i,o=e.getActivePointersListByType(n.type);(r=o.getById(n.id))?(r.captured?(r.insideElement=!1,r.lastPos=r.currentPos,r.lastTime=r.currentTime,r.currentPos=n.currentPos,r.currentTime=n.currentTime):M(e,o,r),n=r):(n.captured=!1,n.insideElementPressed=!1),(e.leaveHandler||e.exitHandler)&&(i={eventSource:e,pointerType:n.type,position:n.currentPos&&w(n.currentPos,e.element),buttons:o.buttons,pointers:e.getActivePointerCount(),insideElementPressed:n.insideElementPressed,buttonDownAny:0!==o.buttons,isTouchEvent:"touch"===n.type,originalEvent:t.originalEvent,userData:e.userData},e.leaveHandler&&e.leaveHandler(i),e.exitHandler&&e.exitHandler(i))}function B(t,r,i,o){var a,s=n[t.hash],l=t.getActivePointersListByType(i.type);if(void 0!==r.originalEvent.buttons?l.buttons=r.originalEvent.buttons:0===o?l.buttons|=1:1===o?l.buttons|=4:2===o?l.buttons|=2:3===o?l.buttons|=8:4===o?l.buttons|=16:5===o&&(l.buttons|=32),0!==o)return r.shouldCapture=!1,r.shouldReleaseCapture=!1,void(!t.nonPrimaryPressHandler||r.preventGesture||r.defaultPrevented||(r.preventDefault=!0,t.nonPrimaryPressHandler({eventSource:t,pointerType:i.type,position:w(i.currentPos,t.element),button:o,buttons:l.buttons,isTouchEvent:"touch"===i.type,originalEvent:r.originalEvent,userData:t.userData})));(a=l.getById(i.id))?(a.insideElementPressed=!0,a.insideElement=!0,a.originalTarget=r.originalEvent.target,a.contactPos=i.currentPos,a.contactTime=i.currentTime,a.lastPos=a.currentPos,a.lastTime=a.currentTime,a.currentPos=i.currentPos,a.currentTime=i.currentTime,i=a):(i.captured=!1,i.insideElementPressed=!0,i.insideElement=!0,i.originalTarget=r.originalEvent.target,I(l,i)),l.addContact(),r.preventGesture||r.defaultPrevented?(r.shouldCapture=!1,r.shouldReleaseCapture=!1):(r.shouldCapture=!0,r.shouldReleaseCapture=!1,r.preventDefault=!0,(t.dragHandler||t.dragEndHandler||t.pinchHandler)&&e.MouseTracker.gesturePointVelocityTracker.addPoint(t,i),1===l.contacts?t.pressHandler&&!r.preventGesture&&t.pressHandler({eventSource:t,pointerType:i.type,position:w(i.contactPos,t.element),buttons:l.buttons,isTouchEvent:"touch"===i.type,originalEvent:r.originalEvent,userData:t.userData}):2===l.contacts&&t.pinchHandler&&"touch"===i.type&&(s.pinchGPoints=l.asArray(),s.lastPinchDist=s.currentPinchDist=s.pinchGPoints[0].currentPos.distanceTo(s.pinchGPoints[1].currentPos),s.lastPinchCenter=s.currentPinchCenter=x(s.pinchGPoints[0].currentPos,s.pinchGPoints[1].currentPos)))}function z(t,r,i,o){var a,s,l,c,u=n[t.hash],d=t.getActivePointersListByType(i.type),p=!1;if(void 0!==r.originalEvent.buttons?d.buttons=r.originalEvent.buttons:0===o?d.buttons^=-2:1===o?d.buttons^=-5:2===o?d.buttons^=-3:3===o?d.buttons^=-9:4===o?d.buttons^=-17:5===o&&(d.buttons^=-33),r.shouldCapture=!1,0!==o)return r.shouldReleaseCapture=!1,void(!t.nonPrimaryReleaseHandler||r.preventGesture||r.defaultPrevented||(r.preventDefault=!0,t.nonPrimaryReleaseHandler({eventSource:t,pointerType:i.type,position:w(i.currentPos,t.element),button:o,buttons:d.buttons,isTouchEvent:"touch"===i.type,originalEvent:r.originalEvent,userData:t.userData})));(l=d.getById(i.id))?(d.removeContact(),l.captured&&(p=!0),l.lastPos=l.currentPos,l.lastTime=l.currentTime,l.currentPos=i.currentPos,l.currentTime=i.currentTime,l.insideElement||M(t,d,l),a=l.currentPos,s=l.currentTime):(i.captured=!1,i.insideElementPressed=!1,i.insideElement=!0,I(d,i),l=i),r.preventGesture||r.defaultPrevented||(p?(r.shouldReleaseCapture=!0,r.preventDefault=!0,(t.dragHandler||t.dragEndHandler||t.pinchHandler)&&e.MouseTracker.gesturePointVelocityTracker.removePoint(t,l),0===d.contacts?(t.releaseHandler&&a&&t.releaseHandler({eventSource:t,pointerType:l.type,position:w(a,t.element),buttons:d.buttons,insideElementPressed:l.insideElementPressed,insideElementReleased:l.insideElement,isTouchEvent:"touch"===l.type,originalEvent:r.originalEvent,userData:t.userData}),t.dragEndHandler&&u.sentDragEvent&&t.dragEndHandler({eventSource:t,pointerType:l.type,position:w(l.currentPos,t.element),speed:l.speed,direction:l.direction,shift:r.originalEvent.shiftKey,isTouchEvent:"touch"===l.type,originalEvent:r.originalEvent,userData:t.userData}),u.sentDragEvent=!1,(t.clickHandler||t.dblClickHandler)&&l.insideElement&&(c=s-l.contactTime<=t.clickTimeThreshold&&l.contactPos.distanceTo(a)<=t.clickDistThreshold,t.clickHandler&&t.clickHandler({eventSource:t,pointerType:l.type,position:w(l.currentPos,t.element),quick:c,shift:r.originalEvent.shiftKey,isTouchEvent:"touch"===l.type,originalEvent:r.originalEvent,originalTarget:l.originalTarget,userData:t.userData}),t.dblClickHandler&&c&&(d.clicks++,1===d.clicks?(u.lastClickPos=a,u.dblClickTimeOut=setTimeout((function(){d.clicks=0}),t.dblClickTimeThreshold)):2===d.clicks&&(clearTimeout(u.dblClickTimeOut),d.clicks=0,u.lastClickPos.distanceTo(a)<=t.dblClickDistThreshold&&t.dblClickHandler({eventSource:t,pointerType:l.type,position:w(l.currentPos,t.element),shift:r.originalEvent.shiftKey,isTouchEvent:"touch"===l.type,originalEvent:r.originalEvent,userData:t.userData}),u.lastClickPos=null)))):2===d.contacts&&t.pinchHandler&&"touch"===l.type&&(u.pinchGPoints=d.asArray(),u.lastPinchDist=u.currentPinchDist=u.pinchGPoints[0].currentPos.distanceTo(u.pinchGPoints[1].currentPos),u.lastPinchCenter=u.currentPinchCenter=x(u.pinchGPoints[0].currentPos,u.pinchGPoints[1].currentPos))):(r.shouldReleaseCapture=!1,t.releaseHandler&&a&&(t.releaseHandler({eventSource:t,pointerType:l.type,position:w(a,t.element),buttons:d.buttons,insideElementPressed:l.insideElementPressed,insideElementReleased:l.insideElement,isTouchEvent:"touch"===l.type,originalEvent:r.originalEvent,userData:t.userData}),r.preventDefault=!0)))}function H(e,t,r){var i,o,a,s=n[e.hash],l=e.getActivePointersListByType(r.type);void 0!==t.originalEvent.buttons&&(l.buttons=t.originalEvent.buttons),(i=l.getById(r.id))&&(i.lastPos=i.currentPos,i.lastTime=i.currentTime,i.currentPos=r.currentPos,i.currentTime=r.currentTime,t.shouldCapture=!1,t.shouldReleaseCapture=!1,e.stopHandler&&"mouse"===r.type&&(clearTimeout(e.stopTimeOut),e.stopTimeOut=setTimeout((function(){!function(e,t,n){e.stopHandler&&e.stopHandler({eventSource:e,pointerType:n,position:b(t,e.element),buttons:e.getActivePointersListByType(n).buttons,isTouchEvent:"touch"===n,originalEvent:t,userData:e.userData})}(e,t.originalEvent,r.type)}),e.stopDelay)),0===l.contacts?e.moveHandler&&e.moveHandler({eventSource:e,pointerType:r.type,position:w(r.currentPos,e.element),buttons:l.buttons,isTouchEvent:"touch"===r.type,originalEvent:t.originalEvent,userData:e.userData}):1===l.contacts?(e.moveHandler&&(i=l.asArray()[0],e.moveHandler({eventSource:e,pointerType:i.type,position:w(i.currentPos,e.element),buttons:l.buttons,isTouchEvent:"touch"===i.type,originalEvent:t.originalEvent,userData:e.userData})),!e.dragHandler||t.preventGesture||t.defaultPrevented||(a=(i=l.asArray()[0]).currentPos.minus(i.lastPos),e.dragHandler({eventSource:e,pointerType:i.type,position:w(i.currentPos,e.element),buttons:l.buttons,delta:a,speed:i.speed,direction:i.direction,shift:t.originalEvent.shiftKey,isTouchEvent:"touch"===i.type,originalEvent:t.originalEvent,userData:e.userData}),t.preventDefault=!0,s.sentDragEvent=!0)):2===l.contacts&&(e.moveHandler&&(o=l.asArray(),e.moveHandler({eventSource:e,pointerType:o[0].type,position:w(x(o[0].currentPos,o[1].currentPos),e.element),buttons:l.buttons,isTouchEvent:"touch"===o[0].type,originalEvent:t.originalEvent,userData:e.userData})),!e.pinchHandler||"touch"!==r.type||t.preventGesture||t.defaultPrevented||(a=s.pinchGPoints[0].currentPos.distanceTo(s.pinchGPoints[1].currentPos))!==s.currentPinchDist&&(s.lastPinchDist=s.currentPinchDist,s.currentPinchDist=a,s.lastPinchCenter=s.currentPinchCenter,s.currentPinchCenter=x(s.pinchGPoints[0].currentPos,s.pinchGPoints[1].currentPos),e.pinchHandler({eventSource:e,pointerType:"touch",gesturePoints:s.pinchGPoints,lastCenter:w(s.lastPinchCenter,e.element),center:w(s.currentPinchCenter,e.element),lastDistance:s.lastPinchDist,distance:s.currentPinchDist,shift:t.originalEvent.shiftKey,originalEvent:t.originalEvent,userData:e.userData}),t.preventDefault=!0)))}function U(e,t,n){var r,i=e.getActivePointersListByType(n.type);(r=i.getById(n.id))&&M(e,i,r)}e.MouseTracker.gesturePointVelocityTracker=(r=[],i=0,o=0,a=function(e,t){return e.hash.toString()+t.type+t.id.toString()},s=function(){var t,n,i,a,s,l,c=r.length,u=e.now();for(a=u-o,o=u,t=0;t<c;t++)(i=(n=r[t]).gPoint).direction=Math.atan2(i.currentPos.y-n.lastPos.y,i.currentPos.x-n.lastPos.x),s=n.lastPos.distanceTo(i.currentPos),n.lastPos=i.currentPos,l=1e3*s/(a+1),i.speed=.75*l+.25*i.speed},{addPoint:function(t,n){var l=a(t,n);r.push({guid:l,gPoint:n,lastPos:n.currentPos}),1===r.length&&(o=e.now(),i=window.setInterval(s,50))},removePoint:function(e,t){var n,o=a(e,t),s=r.length;for(n=0;n<s;n++)if(r[n].guid===o){r.splice(n,1),0==--s&&window.clearInterval(i);break}}}),e.MouseTracker.captureElement=document,e.MouseTracker.wheelEventName=e.Browser.vendor===e.BROWSERS.IE&&e.Browser.version>8||"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",e.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur","contextmenu",e.MouseTracker.wheelEventName],"DOMMouseScroll"===e.MouseTracker.wheelEventName&&e.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent?(e.MouseTracker.havePointerEvents=!0,e.MouseTracker.subscribeEvents.push("pointerenter","pointerleave","pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),e.MouseTracker.havePointerCapture=(l=document.createElement("div"),e.isFunction(l.setPointerCapture)&&e.isFunction(l.releasePointerCapture)),e.MouseTracker.havePointerCapture&&e.MouseTracker.subscribeEvents.push("gotpointercapture","lostpointercapture")):(e.MouseTracker.havePointerEvents=!1,e.MouseTracker.subscribeEvents.push("mouseenter","mouseleave","mouseover","mouseout","mousedown","mouseup","mousemove"),e.MouseTracker.mousePointerId="legacy-mouse",e.MouseTracker.havePointerCapture=function(){var t=document.createElement("div");return e.isFunction(t.setCapture)&&e.isFunction(t.releaseCapture)}(),e.MouseTracker.havePointerCapture&&e.MouseTracker.subscribeEvents.push("losecapture"),"ontouchstart"in window&&e.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&e.MouseTracker.subscribeEvents.push("gesturestart","gesturechange")),e.MouseTracker.GesturePointList=function(e){this._gPoints=[],this.type=e,this.buttons=0,this.contacts=0,this.clicks=0,this.captureCount=0},e.MouseTracker.GesturePointList.prototype={getLength:function(){return this._gPoints.length},asArray:function(){return this._gPoints},add:function(e){return this._gPoints.push(e)},removeById:function(e){var t,n=this._gPoints.length;for(t=0;t<n;t++)if(this._gPoints[t].id===e){this._gPoints.splice(t,1);break}return this._gPoints.length},getByIndex:function(e){return e<this._gPoints.length?this._gPoints[e]:null},getById:function(e){var t,n=this._gPoints.length;for(t=0;t<n;t++)if(this._gPoints[t].id===e)return this._gPoints[t];return null},getPrimary:function(e){var t,n=this._gPoints.length;for(t=0;t<n;t++)if(this._gPoints[t].isPrimary)return this._gPoints[t];return null},addContact:function(){++this.contacts,this.contacts>1&&("mouse"===this.type||"pen"===this.type)&&(e.console.warn("GesturePointList.addContact() Implausible contacts value"),this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(this.contacts=0)}}}(s),function(e){e.ControlAnchor={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4,ABSOLUTE:5},e.Control=function(t,n,r){var i=t.parentNode;"number"==typeof n&&(e.console.error("Passing an anchor directly into the OpenSeadragon.Control constructor is deprecated; please use an options object instead. Support for this deprecated variant is scheduled for removal in December 2013"),n={anchor:n}),n.attachToViewer=void 0===n.attachToViewer||n.attachToViewer,this.autoFade=void 0===n.autoFade||n.autoFade,this.element=t,this.anchor=n.anchor,this.container=r,this.anchor===e.ControlAnchor.ABSOLUTE?(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top="number"==typeof n.top?n.top+"px":n.top,this.wrapper.style.left="number"==typeof n.left?n.left+"px":n.left,this.wrapper.style.height="number"==typeof n.height?n.height+"px":n.height,this.wrapper.style.width="number"==typeof n.width?n.width+"px":n.width,this.wrapper.style.margin="0px",this.wrapper.style.padding="0px",this.element.style.position="relative",this.element.style.top="0px",this.element.style.left="0px",this.element.style.height="100%",this.element.style.width="100%"):(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.display="inline-block",this.anchor===e.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%")),this.wrapper.appendChild(this.element),n.attachToViewer?this.anchor===e.ControlAnchor.TOP_RIGHT||this.anchor===e.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.wrapper,this.container.firstChild):this.container.appendChild(this.wrapper):i.appendChild(this.wrapper)},e.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.anchor!==e.ControlAnchor.NONE&&this.container.removeChild(this.wrapper)},isVisible:function(){return"none"!==this.wrapper.style.display},setVisible:function(t){this.wrapper.style.display=t?this.anchor===e.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(t){this.element[e.SIGNAL]&&e.Browser.vendor===e.BROWSERS.IE?e.setElementOpacity(this.element,t,!0):e.setElementOpacity(this.wrapper,t,!0)}}}(s),function(e){function t(e,t){var n,r=e.controls;for(n=r.length-1;n>=0;n--)if(r[n].element===t)return n;return-1}e.ControlDock=function(t){var n,r,i=["topleft","topright","bottomright","bottomleft"];for(e.extend(!0,this,{id:"controldock-"+e.now()+"-"+Math.floor(1e6*Math.random()),container:e.makeNeutralElement("div"),controls:[]},t),this.container.onsubmit=function(){return!1},this.element&&(this.element=e.getElement(this.element),this.element.appendChild(this.container),this.element.style.position="relative",this.container.style.width="100%",this.container.style.height="100%"),r=0;r<i.length;r++)n=i[r],this.controls[n]=e.makeNeutralElement("div"),this.controls[n].style.position="absolute",n.match("left")&&(this.controls[n].style.left="0px"),n.match("right")&&(this.controls[n].style.right="0px"),n.match("top")&&(this.controls[n].style.top="0px"),n.match("bottom")&&(this.controls[n].style.bottom="0px");this.container.appendChild(this.controls.topleft),this.container.appendChild(this.controls.topright),this.container.appendChild(this.controls.bottomright),this.container.appendChild(this.controls.bottomleft)},e.ControlDock.prototype={addControl:function(n,r){var i=null;if(!(t(this,n=e.getElement(n))>=0)){switch(r.anchor){case e.ControlAnchor.TOP_RIGHT:i=this.controls.topright,n.style.position="relative",n.style.paddingRight="0px",n.style.paddingTop="0px";break;case e.ControlAnchor.BOTTOM_RIGHT:i=this.controls.bottomright,n.style.position="relative",n.style.paddingRight="0px",n.style.paddingBottom="0px";break;case e.ControlAnchor.BOTTOM_LEFT:i=this.controls.bottomleft,n.style.position="relative",n.style.paddingLeft="0px",n.style.paddingBottom="0px";break;case e.ControlAnchor.TOP_LEFT:i=this.controls.topleft,n.style.position="relative",n.style.paddingLeft="0px",n.style.paddingTop="0px";break;case e.ControlAnchor.ABSOLUTE:default:case e.ControlAnchor.NONE:i=this.container,n.style.margin="0px",n.style.padding="0px"}this.controls.push(new e.Control(n,r,i)),n.style.display="inline-block"}},removeControl:function(n){var r=t(this,n=e.getElement(n));return r>=0&&(this.controls[r].destroy(),this.controls.splice(r,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var e;for(e=this.controls.length-1;e>=0;e--)if(this.controls[e].isVisible())return!0;return!1},setControlsEnabled:function(e){var t;for(t=this.controls.length-1;t>=0;t--)this.controls[t].setVisible(e);return this}}}(s),function(e){e.Placement=e.freezeObject({CENTER:0,TOP_LEFT:1,TOP:2,TOP_RIGHT:3,RIGHT:4,BOTTOM_RIGHT:5,BOTTOM:6,BOTTOM_LEFT:7,LEFT:8,properties:{0:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1},1:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},2:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},3:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!0,isVerticallyCentered:!1,isBottom:!1},4:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!0,isBottom:!1},5:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!1,isBottom:!0},6:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},7:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},8:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1}}})}(s),function(e){var t={},n=1;function r(t){return t=e.getElement(t),new e.Point(0===t.clientWidth?1:t.clientWidth,0===t.clientHeight?1:t.clientHeight)}function i(t,n){if(n instanceof e.Overlay)return n;var r=null;if(n.element)r=e.getElement(n.element);else{var i=n.id?n.id:"openseadragon-overlay-"+Math.floor(1e7*Math.random());(r=e.getElement(n.id))||((r=document.createElement("a")).href="#/overlay/"+i),r.id=i,e.addClass(r,n.className?n.className:"openseadragon-overlay")}var o=n.location,a=n.width,s=n.height;if(!o){var l=n.x,c=n.y;if(void 0!==n.px){var u=t.viewport.imageToViewportRectangle(new e.Rect(n.px,n.py,a||0,s||0));l=u.x,c=u.y,a=void 0!==a?u.width:void 0,s=void 0!==s?u.height:void 0}o=new e.Point(l,c)}var d=n.placement;return d&&"string"===e.type(d)&&(d=e.Placement[n.placement.toUpperCase()]),new e.Overlay({element:r,location:o,placement:d,onDraw:n.onDraw,checkResize:n.checkResize,width:a,height:s,rotationMode:n.rotationMode})}function o(e,t){var n;for(n=e.length-1;n>=0;n--)if(e[n].element===t)return n;return-1}function a(t,n){return e.requestAnimationFrame((function(){n(t)}))}function s(t){e.requestAnimationFrame((function(){!function(t){var n,r;if(t.controlsShouldFade){for(n=1-(e.now()-t.controlsFadeBeginTime)/t.controlsFadeLength,n=Math.min(1,n),n=Math.max(0,n),r=t.controls.length-1;r>=0;r--)t.controls[r].autoFade&&t.controls[r].setOpacity(n);n>0&&s(t)}}(t)}))}function l(t){t.autoHideControls&&(t.controlsShouldFade=!0,t.controlsFadeBeginTime=e.now()+t.controlsFadeDelay,window.setTimeout((function(){s(t)}),t.controlsFadeDelay))}function c(e){var t;for(e.controlsShouldFade=!1,t=e.controls.length-1;t>=0;t--)e.controls[t].setOpacity(1)}function u(){c(this)}function d(){l(this)}function p(e){var t={tracker:e.eventSource,position:e.position,originalEvent:e.originalEvent,preventDefault:e.preventDefault};this.raiseEvent("canvas-contextmenu",t),e.preventDefault=t.preventDefault}function h(t){var n={originalEvent:t.originalEvent,preventDefaultAction:!1,preventVerticalPan:t.preventVerticalPan||!this.panVertical,preventHorizontalPan:t.preventHorizontalPan||!this.panHorizontal};if(this.raiseEvent("canvas-key",n),n.preventDefaultAction||t.ctrl||t.alt||t.meta)t.preventDefault=!1;else switch(t.keyCode){case 38:n.preventVerticalPan||(t.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 40:n.preventVerticalPan||(t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 37:n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 39:n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 187:this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 189:this.viewport.zoomBy(.9),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 48:this.viewport.goHome(),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 87:n.preventVerticalPan||(t.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-40))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 83:n.preventVerticalPan||(t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,40))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 65:n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-40,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 68:n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(40,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 82:t.shift?this.viewport.flipped?this.viewport.setRotation(this.viewport.getRotation()+this.rotationIncrement):this.viewport.setRotation(this.viewport.getRotation()-this.rotationIncrement):this.viewport.flipped?this.viewport.setRotation(this.viewport.getRotation()-this.rotationIncrement):this.viewport.setRotation(this.viewport.getRotation()+this.rotationIncrement),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 70:this.viewport.toggleFlip(),t.preventDefault=!0;break;case 74:this.goToPreviousPage();break;case 75:this.goToNextPage();break;default:t.preventDefault=!1}}function f(e){var t={originalEvent:e.originalEvent};this.raiseEvent("canvas-key-press",t)}function m(n){var r;document.activeElement===this.canvas||this.canvas.focus(),this.viewport.flipped&&(n.position.x=this.viewport.getContainerSize().x-n.position.x);var i={tracker:n.eventSource,position:n.position,quick:n.quick,shift:n.shift,originalEvent:n.originalEvent,originalTarget:n.originalTarget,preventDefaultAction:!1};this.raiseEvent("canvas-click",i),!i.preventDefaultAction&&this.viewport&&n.quick&&(!0===(r=this.gestureSettingsByDeviceType(n.pointerType)).clickToZoom&&(this.viewport.zoomBy(n.shift?1/this.zoomPerClick:this.zoomPerClick,r.zoomToRefPoint?this.viewport.pointFromPixel(n.position,!0):null),this.viewport.applyConstraints()),r.dblClickDragToZoom&&(!0===t[this.hash].draggingToZoom?(t[this.hash].lastClickTime=null,t[this.hash].draggingToZoom=!1):t[this.hash].lastClickTime=e.now()))}function g(e){var t,n={tracker:e.eventSource,position:e.position,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};this.raiseEvent("canvas-double-click",n),!n.preventDefaultAction&&this.viewport&&(t=this.gestureSettingsByDeviceType(e.pointerType)).dblClickToZoom&&(this.viewport.zoomBy(e.shift?1/this.zoomPerClick:this.zoomPerClick,t.zoomToRefPoint?this.viewport.pointFromPixel(e.position,!0):null),this.viewport.applyConstraints())}function v(e){var n,r={tracker:e.eventSource,pointerType:e.pointerType,position:e.position,delta:e.delta,speed:e.speed,direction:e.direction,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag",r),n=this.gestureSettingsByDeviceType(e.pointerType),!r.preventDefaultAction&&this.viewport)if(n.dblClickDragToZoom&&t[this.hash].draggingToZoom){var i=Math.pow(this.zoomPerDblClickDrag,e.delta.y/50);this.viewport.zoomBy(i)}else if(n.dragToPan&&!t[this.hash].draggingToZoom){if(this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.viewport.flipped&&(e.delta.x=-e.delta.x),this.constrainDuringPan){var o=this.viewport.deltaPointsFromPixels(e.delta.negate());this.viewport.centerSpringX.target.value+=o.x,this.viewport.centerSpringY.target.value+=o.y;var a=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=o.x,this.viewport.centerSpringY.target.value-=o.y,a.xConstrained&&(e.delta.x=0),a.yConstrained&&(e.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta.negate()),n.flickEnabled&&!this.constrainDuringPan)}}function y(n){var r,i={tracker:n.eventSource,pointerType:n.pointerType,position:n.position,speed:n.speed,direction:n.direction,shift:n.shift,originalEvent:n.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag-end",i),r=this.gestureSettingsByDeviceType(n.pointerType),!i.preventDefaultAction&&this.viewport){if(!t[this.hash].draggingToZoom&&r.flickEnabled&&n.speed>=r.flickMinSpeed){var o=0;this.panHorizontal&&(o=r.flickMomentum*n.speed*Math.cos(n.direction));var a=0;this.panVertical&&(a=r.flickMomentum*n.speed*Math.sin(n.direction));var s=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),l=this.viewport.pointFromPixel(new e.Point(s.x-o,s.y-a));this.viewport.panTo(l,!1)}this.viewport.applyConstraints()}r.dblClickDragToZoom&&!0===t[this.hash].draggingToZoom&&(t[this.hash].draggingToZoom=!1)}function b(e){this.raiseEvent("canvas-enter",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function w(e){this.raiseEvent("canvas-exit",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function x(n){if(this.raiseEvent("canvas-press",{tracker:n.eventSource,pointerType:n.pointerType,position:n.position,insideElementPressed:n.insideElementPressed,insideElementReleased:n.insideElementReleased,originalEvent:n.originalEvent}),this.gestureSettingsByDeviceType(n.pointerType).dblClickDragToZoom){var r=t[this.hash].lastClickTime,i=e.now();if(null===r)return;i-r<this.dblClickTimeThreshold&&(t[this.hash].draggingToZoom=!0),t[this.hash].lastClickTime=null}}function S(e){this.raiseEvent("canvas-release",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,insideElementPressed:e.insideElementPressed,insideElementReleased:e.insideElementReleased,originalEvent:e.originalEvent})}function E(e){this.raiseEvent("canvas-nonprimary-press",{tracker:e.eventSource,position:e.position,pointerType:e.pointerType,button:e.button,buttons:e.buttons,originalEvent:e.originalEvent})}function T(e){this.raiseEvent("canvas-nonprimary-release",{tracker:e.eventSource,position:e.position,pointerType:e.pointerType,button:e.button,buttons:e.buttons,originalEvent:e.originalEvent})}function P(e){var t,n,r,i={tracker:e.eventSource,pointerType:e.pointerType,gesturePoints:e.gesturePoints,lastCenter:e.lastCenter,center:e.center,lastDistance:e.lastDistance,distance:e.distance,shift:e.shift,originalEvent:e.originalEvent,preventDefaultPanAction:!1,preventDefaultZoomAction:!1,preventDefaultRotateAction:!1};if(this.raiseEvent("canvas-pinch",i),this.viewport&&(!(t=this.gestureSettingsByDeviceType(e.pointerType)).pinchToZoom||i.preventDefaultPanAction&&i.preventDefaultZoomAction||(n=this.viewport.pointFromPixel(e.center,!0),t.zoomToRefPoint&&!i.preventDefaultPanAction&&(r=this.viewport.pointFromPixel(e.lastCenter,!0).minus(n),this.panHorizontal||(r.x=0),this.panVertical||(r.y=0),this.viewport.panBy(r,!0)),i.preventDefaultZoomAction||this.viewport.zoomBy(e.distance/e.lastDistance,n,!0),this.viewport.applyConstraints()),t.pinchRotate&&!i.preventDefaultRotateAction)){var o=Math.atan2(e.gesturePoints[0].currentPos.y-e.gesturePoints[1].currentPos.y,e.gesturePoints[0].currentPos.x-e.gesturePoints[1].currentPos.x),a=Math.atan2(e.gesturePoints[0].lastPos.y-e.gesturePoints[1].lastPos.y,e.gesturePoints[0].lastPos.x-e.gesturePoints[1].lastPos.x);n=this.viewport.pointFromPixel(e.center,!0),this.viewport.rotateTo(this.viewport.getRotation(!0)+(o-a)*(180/Math.PI),n,!0)}}function C(e){this.raiseEvent("canvas-focus",{tracker:e.eventSource,originalEvent:e.originalEvent})}function k(e){this.raiseEvent("canvas-blur",{tracker:e.eventSource,originalEvent:e.originalEvent})}function O(t){var n,r,i,o;(o=e.now())-this._lastScrollTime>this.minScrollDeltaTime?(this._lastScrollTime=o,n={tracker:t.eventSource,position:t.position,scroll:t.scroll,shift:t.shift,originalEvent:t.originalEvent,preventDefaultAction:!1,preventDefault:!0},this.raiseEvent("canvas-scroll",n),!n.preventDefaultAction&&this.viewport&&(this.viewport.flipped&&(t.position.x=this.viewport.getContainerSize().x-t.position.x),(r=this.gestureSettingsByDeviceType(t.pointerType)).scrollToZoom&&(i=Math.pow(this.zoomPerScroll,t.scroll),this.viewport.zoomBy(i,r.zoomToRefPoint?this.viewport.pointFromPixel(t.position,!0):null),this.viewport.applyConstraints())),t.preventDefault=n.preventDefault):t.preventDefault=!0}function _(e){t[this.hash].mouseInside=!0,c(this),this.raiseEvent("container-enter",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function R(e){e.pointers<1&&(t[this.hash].mouseInside=!1,t[this.hash].animating||l(this)),this.raiseEvent("container-exit",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function A(n){!function(n){if(n._opening||!t[n.hash])return;if(n.autoResize||t[n.hash].forceResize){var i;if(n._autoResizePolling){i=r(n.container);var o=t[n.hash].prevContainerSize;i.equals(o)||(t[n.hash].needsResize=!0)}t[n.hash].needsResize&&function(n,r){var i,o=n.viewport,a=o.getZoom(),s=o.getCenter();if(o.resize(r,n.preserveImageSizeOnResize),o.panTo(s,!0),n.preserveImageSizeOnResize)i=t[n.hash].prevContainerSize.x/r.x;else{var l=new e.Point(0,0),c=new e.Point(t[n.hash].prevContainerSize.x,t[n.hash].prevContainerSize.y).distanceTo(l);i=new e.Point(r.x,r.y).distanceTo(l)/c*t[n.hash].prevContainerSize.x/r.x}o.zoomTo(a*i,null,!0),t[n.hash].prevContainerSize=r,t[n.hash].forceRedraw=!0,t[n.hash].needsResize=!1,t[n.hash].forceResize=!1}(n,i||r(n.container))}var a=n.viewport.update(),s=n.world.update()||a;a&&n.raiseEvent("viewport-change");n.referenceStrip&&(s=n.referenceStrip.update(n.viewport)||s);var u=t[n.hash].animating;!u&&s&&(n.raiseEvent("animation-start"),c(n));var d=u&&!s;d&&(t[n.hash].animating=!1);(s||d||t[n.hash].forceRedraw||n.world.needsDraw())&&(!function(e){e.imageLoader.clear(),e.drawer.clear(),e.world.draw(),e.raiseEvent("update-viewport",{})}(n),n._drawOverlays(),n.navigator&&n.navigator.update(n.viewport),t[n.hash].forceRedraw=!1,s&&n.raiseEvent("animation"));d&&(n.raiseEvent("animation-finish"),t[n.hash].mouseInside||l(n));t[n.hash].animating=s}(n),n.isOpen()?n._updateRequestId=a(n,A):n._updateRequestId=!1}function D(e,t){return e?e+t:t}function I(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=this.zoomPerSecond,t[this.hash].zooming=!0,j(this)}function M(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=1/this.zoomPerSecond,t[this.hash].zooming=!0,j(this)}function L(){t[this.hash].zooming=!1}function j(t){e.requestAnimationFrame(e.delegate(t,N))}function N(){var n,r,i;t[this.hash].zooming&&this.viewport&&(r=(n=e.now())-t[this.hash].lastZoomTime,i=Math.pow(t[this.hash].zoomFactor,r/1e3),this.viewport.zoomBy(i),this.viewport.applyConstraints(),t[this.hash].lastZoomTime=n,j(this))}function F(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function B(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function z(){this.buttonGroup&&(this.buttonGroup.emulateEnter(),this.buttonGroup.emulateLeave())}function H(){this.viewport&&this.viewport.goHome()}function U(){this.isFullPage()&&!e.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttonGroup&&this.buttonGroup.emulateLeave(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function V(){if(this.viewport){var e=this.viewport.getRotation();this.viewport.flipped?e+=this.rotationIncrement:e-=this.rotationIncrement,this.viewport.setRotation(e)}}function W(){if(this.viewport){var e=this.viewport.getRotation();this.viewport.flipped?e-=this.rotationIncrement:e+=this.rotationIncrement,this.viewport.setRotation(e)}}function G(){this.viewport.toggleFlip()}e.Viewer=function(i){var o,s,c=arguments,u=this;if(e.isPlainObject(i)||(i={id:c[0],xmlPath:c.length>1?c[1]:void 0,prefixUrl:c.length>2?c[2]:void 0,controls:c.length>3?c[3]:void 0,overlays:c.length>4?c[4]:void 0}),i.config&&(e.extend(!0,i,i.config),delete i.config),e.extend(!0,this,{id:i.id,hash:i.hash||n++,initialPage:0,element:null,container:null,canvas:null,overlays:[],overlaysContainer:null,previousBody:[],customControls:[],source:null,drawer:null,world:null,viewport:null,navigator:null,collectionViewport:null,collectionDrawer:null,navImages:null,buttonGroup:null,profiler:null},e.DEFAULT_SETTINGS,i),void 0===this.hash)throw new Error("A hash must be defined, either by specifying options.id or options.hash.");for(void 0!==t[this.hash]&&e.console.warn("Hash "+this.hash+" has already been used."),t[this.hash]={fsBoundsDelta:new e.Point(1,1),prevContainerSize:null,animating:!1,forceRedraw:!1,needsResize:!1,forceResize:!1,mouseInside:!1,group:null,zooming:!1,zoomFactor:null,lastZoomTime:null,fullPage:!1,onfullscreenchange:null,lastClickTime:null,draggingToZoom:!1},this._sequenceIndex=0,this._firstOpen=!0,this._updateRequestId=null,this._loadQueue=[],this.currentOverlays=[],this._updatePixelDensityRatioBind=null,this._lastScrollTime=e.now(),e.EventSource.call(this),this.addHandler("open-failed",(function(t){var n=e.getString("Errors.OpenFailed",t.eventSource,t.message);u._showMessage(n)})),e.ControlDock.call(this,i),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=e.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",(s=this.canvas.style).width="100%",s.height="100%",s.overflow="hidden",s.position="absolute",s.top="0px",s.left="0px",e.setElementTouchActionNone(this.canvas),""!==i.tabIndex&&(this.canvas.tabIndex=void 0===i.tabIndex?0:i.tabIndex),this.container.className="openseadragon-container",function(e){e.width="100%",e.height="100%",e.position="relative",e.overflow="hidden",e.left="0px",e.top="0px",e.textAlign="left"}(this.container.style),e.setElementTouchActionNone(this.container),this.container.insertBefore(this.canvas,this.container.firstChild),this.element.appendChild(this.container),this.bodyWidth=document.body.style.width,this.bodyHeight=document.body.style.height,this.bodyOverflow=document.body.style.overflow,this.docOverflow=document.documentElement.style.overflow,this.innerTracker=new e.MouseTracker({userData:"Viewer.innerTracker",element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,contextMenuHandler:e.delegate(this,p),keyDownHandler:e.delegate(this,h),keyHandler:e.delegate(this,f),clickHandler:e.delegate(this,m),dblClickHandler:e.delegate(this,g),dragHandler:e.delegate(this,v),dragEndHandler:e.delegate(this,y),enterHandler:e.delegate(this,b),leaveHandler:e.delegate(this,w),pressHandler:e.delegate(this,x),releaseHandler:e.delegate(this,S),nonPrimaryPressHandler:e.delegate(this,E),nonPrimaryReleaseHandler:e.delegate(this,T),scrollHandler:e.delegate(this,O),pinchHandler:e.delegate(this,P),focusHandler:e.delegate(this,C),blurHandler:e.delegate(this,k)}),this.outerTracker=new e.MouseTracker({userData:"Viewer.outerTracker",element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:e.delegate(this,_),leaveHandler:e.delegate(this,R)}),this.toolbar&&(this.toolbar=new e.ControlDock({element:this.toolbar})),this.bindStandardControls(),t[this.hash].prevContainerSize=r(this.container),window.ResizeObserver?(this._autoResizePolling=!1,this._resizeObserver=new ResizeObserver((function(){t[u.hash].needsResize=!0})),this._resizeObserver.observe(this.container,{})):this._autoResizePolling=!0,this.world=new e.World({viewer:this}),this.world.addHandler("add-item",(function(e){u.source=u.world.getItemAt(0).source,t[u.hash].forceRedraw=!0,u._updateRequestId||(u._updateRequestId=a(u,A))})),this.world.addHandler("remove-item",(function(e){u.world.getItemCount()?u.source=u.world.getItemAt(0).source:u.source=null,t[u.hash].forceRedraw=!0})),this.world.addHandler("metrics-change",(function(e){u.viewport&&u.viewport._setContentBounds(u.world.getHomeBounds(),u.world.getContentFactor())})),this.world.addHandler("item-index-change",(function(e){u.source=u.world.getItemAt(0).source})),this.viewport=new e.Viewport({containerSize:t[this.hash].prevContainerSize,springStiffness:this.springStiffness,animationTime:this.animationTime,minZoomImageRatio:this.minZoomImageRatio,maxZoomPixelRatio:this.maxZoomPixelRatio,visibilityRatio:this.visibilityRatio,wrapHorizontal:this.wrapHorizontal,wrapVertical:this.wrapVertical,defaultZoomLevel:this.defaultZoomLevel,minZoomLevel:this.minZoomLevel,maxZoomLevel:this.maxZoomLevel,viewer:this,degrees:this.degrees,flipped:this.flipped,navigatorRotate:this.navigatorRotate,homeFillsViewer:this.homeFillsViewer,margins:this.viewportMargins,silenceMultiImageWarnings:this.silenceMultiImageWarnings}),this.viewport._setContentBounds(this.world.getHomeBounds(),this.world.getContentFactor()),this.imageLoader=new e.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:i.timeout,tileRetryMax:this.tileRetryMax,tileRetryDelay:this.tileRetryDelay}),this.tileCache=new e.TileCache({maxImageCacheCount:this.maxImageCacheCount}),this.drawer=new e.Drawer({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor}),this.overlaysContainer=e.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),this.drawer.canRotate()||(this.rotateLeft&&(o=this.buttonGroup.buttons.indexOf(this.rotateLeft),this.buttonGroup.buttons.splice(o,1),this.buttonGroup.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(o=this.buttonGroup.buttons.indexOf(this.rotateRight),this.buttonGroup.buttons.splice(o,1),this.buttonGroup.element.removeChild(this.rotateRight.element))),this._addUpdatePixelDensityRatioEvent(),this.showNavigator&&(this.navigator=new e.Navigator({element:this.navigatorElement,id:this.navigatorId,position:this.navigatorPosition,sizeRatio:this.navigatorSizeRatio,maintainSizeRatio:this.navigatorMaintainSizeRatio,top:this.navigatorTop,left:this.navigatorLeft,width:this.navigatorWidth,height:this.navigatorHeight,autoResize:this.navigatorAutoResize,autoFade:this.navigatorAutoFade,prefixUrl:this.prefixUrl,viewer:this,navigatorRotate:this.navigatorRotate,background:this.navigatorBackground,opacity:this.navigatorOpacity,borderColor:this.navigatorBorderColor,displayRegionColor:this.navigatorDisplayRegionColor,crossOriginPolicy:this.crossOriginPolicy,animationTime:this.animationTime})),this.sequenceMode&&this.bindSequenceControls(),this.tileSources&&this.open(this.tileSources),o=0;o<this.customControls.length;o++)this.addControl(this.customControls[o].id,{anchor:this.customControls[o].anchor});e.requestAnimationFrame((function(){l(u)})),void 0===this.imageSmoothingEnabled||this.imageSmoothingEnabled||this.drawer.setImageSmoothingEnabled(this.imageSmoothingEnabled),e._viewers.set(this.element,this)},e.extend(e.Viewer.prototype,e.EventSource.prototype,e.ControlDock.prototype,{isOpen:function(){return!!this.world.getItemCount()},openDzi:function(t){return e.console.error("[Viewer.openDzi] this function is deprecated; use Viewer.open() instead."),this.open(t)},openTileSource:function(t){return e.console.error("[Viewer.openTileSource] this function is deprecated; use Viewer.open() instead."),this.open(t)},get buttons(){return e.console.warn("Viewer.buttons is deprecated; Please use Viewer.buttonGroup"),this.buttonGroup},open:function(t,n){var r=this;if(this.close(),!t)return this;if(this.sequenceMode&&e.isArray(t))return this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null),void 0===n||isNaN(n)||(this.initialPage=n),this.tileSources=t,this._sequenceIndex=Math.max(0,Math.min(this.tileSources.length-1,this.initialPage)),this.tileSources.length&&(this.open(this.tileSources[this._sequenceIndex]),this.showReferenceStrip&&this.addReferenceStrip()),this._updateSequenceButtons(this._sequenceIndex),this;if(e.isArray(t)||(t=[t]),!t.length)return this;this._opening=!0;for(var o,a=t.length,s=0,l=0,c=function(){if(s+l===a)if(s){!r._firstOpen&&r.preserveViewport||(r.viewport.goHome(!0),r.viewport.update()),r._firstOpen=!1;var e=t[0];if(e.tileSource&&(e=e.tileSource),r.overlays&&!r.preserveOverlays)for(var n=0;n<r.overlays.length;n++)r.currentOverlays[n]=i(r,r.overlays[n]);r._drawOverlays(),r._opening=!1,r.raiseEvent("open",{source:e})}else r._opening=!1,r.raiseEvent("open-failed",o)},u=function(t){e.isPlainObject(t)&&t.tileSource||(t={tileSource:t}),void 0!==t.index&&(e.console.error("[Viewer.open] setting indexes here is not supported; use addTiledImage instead"),delete t.index),void 0===t.collectionImmediately&&(t.collectionImmediately=!0);var n=t.success;t.success=function(e){if(s++,t.tileSource.overlays)for(var i=0;i<t.tileSource.overlays.length;i++)r.addOverlay(t.tileSource.overlays[i]);n&&n(e),c()};var i=t.error;t.error=function(e){l++,o||(o=e),i&&i(e),c()},r.addTiledImage(t)},d=0;d<t.length;d++)u(t[d]);return this},close:function(){return t[this.hash]?(this._opening=!1,this.navigator&&this.navigator.close(),this.preserveOverlays||(this.clearOverlays(),this.overlaysContainer.innerHTML=""),t[this.hash].animating=!1,this.world.removeAll(),this.imageLoader.clear(),this.raiseEvent("close"),this):this},destroy:function(){if(t[this.hash]){if(this.raiseEvent("before-destroy"),this._removeUpdatePixelDensityRatioEvent(),this.close(),this.clearOverlays(),this.overlaysContainer.innerHTML="",this._resizeObserver&&this._resizeObserver.disconnect(),this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null),null!==this._updateRequestId&&(e.cancelAnimationFrame(this._updateRequestId),this._updateRequestId=null),this.drawer&&this.drawer.destroy(),this.navigator&&(this.navigator.destroy(),t[this.navigator.hash]=null,delete t[this.navigator.hash],this.navigator=null),this.buttonGroup)this.buttonGroup.destroy();else if(this.customButtons)for(;this.customButtons.length;)this.customButtons.pop().destroy();if(this.paging&&this.paging.destroy(),this.element)for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.container.onsubmit=null,this.clearControls(),this.innerTracker&&this.innerTracker.destroy(),this.outerTracker&&this.outerTracker.destroy(),t[this.hash]=null,delete t[this.hash],this.canvas=null,this.container=null,e._viewers.delete(this.element),this.element=null,this.raiseEvent("destroy"),this.removeAllHandlers()}},isMouseNavEnabled:function(){return this.innerTracker.isTracking()},setMouseNavEnabled:function(e){return this.innerTracker.setTracking(e),this.outerTracker.setTracking(e),this.raiseEvent("mouse-enabled",{enabled:e}),this},areControlsEnabled:function(){var e,t=this.controls.length;for(e=0;e<this.controls.length;e++)t=t&&this.controls[e].isVisible();return t},setControlsEnabled:function(e){return e?c(this):l(this),this.raiseEvent("controls-enabled",{enabled:e}),this},setDebugMode:function(e){for(var t=0;t<this.world.getItemCount();t++)this.world.getItemAt(t).debugMode=e;this.debugMode=e,this.forceRedraw()},setAjaxHeaders:function(t,n){if(null===t&&(t={}),e.isPlainObject(t)){if(void 0===n&&(n=!0),this.ajaxHeaders=t,n){for(var r=0;r<this.world.getItemCount();r++)this.world.getItemAt(r)._updateAjaxHeaders(!0);if(this.navigator&&this.navigator.setAjaxHeaders(this.ajaxHeaders,!0),this.referenceStrip&&this.referenceStrip.miniViewers)for(var i in this.referenceStrip.miniViewers)this.referenceStrip.miniViewers[i].setAjaxHeaders(this.ajaxHeaders,!0)}}else console.error("[Viewer.setAjaxHeaders] Ignoring invalid headers, must be a plain object")},addButton:function(e){this.buttonGroup.addButton(e)},isFullPage:function(){return t[this.hash].fullPage},setFullPage:function(n){var r,i,o=document.body,a=o.style,s=document.documentElement.style,l=this;if(n===this.isFullPage())return this;var c={fullPage:n,preventDefaultAction:!1};if(this.raiseEvent("pre-full-page",c),c.preventDefaultAction)return this;if(n){for(this.elementSize=e.getElementSize(this.element),this.pageScroll=e.getPageScroll(),this.elementMargin=this.element.style.margin,this.element.style.margin="0",this.elementPadding=this.element.style.padding,this.element.style.padding="0",this.bodyMargin=a.margin,this.docMargin=s.margin,a.margin="0",s.margin="0",this.bodyPadding=a.padding,this.docPadding=s.padding,a.padding="0",s.padding="0",this.bodyWidth=a.width,this.docWidth=s.width,a.width="100%",s.width="100%",this.bodyHeight=a.height,this.docHeight=s.height,a.height="100%",s.height="100%",this.bodyDisplay=a.display,a.display="block",this.previousBody=[],t[this.hash].prevElementParent=this.element.parentNode,t[this.hash].prevNextSibling=this.element.nextSibling,t[this.hash].prevElementWidth=this.element.style.width,t[this.hash].prevElementHeight=this.element.style.height,r=o.childNodes.length,i=0;i<r;i++)this.previousBody.push(o.childNodes[0]),o.removeChild(o.childNodes[0]);this.toolbar&&this.toolbar.element&&(this.toolbar.parentNode=this.toolbar.element.parentNode,this.toolbar.nextSibling=this.toolbar.element.nextSibling,o.appendChild(this.toolbar.element),e.addClass(this.toolbar.element,"fullpage")),e.addClass(this.element,"fullpage"),o.appendChild(this.element),this.element.style.height="100vh",this.element.style.width="100vw",this.toolbar&&this.toolbar.element&&(this.element.style.height=e.getElementSize(this.element).y-e.getElementSize(this.toolbar.element).y+"px"),t[this.hash].fullPage=!0,e.delegate(this,_)({})}else{for(this.element.style.margin=this.elementMargin,this.element.style.padding=this.elementPadding,a.margin=this.bodyMargin,s.margin=this.docMargin,a.padding=this.bodyPadding,s.padding=this.docPadding,a.width=this.bodyWidth,s.width=this.docWidth,a.height=this.bodyHeight,s.height=this.docHeight,a.display=this.bodyDisplay,o.removeChild(this.element),r=this.previousBody.length,i=0;i<r;i++)o.appendChild(this.previousBody.shift());e.removeClass(this.element,"fullpage"),t[this.hash].prevElementParent.insertBefore(this.element,t[this.hash].prevNextSibling),this.toolbar&&this.toolbar.element&&(o.removeChild(this.toolbar.element),e.removeClass(this.toolbar.element,"fullpage"),this.toolbar.parentNode.insertBefore(this.toolbar.element,this.toolbar.nextSibling),delete this.toolbar.parentNode,delete this.toolbar.nextSibling),this.element.style.width=t[this.hash].prevElementWidth,this.element.style.height=t[this.hash].prevElementHeight;var u=0;e.requestAnimationFrame((function t(){e.setPageScroll(l.pageScroll);var n=e.getPageScroll();++u<10&&(n.x!==l.pageScroll.x||n.y!==l.pageScroll.y)&&e.requestAnimationFrame(t)})),t[this.hash].fullPage=!1,e.delegate(this,R)({})}return this.navigator&&this.viewport&&this.navigator.update(this.viewport),this.raiseEvent("full-page",{fullPage:n}),this},setFullScreen:function(t){var n=this;if(!e.supportsFullScreen)return this.setFullPage(t);if(e.isFullScreen()===t)return this;var r={fullScreen:t,preventDefaultAction:!1};if(this.raiseEvent("pre-full-screen",r),r.preventDefaultAction)return this;if(t){if(this.setFullPage(!0),!this.isFullPage())return this;this.fullPageStyleWidth=this.element.style.width,this.fullPageStyleHeight=this.element.style.height,this.element.style.width="100%",this.element.style.height="100%";var i=function t(){var r=e.isFullScreen();r||(e.removeEvent(document,e.fullScreenEventName,t),e.removeEvent(document,e.fullScreenErrorEventName,t),n.setFullPage(!1),n.isFullPage()&&(n.element.style.width=n.fullPageStyleWidth,n.element.style.height=n.fullPageStyleHeight)),n.navigator&&n.viewport&&setTimeout((function(){n.navigator.update(n.viewport)})),n.raiseEvent("full-screen",{fullScreen:r})};e.addEvent(document,e.fullScreenEventName,i),e.addEvent(document,e.fullScreenErrorEventName,i),e.requestFullScreen(document.body)}else e.exitFullScreen();return this},isVisible:function(){return"hidden"!==this.container.style.visibility},isFullScreen:function(){return e.isFullScreen()&&this.isFullPage()},setVisible:function(e){return this.container.style.visibility=e?"":"hidden",this.raiseEvent("visible",{visible:e}),this},addTiledImage:function(t){e.console.assert(t,"[Viewer.addTiledImage] options is required"),e.console.assert(t.tileSource,"[Viewer.addTiledImage] options.tileSource is required"),e.console.assert(!t.replace||t.index>-1&&t.index<this.world.getItemCount(),"[Viewer.addTiledImage] if options.replace is used, options.index must be a valid index in Viewer.world");var n=this;t.replace&&(t.replaceItem=n.world.getItemAt(t.index)),this._hideMessage(),void 0===t.placeholderFillStyle&&(t.placeholderFillStyle=this.placeholderFillStyle),void 0===t.opacity&&(t.opacity=this.opacity),void 0===t.preload&&(t.preload=this.preload),void 0===t.compositeOperation&&(t.compositeOperation=this.compositeOperation),void 0===t.crossOriginPolicy&&(t.crossOriginPolicy=void 0!==t.tileSource.crossOriginPolicy?t.tileSource.crossOriginPolicy:this.crossOriginPolicy),void 0===t.ajaxWithCredentials&&(t.ajaxWithCredentials=this.ajaxWithCredentials),void 0===t.loadTilesWithAjax&&(t.loadTilesWithAjax=this.loadTilesWithAjax),e.isPlainObject(t.ajaxHeaders)||(t.ajaxHeaders={});var r={options:t};function i(e){for(var i=0;i<n._loadQueue.length;i++)if(n._loadQueue[i]===r){n._loadQueue.splice(i,1);break}0===n._loadQueue.length&&o(r),n.raiseEvent("add-item-failed",e),t.error&&t.error(e)}function o(e){n.collectionMode&&(n.world.arrange({immediately:e.options.collectionImmediately,rows:n.collectionRows,columns:n.collectionColumns,layout:n.collectionLayout,tileSize:n.collectionTileSize,tileMargin:n.collectionTileMargin}),n.world.setAutoRefigureSizes(!0))}function a(){for(var t,r,i;n._loadQueue.length&&(t=n._loadQueue[0]).tileSource;){if(n._loadQueue.splice(0,1),t.options.replace){var a=n.world.getIndexOfItem(t.options.replaceItem);-1!==a&&(t.options.index=a),n.world.removeItem(t.options.replaceItem)}r=new e.TiledImage({viewer:n,source:t.tileSource,viewport:n.viewport,drawer:n.drawer,tileCache:n.tileCache,imageLoader:n.imageLoader,x:t.options.x,y:t.options.y,width:t.options.width,height:t.options.height,fitBounds:t.options.fitBounds,fitBoundsPlacement:t.options.fitBoundsPlacement,clip:t.options.clip,placeholderFillStyle:t.options.placeholderFillStyle,opacity:t.options.opacity,preload:t.options.preload,degrees:t.options.degrees,flipped:t.options.flipped,compositeOperation:t.options.compositeOperation,springStiffness:n.springStiffness,animationTime:n.animationTime,minZoomImageRatio:n.minZoomImageRatio,wrapHorizontal:n.wrapHorizontal,wrapVertical:n.wrapVertical,immediateRender:n.immediateRender,blendTime:n.blendTime,alwaysBlend:n.alwaysBlend,minPixelRatio:n.minPixelRatio,smoothTileEdgesMinZoom:n.smoothTileEdgesMinZoom,iOSDevice:n.iOSDevice,crossOriginPolicy:t.options.crossOriginPolicy,ajaxWithCredentials:t.options.ajaxWithCredentials,loadTilesWithAjax:t.options.loadTilesWithAjax,ajaxHeaders:t.options.ajaxHeaders,debugMode:n.debugMode,subPixelRoundingForTransparency:n.subPixelRoundingForTransparency}),n.collectionMode&&n.world.setAutoRefigureSizes(!1),n.navigator&&(i=e.extend({},t.options,{replace:!1,originalTiledImage:r,tileSource:t.tileSource}),n.navigator.addTiledImage(i)),n.world.addItem(r,{index:t.options.index}),0===n._loadQueue.length&&o(t),1!==n.world.getItemCount()||n.preserveViewport||n.viewport.goHome(!0),t.options.success&&t.options.success({item:r})}}e.isArray(t.tileSource)?setTimeout((function(){i({message:"[Viewer.addTiledImage] Sequences can not be added; add them one at a time instead.",source:t.tileSource,options:t})})):(this._loadQueue.push(r),function(t,n,r,i,o){var a=t;if("string"===e.type(n))if(n.match(/^\s*<.*>\s*$/))n=e.parseXml(n);else if(n.match(/^\s*[{[].*[}\]]\s*$/))try{var s=e.parseJSON(n);n=s}catch(e){}function l(e,t){e.ready?i(e):(e.addHandler("ready",(function(){i(e)})),e.addHandler("open-failed",(function(e){o({message:e.message,source:t})})))}setTimeout((function(){if("string"===e.type(n))(n=new e.TileSource({url:n,crossOriginPolicy:void 0!==r.crossOriginPolicy?r.crossOriginPolicy:t.crossOriginPolicy,ajaxWithCredentials:t.ajaxWithCredentials,ajaxHeaders:r.ajaxHeaders?r.ajaxHeaders:t.ajaxHeaders,splitHashDataForPost:t.splitHashDataForPost,useCanvas:t.useCanvas,success:function(e){i(e.tileSource)}})).addHandler("open-failed",(function(e){o(e)}));else if(e.isPlainObject(n)||n.nodeType)if(void 0!==n.crossOriginPolicy||void 0===r.crossOriginPolicy&&void 0===t.crossOriginPolicy||(n.crossOriginPolicy=void 0!==r.crossOriginPolicy?r.crossOriginPolicy:t.crossOriginPolicy),void 0===n.ajaxWithCredentials&&(n.ajaxWithCredentials=t.ajaxWithCredentials),void 0===n.useCanvas&&(n.useCanvas=t.useCanvas),e.isFunction(n.getTileUrl)){var s=new e.TileSource(n);s.getTileUrl=n.getTileUrl,i(s)}else{var c=e.TileSource.determineType(a,n);if(!c)return void o({message:"Unable to load TileSource",source:n});var u=c.prototype.configure.apply(a,[n]);l(new c(u),n)}else l(n,n)}))}(this,t.tileSource,t,(function(e){r.tileSource=e,a()}),(function(e){e.options=t,i(e),a()})))},addSimpleImage:function(t){e.console.assert(t,"[Viewer.addSimpleImage] options is required"),e.console.assert(t.url,"[Viewer.addSimpleImage] options.url is required");var n=e.extend({},t,{tileSource:{type:"image",url:t.url}});delete n.url,this.addTiledImage(n)},addLayer:function(t){var n=this;e.console.error("[Viewer.addLayer] this function is deprecated; use Viewer.addTiledImage() instead.");var r=e.extend({},t,{success:function(e){n.raiseEvent("add-layer",{options:t,drawer:e.item})},error:function(e){n.raiseEvent("add-layer-failed",e)}});return this.addTiledImage(r),this},getLayerAtLevel:function(t){return e.console.error("[Viewer.getLayerAtLevel] this function is deprecated; use World.getItemAt() instead."),this.world.getItemAt(t)},getLevelOfLayer:function(t){return e.console.error("[Viewer.getLevelOfLayer] this function is deprecated; use World.getIndexOfItem() instead."),this.world.getIndexOfItem(t)},getLayersCount:function(){return e.console.error("[Viewer.getLayersCount] this function is deprecated; use World.getItemCount() instead."),this.world.getItemCount()},setLayerLevel:function(t,n){return e.console.error("[Viewer.setLayerLevel] this function is deprecated; use World.setItemIndex() instead."),this.world.setItemIndex(t,n)},removeLayer:function(t){return e.console.error("[Viewer.removeLayer] this function is deprecated; use World.removeItem() instead."),this.world.removeItem(t)},forceRedraw:function(){return t[this.hash].forceRedraw=!0,this},forceResize:function(){t[this.hash].needsResize=!0,t[this.hash].forceResize=!0},bindSequenceControls:function(){var t=e.delegate(this,u),n=e.delegate(this,d),r=e.delegate(this,this.goToNextPage),i=e.delegate(this,this.goToPreviousPage),o=this.navImages,a=!0;return this.showSequenceControl&&((this.previousButton||this.nextButton)&&(a=!1),this.previousButton=new e.Button({element:this.previousButton?e.getElement(this.previousButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.PreviousPage"),srcRest:D(this.prefixUrl,o.previous.REST),srcGroup:D(this.prefixUrl,o.previous.GROUP),srcHover:D(this.prefixUrl,o.previous.HOVER),srcDown:D(this.prefixUrl,o.previous.DOWN),onRelease:i,onFocus:t,onBlur:n}),this.nextButton=new e.Button({element:this.nextButton?e.getElement(this.nextButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.NextPage"),srcRest:D(this.prefixUrl,o.next.REST),srcGroup:D(this.prefixUrl,o.next.GROUP),srcHover:D(this.prefixUrl,o.next.HOVER),srcDown:D(this.prefixUrl,o.next.DOWN),onRelease:r,onFocus:t,onBlur:n}),this.navPrevNextWrap||this.previousButton.disable(),this.tileSources&&this.tileSources.length||this.nextButton.disable(),a&&(this.paging=new e.ButtonGroup({buttons:[this.previousButton,this.nextButton],clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.pagingControl=this.paging.element,this.toolbar?this.toolbar.addControl(this.pagingControl,{anchor:e.ControlAnchor.BOTTOM_RIGHT}):this.addControl(this.pagingControl,{anchor:this.sequenceControlAnchor||e.ControlAnchor.TOP_LEFT}))),this},bindStandardControls:function(){var t=e.delegate(this,I),n=e.delegate(this,L),r=e.delegate(this,F),i=e.delegate(this,M),o=e.delegate(this,B),a=e.delegate(this,H),s=e.delegate(this,U),l=e.delegate(this,V),c=e.delegate(this,W),p=e.delegate(this,G),h=e.delegate(this,u),f=e.delegate(this,d),m=this.navImages,g=[],v=!0;return this.showNavigationControl&&((this.zoomInButton||this.zoomOutButton||this.homeButton||this.fullPageButton||this.rotateLeftButton||this.rotateRightButton||this.flipButton)&&(v=!1),this.showZoomControl&&(g.push(this.zoomInButton=new e.Button({element:this.zoomInButton?e.getElement(this.zoomInButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.ZoomIn"),srcRest:D(this.prefixUrl,m.zoomIn.REST),srcGroup:D(this.prefixUrl,m.zoomIn.GROUP),srcHover:D(this.prefixUrl,m.zoomIn.HOVER),srcDown:D(this.prefixUrl,m.zoomIn.DOWN),onPress:t,onRelease:n,onClick:r,onEnter:t,onExit:n,onFocus:h,onBlur:f})),g.push(this.zoomOutButton=new e.Button({element:this.zoomOutButton?e.getElement(this.zoomOutButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.ZoomOut"),srcRest:D(this.prefixUrl,m.zoomOut.REST),srcGroup:D(this.prefixUrl,m.zoomOut.GROUP),srcHover:D(this.prefixUrl,m.zoomOut.HOVER),srcDown:D(this.prefixUrl,m.zoomOut.DOWN),onPress:i,onRelease:n,onClick:o,onEnter:i,onExit:n,onFocus:h,onBlur:f}))),this.showHomeControl&&g.push(this.homeButton=new e.Button({element:this.homeButton?e.getElement(this.homeButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.Home"),srcRest:D(this.prefixUrl,m.home.REST),srcGroup:D(this.prefixUrl,m.home.GROUP),srcHover:D(this.prefixUrl,m.home.HOVER),srcDown:D(this.prefixUrl,m.home.DOWN),onRelease:a,onFocus:h,onBlur:f})),this.showFullPageControl&&g.push(this.fullPageButton=new e.Button({element:this.fullPageButton?e.getElement(this.fullPageButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.FullPage"),srcRest:D(this.prefixUrl,m.fullpage.REST),srcGroup:D(this.prefixUrl,m.fullpage.GROUP),srcHover:D(this.prefixUrl,m.fullpage.HOVER),srcDown:D(this.prefixUrl,m.fullpage.DOWN),onRelease:s,onFocus:h,onBlur:f})),this.showRotationControl&&(g.push(this.rotateLeftButton=new e.Button({element:this.rotateLeftButton?e.getElement(this.rotateLeftButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.RotateLeft"),srcRest:D(this.prefixUrl,m.rotateleft.REST),srcGroup:D(this.prefixUrl,m.rotateleft.GROUP),srcHover:D(this.prefixUrl,m.rotateleft.HOVER),srcDown:D(this.prefixUrl,m.rotateleft.DOWN),onRelease:l,onFocus:h,onBlur:f})),g.push(this.rotateRightButton=new e.Button({element:this.rotateRightButton?e.getElement(this.rotateRightButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.RotateRight"),srcRest:D(this.prefixUrl,m.rotateright.REST),srcGroup:D(this.prefixUrl,m.rotateright.GROUP),srcHover:D(this.prefixUrl,m.rotateright.HOVER),srcDown:D(this.prefixUrl,m.rotateright.DOWN),onRelease:c,onFocus:h,onBlur:f}))),this.showFlipControl&&g.push(this.flipButton=new e.Button({element:this.flipButton?e.getElement(this.flipButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.Flip"),srcRest:D(this.prefixUrl,m.flip.REST),srcGroup:D(this.prefixUrl,m.flip.GROUP),srcHover:D(this.prefixUrl,m.flip.HOVER),srcDown:D(this.prefixUrl,m.flip.DOWN),onRelease:p,onFocus:h,onBlur:f})),v?(this.buttonGroup=new e.ButtonGroup({buttons:g,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.navControl=this.buttonGroup.element,this.addHandler("open",e.delegate(this,z)),this.toolbar?this.toolbar.addControl(this.navControl,{anchor:this.navigationControlAnchor||e.ControlAnchor.TOP_LEFT}):this.addControl(this.navControl,{anchor:this.navigationControlAnchor||e.ControlAnchor.TOP_LEFT})):this.customButtons=g),this},currentPage:function(){return this._sequenceIndex},goToPage:function(e){return this.tileSources&&e>=0&&e<this.tileSources.length&&(this._sequenceIndex=e,this._updateSequenceButtons(e),this.open(this.tileSources[e]),this.referenceStrip&&this.referenceStrip.setFocus(e),this.raiseEvent("page",{page:e})),this},addOverlay:function(t,n,r,a){var s;if(s=e.isPlainObject(t)?t:{element:t,location:n,placement:r,onDraw:a},t=e.getElement(s.element),o(this.currentOverlays,t)>=0)return this;var l=i(this,s);return this.currentOverlays.push(l),l.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:t,location:s.location,placement:s.placement}),this},updateOverlay:function(n,r,i){var a;return n=e.getElement(n),(a=o(this.currentOverlays,n))>=0&&(this.currentOverlays[a].update(r,i),t[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:n,location:r,placement:i})),this},removeOverlay:function(n){var r;return n=e.getElement(n),(r=o(this.currentOverlays,n))>=0&&(this.currentOverlays[r].destroy(),this.currentOverlays.splice(r,1),t[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:n})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return t[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(t){var n;return t=e.getElement(t),(n=o(this.currentOverlays,t))>=0?this.currentOverlays[n]:null},_updateSequenceButtons:function(e){this.nextButton&&(this.tileSources&&this.tileSources.length-1!==e?this.nextButton.enable():this.navPrevNextWrap||this.nextButton.disable()),this.previousButton&&(e>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(t){this._hideMessage();var n=e.makeNeutralElement("div");n.appendChild(document.createTextNode(t)),this.messageDiv=e.makeCenteredNode(n),e.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var e=this.messageDiv;e&&(e.parentNode.removeChild(e),delete this.messageDiv)},gestureSettingsByDeviceType:function(e){switch(e){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var e,t=this.currentOverlays.length;for(e=0;e<t;e++)this.currentOverlays[e].drawHTML(this.overlaysContainer,this.viewport)},_cancelPendingImages:function(){this._loadQueue=[]},removeReferenceStrip:function(){this.showReferenceStrip=!1,this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null)},addReferenceStrip:function(){if(this.showReferenceStrip=!0,this.sequenceMode){if(this.referenceStrip)return;this.tileSources.length&&this.tileSources.length>1&&(this.referenceStrip=new e.ReferenceStrip({id:this.referenceStripElement,position:this.referenceStripPosition,sizeRatio:this.referenceStripSizeRatio,scroll:this.referenceStripScroll,height:this.referenceStripHeight,width:this.referenceStripWidth,tileSources:this.tileSources,prefixUrl:this.prefixUrl,useCanvas:this.useCanvas,viewer:this}),this.referenceStrip.setFocus(this._sequenceIndex))}else e.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')},_addUpdatePixelDensityRatioEvent:function(){this._updatePixelDensityRatioBind=this._updatePixelDensityRatio.bind(this),e.addEvent(window,"resize",this._updatePixelDensityRatioBind)},_removeUpdatePixelDensityRatioEvent:function(){e.removeEvent(window,"resize",this._updatePixelDensityRatioBind)},_updatePixelDensityRatio:function(){var t=e.pixelDensityRatio,n=e.getCurrentPixelDensityRatio();t!==n&&(e.pixelDensityRatio=n,this.world.resetItems(),this.forceRedraw())},goToPreviousPage:function(){var e=this._sequenceIndex-1;this.navPrevNextWrap&&e<0&&(e+=this.tileSources.length),this.goToPage(e)},goToNextPage:function(){var e=this._sequenceIndex+1;this.navPrevNextWrap&&e>=this.tileSources.length&&(e=0),this.goToPage(e)},isAnimating:function(){return t[this.hash].animating}})}(s),function(e){function t(e){var t={tracker:e.eventSource,position:e.position,quick:e.quick,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};if(this.viewer.raiseEvent("navigator-click",t),!t.preventDefaultAction&&e.quick&&this.viewer.viewport&&(this.panVertical||this.panHorizontal)){this.viewer.viewport.flipped&&(e.position.x=this.viewport.getContainerSize().x-e.position.x);var n=this.viewport.pointFromPixel(e.position);this.panVertical?this.panHorizontal||(n.x=this.viewer.viewport.getCenter(!0).x):n.y=this.viewer.viewport.getCenter(!0).y,this.viewer.viewport.panTo(n),this.viewer.viewport.applyConstraints()}}function n(e){var t={tracker:e.eventSource,position:e.position,delta:e.delta,speed:e.speed,direction:e.direction,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};this.viewer.raiseEvent("navigator-drag",t),!t.preventDefaultAction&&this.viewer.viewport&&(this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.viewer.viewport.flipped&&(e.delta.x=-e.delta.x),this.viewer.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta)),this.viewer.constrainDuringPan&&this.viewer.viewport.applyConstraints())}function r(e){e.insideElementPressed&&this.viewer.viewport&&this.viewer.viewport.applyConstraints()}function i(e){var t={tracker:e.eventSource,position:e.position,scroll:e.scroll,shift:e.shift,originalEvent:e.originalEvent,preventDefault:e.preventDefault};this.viewer.raiseEvent("navigator-scroll",t),e.preventDefault=t.preventDefault}function o(e,t){a(e,"rotate("+t+"deg)")}function a(e,t){e.style.webkitTransform=t,e.style.mozTransform=t,e.style.msTransform=t,e.style.oTransform=t,e.style.transform=t}e.Navigator=function(a){var s,l,c,u,d=a.viewer,p=this;function h(e,t){o(p.displayRegionContainer,e),o(p.displayRegion,-e),p.viewport.setRotation(e,t)}(a.element||a.id?(a.element?(a.id&&e.console.warn("Given option.id for Navigator was ignored since option.element was provided and is being used instead."),a.element.id?a.id=a.element.id:a.id="navigator-"+e.now(),this.element=a.element):this.element=document.getElementById(a.id),a.controlOptions={anchor:e.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(a.id="navigator-"+e.now(),this.element=e.makeNeutralElement("div"),a.controlOptions={anchor:e.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:a.autoFade},a.position&&("BOTTOM_RIGHT"===a.position?a.controlOptions.anchor=e.ControlAnchor.BOTTOM_RIGHT:"BOTTOM_LEFT"===a.position?a.controlOptions.anchor=e.ControlAnchor.BOTTOM_LEFT:"TOP_RIGHT"===a.position?a.controlOptions.anchor=e.ControlAnchor.TOP_RIGHT:"TOP_LEFT"===a.position?a.controlOptions.anchor=e.ControlAnchor.TOP_LEFT:"ABSOLUTE"===a.position&&(a.controlOptions.anchor=e.ControlAnchor.ABSOLUTE,a.controlOptions.top=a.top,a.controlOptions.left=a.left,a.controlOptions.height=a.height,a.controlOptions.width=a.width))),this.element.id=a.id,this.element.className+=" navigator",(a=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.navigatorSizeRatio},a,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:a.animationTime,autoResize:!1,minZoomImageRatio:1,background:a.background,opacity:a.opacity,borderColor:a.borderColor,displayRegionColor:a.displayRegionColor})).minPixelRatio=this.minPixelRatio=d.minPixelRatio,e.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new e.Point(1,1),this.totalBorderWidths=new e.Point(2*this.borderWidth,2*this.borderWidth).minus(this.fudge),a.controlOptions.anchor!==e.ControlAnchor.NONE&&(c=this.element.style,u=this.borderWidth,c.margin="0px",c.border=u+"px solid "+a.borderColor,c.padding="0px",c.background=a.background,c.opacity=a.opacity,c.overflow="hidden"),this.displayRegion=e.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function(e,t){e.position="relative",e.top="0px",e.left="0px",e.fontSize="0px",e.overflow="hidden",e.border=t+"px solid "+a.displayRegionColor,e.margin="0px",e.padding="0px",e.background="transparent",e.float="left",e.cssFloat="left",e.styleFloat="left",e.zIndex=999999999,e.cursor="default",e.boxSizing="content-box"}(this.displayRegion.style,this.borderWidth),e.setElementPointerEventsNone(this.displayRegion),e.setElementTouchActionNone(this.displayRegion),this.displayRegionContainer=e.makeNeutralElement("div"),this.displayRegionContainer.id=this.element.id+"-displayregioncontainer",this.displayRegionContainer.className="displayregioncontainer",this.displayRegionContainer.style.width="100%",this.displayRegionContainer.style.height="100%",e.setElementPointerEventsNone(this.displayRegionContainer),e.setElementTouchActionNone(this.displayRegionContainer),d.addControl(this.element,a.controlOptions),this._resizeWithViewer=a.controlOptions.anchor!==e.ControlAnchor.ABSOLUTE&&a.controlOptions.anchor!==e.ControlAnchor.NONE,a.width&&a.height?(this.setWidth(a.width),this.setHeight(a.height)):this._resizeWithViewer&&(s=e.getElementSize(d.element),this.element.style.height=Math.round(s.y*a.sizeRatio)+"px",this.element.style.width=Math.round(s.x*a.sizeRatio)+"px",this.oldViewerSize=s,l=e.getElementSize(this.element),this.elementArea=l.x*l.y),this.oldContainerSize=new e.Point(0,0),e.Viewer.apply(this,[a]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer),a.navigatorRotate)&&(h(a.viewer.viewport?a.viewer.viewport.getRotation():a.viewer.degrees||0,!0),a.viewer.addHandler("rotate",(function(e){h(e.degrees,e.immediately)})));this.innerTracker.destroy(),this.innerTracker=new e.MouseTracker({userData:"Navigator.innerTracker",element:this.element,dragHandler:e.delegate(this,n),clickHandler:e.delegate(this,t),releaseHandler:e.delegate(this,r),scrollHandler:e.delegate(this,i),preProcessEventHandler:function(e){"wheel"===e.eventType&&(e.preventDefault=!0)}}),this.outerTracker.userData="Navigator.outerTracker",e.setElementPointerEventsNone(this.canvas),e.setElementPointerEventsNone(this.container),this.addHandler("reset-size",(function(){p.viewport&&p.viewport.goHome(!0)})),d.world.addHandler("item-index-change",(function(e){window.setTimeout((function(){var t=p.world.getItemAt(e.previousIndex);p.world.setItemIndex(t,e.newIndex)}),1)})),d.world.addHandler("remove-item",(function(e){var t=e.item,n=p._getMatchingItem(t);n&&p.world.removeItem(n)})),this.update(d.viewport)},e.extend(e.Navigator.prototype,e.EventSource.prototype,e.Viewer.prototype,{updateSize:function(){if(this.viewport){var t=new e.Point(0===this.container.clientWidth?1:this.container.clientWidth,0===this.container.clientHeight?1:this.container.clientHeight);t.equals(this.oldContainerSize)||(this.viewport.resize(t,!0),this.viewport.goHome(!0),this.oldContainerSize=t,this.drawer.clear(),this.world.draw())}},setWidth:function(e){this.width=e,this.element.style.width="number"==typeof e?e+"px":e,this._resizeWithViewer=!1,this.updateSize()},setHeight:function(e){this.height=e,this.element.style.height="number"==typeof e?e+"px":e,this._resizeWithViewer=!1,this.updateSize()},setFlip:function(e){return this.viewport.setFlip(e),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(e){a(this.displayRegion,e),a(this.canvas,e),a(this.element,e)},update:function(t){var n,r,i,a,s,l;if(n=e.getElementSize(this.viewer.element),this._resizeWithViewer&&n.x&&n.y&&!n.equals(this.oldViewerSize)&&(this.oldViewerSize=n,this.maintainSizeRatio||!this.elementArea?(r=n.x*this.sizeRatio,i=n.y*this.sizeRatio):(r=Math.sqrt(this.elementArea*(n.x/n.y)),i=this.elementArea/r),this.element.style.width=Math.round(r)+"px",this.element.style.height=Math.round(i)+"px",this.elementArea||(this.elementArea=r*i),this.updateSize()),t&&this.viewport){if(a=t.getBoundsNoRotate(!0),s=this.viewport.pixelFromPointNoRotate(a.getTopLeft(),!1),l=this.viewport.pixelFromPointNoRotate(a.getBottomRight(),!1).minus(this.totalBorderWidths),!this.navigatorRotate){var c=t.getRotation(!0);o(this.displayRegion,-c)}var u=this.displayRegion.style;u.display=this.world.getItemCount()?"block":"none",u.top=s.y.toFixed(2)+"px",u.left=s.x.toFixed(2)+"px";var d=l.x-s.x,p=l.y-s.y;u.width=Math.round(Math.max(d,0))+"px",u.height=Math.round(Math.max(p,0))+"px"}},addTiledImage:function(t){var n=this,r=t.originalTiledImage;delete t.original;var i=e.extend({},t,{success:function(e){var t=e.item;function i(){n._matchBounds(t,r)}t._originalForNavigator=r,n._matchBounds(t,r,!0),n._matchOpacity(t,r),n._matchCompositeOperation(t,r),r.addHandler("bounds-change",i),r.addHandler("clip-change",i),r.addHandler("opacity-change",(function(){n._matchOpacity(t,r)})),r.addHandler("composite-operation-change",(function(){n._matchCompositeOperation(t,r)}))}});return e.Viewer.prototype.addTiledImage.apply(this,[i])},destroy:function(){return e.Viewer.prototype.destroy.apply(this)},_getMatchingItem:function(e){for(var t,n=this.world.getItemCount(),r=0;r<n;r++)if((t=this.world.getItemAt(r))._originalForNavigator===e)return t;return null},_matchBounds:function(e,t,n){var r=t.getBoundsNoRotate();e.setPosition(r.getTopLeft(),n),e.setWidth(r.width,n),e.setRotation(t.getRotation(),n),e.setClip(t.getClip()),e.setFlip(t.getFlip())},_matchOpacity:function(e,t){e.setOpacity(t.opacity)},_matchCompositeOperation:function(e,t){e.setCompositeOperation(t.compositeOperation)}})}(s),function(e){var t={Errors:{Dzc:"Sorry, we don't support Deep Zoom Collections!",Dzi:"Hmm, this doesn't appear to be a valid Deep Zoom Image.",Xml:"Hmm, this doesn't appear to be a valid Deep Zoom Image.",ImageFormat:"Sorry, we don't support {0}-based Deep Zoom Images.",Security:"It looks like a security restriction stopped us from loading this Deep Zoom Image.",Status:"This space unintentionally left blank ({0} {1}).",OpenFailed:"Unable to open {0}: {1}"},Tooltips:{FullPage:"Toggle full page",Home:"Go home",ZoomIn:"Zoom in",ZoomOut:"Zoom out",NextPage:"Next page",PreviousPage:"Previous page",RotateLeft:"Rotate left",RotateRight:"Rotate right",Flip:"Flip Horizontally"}};e.extend(e,{getString:function(n){var r,i=n.split("."),o=null,a=arguments,s=t;for(r=0;r<i.length-1;r++)s=s[i[r]]||{};return"string"!=typeof(o=s[i[r]])&&(e.console.error("Untranslated source string:",n),o=""),o.replace(/\{\d+\}/g,(function(e){var t=parseInt(e.match(/\d+/),10)+1;return t<a.length?a[t]:""}))},setString:function(e,n){var r,i=e.split("."),o=t;for(r=0;r<i.length-1;r++)o[i[r]]||(o[i[r]]={}),o=o[i[r]];o[i[r]]=n}})}(s),function(e){e.Point=function(e,t){this.x="number"==typeof e?e:0,this.y="number"==typeof t?t:0},e.Point.prototype={clone:function(){return new e.Point(this.x,this.y)},plus:function(t){return new e.Point(this.x+t.x,this.y+t.y)},minus:function(t){return new e.Point(this.x-t.x,this.y-t.y)},times:function(t){return new e.Point(this.x*t,this.y*t)},divide:function(t){return new e.Point(this.x/t,this.y/t)},negate:function(){return new e.Point(-this.x,-this.y)},distanceTo:function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},squaredDistanceTo:function(e){return Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2)},apply:function(t){return new e.Point(t(this.x),t(this.y))},equals:function(t){return t instanceof e.Point&&this.x===t.x&&this.y===t.y},rotate:function(t,n){var r,i;if(n=n||new e.Point(0,0),t%90==0){switch(e.positiveModulo(t,360)){case 0:r=1,i=0;break;case 90:r=0,i=1;break;case 180:r=-1,i=0;break;case 270:r=0,i=-1}}else{var o=t*Math.PI/180;r=Math.cos(o),i=Math.sin(o)}var a=r*(this.x-n.x)-i*(this.y-n.y)+n.x,s=i*(this.x-n.x)+r*(this.y-n.y)+n.y;return new e.Point(a,s)},toString:function(){return"("+Math.round(100*this.x)/100+","+Math.round(100*this.y)/100+")"}}}(s),function(e){e.TileSource=function(t,n,r,i,o,a){var s,l,c=this,u=arguments;if(s=e.isPlainObject(t)?t:{width:u[0],height:u[1],tileSize:u[2],tileOverlap:u[3],minLevel:u[4],maxLevel:u[5]},e.EventSource.call(this),e.extend(!0,this,s),!this.success)for(l=0;l<arguments.length;l++)if(e.isFunction(arguments[l])){this.success=arguments[l];break}this.success&&this.addHandler("ready",(function(e){c.success(e)})),"string"===e.type(arguments[0])&&(this.url=arguments[0]),this.url?(this.aspectRatio=1,this.dimensions=new e.Point(10,10),this._tileWidth=0,this._tileHeight=0,this.tileOverlap=0,this.minLevel=0,this.maxLevel=0,this.ready=!1,this.getImageInfo(this.url)):(this.ready=!0,this.aspectRatio=s.width&&s.height?s.width/s.height:1,this.dimensions=new e.Point(s.width,s.height),this.tileSize?(this._tileWidth=this._tileHeight=this.tileSize,delete this.tileSize):(this.tileWidth?(this._tileWidth=this.tileWidth,delete this.tileWidth):this._tileWidth=0,this.tileHeight?(this._tileHeight=this.tileHeight,delete this.tileHeight):this._tileHeight=0),this.tileOverlap=s.tileOverlap?s.tileOverlap:0,this.minLevel=s.minLevel?s.minLevel:0,this.maxLevel=void 0!==s.maxLevel&&null!==s.maxLevel?s.maxLevel:s.width&&s.height?Math.ceil(Math.log(Math.max(s.width,s.height))/Math.log(2)):0,this.success&&e.isFunction(this.success)&&this.success(this))},e.TileSource.prototype={getTileSize:function(t){return e.console.error("[TileSource.getTileSize] is deprecated. Use TileSource.getTileWidth() and TileSource.getTileHeight() instead"),this._tileWidth},getTileWidth:function(e){return this._tileWidth?this._tileWidth:this.getTileSize(e)},getTileHeight:function(e){return this._tileHeight?this._tileHeight:this.getTileSize(e)},setMaxLevel:function(e){this.maxLevel=e,this._memoizeLevelScale()},getLevelScale:function(e){return this._memoizeLevelScale(),this.getLevelScale(e)},_memoizeLevelScale:function(){var e,t={};for(e=0;e<=this.maxLevel;e++)t[e]=1/Math.pow(2,this.maxLevel-e);this.getLevelScale=function(e){return t[e]}},getNumTiles:function(t){var n=this.getLevelScale(t),r=Math.ceil(n*this.dimensions.x/this.getTileWidth(t)),i=Math.ceil(n*this.dimensions.y/this.getTileHeight(t));return new e.Point(r,i)},getPixelRatio:function(t){var n=this.dimensions.times(this.getLevelScale(t)),r=1/n.x*e.pixelDensityRatio,i=1/n.y*e.pixelDensityRatio;return new e.Point(r,i)},getClosestLevel:function(){var e,t;for(e=this.minLevel+1;e<=this.maxLevel&&!((t=this.getNumTiles(e)).x>1||t.y>1);e++);return e-1},getTileAtPoint:function(t,n){var r=n.x>=0&&n.x<=1&&n.y>=0&&n.y<=1/this.aspectRatio;e.console.assert(r,"[TileSource.getTileAtPoint] must be called with a valid point.");var i=this.dimensions.x*this.getLevelScale(t),o=n.x*i,a=n.y*i,s=Math.floor(o/this.getTileWidth(t)),l=Math.floor(a/this.getTileHeight(t));n.x>=1&&(s=this.getNumTiles(t).x-1);return n.y>=1/this.aspectRatio-1e-15&&(l=this.getNumTiles(t).y-1),new e.Point(s,l)},getTileBounds:function(t,n,r,i){var o=this.dimensions.times(this.getLevelScale(t)),a=this.getTileWidth(t),s=this.getTileHeight(t),l=0===n?0:a*n-this.tileOverlap,c=0===r?0:s*r-this.tileOverlap,u=a+(0===n?1:2)*this.tileOverlap,d=s+(0===r?1:2)*this.tileOverlap,p=1/o.x;return u=Math.min(u,o.x-l),d=Math.min(d,o.y-c),i?new e.Rect(0,0,u,d):new e.Rect(l*p,c*p,u*p,d*p)},getImageInfo:function(t){var n,r,i,o,a,s,l,c=this;t&&(l=(s=(a=t.split("/"))[a.length-1]).lastIndexOf("."))>-1&&(a[a.length-1]=s.slice(0,l));var u=null;if(this.splitHashDataForPost){var d=t.indexOf("#");-1!==d&&(u=t.substring(d+1),t=t.substr(0,d))}r=function(n){"string"==typeof n&&(n=e.parseXml(n));var r=e.TileSource.determineType(c,n,t);r?(void 0===(o=r.prototype.configure.apply(c,[n,t,u])).ajaxWithCredentials&&(o.ajaxWithCredentials=c.ajaxWithCredentials),i=new r(o),c.ready=!0,c.raiseEvent("ready",{tileSource:i})):c.raiseEvent("open-failed",{message:"Unable to load TileSource",source:t})},t.match(/\.js$/)?(n=t.split("/").pop().replace(".js",""),e.jsonp({url:t,async:!1,callbackName:n,callback:r})):e.makeAjaxRequest({url:t,postData:u,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(t){var n=function(t){var n,r,i=t.responseText,o=t.status;if(!t)throw new Error(e.getString("Errors.Security"));if(200!==t.status&&0!==t.status)throw n=404===(o=t.status)?"Not Found":t.statusText,new Error(e.getString("Errors.Status",o,n));if(i.match(/^\s*<.*/))try{r=t.responseXML&&t.responseXML.documentElement?t.responseXML:e.parseXml(i)}catch(e){r=t.responseText}else if(i.match(/\s*[{[].*/))try{r=e.parseJSON(i)}catch(e){r=i}else r=i;return r}(t);r(n)},error:function(n,r){var i;try{i="HTTP "+n.status+" attempting to load TileSource: "+t}catch(e){i=(void 0!==r&&r.toString?r.toString():"Unknown error")+" attempting to load TileSource: "+t}e.console.error(i),c.raiseEvent("open-failed",{message:i,source:t,postData:u})}})},supports:function(e,t){return!1},configure:function(e,t,n){throw new Error("Method not implemented.")},getTileUrl:function(e,t,n){throw new Error("Method not implemented.")},getTilePostData:function(e,t,n){return null},getTileAjaxHeaders:function(e,t,n){return{}},getTileHashKey:function(e,t,n,r,i,o){function a(e){return i?e+"+"+JSON.stringify(i):e}return a("string"!=typeof r?e+"/"+t+"_"+n:r)},tileExists:function(e,t,n){var r=this.getNumTiles(e);return e>=this.minLevel&&e<=this.maxLevel&&t>=0&&n>=0&&t<r.x&&n<r.y},hasTransparency:function(e,t,n,r){return!!e||t.match(".png")},downloadTileStart:function(t){var n=t.userData,r=new Image;n.image=r,n.request=null;var i=function(e){r?(r.onload=r.onerror=r.onabort=null,t.finish(e?null:r,n.request,e)):t.finish(null,n.request,"Image load failed: undefined Image instance.")};r.onload=function(){i()},r.onabort=r.onerror=function(){i("Image load aborted.")},t.loadWithAjax?n.request=e.makeAjaxRequest({url:t.src,withCredentials:t.ajaxWithCredentials,headers:t.ajaxHeaders,responseType:"arraybuffer",postData:t.postData,success:function(e){var t;try{t=new window.Blob([e.response])}catch(r){var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if("TypeError"===r.name&&n){var o=new n;o.append(e.response),t=o.getBlob()}}0===t.size?i("Empty image response."):r.src=(window.URL||window.webkitURL).createObjectURL(t)},error:function(e){i("Image load aborted - XHR error")}}):(!1!==t.crossOriginPolicy&&(r.crossOrigin=t.crossOriginPolicy),r.src=t.src)},downloadTileAbort:function(e){e.userData.request&&e.userData.request.abort();var t=e.userData.image;e.userData.image&&(t.onload=t.onerror=t.onabort=null)},createTileCache:function(e,t,n){e._data=t},destroyTileCache:function(e){e._data=null,e._renderedContext=null},getTileCacheData:function(e){return e._data},getTileCacheDataAsImage:function(e){return e._data},getTileCacheDataAsContext2D:function(e){if(!e._renderedContext){var t=document.createElement("canvas");t.width=e._data.width,t.height=e._data.height,e._renderedContext=t.getContext("2d"),e._renderedContext.drawImage(e._data,0,0),e._data=null}return e._renderedContext}},e.extend(!0,e.TileSource.prototype,e.EventSource.prototype),e.TileSource.determineType=function(t,n,r){var i;for(i in s)if(i.match(/.+TileSource$/)&&e.isFunction(s[i])&&e.isFunction(s[i].prototype.supports)&&s[i].prototype.supports.call(t,n,r))return s[i];return e.console.error("No TileSource was able to open %s %s",r,n),null}}(s),function(e){function t(t,n){var r,i,o=n.Image,a=o.Url,s=o.Format,l=o.Size,c=o.DisplayRect||[],u=parseInt(l.Width,10),d=parseInt(l.Height,10),p=parseInt(o.TileSize,10),h=parseInt(o.Overlap,10),f=[];for(i=0;i<c.length;i++)r=c[i].Rect,f.push(new e.DisplayRect(parseInt(r.X,10),parseInt(r.Y,10),parseInt(r.Width,10),parseInt(r.Height,10),parseInt(r.MinLevel,10),parseInt(r.MaxLevel,10)));return e.extend(!0,{width:u,height:d,tileSize:p,tileOverlap:h,minLevel:null,maxLevel:null,tilesUrl:a,fileFormat:s,displayRects:f},n)}e.DziTileSource=function(t,n,r,i,o,a,s,l,c){var u,d,p,h;if(h=e.isPlainObject(t)?t:{width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4],fileFormat:arguments[5],displayRects:arguments[6],minLevel:arguments[7],maxLevel:arguments[8]},this._levelRects={},this.tilesUrl=h.tilesUrl,this.fileFormat=h.fileFormat,this.displayRects=h.displayRects,this.displayRects)for(u=this.displayRects.length-1;u>=0;u--)for(p=(d=this.displayRects[u]).minLevel;p<=d.maxLevel;p++)this._levelRects[p]||(this._levelRects[p]=[]),this._levelRects[p].push(d);e.TileSource.apply(this,[h])},e.extend(e.DziTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){var n;return e.Image?n=e.Image.xmlns:e.documentElement&&("Image"!==e.documentElement.localName&&"Image"!==e.documentElement.tagName||(n=e.documentElement.namespaceURI)),-1!==(n=(n||"").toLowerCase()).indexOf("schemas.microsoft.com/deepzoom/2008")||-1!==n.indexOf("schemas.microsoft.com/deepzoom/2009")},configure:function(n,r,i){var o;return o=e.isPlainObject(n)?t(this,n):function(n,r){if(!r||!r.documentElement)throw new Error(e.getString("Errors.Xml"));var i,o,a,s,l,c=r.documentElement,u=c.localName||c.tagName,d=r.documentElement.namespaceURI,p=null,h=[];if("Image"===u)try{if(void 0===(s=c.getElementsByTagName("Size")[0])&&(s=c.getElementsByTagNameNS(d,"Size")[0]),p={Image:{xmlns:"http://schemas.microsoft.com/deepzoom/2008",Url:c.getAttribute("Url"),Format:c.getAttribute("Format"),DisplayRect:null,Overlap:parseInt(c.getAttribute("Overlap"),10),TileSize:parseInt(c.getAttribute("TileSize"),10),Size:{Height:parseInt(s.getAttribute("Height"),10),Width:parseInt(s.getAttribute("Width"),10)}}},!e.imageFormatSupported(p.Image.Format))throw new Error(e.getString("Errors.ImageFormat",p.Image.Format.toUpperCase()));for(void 0===(i=c.getElementsByTagName("DisplayRect"))&&(i=c.getElementsByTagNameNS(d,"DisplayRect")[0]),l=0;l<i.length;l++)void 0===(a=(o=i[l]).getElementsByTagName("Rect")[0])&&(a=o.getElementsByTagNameNS(d,"Rect")[0]),h.push({Rect:{X:parseInt(a.getAttribute("X"),10),Y:parseInt(a.getAttribute("Y"),10),Width:parseInt(a.getAttribute("Width"),10),Height:parseInt(a.getAttribute("Height"),10),MinLevel:parseInt(o.getAttribute("MinLevel"),10),MaxLevel:parseInt(o.getAttribute("MaxLevel"),10)}});return h.length&&(p.Image.DisplayRect=h),t(n,p)}catch(t){throw t instanceof Error?t:new Error(e.getString("Errors.Dzi"))}else{if("Collection"===u)throw new Error(e.getString("Errors.Dzc"));if("Error"===u){var f=c.getElementsByTagName("Message")[0].firstChild.nodeValue;throw new Error(f)}}throw new Error(e.getString("Errors.Dzi"))}(this,n),r&&!o.tilesUrl&&(o.tilesUrl=r.replace(/([^/]+?)(\.(dzi|xml|js)?(\?[^/]*)?)?\/?$/,"$1_files/"),-1!==r.search(/\.(dzi|xml|js)\?/)?o.queryParams=r.match(/\?.*/):o.queryParams=""),o},getTileUrl:function(e,t,n){return[this.tilesUrl,e,"/",t,"_",n,".",this.fileFormat,this.queryParams].join("")},tileExists:function(e,t,n){var r,i,o,a,s,l,c,u=this._levelRects[e];if(this.minLevel&&e<this.minLevel||this.maxLevel&&e>this.maxLevel)return!1;if(!u||!u.length)return!0;for(c=u.length-1;c>=0;c--)if(!(e<(r=u[c]).minLevel||e>r.maxLevel)&&(i=this.getLevelScale(e),o=r.x*i,a=r.y*i,s=o+r.width*i,l=a+r.height*i,o=Math.floor(o/this._tileWidth),a=Math.floor(a/this._tileWidth),s=Math.ceil(s/this._tileWidth),l=Math.ceil(l/this._tileWidth),o<=t&&t<s&&a<=n&&n<l))return!0;return!1}})}(s),function(e){function t(e){var t=Array.isArray(e.profile)?e.profile[0]:e.profile,n=-1!==["http://library.stanford.edu/iiif/image-api/compliance.html#level0","http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0","http://iiif.io/api/image/2/level0.json","level0","https://iiif.io/api/image/3/level0.json"].indexOf(t),r=!1;return 2===e.version&&e.profile.length>1&&e.profile[1].supports&&(r=-1!==e.profile[1].supports.indexOf("sizeByW")),3===e.version&&e.extraFeatures&&(r=-1!==e.extraFeatures.indexOf("sizeByWh")),!n||r}function n(e){for(var t=[],n=0;n<e.sizes.length;n++)t.push({url:e._id+"/full/"+e.sizes[n].width+","+(3===e.version?e.sizes[n].height:"")+"/0/default."+e.tileFormat,width:e.sizes[n].width,height:e.sizes[n].height});return t.sort((function(e,t){return e.width-t.width}))}function r(t,n,i){var o,a;if(3===t.nodeType&&i)(a=t.nodeValue.trim()).match(/^\d*$/)&&(a=Number(a)),n[i]?(e.isArray(n[i])||(n[i]=[n[i]]),n[i].push(a)):n[i]=a;else if(1===t.nodeType)for(o=0;o<t.childNodes.length;o++)r(t.childNodes[o],n,t.nodeName)}e.IIIFTileSource=function(r){if(e.extend(!0,this,r),this._id=this["@id"]||this.id||this.identifier||null,!(this.height&&this.width&&this._id))throw new Error("IIIF required parameters (width, height, or id) not provided.");if(r.tileSizePerScaleFactor={},this.tileFormat=this.tileFormat||"jpg",this.version=r.version,this.tile_width&&this.tile_height)r.tileWidth=this.tile_width,r.tileHeight=this.tile_height;else if(this.tile_width)r.tileSize=this.tile_width;else if(this.tile_height)r.tileSize=this.tile_height;else if(this.tiles)if(1===this.tiles.length)r.tileWidth=this.tiles[0].width,r.tileHeight=this.tiles[0].height||this.tiles[0].width,this.scale_factors=this.tiles[0].scaleFactors;else{this.scale_factors=[];for(var i=0;i<this.tiles.length;i++)for(var o=0;o<this.tiles[i].scaleFactors.length;o++){var a=this.tiles[i].scaleFactors[o];this.scale_factors.push(a),r.tileSizePerScaleFactor[a]={width:this.tiles[i].width,height:this.tiles[i].height||this.tiles[i].width}}}else if(t(r)){for(var s=Math.min(this.height,this.width),l=[256,512,1024],c=[],u=0;u<l.length;u++)l[u]<=s&&c.push(l[u]);c.length>0?r.tileSize=Math.max.apply(null,c):r.tileSize=s}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,r.levels=n(this),e.extend(!0,r,{width:r.levels[r.levels.length-1].width,height:r.levels[r.levels.length-1].height,tileSize:Math.max(r.height,r.width),tileOverlap:0,minLevel:0,maxLevel:r.levels.length-1}),this.levels=r.levels):e.console.error("Nothing in the info.json to construct image pyramids from");if(!r.maxLevel&&!this.emulateLegacyImagePyramid)if(this.scale_factors){var d=Math.max.apply(null,this.scale_factors);r.maxLevel=Math.round(Math.log(d)*Math.LOG2E)}else r.maxLevel=Number(Math.round(Math.log(Math.max(this.width,this.height),2)));if(this.sizes){var p=this.sizes.length;p!==r.maxLevel&&p!==r.maxLevel+1||(this.levelSizes=this.sizes,p===r.maxLevel&&this.levelSizes.push({width:this.width,height:this.height}))}e.TileSource.apply(this,[r])},e.extend(e.IIIFTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return!(!e.protocol||"http://iiif.io/api/image"!==e.protocol)||(!(!e["@context"]||"http://library.stanford.edu/iiif/image-api/1.1/context.json"!==e["@context"]&&"http://iiif.io/api/image/1/context.json"!==e["@context"])||(!(!e.profile||0!==e.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html"))||(!!(e.identifier&&e.width&&e.height)||!(!e.documentElement||"info"!==e.documentElement.tagName||"http://library.stanford.edu/iiif/image-api/ns/"!==e.documentElement.namespaceURI))))},configure:function(t,n,i){if(e.isPlainObject(t)){if(t["@context"]){var o=t["@context"];if(Array.isArray(o))for(var a=0;a<o.length;a++)if("string"==typeof o[a]&&(/^http:\/\/iiif\.io\/api\/image\/[1-3]\/context\.json$/.test(o[a])||"http://library.stanford.edu/iiif/image-api/1.1/context.json"===o[a])){o=o[a];break}switch(o){case"http://iiif.io/api/image/1/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/context.json":t.version=1;break;case"http://iiif.io/api/image/2/context.json":t.version=2;break;case"http://iiif.io/api/image/3/context.json":t.version=3;break;default:e.console.error("Data has a @context property which contains no known IIIF context URI.")}}else t["@context"]="http://iiif.io/api/image/1.0/context.json",t["@id"]=n.replace("/info.json",""),t.version=1;if(t.preferredFormats)for(var l=0;l<t.preferredFormats.length;l++)if(s.imageFormatSupported(t.preferredFormats[l])){t.tileFormat=t.preferredFormats[l];break}return t}var c=function(t){if(!t||!t.documentElement)throw new Error(e.getString("Errors.Xml"));var n=t.documentElement,i=n.tagName,o=null;if("info"===i)try{return r(n,o={}),o}catch(t){throw t instanceof Error?t:new Error(e.getString("Errors.IIIF"))}throw new Error(e.getString("Errors.IIIF"))}(t);return c["@context"]="http://iiif.io/api/image/1.0/context.json",c["@id"]=n.replace("/info.xml",""),c.version=1,c},getTileWidth:function(t){if(this.emulateLegacyImagePyramid)return e.TileSource.prototype.getTileWidth.call(this,t);var n=Math.pow(2,this.maxLevel-t);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[n]?this.tileSizePerScaleFactor[n].width:this._tileWidth},getTileHeight:function(t){if(this.emulateLegacyImagePyramid)return e.TileSource.prototype.getTileHeight.call(this,t);var n=Math.pow(2,this.maxLevel-t);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[n]?this.tileSizePerScaleFactor[n].height:this._tileHeight},getLevelScale:function(t){if(this.emulateLegacyImagePyramid){var n=NaN;return this.levels.length>0&&t>=this.minLevel&&t<=this.maxLevel&&(n=this.levels[t].width/this.levels[this.maxLevel].width),n}return e.TileSource.prototype.getLevelScale.call(this,t)},getNumTiles:function(t){if(this.emulateLegacyImagePyramid)return this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0);if(this.levelSizes){var n=this.levelSizes[t],r=Math.ceil(n.width/this.getTileWidth(t)),i=Math.ceil(n.height/this.getTileHeight(t));return new e.Point(r,i)}return e.TileSource.prototype.getNumTiles.call(this,t)},getTileAtPoint:function(t,n){if(this.emulateLegacyImagePyramid)return new e.Point(0,0);if(this.levelSizes){var r=n.x>=0&&n.x<=1&&n.y>=0&&n.y<=1/this.aspectRatio;e.console.assert(r,"[TileSource.getTileAtPoint] must be called with a valid point.");var i=this.levelSizes[t].width,o=n.x*i,a=n.y*i,s=Math.floor(o/this.getTileWidth(t)),l=Math.floor(a/this.getTileHeight(t));n.x>=1&&(s=this.getNumTiles(t).x-1);return n.y>=1/this.aspectRatio-1e-15&&(l=this.getNumTiles(t).y-1),new e.Point(s,l)}return e.TileSource.prototype.getTileAtPoint.call(this,t,n)},getTileUrl:function(e,t,n){if(this.emulateLegacyImagePyramid){var r=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(r=this.levels[e].url),r}var i,o,a,s,l,c,u,d,p,h,f,m,g,v,y,b=Math.pow(.5,this.maxLevel-e);return this.levelSizes?(i=this.levelSizes[e].width,o=this.levelSizes[e].height):(i=Math.ceil(this.width*b),o=Math.ceil(this.height*b)),a=this.getTileWidth(e),s=this.getTileHeight(e),l=Math.round(a/b),c=Math.round(s/b),y=1===this.version?"native."+this.tileFormat:"default."+this.tileFormat,i<a&&o<s?(m=2===this.version&&i===this.width?"full":3===this.version&&i===this.width&&o===this.height?"max":3===this.version?i+","+o:i+",",u="full"):(d=t*l,p=n*c,h=Math.min(l,this.width-d),f=Math.min(c,this.height-p),u=0===t&&0===n&&h===this.width&&f===this.height?"full":[d,p,h,f].join(","),g=Math.min(a,i-t*a),v=Math.min(s,o-n*s),m=2===this.version&&g===this.width?"full":3===this.version&&g===this.width&&v===this.height?"max":3===this.version?g+","+v:g+","),[this._id,u,m,"0",y].join("/")},__testonly__:{canBeTiled:t,constructLevels:n}})}(s),function(e){e.OsmTileSource=function(t,n,r,i,o){var a;(a=e.isPlainObject(t)?t:{width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]}).width&&a.height||(a.width=65572864,a.height=65572864),a.tileSize||(a.tileSize=256,a.tileOverlap=0),a.tilesUrl||(a.tilesUrl="http://tile.openstreetmap.org/"),a.minLevel=8,e.TileSource.apply(this,[a])},e.extend(e.OsmTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"openstreetmaps"===e.type},configure:function(e,t,n){return e},getTileUrl:function(e,t,n){return this.tilesUrl+(e-8)+"/"+t+"/"+n+".png"}})}(s),function(e){e.TmsTileSource=function(t,n,r,i,o){var a;a=e.isPlainObject(t)?t:{width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]};var s,l=256*Math.ceil(a.width/256),c=256*Math.ceil(a.height/256);s=l>c?l/256:c/256,a.maxLevel=Math.ceil(Math.log(s)/Math.log(2))-1,a.tileSize=256,a.width=l,a.height=c,e.TileSource.apply(this,[a])},e.extend(e.TmsTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"tiledmapservice"===e.type},configure:function(e,t,n){return e},getTileUrl:function(e,t,n){var r=this.getNumTiles(e).y-1;return this.tilesUrl+e+"/"+t+"/"+(r-n)+".png"}})}(s),function(e){e.ZoomifyTileSource=function(e){void 0===e.tileSize&&(e.tileSize=256),void 0===e.fileFormat&&(e.fileFormat="jpg",this.fileFormat=e.fileFormat);var t={x:e.width,y:e.height};for(e.imageSizes=[{x:e.width,y:e.height}],e.gridSize=[this._getGridSize(e.width,e.height,e.tileSize)];parseInt(t.x,10)>e.tileSize||parseInt(t.y,10)>e.tileSize;)t.x=Math.floor(t.x/2),t.y=Math.floor(t.y/2),e.imageSizes.push({x:t.x,y:t.y}),e.gridSize.push(this._getGridSize(t.x,t.y,e.tileSize));e.imageSizes.reverse(),e.gridSize.reverse(),e.minLevel=0,e.maxLevel=e.gridSize.length-1,s.TileSource.apply(this,[e])},e.extend(e.ZoomifyTileSource.prototype,e.TileSource.prototype,{_getGridSize:function(e,t,n){return{x:Math.ceil(e/n),y:Math.ceil(t/n)}},_calculateAbsoluteTileNumber:function(e,t,n){for(var r=0,i={},o=0;o<e;o++)r+=(i=this.gridSize[o]).x*i.y;return r+=(i=this.gridSize[e]).x*n+t},supports:function(e,t){return e.type&&"zoomifytileservice"===e.type},configure:function(e,t,n){return e},getTileUrl:function(e,t,n){var r,i=this._calculateAbsoluteTileNumber(e,t,n);return r=Math.floor(i/256),this.tilesUrl+"TileGroup"+r+"/"+e+"-"+t+"-"+n+"."+this.fileFormat}})}(s),function(e){function t(e,t){return t.levels}e.LegacyTileSource=function(t){var n,r,i;e.isArray(t)&&(n={type:"legacy-image-pyramid",levels:t}),n.levels=function(t){var n,r,i=[];for(r=0;r<t.length;r++)(n=t[r]).height&&n.width&&n.url?i.push({url:n.url,width:Number(n.width),height:Number(n.height)}):e.console.error("Unsupported image format: %s",n.url?n.url:"<no URL>");return i.sort((function(e,t){return e.height-t.height}))}(n.levels),n.levels.length>0?(r=n.levels[n.levels.length-1].width,i=n.levels[n.levels.length-1].height):(r=0,i=0,e.console.error("No supported image formats found")),e.extend(!0,n,{width:r,height:i,tileSize:Math.max(i,r),tileOverlap:0,minLevel:0,maxLevel:n.levels.length>0?n.levels.length-1:0}),e.TileSource.apply(this,[n]),this.levels=n.levels},e.extend(e.LegacyTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"legacy-image-pyramid"===e.type||e.documentElement&&"legacy-image-pyramid"===e.documentElement.getAttribute("type")},configure:function(n,r,i){return e.isPlainObject(n)?t(this,n):function(n,r){if(!r||!r.documentElement)throw new Error(e.getString("Errors.Xml"));var i,o,a=r.documentElement,s=a.tagName,l=null,c=[];if("image"===s)try{for(l={type:a.getAttribute("type"),levels:[]},c=a.getElementsByTagName("level"),o=0;o<c.length;o++)i=c[o],l.levels.push({url:i.getAttribute("url"),width:parseInt(i.getAttribute("width"),10),height:parseInt(i.getAttribute("height"),10)});return t(n,l)}catch(e){throw e instanceof Error?e:new Error("Unknown error parsing Legacy Image Pyramid XML.")}else{if("collection"===s)throw new Error("Legacy Image Pyramid Collections not yet supported.");if("error"===s)throw new Error("Error: "+r)}throw new Error("Unknown element "+s)}(this,n)},getLevelScale:function(e){var t=NaN;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(t){return this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(e,t,n){var r=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(r=this.levels[e].url),r}})}(s),function(e){e.ImageTileSource=function(t){t=e.extend({buildPyramid:!0,crossOriginPolicy:!1,ajaxWithCredentials:!1,useCanvas:!0},t),e.TileSource.apply(this,[t])},e.extend(e.ImageTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"image"===e.type},configure:function(e,t,n){return e},getImageInfo:function(t){var n=this._image=new Image,r=this;this.crossOriginPolicy&&(n.crossOrigin=this.crossOriginPolicy),this.ajaxWithCredentials&&(n.useCredentials=this.ajaxWithCredentials),e.addEvent(n,"load",(function(){r.width=n.naturalWidth,r.height=n.naturalHeight,r.aspectRatio=r.width/r.height,r.dimensions=new e.Point(r.width,r.height),r._tileWidth=r.width,r._tileHeight=r.height,r.tileOverlap=0,r.minLevel=0,r.levels=r._buildLevels(),r.maxLevel=r.levels.length-1,r.ready=!0,r.raiseEvent("ready",{tileSource:r})})),e.addEvent(n,"error",(function(){r.raiseEvent("open-failed",{message:"Error loading image at "+t,source:t})})),n.src=t},getLevelScale:function(e){var t=NaN;return e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(t){return this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(e,t,n){var r=null;return e>=this.minLevel&&e<=this.maxLevel&&(r=this.levels[e].url),r},getContext2D:function(e,t,n){var r=null;return e>=this.minLevel&&e<=this.maxLevel&&(r=this.levels[e].context2D),r},destroy:function(){this._freeupCanvasMemory()},_buildLevels:function(){var t=[{url:this._image.src,width:this._image.naturalWidth,height:this._image.naturalHeight}];if(!this.buildPyramid||!e.supportsCanvas||!this.useCanvas)return delete this._image,t;var n=this._image.naturalWidth,r=this._image.naturalHeight,i=document.createElement("canvas"),o=i.getContext("2d");if(i.width=n,i.height=r,o.drawImage(this._image,0,0,n,r),t[0].context2D=o,delete this._image,e.isCanvasTainted(i))return t;for(;n>=2&&r>=2;){n=Math.floor(n/2),r=Math.floor(r/2);var a=document.createElement("canvas"),s=a.getContext("2d");a.width=n,a.height=r,s.drawImage(i,0,0,n,r),t.splice(0,0,{context2D:s,width:n,height:r}),i=a,o=s}return t},_freeupCanvasMemory:function(){for(var e=0;e<this.levels.length;e++)this.levels[e].context2D&&(this.levels[e].context2D.canvas.height=0,this.levels[e].context2D.canvas.width=0)}})}(s),function(e){e.TileSourceCollection=function(t,n,r,i){e.console.error("TileSourceCollection is deprecated; use World instead")}}(s),function(e){function t(n){e.requestAnimationFrame((function(){!function(n){var r;n.shouldFade&&(r=1-(e.now()-n.fadeBeginTime)/n.fadeLength,r=Math.min(1,r),r=Math.max(0,r),n.imgGroup&&e.setElementOpacity(n.imgGroup,r,!0),r>0&&t(n))}(n)}))}function n(t,n){t.element.disabled||(n>=e.ButtonState.GROUP&&t.currentState===e.ButtonState.REST&&(!function(t){t.shouldFade=!1,t.imgGroup&&e.setElementOpacity(t.imgGroup,1,!0)}(t),t.currentState=e.ButtonState.GROUP),n>=e.ButtonState.HOVER&&t.currentState===e.ButtonState.GROUP&&(t.imgHover&&(t.imgHover.style.visibility=""),t.currentState=e.ButtonState.HOVER),n>=e.ButtonState.DOWN&&t.currentState===e.ButtonState.HOVER&&(t.imgDown&&(t.imgDown.style.visibility=""),t.currentState=e.ButtonState.DOWN))}function r(n,r){n.element.disabled||(r<=e.ButtonState.HOVER&&n.currentState===e.ButtonState.DOWN&&(n.imgDown&&(n.imgDown.style.visibility="hidden"),n.currentState=e.ButtonState.HOVER),r<=e.ButtonState.GROUP&&n.currentState===e.ButtonState.HOVER&&(n.imgHover&&(n.imgHover.style.visibility="hidden"),n.currentState=e.ButtonState.GROUP),r<=e.ButtonState.REST&&n.currentState===e.ButtonState.GROUP&&(!function(n){n.shouldFade=!0,n.fadeBeginTime=e.now()+n.fadeDelay,window.setTimeout((function(){t(n)}),n.fadeDelay)}(n),n.currentState=e.ButtonState.REST))}e.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},e.Button=function(t){var i=this;e.EventSource.call(this),e.extend(!0,this,{tooltip:null,srcRest:null,srcGroup:null,srcHover:null,srcDown:null,clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,fadeDelay:0,fadeLength:2e3,onPress:null,onRelease:null,onClick:null,onEnter:null,onExit:null,onFocus:null,onBlur:null,userData:null},t),this.element=t.element||e.makeNeutralElement("div"),t.element||(this.imgRest=e.makeTransparentImage(this.srcRest),this.imgGroup=e.makeTransparentImage(this.srcGroup),this.imgHover=e.makeTransparentImage(this.srcHover),this.imgDown=e.makeTransparentImage(this.srcDown),this.imgRest.alt=this.imgGroup.alt=this.imgHover.alt=this.imgDown.alt=this.tooltip,e.setElementPointerEventsNone(this.imgRest),e.setElementPointerEventsNone(this.imgGroup),e.setElementPointerEventsNone(this.imgHover),e.setElementPointerEventsNone(this.imgDown),this.element.style.position="relative",e.setElementTouchActionNone(this.element),this.imgGroup.style.position=this.imgHover.style.position=this.imgDown.style.position="absolute",this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top="0px",this.imgGroup.style.left=this.imgHover.style.left=this.imgDown.style.left="0px",this.imgHover.style.visibility=this.imgDown.style.visibility="hidden",e.Browser.vendor===e.BROWSERS.FIREFOX&&e.Browser.version<3&&(this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top=""),this.element.appendChild(this.imgRest),this.element.appendChild(this.imgGroup),this.element.appendChild(this.imgHover),this.element.appendChild(this.imgDown)),this.addHandler("press",this.onPress),this.addHandler("release",this.onRelease),this.addHandler("click",this.onClick),this.addHandler("enter",this.onEnter),this.addHandler("exit",this.onExit),this.addHandler("focus",this.onFocus),this.addHandler("blur",this.onBlur),this.currentState=e.ButtonState.GROUP,this.fadeBeginTime=null,this.shouldFade=!1,this.element.style.display="inline-block",this.element.style.position="relative",this.element.title=this.tooltip,this.tracker=new e.MouseTracker({userData:"Button.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(t){t.insideElementPressed?(n(i,e.ButtonState.DOWN),i.raiseEvent("enter",{originalEvent:t.originalEvent})):t.buttonDownAny||n(i,e.ButtonState.HOVER)},focusHandler:function(e){i.tracker.enterHandler(e),i.raiseEvent("focus",{originalEvent:e.originalEvent})},leaveHandler:function(t){r(i,e.ButtonState.GROUP),t.insideElementPressed&&i.raiseEvent("exit",{originalEvent:t.originalEvent})},blurHandler:function(e){i.tracker.leaveHandler(e),i.raiseEvent("blur",{originalEvent:e.originalEvent})},pressHandler:function(t){n(i,e.ButtonState.DOWN),i.raiseEvent("press",{originalEvent:t.originalEvent})},releaseHandler:function(t){t.insideElementPressed&&t.insideElementReleased?(r(i,e.ButtonState.HOVER),i.raiseEvent("release",{originalEvent:t.originalEvent})):t.insideElementPressed?r(i,e.ButtonState.GROUP):n(i,e.ButtonState.HOVER)},clickHandler:function(e){e.quick&&i.raiseEvent("click",{originalEvent:e.originalEvent})},keyHandler:function(e){13===e.keyCode?(i.raiseEvent("click",{originalEvent:e.originalEvent}),i.raiseEvent("release",{originalEvent:e.originalEvent}),e.preventDefault=!0):e.preventDefault=!1}}),r(this,e.ButtonState.REST)},e.extend(e.Button.prototype,e.EventSource.prototype,{notifyGroupEnter:function(){n(this,e.ButtonState.GROUP)},notifyGroupExit:function(){r(this,e.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,this.tracker.setTracking(!1),e.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,this.tracker.setTracking(!0),e.setElementOpacity(this.element,1,!0),this.notifyGroupEnter()},destroy:function(){this.imgRest&&(this.element.removeChild(this.imgRest),this.imgRest=null),this.imgGroup&&(this.element.removeChild(this.imgGroup),this.imgGroup=null),this.imgHover&&(this.element.removeChild(this.imgHover),this.imgHover=null),this.imgDown&&(this.element.removeChild(this.imgDown),this.imgDown=null),this.removeAllHandlers(),this.tracker.destroy(),this.element=null}})}(s),function(e){e.ButtonGroup=function(t){e.extend(!0,this,{buttons:[],clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},t);var n,r=this.buttons.concat([]),i=this;if(this.element=t.element||e.makeNeutralElement("div"),!t.group)for(this.element.style.display="inline-block",n=0;n<r.length;n++)this.element.appendChild(r[n].element);e.setElementTouchActionNone(this.element),this.tracker=new e.MouseTracker({userData:"ButtonGroup.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(e){var t;for(t=0;t<i.buttons.length;t++)i.buttons[t].notifyGroupEnter()},leaveHandler:function(e){var t;if(!e.insideElementPressed)for(t=0;t<i.buttons.length;t++)i.buttons[t].notifyGroupExit()}})},e.ButtonGroup.prototype={addButton:function(e){this.buttons.push(e),this.element.appendChild(e.element)},emulateEnter:function(){this.tracker.enterHandler({eventSource:this.tracker})},emulateLeave:function(){this.tracker.leaveHandler({eventSource:this.tracker})},destroy:function(){for(;this.buttons.length;){var e=this.buttons.pop();this.element.removeChild(e.element),e.destroy()}this.tracker.destroy(),this.element=null}}}(s),function(e){e.Rect=function(t,n,r,i,o){var a,s;this.x="number"==typeof t?t:0,this.y="number"==typeof n?n:0,this.width="number"==typeof r?r:0,this.height="number"==typeof i?i:0,this.degrees="number"==typeof o?o:0,this.degrees=e.positiveModulo(this.degrees,360),this.degrees>=270?(a=this.getTopRight(),this.x=a.x,this.y=a.y,s=this.height,this.height=this.width,this.width=s,this.degrees-=270):this.degrees>=180?(a=this.getBottomRight(),this.x=a.x,this.y=a.y,this.degrees-=180):this.degrees>=90&&(a=this.getBottomLeft(),this.x=a.x,this.y=a.y,s=this.height,this.height=this.width,this.width=s,this.degrees-=90)},e.Rect.fromSummits=function(t,n,r){var i=t.distanceTo(n),o=t.distanceTo(r),a=n.minus(t),s=Math.atan(a.y/a.x);return a.x<0?s+=Math.PI:a.y<0&&(s+=2*Math.PI),new e.Rect(t.x,t.y,i,o,s/Math.PI*180)},e.Rect.prototype={clone:function(){return new e.Rect(this.x,this.y,this.width,this.height,this.degrees)},getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new e.Point(this.x,this.y)},getBottomRight:function(){return new e.Point(this.x+this.width,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getTopRight:function(){return new e.Point(this.x+this.width,this.y).rotate(this.degrees,this.getTopLeft())},getBottomLeft:function(){return new e.Point(this.x,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getCenter:function(){return new e.Point(this.x+this.width/2,this.y+this.height/2).rotate(this.degrees,this.getTopLeft())},getSize:function(){return new e.Point(this.width,this.height)},equals:function(t){return t instanceof e.Rect&&this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height&&this.degrees===t.degrees},times:function(t){return new e.Rect(this.x*t,this.y*t,this.width*t,this.height*t,this.degrees)},translate:function(t){return new e.Rect(this.x+t.x,this.y+t.y,this.width,this.height,this.degrees)},union:function(t){var n=this.getBoundingBox(),r=t.getBoundingBox(),i=Math.min(n.x,r.x),o=Math.min(n.y,r.y),a=Math.max(n.x+n.width,r.x+r.width),s=Math.max(n.y+n.height,r.y+r.height);return new e.Rect(i,o,a-i,s-o)},intersection:function(t){var n=1e-10,r=[],i=this.getTopLeft();t.containsPoint(i,n)&&r.push(i);var o=this.getTopRight();t.containsPoint(o,n)&&r.push(o);var a=this.getBottomLeft();t.containsPoint(a,n)&&r.push(a);var s=this.getBottomRight();t.containsPoint(s,n)&&r.push(s);var l=t.getTopLeft();this.containsPoint(l,n)&&r.push(l);var c=t.getTopRight();this.containsPoint(c,n)&&r.push(c);var u=t.getBottomLeft();this.containsPoint(u,n)&&r.push(u);var d=t.getBottomRight();this.containsPoint(d,n)&&r.push(d);for(var p=this._getSegments(),h=t._getSegments(),f=0;f<p.length;f++)for(var m=p[f],g=0;g<h.length;g++){var v=h[g],y=b(m[0],m[1],v[0],v[1]);y&&r.push(y)}function b(t,r,i,o){var a=r.minus(t),s=o.minus(i),l=-s.x*a.y+a.x*s.y;if(0===l)return null;var c=(a.x*(t.y-i.y)-a.y*(t.x-i.x))/l,u=(s.x*(t.y-i.y)-s.y*(t.x-i.x))/l;return-1e-10<=c&&c<=1-n&&-1e-10<=u&&u<=1-n?new e.Point(t.x+u*a.x,t.y+u*a.y):null}if(0===r.length)return null;for(var w=r[0].x,x=r[0].x,S=r[0].y,E=r[0].y,T=1;T<r.length;T++){var P=r[T];P.x<w&&(w=P.x),P.x>x&&(x=P.x),P.y<S&&(S=P.y),P.y>E&&(E=P.y)}return new e.Rect(w,S,x-w,E-S)},_getSegments:function(){var e=this.getTopLeft(),t=this.getTopRight(),n=this.getBottomLeft(),r=this.getBottomRight();return[[e,t],[t,r],[r,n],[n,e]]},rotate:function(t,n){if(0===(t=e.positiveModulo(t,360)))return this.clone();n=n||this.getCenter();var r=this.getTopLeft().rotate(t,n),i=this.getTopRight().rotate(t,n).minus(r);i=i.apply((function(e){return Math.abs(e)<1e-15?0:e}));var o=Math.atan(i.y/i.x);return i.x<0?o+=Math.PI:i.y<0&&(o+=2*Math.PI),new e.Rect(r.x,r.y,this.width,this.height,o/Math.PI*180)},getBoundingBox:function(){if(0===this.degrees)return this.clone();var t=this.getTopLeft(),n=this.getTopRight(),r=this.getBottomLeft(),i=this.getBottomRight(),o=Math.min(t.x,n.x,r.x,i.x),a=Math.max(t.x,n.x,r.x,i.x),s=Math.min(t.y,n.y,r.y,i.y),l=Math.max(t.y,n.y,r.y,i.y);return new e.Rect(o,s,a-o,l-s)},getIntegerBoundingBox:function(){var t=this.getBoundingBox(),n=Math.floor(t.x),r=Math.floor(t.y),i=Math.ceil(t.width+t.x-n),o=Math.ceil(t.height+t.y-r);return new e.Rect(n,r,i,o)},containsPoint:function(e,t){t=t||0;var n=this.getTopLeft(),r=this.getTopRight(),i=this.getBottomLeft(),o=r.minus(n),a=i.minus(n);return(e.x-n.x)*o.x+(e.y-n.y)*o.y>=-t&&(e.x-r.x)*o.x+(e.y-r.y)*o.y<=t&&(e.x-n.x)*a.x+(e.y-n.y)*a.y>=-t&&(e.x-i.x)*a.x+(e.y-i.y)*a.y<=t},toString:function(){return"["+Math.round(100*this.x)/100+", "+Math.round(100*this.y)/100+", "+Math.round(100*this.width)/100+"x"+Math.round(100*this.height)/100+", "+Math.round(100*this.degrees)/100+"deg]"}}}(s),function(e){var t={};function n(e){var t;e.quick&&(t="horizontal"===this.scroll?Math.floor(e.position.x/(this.panelWidth+4)):Math.floor(e.position.y/this.panelHeight),this.viewer.goToPage(t));this.element.focus()}function r(t){if(this.dragging=!0,this.element){var n=Number(this.element.style.marginLeft.replace("px","")),r=Number(this.element.style.marginTop.replace("px","")),i=Number(this.element.style.width.replace("px","")),a=Number(this.element.style.height.replace("px","")),s=e.getElementSize(this.viewer.canvas);"horizontal"===this.scroll?-t.delta.x>0?n>-(i-s.x)&&(this.element.style.marginLeft=n+2*t.delta.x+"px",o(this,s.x,n+2*t.delta.x)):-t.delta.x<0&&n<0&&(this.element.style.marginLeft=n+2*t.delta.x+"px",o(this,s.x,n+2*t.delta.x)):-t.delta.y>0?r>-(a-s.y)&&(this.element.style.marginTop=r+2*t.delta.y+"px",o(this,s.y,r+2*t.delta.y)):-t.delta.y<0&&r<0&&(this.element.style.marginTop=r+2*t.delta.y+"px",o(this,s.y,r+2*t.delta.y))}}function i(t){if(this.element){var n=Number(this.element.style.marginLeft.replace("px","")),r=Number(this.element.style.marginTop.replace("px","")),i=Number(this.element.style.width.replace("px","")),a=Number(this.element.style.height.replace("px","")),s=e.getElementSize(this.viewer.canvas);"horizontal"===this.scroll?t.scroll>0?n>-(i-s.x)&&(this.element.style.marginLeft=n-60*t.scroll+"px",o(this,s.x,n-60*t.scroll)):t.scroll<0&&n<0&&(this.element.style.marginLeft=n-60*t.scroll+"px",o(this,s.x,n-60*t.scroll)):t.scroll<0?r>s.y-a&&(this.element.style.marginTop=r+60*t.scroll+"px",o(this,s.y,r+60*t.scroll)):t.scroll>0&&r<0&&(this.element.style.marginTop=r+60*t.scroll+"px",o(this,s.y,r+60*t.scroll)),t.preventDefault=!0}}function o(t,n,r){var i,o,a,s,l,c;for(i="horizontal"===t.scroll?t.panelWidth:t.panelHeight,o=Math.ceil(n/i)+5,l=o=(o=(a=Math.ceil((Math.abs(r)+n)/i)+1)-o)<0?0:o;l<a&&l<t.panels.length;l++)if(!(c=t.panels[l]).activePanel){var u,d=t.viewer.tileSources[l];u=d.referenceStripThumbnailUrl?{type:"image",url:d.referenceStripThumbnailUrl}:d,s=new e.Viewer({id:c.id,tileSources:[u],element:c,navigatorSizeRatio:t.sizeRatio,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,loadTilesWithAjax:t.viewer.loadTilesWithAjax,ajaxHeaders:t.viewer.ajaxHeaders,useCanvas:t.useCanvas}),e.setElementPointerEventsNone(s.canvas),e.setElementPointerEventsNone(s.container),s.innerTracker.setTracking(!1),s.outerTracker.setTracking(!1),t.miniViewers[c.id]=s,c.activePanel=!0}}function a(e){var t=e.eventSource.element;"horizontal"===this.scroll?t.style.marginBottom="0px":t.style.marginLeft="0px"}function s(t){var n=t.eventSource.element;"horizontal"===this.scroll?n.style.marginBottom="-"+e.getElementSize(n).y/2+"px":n.style.marginLeft="-"+e.getElementSize(n).x/2+"px"}function l(e){if(e.ctrl||e.alt||e.meta)e.preventDefault=!1;else switch(e.keyCode){case 38:case 39:i.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),e.preventDefault=!0;break;case 40:case 37:i.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),e.preventDefault=!0;break;default:e.preventDefault=!1}}function c(e){if(e.ctrl||e.alt||e.meta)e.preventDefault=!1;else switch(e.keyCode){case 61:case 48:case 119:case 87:case 100:i.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),e.preventDefault=!0;break;case 45:case 115:case 83:case 97:i.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),e.preventDefault=!0;break;default:e.preventDefault=!1}}e.ReferenceStrip=function(u){var d,p,h,f=u.viewer,m=e.getElementSize(f.element);for(u.id||(u.id="referencestrip-"+e.now(),this.element=e.makeNeutralElement("div"),this.element.id=u.id,this.element.className="referencestrip"),u=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.referenceStripSizeRatio,position:e.DEFAULT_SETTINGS.referenceStripPosition,scroll:e.DEFAULT_SETTINGS.referenceStripScroll,clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold},u,{element:this.element}),e.extend(this,u),t[this.id]={animating:!1},this.minPixelRatio=this.viewer.minPixelRatio,this.element.tabIndex=0,(p=this.element.style).marginTop="0px",p.marginRight="0px",p.marginBottom="0px",p.marginLeft="0px",p.left="0px",p.bottom="0px",p.border="0px",p.background="#000",p.position="relative",e.setElementTouchActionNone(this.element),e.setElementOpacity(this.element,.8),this.viewer=f,this.tracker=new e.MouseTracker({userData:"ReferenceStrip.tracker",element:this.element,clickHandler:e.delegate(this,n),dragHandler:e.delegate(this,r),scrollHandler:e.delegate(this,i),enterHandler:e.delegate(this,a),leaveHandler:e.delegate(this,s),keyDownHandler:e.delegate(this,l),keyHandler:e.delegate(this,c),preProcessEventHandler:function(e){"wheel"===e.eventType&&(e.preventDefault=!0)}}),u.width&&u.height?(this.element.style.width=u.width+"px",this.element.style.height=u.height+"px",f.addControl(this.element,{anchor:e.ControlAnchor.BOTTOM_LEFT})):"horizontal"===u.scroll?(this.element.style.width=m.x*u.sizeRatio*f.tileSources.length+12*f.tileSources.length+"px",this.element.style.height=m.y*u.sizeRatio+"px",f.addControl(this.element,{anchor:e.ControlAnchor.BOTTOM_LEFT})):(this.element.style.height=m.y*u.sizeRatio*f.tileSources.length+12*f.tileSources.length+"px",this.element.style.width=m.x*u.sizeRatio+"px",f.addControl(this.element,{anchor:e.ControlAnchor.TOP_LEFT})),this.panelWidth=m.x*this.sizeRatio+8,this.panelHeight=m.y*this.sizeRatio+8,this.panels=[],this.miniViewers={},h=0;h<f.tileSources.length;h++)(d=e.makeNeutralElement("div")).id=this.element.id+"-"+h,d.style.width=this.panelWidth+"px",d.style.height=this.panelHeight+"px",d.style.display="inline",d.style.float="left",d.style.cssFloat="left",d.style.styleFloat="left",d.style.padding="2px",e.setElementTouchActionNone(d),e.setElementPointerEventsNone(d),this.element.appendChild(d),d.activePanel=!1,this.panels.push(d);o(this,"vertical"===this.scroll?m.y:m.x,0),this.setFocus(0)},e.ReferenceStrip.prototype={setFocus:function(t){var n,r=this.element.querySelector("#"+this.element.id+"-"+t),i=e.getElementSize(this.viewer.canvas),s=Number(this.element.style.width.replace("px","")),l=Number(this.element.style.height.replace("px","")),c=-Number(this.element.style.marginLeft.replace("px","")),u=-Number(this.element.style.marginTop.replace("px",""));this.currentSelected!==r&&(this.currentSelected&&(this.currentSelected.style.background="#000"),this.currentSelected=r,this.currentSelected.style.background="#999","horizontal"===this.scroll?(n=Number(t)*(this.panelWidth+3))>c+i.x-this.panelWidth?(n=Math.min(n,s-i.x),this.element.style.marginLeft=-n+"px",o(this,i.x,-n)):n<c&&(n=Math.max(0,n-i.x/2),this.element.style.marginLeft=-n+"px",o(this,i.x,-n)):(n=Number(t)*(this.panelHeight+3))>u+i.y-this.panelHeight?(n=Math.min(n,l-i.y),this.element.style.marginTop=-n+"px",o(this,i.y,-n)):n<u&&(n=Math.max(0,n-i.y/2),this.element.style.marginTop=-n+"px",o(this,i.y,-n)),this.currentPage=t,a.call(this,{eventSource:this.tracker}))},update:function(){return!!t[this.id].animating},destroy:function(){if(this.miniViewers)for(var e in this.miniViewers)this.miniViewers[e].destroy();this.tracker.destroy(),this.element&&this.viewer.removeControl(this.element)}}}(s),function(e){e.DisplayRect=function(t,n,r,i,o,a){e.Rect.apply(this,[t,n,r,i]),this.minLevel=o,this.maxLevel=a},e.extend(e.DisplayRect.prototype,e.Rect.prototype)}(s),function(e){e.Spring=function(t){var n=arguments;"object"!=typeof t&&(t={initial:n.length&&"number"==typeof n[0]?n[0]:void 0,springStiffness:n.length>1?n[1].springStiffness:5,animationTime:n.length>1?n[1].animationTime:1.5}),e.console.assert("number"==typeof t.springStiffness&&0!==t.springStiffness,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),e.console.assert("number"==typeof t.animationTime&&t.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),t.exponential&&(this._exponential=!0,delete t.exponential),e.extend(!0,this,t),this.current={value:"number"==typeof this.initial?this.initial:this._exponential?0:1,time:e.now()},e.console.assert(!this._exponential||0!==this.current.value,"[OpenSeadragon.Spring] value must be non-zero for exponential springs"),this.start={value:this.current.value,time:this.current.time},this.target={value:this.current.value,time:this.current.time},this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},e.Spring.prototype={resetTo:function(t){e.console.assert(!this._exponential||0!==t,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=t,this.start.time=this.target.time=this.current.time=e.now(),this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},springTo:function(t){e.console.assert(!this._exponential||0!==t,"[OpenSeadragon.Spring.springTo] target must be non-zero for exponential springs"),this.start.value=this.current.value,this.start.time=this.current.time,this.target.value=t,this.target.time=this.start.time+1e3*this.animationTime,this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},shiftBy:function(t){this.start.value+=t,this.target.value+=t,this._exponential&&(e.console.assert(0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.shiftBy] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},setExponential:function(t){this._exponential=t,this._exponential&&(e.console.assert(0!==this.current.value&&0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.setExponential] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},update:function(){var t,n;this.current.time=e.now(),this._exponential?(t=this.start._logValue,n=this.target._logValue):(t=this.start.value,n=this.target.value);var r,i,o=this.current.time>=this.target.time?n:t+(n-t)*(r=this.springStiffness,i=(this.current.time-this.start.time)/(this.target.time-this.start.time),(1-Math.exp(r*-i))/(1-Math.exp(-r))),a=this.current.value;return this._exponential?this.current.value=Math.exp(o):this.current.value=o,a!==this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}}}(s),function(e){e.ImageJob=function(t){e.extend(!0,this,{timeout:e.DEFAULT_SETTINGS.timeout,jobId:null,tries:0},t),this.data=null,this.userData={},this.errorMsg=null},e.ImageJob.prototype={start:function(){this.tries++;var e=this,t=this.abort;this.jobId=window.setTimeout((function(){e.finish(null,null,"Image load exceeded timeout ("+e.timeout+" ms)")}),this.timeout),this.abort=function(){e.source.downloadTileAbort(e),"function"==typeof t&&t()},this.source.downloadTileStart(this)},finish:function(e,t,n){this.data=e,this.request=t,this.errorMsg=n,this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},e.ImageLoader=function(t){e.extend(!0,this,{jobLimit:e.DEFAULT_SETTINGS.imageLoaderLimit,timeout:e.DEFAULT_SETTINGS.timeout,jobQueue:[],failedTiles:[],jobsInProgress:0},t)},e.ImageLoader.prototype={addJob:function(t){if(!t.source){e.console.error("ImageLoader.prototype.addJob() requires [options.source]. TileSource since new API defines how images are fetched. Creating a dummy TileSource.");var n=e.TileSource.prototype;t.source={downloadTileStart:n.downloadTileStart,downloadTileAbort:n.downloadTileAbort}}var r=this,i={src:t.src,tile:t.tile||{},source:t.source,loadWithAjax:t.loadWithAjax,ajaxHeaders:t.loadWithAjax?t.ajaxHeaders:null,crossOriginPolicy:t.crossOriginPolicy,ajaxWithCredentials:t.ajaxWithCredentials,postData:t.postData,callback:function(e){!function(e,t,n){""!==t.errorMsg&&(null===t.data||void 0===t.data)&&t.tries<1+e.tileRetryMax&&e.failedTiles.push(t);var r;e.jobsInProgress--,(!e.jobLimit||e.jobsInProgress<e.jobLimit)&&e.jobQueue.length>0&&((r=e.jobQueue.shift()).start(),e.jobsInProgress++);e.tileRetryMax>0&&0===e.jobQueue.length&&(!e.jobLimit||e.jobsInProgress<e.jobLimit)&&e.failedTiles.length>0&&(r=e.failedTiles.shift(),setTimeout((function(){r.start()}),e.tileRetryDelay),e.jobsInProgress++);n(t.data,t.errorMsg,t.request)}(r,e,t.callback)},abort:t.abort,timeout:this.timeout},o=new e.ImageJob(i);!this.jobLimit||this.jobsInProgress<this.jobLimit?(o.start(),this.jobsInProgress++):this.jobQueue.push(o)},clear:function(){for(var e=0;e<this.jobQueue.length;e++){var t=this.jobQueue[e];"function"==typeof t.abort&&t.abort()}this.jobQueue=[]}}}(s),function(e){e.Tile=function(t,n,r,i,o,a,s,l,c,u,d,p){this.level=t,this.x=n,this.y=r,this.bounds=i,this.sourceBounds=u,this.exists=o,this._url=a,this.postData=d,this.context2D=s,this.loadWithAjax=l,this.ajaxHeaders=c,void 0===p&&(e.console.warn("Tile constructor needs 'cacheKey' variable: creation tile cache in Tile class is deprecated. TileSource.prototype.getTileHashKey will be used."),p=e.TileSource.prototype.getTileHashKey(t,n,r,a,c,d)),this.cacheKey=p,this.loaded=!1,this.loading=!1,this.element=null,this.imgElement=null,this.style=null,this.position=null,this.size=null,this.flipped=!1,this.blendStart=null,this.opacity=null,this.squaredDistance=null,this.visibility=null,this.hasTransparency=!1,this.beingDrawn=!1,this.lastTouchTime=0,this.isRightMost=!1,this.isBottomMost=!1},e.Tile.prototype={toString:function(){return this.level+"/"+this.x+"_"+this.y},_hasTransparencyChannel:function(){return console.warn("Tile.prototype._hasTransparencyChannel() has been deprecated and will be removed in the future. Use TileSource.prototype.hasTransparency() instead."),!!this.context2D||this.getUrl().match(".png")},drawHTML:function(t){if(this.cacheImageRecord)if(this.loaded){if(!this.element){var n=this.getImage();if(!n)return;this.element=e.makeNeutralElement("div"),this.imgElement=n.cloneNode(),this.imgElement.style.msInterpolationMode="nearest-neighbor",this.imgElement.style.width="100%",this.imgElement.style.height="100%",this.style=this.element.style,this.style.position="absolute"}this.element.parentNode!==t&&t.appendChild(this.element),this.imgElement.parentNode!==this.element&&this.element.appendChild(this.imgElement),this.style.top=this.position.y+"px",this.style.left=this.position.x+"px",this.style.height=this.size.y+"px",this.style.width=this.size.x+"px",this.flipped&&(this.style.transform="scaleX(-1)"),e.setElementOpacity(this.element,this.opacity)}else e.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());else e.console.warn("[Tile.drawHTML] attempting to draw tile %s when it's not cached",this.toString())},get image(){return e.console.error("[Tile.image] property has been deprecated. Use [Tile.prototype.getImage] instead."),this.getImage()},get url(){return e.console.error("[Tile.url] property has been deprecated. Use [Tile.prototype.getUrl] instead."),this.getUrl()},getImage:function(){return this.cacheImageRecord.getImage()},getUrl:function(){return"function"==typeof this._url?this._url():this._url},getCanvasContext:function(){return this.context2D||this.cacheImageRecord.getRenderedContext()},drawCanvas:function(t,n,r,i,o,a){var s,l,c,u=this.position.times(e.pixelDensityRatio),d=this.size.times(e.pixelDensityRatio);this.context2D||this.cacheImageRecord?(s=this.getCanvasContext(),this.loaded&&s?(t.save(),t.globalAlpha=this.opacity,"number"==typeof r&&1!==r&&(u=u.times(r),d=d.times(r)),i instanceof e.Point&&(u=u.plus(i)),1===t.globalAlpha&&this.hasTransparency&&(o&&(u.x=Math.round(u.x),u.y=Math.round(u.y),d.x=Math.round(d.x),d.y=Math.round(d.y)),t.clearRect(u.x,u.y,d.x,d.y)),n({context:t,tile:this,rendered:s}),this.sourceBounds?(l=Math.min(this.sourceBounds.width,s.canvas.width),c=Math.min(this.sourceBounds.height,s.canvas.height)):(l=s.canvas.width,c=s.canvas.height),t.translate(u.x+d.x/2,0),this.flipped&&t.scale(-1,1),t.drawImage(s.canvas,0,0,l,c,-d.x/2,u.y,d.x,d.y),t.restore()):e.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString())):e.console.warn("[Tile.drawCanvas] attempting to draw tile %s when it's not cached",this.toString())},getScaleForEdgeSmoothing:function(){var t;if(this.cacheImageRecord)t=this.cacheImageRecord.getRenderedContext();else{if(!this.context2D)return e.console.warn("[Tile.drawCanvas] attempting to get tile scale %s when tile's not cached",this.toString()),1;t=this.context2D}return t.canvas.width/(this.size.x*e.pixelDensityRatio)},getTranslationForEdgeSmoothing:function(t,n,r){var i=Math.max(1,Math.ceil((r.x-n.x)/2)),o=Math.max(1,Math.ceil((r.y-n.y)/2));return new e.Point(i,o).minus(this.position.times(e.pixelDensityRatio).times(t||1).apply((function(e){return e%1})))},unload:function(){this.imgElement&&this.imgElement.parentNode&&this.imgElement.parentNode.removeChild(this.imgElement),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.imgElement=null,this.loaded=!1,this.loading=!1}}}(s),function(e){e.OverlayPlacement=e.Placement,e.OverlayRotationMode=e.freezeObject({NO_ROTATION:1,EXACT:2,BOUNDING_BOX:3}),e.Overlay=function(t,n,r){var i;i=e.isPlainObject(t)?t:{element:t,location:n,placement:r},this.element=i.element,this.style=i.element.style,this._init(i)},e.Overlay.prototype={_init:function(t){this.location=t.location,this.placement=void 0===t.placement?e.Placement.TOP_LEFT:t.placement,this.onDraw=t.onDraw,this.checkResize=void 0===t.checkResize||t.checkResize,this.width=void 0===t.width?null:t.width,this.height=void 0===t.height?null:t.height,this.rotationMode=t.rotationMode||e.OverlayRotationMode.EXACT,this.location instanceof e.Rect&&(this.width=this.location.width,this.height=this.location.height,this.location=this.location.getTopLeft(),this.placement=e.Placement.TOP_LEFT),this.scales=null!==this.width&&null!==this.height,this.bounds=new e.Rect(this.location.x,this.location.y,this.width,this.height),this.position=this.location},adjust:function(t,n){var r=e.Placement.properties[this.placement];r&&(r.isHorizontallyCentered?t.x-=n.x/2:r.isRight&&(t.x-=n.x),r.isVerticallyCentered?t.y-=n.y/2:r.isBottom&&(t.y-=n.y))},destroy:function(){var t=this.element,n=this.style;t.parentNode&&(t.parentNode.removeChild(t),t.prevElementParent&&(n.display="none",document.body.appendChild(t))),this.onDraw=null,n.top="",n.left="",n.position="",null!==this.width&&(n.width=""),null!==this.height&&(n.height="");var r=e.getCssPropertyWithVendorPrefix("transformOrigin"),i=e.getCssPropertyWithVendorPrefix("transform");r&&i&&(n[r]="",n[i]="")},drawHTML:function(t,n){var r=this.element;r.parentNode!==t&&(r.prevElementParent=r.parentNode,r.prevNextSibling=r.nextSibling,t.appendChild(r),this.style.position="absolute",this.size=e.getElementSize(r));var i=this._getOverlayPositionAndSize(n),o=i.position,a=this.size=i.size,s=i.rotate;if(this.onDraw)this.onDraw(o,a,this.element);else{var l=this.style;l.left=o.x+"px",l.top=o.y+"px",null!==this.width&&(l.width=a.x+"px"),null!==this.height&&(l.height=a.y+"px");var c=e.getCssPropertyWithVendorPrefix("transformOrigin"),u=e.getCssPropertyWithVendorPrefix("transform");c&&u&&(s?(l[c]=this._getTransformOrigin(),l[u]="rotate("+s+"deg)"):(l[c]="",l[u]="")),l.display="block"}},_getOverlayPositionAndSize:function(t){var n=t.pixelFromPoint(this.location,!0),r=this._getSizeInPixels(t);this.adjust(n,r);var i=0;if(t.getRotation(!0)&&this.rotationMode!==e.OverlayRotationMode.NO_ROTATION)if(this.rotationMode===e.OverlayRotationMode.BOUNDING_BOX&&null!==this.width&&null!==this.height){var o=new e.Rect(n.x,n.y,r.x,r.y),a=this._getBoundingBox(o,t.getRotation(!0));n=a.getTopLeft(),r=a.getSize()}else i=t.getRotation(!0);return{position:n,size:r,rotate:i}},_getSizeInPixels:function(t){var n=this.size.x,r=this.size.y;if(null!==this.width||null!==this.height){var i=t.deltaPixelsFromPointsNoRotate(new e.Point(this.width||0,this.height||0),!0);null!==this.width&&(n=i.x),null!==this.height&&(r=i.y)}if(this.checkResize&&(null===this.width||null===this.height)){var o=this.size=e.getElementSize(this.element);null===this.width&&(n=o.x),null===this.height&&(r=o.y)}return new e.Point(n,r)},_getBoundingBox:function(e,t){var n=this._getPlacementPoint(e);return e.rotate(t,n).getBoundingBox()},_getPlacementPoint:function(t){var n=new e.Point(t.x,t.y),r=e.Placement.properties[this.placement];return r&&(r.isHorizontallyCentered?n.x+=t.width/2:r.isRight&&(n.x+=t.width),r.isVerticallyCentered?n.y+=t.height/2:r.isBottom&&(n.y+=t.height)),n},_getTransformOrigin:function(){var t="",n=e.Placement.properties[this.placement];return n?(n.isLeft?t="left":n.isRight&&(t="right"),n.isTop?t+=" top":n.isBottom&&(t+=" bottom"),t):t},update:function(t,n){var r=e.isPlainObject(t)?t:{location:t,placement:n};this._init({location:r.location||this.location,placement:void 0!==r.placement?r.placement:this.placement,onDraw:r.onDraw||this.onDraw,checkResize:r.checkResize||this.checkResize,width:void 0!==r.width?r.width:this.width,height:void 0!==r.height?r.height:this.height,rotationMode:r.rotationMode||this.rotationMode})},getBounds:function(t){e.console.assert(t,"A viewport must now be passed to Overlay.getBounds.");var n=this.width,r=this.height;if(null===n||null===r){var i=t.deltaPointsFromPixelsNoRotate(this.size,!0);null===n&&(n=i.x),null===r&&(r=i.y)}var o=this.location.clone();return this.adjust(o,new e.Point(n,r)),this._adjustBoundsForRotation(t,new e.Rect(o.x,o.y,n,r))},_adjustBoundsForRotation:function(t,n){if(!t||0===t.getRotation(!0)||this.rotationMode===e.OverlayRotationMode.EXACT)return n;if(this.rotationMode===e.OverlayRotationMode.BOUNDING_BOX){if(null===this.width||null===this.height)return n;var r=this._getOverlayPositionAndSize(t);return t.viewerElementToViewportRectangle(new e.Rect(r.position.x,r.position.y,r.size.x,r.size.y))}return n.rotate(-t.getRotation(!0),this._getPlacementPoint(n))}}}(s),function(e){e.Drawer=function(t){e.console.assert(t.viewer,"[Drawer] options.viewer is required");var n=arguments;if(e.isPlainObject(t)||(t={source:n[0],viewport:n[1],element:n[2]}),e.console.assert(t.viewport,"[Drawer] options.viewport is required"),e.console.assert(t.element,"[Drawer] options.element is required"),t.source&&e.console.error("[Drawer] options.source is no longer accepted; use TiledImage instead"),this.viewer=t.viewer,this.viewport=t.viewport,this.debugGridColor="string"==typeof t.debugGridColor?[t.debugGridColor]:t.debugGridColor||e.DEFAULT_SETTINGS.debugGridColor,t.opacity&&e.console.error("[Drawer] options.opacity is no longer accepted; set the opacity on the TiledImage instead"),this.useCanvas=e.supportsCanvas&&(!this.viewer||this.viewer.useCanvas),this.container=e.getElement(t.element),this.canvas=e.makeNeutralElement(this.useCanvas?"canvas":"div"),this.context=this.useCanvas?this.canvas.getContext("2d"):null,this.sketchCanvas=null,this.sketchContext=null,this.element=this.container,this.container.dir="ltr",this.useCanvas){var r=this._calculateCanvasSize();this.canvas.width=r.x,this.canvas.height=r.y}this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.position="absolute",e.setElementOpacity(this.canvas,this.opacity,!0),e.setElementPointerEventsNone(this.canvas),e.setElementTouchActionNone(this.canvas),this.container.style.textAlign="left",this.container.appendChild(this.canvas),this._imageSmoothingEnabled=!0},e.Drawer.prototype={addOverlay:function(t,n,r,i){return e.console.error("drawer.addOverlay is deprecated. Use viewer.addOverlay instead."),this.viewer.addOverlay(t,n,r,i),this},updateOverlay:function(t,n,r){return e.console.error("drawer.updateOverlay is deprecated. Use viewer.updateOverlay instead."),this.viewer.updateOverlay(t,n,r),this},removeOverlay:function(t){return e.console.error("drawer.removeOverlay is deprecated. Use viewer.removeOverlay instead."),this.viewer.removeOverlay(t),this},clearOverlays:function(){return e.console.error("drawer.clearOverlays is deprecated. Use viewer.clearOverlays instead."),this.viewer.clearOverlays(),this},viewportCoordToDrawerCoord:function(t){var n=this.viewport.pixelFromPointNoRotate(t,!0);return new e.Point(n.x*e.pixelDensityRatio,n.y*e.pixelDensityRatio)},clipWithPolygons:function(e,t){if(this.useCanvas){var n=this._getContext(t);n.beginPath(),e.forEach((function(e){e.forEach((function(e,t){n[0===t?"moveTo":"lineTo"](e.x,e.y)}))})),n.clip()}},setOpacity:function(t){e.console.error("drawer.setOpacity is deprecated. Use tiledImage.setOpacity instead.");for(var n=this.viewer.world,r=0;r<n.getItemCount();r++)n.getItemAt(r).setOpacity(t);return this},getOpacity:function(){e.console.error("drawer.getOpacity is deprecated. Use tiledImage.getOpacity instead.");for(var t=this.viewer.world,n=0,r=0;r<t.getItemCount();r++){var i=t.getItemAt(r).getOpacity();i>n&&(n=i)}return n},needsUpdate:function(){return e.console.error("[Drawer.needsUpdate] this function is deprecated. Use World.needsDraw instead."),this.viewer.world.needsDraw()},numTilesLoaded:function(){return e.console.error("[Drawer.numTilesLoaded] this function is deprecated. Use TileCache.numTilesLoaded instead."),this.viewer.tileCache.numTilesLoaded()},reset:function(){return e.console.error("[Drawer.reset] this function is deprecated. Use World.resetItems instead."),this.viewer.world.resetItems(),this},update:function(){return e.console.error("[Drawer.update] this function is deprecated. Use Drawer.clear and World.draw instead."),this.clear(),this.viewer.world.draw(),this},canRotate:function(){return this.useCanvas},destroy:function(){this.canvas.width=1,this.canvas.height=1,this.sketchCanvas=null,this.sketchContext=null},clear:function(){if(this.canvas.innerHTML="",this.useCanvas){var e=this._calculateCanvasSize();if((this.canvas.width!==e.x||this.canvas.height!==e.y)&&(this.canvas.width=e.x,this.canvas.height=e.y,this._updateImageSmoothingEnabled(this.context),null!==this.sketchCanvas)){var t=this._calculateSketchCanvasSize();this.sketchCanvas.width=t.x,this.sketchCanvas.height=t.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}},_clear:function(e,t){if(this.useCanvas){var n=this._getContext(e);if(t)n.clearRect(t.x,t.y,t.width,t.height);else{var r=n.canvas;n.clearRect(0,0,r.width,r.height)}}},viewportToDrawerRectangle:function(t){var n=this.viewport.pixelFromPointNoRotate(t.getTopLeft(),!0),r=this.viewport.deltaPixelsFromPointsNoRotate(t.getSize(),!0);return new e.Rect(n.x*e.pixelDensityRatio,n.y*e.pixelDensityRatio,r.x*e.pixelDensityRatio,r.y*e.pixelDensityRatio)},drawTile:function(t,n,r,i,o,a,s){if(e.console.assert(t,"[Drawer.drawTile] tile is required"),e.console.assert(n,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var l=this._getContext(r);i=i||1,t.drawCanvas(l,n,i,o,a,s)}else t.drawHTML(this.canvas)},_getContext:function(e){var t=this.context;if(e){if(null===this.sketchCanvas){this.sketchCanvas=document.createElement("canvas");var n=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=n.x,this.sketchCanvas.height=n.y,this.sketchContext=this.sketchCanvas.getContext("2d"),0===this.viewport.getRotation()){var r=this;this.viewer.addHandler("rotate",(function e(){if(0!==r.viewport.getRotation()){r.viewer.removeHandler("rotate",e);var t=r._calculateSketchCanvasSize();r.sketchCanvas.width=t.x,r.sketchCanvas.height=t.y}}))}this._updateImageSmoothingEnabled(this.sketchContext)}t=this.sketchContext}return t},saveContext:function(e){this.useCanvas&&this._getContext(e).save()},restoreContext:function(e){this.useCanvas&&this._getContext(e).restore()},setClip:function(e,t){if(this.useCanvas){var n=this._getContext(t);n.beginPath(),n.rect(e.x,e.y,e.width,e.height),n.clip()}},drawRectangle:function(e,t,n){if(this.useCanvas){var r=this._getContext(n);r.save(),r.fillStyle=t,r.fillRect(e.x,e.y,e.width,e.height),r.restore()}},blendSketch:function(t,n,r,i){var o=t;if(e.isPlainObject(o)||(o={opacity:t,scale:n,translate:r,compositeOperation:i}),this.useCanvas&&this.sketchCanvas){t=o.opacity,i=o.compositeOperation;var a=o.bounds;if(this.context.save(),this.context.globalAlpha=t,i&&(this.context.globalCompositeOperation=i),a)a.x<0&&(a.width+=a.x,a.x=0),a.x+a.width>this.canvas.width&&(a.width=this.canvas.width-a.x),a.y<0&&(a.height+=a.y,a.y=0),a.y+a.height>this.canvas.height&&(a.height=this.canvas.height-a.y),this.context.drawImage(this.sketchCanvas,a.x,a.y,a.width,a.height,a.x,a.y,a.width,a.height);else{n=o.scale||1;var s=(r=o.translate)instanceof e.Point?r:new e.Point(0,0),l=0,c=0;if(r){var u=this.sketchCanvas.width-this.canvas.width,d=this.sketchCanvas.height-this.canvas.height;l=Math.round(u/2),c=Math.round(d/2)}this.context.drawImage(this.sketchCanvas,s.x-l*n,s.y-c*n,(this.canvas.width+2*l)*n,(this.canvas.height+2*c)*n,-l,-c,this.canvas.width+2*l,this.canvas.height+2*c)}this.context.restore()}},drawDebugInfo:function(t,n,r,i){if(this.useCanvas){var o=this.viewer.world.getIndexOfItem(i)%this.debugGridColor.length,a=this.context;a.save(),a.lineWidth=2*e.pixelDensityRatio,a.font="small-caps bold "+13*e.pixelDensityRatio+"px arial",a.strokeStyle=this.debugGridColor[o],a.fillStyle=this.debugGridColor[o],this.viewport.getRotation(!0)%360!=0&&this._offsetForRotation({degrees:this.viewport.getRotation(!0)}),i.getRotation(!0)%360!=0&&this._offsetForRotation({degrees:i.getRotation(!0),point:i.viewport.pixelFromPointNoRotate(i._getRotationPoint(!0),!0)}),i.viewport.getRotation(!0)%360==0&&i.getRotation(!0)%360==0&&i._drawer.viewer.viewport.getFlip()&&i._drawer._flip(),a.strokeRect(t.position.x*e.pixelDensityRatio,t.position.y*e.pixelDensityRatio,t.size.x*e.pixelDensityRatio,t.size.y*e.pixelDensityRatio);var s=(t.position.x+t.size.x/2)*e.pixelDensityRatio,l=(t.position.y+t.size.y/2)*e.pixelDensityRatio;a.translate(s,l),a.rotate(Math.PI/180*-this.viewport.getRotation(!0)),a.translate(-s,-l),0===t.x&&0===t.y&&(a.fillText("Zoom: "+this.viewport.getZoom(),t.position.x*e.pixelDensityRatio,(t.position.y-30)*e.pixelDensityRatio),a.fillText("Pan: "+this.viewport.getBounds().toString(),t.position.x*e.pixelDensityRatio,(t.position.y-20)*e.pixelDensityRatio)),a.fillText("Level: "+t.level,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+20)*e.pixelDensityRatio),a.fillText("Column: "+t.x,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+30)*e.pixelDensityRatio),a.fillText("Row: "+t.y,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+40)*e.pixelDensityRatio),a.fillText("Order: "+r+" of "+n,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+50)*e.pixelDensityRatio),a.fillText("Size: "+t.size.toString(),(t.position.x+10)*e.pixelDensityRatio,(t.position.y+60)*e.pixelDensityRatio),a.fillText("Position: "+t.position.toString(),(t.position.x+10)*e.pixelDensityRatio,(t.position.y+70)*e.pixelDensityRatio),this.viewport.getRotation(!0)%360!=0&&this._restoreRotationChanges(),i.getRotation(!0)%360!=0&&this._restoreRotationChanges(),i.viewport.getRotation(!0)%360==0&&i.getRotation(!0)%360==0&&i._drawer.viewer.viewport.getFlip()&&i._drawer._flip(),a.restore()}},debugRect:function(t){if(this.useCanvas){var n=this.context;n.save(),n.lineWidth=2*e.pixelDensityRatio,n.strokeStyle=this.debugGridColor[0],n.fillStyle=this.debugGridColor[0],n.strokeRect(t.x*e.pixelDensityRatio,t.y*e.pixelDensityRatio,t.width*e.pixelDensityRatio,t.height*e.pixelDensityRatio),n.restore()}},setImageSmoothingEnabled:function(e){this.useCanvas&&(this._imageSmoothingEnabled=e,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw())},_updateImageSmoothingEnabled:function(e){e.msImageSmoothingEnabled=this._imageSmoothingEnabled,e.imageSmoothingEnabled=this._imageSmoothingEnabled},getCanvasSize:function(t){var n=this._getContext(t).canvas;return new e.Point(n.width,n.height)},getCanvasCenter:function(){return new e.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(t){var n=t.point?t.point.times(e.pixelDensityRatio):this.getCanvasCenter(),r=this._getContext(t.useSketch);r.save(),r.translate(n.x,n.y),this.viewer.viewport.flipped?(r.rotate(Math.PI/180*-t.degrees),r.scale(-1,1)):r.rotate(Math.PI/180*t.degrees),r.translate(-n.x,-n.y)},_flip:function(t){var n=(t=t||{}).point?t.point.times(e.pixelDensityRatio):this.getCanvasCenter(),r=this._getContext(t.useSketch);r.translate(n.x,0),r.scale(-1,1),r.translate(-n.x,0)},_restoreRotationChanges:function(e){this._getContext(e).restore()},_calculateCanvasSize:function(){var t=e.pixelDensityRatio,n=this.viewport.getContainerSize();return{x:Math.round(n.x*t),y:Math.round(n.y*t)}},_calculateSketchCanvasSize:function(){var e=this._calculateCanvasSize();if(0===this.viewport.getRotation())return e;var t=Math.ceil(Math.sqrt(e.x*e.x+e.y*e.y));return{x:t,y:t}}}}(s),function(e){e.Viewport=function(t){var n=arguments;n.length&&n[0]instanceof e.Point&&(t={containerSize:n[0],contentSize:n[1],config:n[2]}),t.config&&(e.extend(!0,t,t.config),delete t.config),this._margins=e.extend({left:0,top:0,right:0,bottom:0},t.margins||{}),delete t.margins,t.initialDegrees=t.degrees,delete t.degrees,e.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,rotationPivot:null,viewer:null,springStiffness:e.DEFAULT_SETTINGS.springStiffness,animationTime:e.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:e.DEFAULT_SETTINGS.minZoomImageRatio,maxZoomPixelRatio:e.DEFAULT_SETTINGS.maxZoomPixelRatio,visibilityRatio:e.DEFAULT_SETTINGS.visibilityRatio,wrapHorizontal:e.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:e.DEFAULT_SETTINGS.wrapVertical,defaultZoomLevel:e.DEFAULT_SETTINGS.defaultZoomLevel,minZoomLevel:e.DEFAULT_SETTINGS.minZoomLevel,maxZoomLevel:e.DEFAULT_SETTINGS.maxZoomLevel,initialDegrees:e.DEFAULT_SETTINGS.degrees,flipped:e.DEFAULT_SETTINGS.flipped,homeFillsViewer:e.DEFAULT_SETTINGS.homeFillsViewer,silenceMultiImageWarnings:e.DEFAULT_SETTINGS.silenceMultiImageWarnings},t),this._updateContainerInnerSize(),this.centerSpringX=new e.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.centerSpringY=new e.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.zoomSpring=new e.Spring({exponential:!0,initial:1,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.degreesSpring=new e.Spring({initial:t.initialDegrees,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._oldDegrees=this.degreesSpring.current.value,this._setContentBounds(new e.Rect(0,0,1,1),1),this.goHome(!0),this.update()},e.Viewport.prototype={get degrees(){return e.console.warn("Accessing [Viewport.degrees] is deprecated. Use viewport.getRotation instead."),this.getRotation()},set degrees(t){e.console.warn("Setting [Viewport.degrees] is deprecated. Use viewport.rotateTo, viewport.rotateBy, or viewport.setRotation instead."),this.rotateTo(t)},resetContentSize:function(t){return e.console.assert(t,"[Viewport.resetContentSize] contentSize is required"),e.console.assert(t instanceof e.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),e.console.assert(t.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),e.console.assert(t.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new e.Rect(0,0,1,t.y/t.x),t.x),this},setHomeBounds:function(t,n){e.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(t,n)},_setContentBounds:function(t,n){e.console.assert(t,"[Viewport._setContentBounds] bounds is required"),e.console.assert(t instanceof e.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),e.console.assert(t.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),e.console.assert(t.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=t.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(n),this._contentBounds=t.rotate(this.getRotation()).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(n),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:n,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var e=this._contentAspectRatio/this.getAspectRatio();return(this.homeFillsViewer?e>=1?e:1:e>=1?1:e)/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var t=this._contentBounds.getCenter(),n=1/this.getHomeZoom(),r=n/this.getAspectRatio();return new e.Rect(t.x-n/2,t.y-r/2,n,r)},goHome:function(e){return this.viewer&&this.viewer.raiseEvent("home",{immediately:e}),this.fitBounds(this.getHomeBounds(),e)},getMinZoom:function(){var e=this.getHomeZoom();return this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*e},getMaxZoom:function(){var e=this.maxZoomLevel;return e||(e=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,e/=this._contentBounds.width),Math.max(e,this.getHomeZoom())},getAspectRatio:function(){return this._containerInnerSize.x/this._containerInnerSize.y},getContainerSize:function(){return new e.Point(this.containerSize.x,this.containerSize.y)},getMargins:function(){return e.extend({},this._margins)},setMargins:function(t){e.console.assert("object"===e.type(t),"[Viewport.setMargins] margins must be an object"),this._margins=e.extend({left:0,top:0,right:0,bottom:0},t),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(e){return this.getBoundsNoRotate(e).rotate(-this.getRotation(e))},getBoundsNoRotate:function(t){var n=this.getCenter(t),r=1/this.getZoom(t),i=r/this.getAspectRatio();return new e.Rect(n.x-r/2,n.y-i/2,r,i)},getBoundsWithMargins:function(e){return this.getBoundsNoRotateWithMargins(e).rotate(-this.getRotation(e),this.getCenter(e))},getBoundsNoRotateWithMargins:function(e){var t=this.getBoundsNoRotate(e),n=this._containerInnerSize.x*this.getZoom(e);return t.x-=this._margins.left/n,t.y-=this._margins.top/n,t.width+=(this._margins.left+this._margins.right)/n,t.height+=(this._margins.top+this._margins.bottom)/n,t},getCenter:function(t){var n,r,i,o,a,s,l=new e.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),c=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return t?l:this.zoomPoint?(n=this.pixelFromPoint(this.zoomPoint,!0),o=(i=1/(r=this.getZoom()))/this.getAspectRatio(),a=new e.Rect(l.x-i/2,l.y-o/2,i,o),s=this._pixelFromPoint(this.zoomPoint,a).minus(n).rotate(-this.getRotation(!0)).divide(this._containerInnerSize.x*r),c.plus(s)):c},getZoom:function(e){return e?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(e){return Math.max(Math.min(e,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(e){var t=this.viewportToViewerElementRectangle(e).getBoundingBox(),n=this.viewportToViewerElementRectangle(this._contentBoundsNoRotate).getBoundingBox(),r=!1,i=!1;if(this.wrapHorizontal);else{var o,a,s,l=t.x+t.width,c=n.x+n.width;o=t.width>n.width?this.visibilityRatio*n.width:this.visibilityRatio*t.width,a=n.x-l+o,s=c-t.x-o,o>n.width?(t.x+=(a+s)/2,r=!0):s<0?(t.x+=s,r=!0):a>0&&(t.x+=a,r=!0)}if(this.wrapVertical);else{var u,d,p,h=t.y+t.height,f=n.y+n.height;u=t.height>n.height?this.visibilityRatio*n.height:this.visibilityRatio*t.height,d=n.y-h+u,p=f-t.y-u,u>n.height?(t.y+=(d+p)/2,i=!0):p<0?(t.y+=p,i=!0):d>0&&(t.y+=d,i=!0)}var m=r||i,g=m?this.viewerElementToViewportRectangle(t):e.clone();return g.xConstrained=r,g.yConstrained=i,g.constraintApplied=m,g},_raiseConstraintsEvent:function(e){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:e})},applyConstraints:function(e){var t=this.getZoom(),n=this._applyZoomConstraints(t);t!==n&&this.zoomTo(n,this.zoomPoint,e);var r=this.getConstrainedBounds(!1);return r.constraintApplied&&(this.fitBounds(r,e),this._raiseConstraintsEvent(e)),this},ensureVisible:function(e){return this.applyConstraints(e)},_fitBounds:function(t,n){var r=(n=n||{}).immediately||!1,i=n.constraints||!1,o=this.getAspectRatio(),a=t.getCenter(),s=new e.Rect(t.x,t.y,t.width,t.height,t.degrees+this.getRotation()).getBoundingBox();s.getAspectRatio()>=o?s.height=s.width/o:s.width=s.height*o,s.x=a.x-s.width/2,s.y=a.y-s.height/2;var l=1/s.width;if(r)return this.panTo(a,!0),this.zoomTo(l,null,!0),i&&this.applyConstraints(!0),this;var c=this.getCenter(!0),u=this.getZoom(!0);this.panTo(c,!0),this.zoomTo(u,null,!0);var d=this.getBounds(),p=this.getZoom();if(0===p||Math.abs(l/p-1)<1e-8)return this.zoomTo(l,null,!0),this.panTo(a,r),i&&this.applyConstraints(!1),this;if(i){this.panTo(a,!1),l=this._applyZoomConstraints(l),this.zoomTo(l,null,!1);var h=this.getConstrainedBounds();this.panTo(c,!0),this.zoomTo(u,null,!0),this.fitBounds(h)}else{var f=s.rotate(-this.getRotation()).getTopLeft().times(l).minus(d.getTopLeft().times(p)).divide(l-p);this.zoomTo(l,f,r)}return this},fitBounds:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!1})},fitBoundsWithConstraints:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!0})},fitVertically:function(t){var n=new e.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(n,t)},fitHorizontally:function(t){var n=new e.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(n,t)},getConstrainedBounds:function(e){var t;return t=this.getBounds(e),this._applyBoundaryConstraints(t)},panBy:function(t,n){var r=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(r.plus(t),n)},panTo:function(e,t){return t?(this.centerSpringX.resetTo(e.x),this.centerSpringY.resetTo(e.y)):(this.centerSpringX.springTo(e.x),this.centerSpringY.springTo(e.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:e,immediately:t}),this},zoomBy:function(e,t,n){return this.zoomTo(this.zoomSpring.target.value*e,t,n)},zoomTo:function(t,n,r){var i=this;return this.zoomPoint=n instanceof e.Point&&!isNaN(n.x)&&!isNaN(n.y)?n:null,r?this._adjustCenterSpringsForZoomPoint((function(){i.zoomSpring.resetTo(t)})):this.zoomSpring.springTo(t),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:t,refPoint:n,immediately:r}),this},setRotation:function(e,t){return this.rotateTo(e,null,t)},getRotation:function(e){return e?this.degreesSpring.current.value:this.degreesSpring.target.value},setRotationWithPivot:function(e,t,n){return this.rotateTo(e,t,n)},rotateTo:function(t,n,r){if(!this.viewer||!this.viewer.drawer.canRotate())return this;if(this.degreesSpring.target.value===t&&this.degreesSpring.isAtTargetValue())return this;if(this.rotationPivot=n instanceof e.Point&&!isNaN(n.x)&&!isNaN(n.y)?n:null,r)if(this.rotationPivot){if(!(t-this._oldDegrees))return this.rotationPivot=null,this;this._rotateAboutPivot(t)}else this.degreesSpring.resetTo(t);else{var i=e.positiveModulo(this.degreesSpring.current.value,360),o=e.positiveModulo(t,360),a=o-i;a>180?o-=360:a<-180&&(o+=360);var s=i-o;this.degreesSpring.resetTo(t+s),this.degreesSpring.springTo(t)}return this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:t,immediately:!!r,pivot:this.rotationPivot||this.getCenter()}),this},rotateBy:function(e,t,n){return this.rotateTo(this.degreesSpring.target.value+e,t,n)},resize:function(e,t){var n,r=this.getBoundsNoRotate(),i=r;this.containerSize.x=e.x,this.containerSize.y=e.y,this._updateContainerInnerSize(),t&&(n=e.x/this.containerSize.x,i.width=r.width*n,i.height=i.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:e,maintain:t});var o=this.fitBounds(i,!0);return this.viewer&&this.viewer.raiseEvent("after-resize",{newContainerSize:e,maintain:t}),o},_updateContainerInnerSize:function(){this._containerInnerSize=new e.Point(Math.max(1,this.containerSize.x-(this._margins.left+this._margins.right)),Math.max(1,this.containerSize.y-(this._margins.top+this._margins.bottom)))},update:function(){var e=this;this._adjustCenterSpringsForZoomPoint((function(){e.zoomSpring.update()})),this.degreesSpring.isAtTargetValue()&&(this.rotationPivot=null),this.centerSpringX.update(),this.centerSpringY.update(),this.rotationPivot?this._rotateAboutPivot(!0):this.degreesSpring.update();var t=this.centerSpringX.current.value!==this._oldCenterX||this.centerSpringY.current.value!==this._oldCenterY||this.zoomSpring.current.value!==this._oldZoom||this.degreesSpring.current.value!==this._oldDegrees;return this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._oldDegrees=this.degreesSpring.current.value,t},_rotateAboutPivot:function(e){var t=!0===e,n=this.rotationPivot.minus(this.getCenter());this.centerSpringX.shiftBy(n.x),this.centerSpringY.shiftBy(n.y),t?this.degreesSpring.update():this.degreesSpring.resetTo(e);var r=this.degreesSpring.current.value-this._oldDegrees,i=n.rotate(-1*r).times(-1);this.centerSpringX.shiftBy(i.x),this.centerSpringY.shiftBy(i.y)},_adjustCenterSpringsForZoomPoint:function(e){if(this.zoomPoint){var t=this.pixelFromPoint(this.zoomPoint,!0);e();var n=this.pixelFromPoint(this.zoomPoint,!0).minus(t),r=this.deltaPointsFromPixels(n,!0);this.centerSpringX.shiftBy(r.x),this.centerSpringY.shiftBy(r.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else e()},deltaPixelsFromPointsNoRotate:function(e,t){return e.times(this._containerInnerSize.x*this.getZoom(t))},deltaPixelsFromPoints:function(e,t){return this.deltaPixelsFromPointsNoRotate(e.rotate(this.getRotation(t)),t)},deltaPointsFromPixelsNoRotate:function(e,t){return e.divide(this._containerInnerSize.x*this.getZoom(t))},deltaPointsFromPixels:function(e,t){return this.deltaPointsFromPixelsNoRotate(e,t).rotate(-this.getRotation(t))},pixelFromPointNoRotate:function(e,t){return this._pixelFromPointNoRotate(e,this.getBoundsNoRotate(t))},pixelFromPoint:function(e,t){return this._pixelFromPoint(e,this.getBoundsNoRotate(t))},_pixelFromPointNoRotate:function(t,n){return t.minus(n.getTopLeft()).times(this._containerInnerSize.x/n.width).plus(new e.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(e,t){return this._pixelFromPointNoRotate(e.rotate(this.getRotation(!0),this.getCenter(!0)),t)},pointFromPixelNoRotate:function(t,n){var r=this.getBoundsNoRotate(n);return t.minus(new e.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/r.width).plus(r.getTopLeft())},pointFromPixel:function(e,t){return this.pointFromPixelNoRotate(e,t).rotate(-this.getRotation(t),this.getCenter(t))},_viewportToImageDelta:function(t,n){var r=this._contentBoundsNoRotate.width;return new e.Point(t*this._contentSizeNoRotate.x/r,n*this._contentSizeNoRotate.x/r)},viewportToImageCoordinates:function(t,n){if(t instanceof e.Point)return this.viewportToImageCoordinates(t.x,t.y);if(this.viewer){var r=this.viewer.world.getItemCount();if(r>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(1===r){return this.viewer.world.getItemAt(0).viewportToImageCoordinates(t,n,!0)}}return this._viewportToImageDelta(t-this._contentBoundsNoRotate.x,n-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(t,n){var r=this._contentBoundsNoRotate.width;return new e.Point(t/this._contentSizeNoRotate.x*r,n/this._contentSizeNoRotate.x*r)},imageToViewportCoordinates:function(t,n){if(t instanceof e.Point)return this.imageToViewportCoordinates(t.x,t.y);if(this.viewer){var r=this.viewer.world.getItemCount();if(r>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(1===r){return this.viewer.world.getItemAt(0).imageToViewportCoordinates(t,n,!0)}}var i=this._imageToViewportDelta(t,n);return i.x+=this._contentBoundsNoRotate.x,i.y+=this._contentBoundsNoRotate.y,i},imageToViewportRectangle:function(t,n,r,i){var o=t;if(o instanceof e.Rect||(o=new e.Rect(t,n,r,i)),this.viewer){var a=this.viewer.world.getItemCount();if(a>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(1===a){return this.viewer.world.getItemAt(0).imageToViewportRectangle(t,n,r,i,!0)}}var s=this.imageToViewportCoordinates(o.x,o.y),l=this._imageToViewportDelta(o.width,o.height);return new e.Rect(s.x,s.y,l.x,l.y,o.degrees)},viewportToImageRectangle:function(t,n,r,i){var o=t;if(o instanceof e.Rect||(o=new e.Rect(t,n,r,i)),this.viewer){var a=this.viewer.world.getItemCount();if(a>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(1===a){return this.viewer.world.getItemAt(0).viewportToImageRectangle(t,n,r,i,!0)}}var s=this.viewportToImageCoordinates(o.x,o.y),l=this._viewportToImageDelta(o.width,o.height);return new e.Rect(s.x,s.y,l.x,l.y,o.degrees)},viewerElementToImageCoordinates:function(e){var t=this.pointFromPixel(e,!0);return this.viewportToImageCoordinates(t)},imageToViewerElementCoordinates:function(e){var t=this.imageToViewportCoordinates(e);return this.pixelFromPoint(t,!0)},windowToImageCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var n=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(n)},imageToWindowCoordinates:function(t){return e.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer."),this.imageToViewerElementCoordinates(t).plus(e.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(e){return this.pointFromPixel(e,!0)},viewportToViewerElementCoordinates:function(e){return this.pixelFromPoint(e,!0)},viewerElementToViewportRectangle:function(t){return e.Rect.fromSummits(this.pointFromPixel(t.getTopLeft(),!0),this.pointFromPixel(t.getTopRight(),!0),this.pointFromPixel(t.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(t){return e.Rect.fromSummits(this.pixelFromPoint(t.getTopLeft(),!0),this.pixelFromPoint(t.getTopRight(),!0),this.pixelFromPoint(t.getBottomLeft(),!0))},windowToViewportCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var n=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(n)},viewportToWindowCoordinates:function(t){return e.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer."),this.viewportToViewerElementCoordinates(t).plus(e.getElementPosition(this.viewer.element))},viewportToImageZoom:function(t){if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(1===n){return this.viewer.world.getItemAt(0).viewportToImageZoom(t)}}var r=this._contentSizeNoRotate.x;return t*(this._containerInnerSize.x/r*this._contentBoundsNoRotate.width)},imageToViewportZoom:function(t){if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)this.silenceMultiImageWarnings||e.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(1===n){return this.viewer.world.getItemAt(0).imageToViewportZoom(t)}}return t*(this._contentSizeNoRotate.x/this._containerInnerSize.x/this._contentBoundsNoRotate.width)},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(e){return this.flipped===e||(this.flipped=e,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:e})),this}}}(s),function(e){e.TiledImage=function(t){var n=this;e.console.assert(t.tileCache,"[TiledImage] options.tileCache is required"),e.console.assert(t.drawer,"[TiledImage] options.drawer is required"),e.console.assert(t.viewer,"[TiledImage] options.viewer is required"),e.console.assert(t.imageLoader,"[TiledImage] options.imageLoader is required"),e.console.assert(t.source,"[TiledImage] options.source is required"),e.console.assert(!t.clip||t.clip instanceof e.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),e.EventSource.call(this),this._tileCache=t.tileCache,delete t.tileCache,this._drawer=t.drawer,delete t.drawer,this._imageLoader=t.imageLoader,delete t.imageLoader,t.clip instanceof e.Rect&&(this._clip=t.clip.clone()),delete t.clip;var r=t.x||0;delete t.x;var i=t.y||0;delete t.y,this.normHeight=t.source.dimensions.y/t.source.dimensions.x,this.contentAspectX=t.source.dimensions.x/t.source.dimensions.y;var o=1;t.width?(o=t.width,delete t.width,t.height&&(e.console.error("specifying both width and height to a tiledImage is not supported"),delete t.height)):t.height&&(o=t.height/this.normHeight,delete t.height);var a=t.fitBounds;delete t.fitBounds;var l=t.fitBoundsPlacement||s.Placement.CENTER;delete t.fitBoundsPlacement;var c=t.degrees||0;delete t.degrees;var u=t.ajaxHeaders;delete t.ajaxHeaders,e.extend(!0,this,{viewer:null,tilesMatrix:{},coverage:{},loadingCoverage:{},lastDrawn:[],lastResetTime:0,_midDraw:!1,_needsDraw:!0,_hasOpaqueTile:!1,_tilesLoading:0,springStiffness:e.DEFAULT_SETTINGS.springStiffness,animationTime:e.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:e.DEFAULT_SETTINGS.minZoomImageRatio,wrapHorizontal:e.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:e.DEFAULT_SETTINGS.wrapVertical,immediateRender:e.DEFAULT_SETTINGS.immediateRender,blendTime:e.DEFAULT_SETTINGS.blendTime,alwaysBlend:e.DEFAULT_SETTINGS.alwaysBlend,minPixelRatio:e.DEFAULT_SETTINGS.minPixelRatio,smoothTileEdgesMinZoom:e.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,iOSDevice:e.DEFAULT_SETTINGS.iOSDevice,debugMode:e.DEFAULT_SETTINGS.debugMode,crossOriginPolicy:e.DEFAULT_SETTINGS.crossOriginPolicy,ajaxWithCredentials:e.DEFAULT_SETTINGS.ajaxWithCredentials,placeholderFillStyle:e.DEFAULT_SETTINGS.placeholderFillStyle,opacity:e.DEFAULT_SETTINGS.opacity,preload:e.DEFAULT_SETTINGS.preload,compositeOperation:e.DEFAULT_SETTINGS.compositeOperation,subPixelRoundingForTransparency:e.DEFAULT_SETTINGS.subPixelRoundingForTransparency},t),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new e.Spring({initial:r,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new e.Spring({initial:i,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new e.Spring({initial:o,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new e.Spring({initial:c,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),a&&this.fitBounds(a,l,!0),this._drawingHandler=function(t){n.viewer.raiseEvent("tile-drawing",e.extend({tiledImage:n},t))},this._ownAjaxHeaders={},this.setAjaxHeaders(u,!1)},e.extend(e.TiledImage.prototype,e.EventSource.prototype,{needsDraw:function(){return this._needsDraw},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(e){e!==this._fullyLoaded&&(this._fullyLoaded=e,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=e.now(),this._needsDraw=!0},update:function(){var e=this._xSpring.update(),t=this._ySpring.update(),n=this._scaleSpring.update(),r=this._degreesSpring.update();return!!(e||t||n||r)&&(this._updateForScale(),this._needsDraw=!0,!0)},draw:function(){0!==this.opacity||this._preload?(this._midDraw=!0,this._updateViewport(),this._midDraw=!1):this._needsDraw=!1},destroy:function(){this.reset(),this.source.destroy&&this.source.destroy()},getBounds:function(e){return this.getBoundsNoRotate(e).rotate(this.getRotation(e),this._getRotationPoint(e))},getBoundsNoRotate:function(t){return t?new e.Rect(this._xSpring.current.value,this._ySpring.current.value,this._worldWidthCurrent,this._worldHeightCurrent):new e.Rect(this._xSpring.target.value,this._ySpring.target.value,this._worldWidthTarget,this._worldHeightTarget)},getWorldBounds:function(){return e.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"),this.getBounds()},getClippedBounds:function(t){var n=this.getBoundsNoRotate(t);if(this._clip){var r=(t?this._worldWidthCurrent:this._worldWidthTarget)/this.source.dimensions.x,i=this._clip.times(r);n=new e.Rect(n.x+i.x,n.y+i.y,i.width,i.height)}return n.rotate(this.getRotation(t),this._getRotationPoint(t))},getTileBounds:function(e,t,n){var r=this.source.getNumTiles(e),i=(r.x+t%r.x)%r.x,o=(r.y+n%r.y)%r.y,a=this.source.getTileBounds(e,i,o);return this.getFlip()&&(a.x=1-a.x-a.width),a.x+=(t-i)/r.x,a.y+=this._worldHeightCurrent/this._worldWidthCurrent*((n-o)/r.y),a},getContentSize:function(){return new e.Point(this.source.dimensions.x,this.source.dimensions.y)},getSizeInWindowCoordinates:function(){var t=this.imageToWindowCoordinates(new e.Point(0,0)),n=this.imageToWindowCoordinates(this.getContentSize());return new e.Point(n.x-t.x,n.y-t.y)},_viewportToImageDelta:function(t,n,r){var i=r?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(t*(this.source.dimensions.x/i),n*(this.source.dimensions.y*this.contentAspectX/i))},viewportToImageCoordinates:function(t,n,r){var i;return t instanceof e.Point?(r=n,i=t):i=new e.Point(t,n),i=i.rotate(-this.getRotation(r),this._getRotationPoint(r)),r?this._viewportToImageDelta(i.x-this._xSpring.current.value,i.y-this._ySpring.current.value):this._viewportToImageDelta(i.x-this._xSpring.target.value,i.y-this._ySpring.target.value)},_imageToViewportDelta:function(t,n,r){var i=r?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(t/this.source.dimensions.x*i,n/this.source.dimensions.y/this.contentAspectX*i)},imageToViewportCoordinates:function(t,n,r){t instanceof e.Point&&(r=n,n=t.y,t=t.x);var i=this._imageToViewportDelta(t,n);return r?(i.x+=this._xSpring.current.value,i.y+=this._ySpring.current.value):(i.x+=this._xSpring.target.value,i.y+=this._ySpring.target.value),i.rotate(this.getRotation(r),this._getRotationPoint(r))},imageToViewportRectangle:function(t,n,r,i,o){var a=t;a instanceof e.Rect?o=n:a=new e.Rect(t,n,r,i);var s=this.imageToViewportCoordinates(a.getTopLeft(),o),l=this._imageToViewportDelta(a.width,a.height,o);return new e.Rect(s.x,s.y,l.x,l.y,a.degrees+this.getRotation(o))},viewportToImageRectangle:function(t,n,r,i,o){var a=t;t instanceof e.Rect?o=n:a=new e.Rect(t,n,r,i);var s=this.viewportToImageCoordinates(a.getTopLeft(),o),l=this._viewportToImageDelta(a.width,a.height,o);return new e.Rect(s.x,s.y,l.x,l.y,a.degrees-this.getRotation(o))},viewerElementToImageCoordinates:function(e){var t=this.viewport.pointFromPixel(e,!0);return this.viewportToImageCoordinates(t)},imageToViewerElementCoordinates:function(e){var t=this.imageToViewportCoordinates(e);return this.viewport.pixelFromPoint(t,!0)},windowToImageCoordinates:function(e){var t=e.minus(s.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(t)},imageToWindowCoordinates:function(e){return this.imageToViewerElementCoordinates(e).plus(s.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(t){var n=this._scaleSpring.current.value;return t=t.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new e.Rect((t.x-this._xSpring.current.value)/n,(t.y-this._ySpring.current.value)/n,t.width/n,t.height/n,t.degrees)},viewportToImageZoom:function(e){return this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x*e},imageToViewportZoom:function(e){return e/(this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x)},setPosition:function(e,t){var n=this._xSpring.target.value===e.x&&this._ySpring.target.value===e.y;if(t){if(n&&this._xSpring.current.value===e.x&&this._ySpring.current.value===e.y)return;this._xSpring.resetTo(e.x),this._ySpring.resetTo(e.y),this._needsDraw=!0}else{if(n)return;this._xSpring.springTo(e.x),this._ySpring.springTo(e.y),this._needsDraw=!0}n||this._raiseBoundsChange()},setWidth:function(e,t){this._setScale(e,t)},setHeight:function(e,t){this._setScale(e/this.normHeight,t)},setCroppingPolygons:function(t){var n=function(t){return t.map((function(t){try{if(function(t){return t instanceof e.Point||"number"==typeof t.x&&"number"==typeof t.y}(t))return{x:t.x,y:t.y};throw new Error}catch(e){throw new Error("A Provided cropping polygon point is not supported")}}))};try{if(!e.isArray(t))throw new Error("Provided cropping polygon is not an array");this._croppingPolygons=t.map((function(e){return n(e)}))}catch(t){e.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),e.console.error(t),this._croppingPolygons=null}},resetCroppingPolygons:function(){this._croppingPolygons=null},fitBounds:function(t,n,r){n=n||e.Placement.CENTER;var i=e.Placement.properties[n],o=this.contentAspectX,a=0,s=0,l=1,c=1;if(this._clip&&(o=this._clip.getAspectRatio(),l=this._clip.width/this.source.dimensions.x,c=this._clip.height/this.source.dimensions.y,t.getAspectRatio()>o?(a=this._clip.x/this._clip.height*t.height,s=this._clip.y/this._clip.height*t.height):(a=this._clip.x/this._clip.width*t.width,s=this._clip.y/this._clip.width*t.width)),t.getAspectRatio()>o){var u=t.height/c,d=0;i.isHorizontallyCentered?d=(t.width-t.height*o)/2:i.isRight&&(d=t.width-t.height*o),this.setPosition(new e.Point(t.x-a+d,t.y-s),r),this.setHeight(u,r)}else{var p=t.width/l,h=0;i.isVerticallyCentered?h=(t.height-t.width/o)/2:i.isBottom&&(h=t.height-t.width/o),this.setPosition(new e.Point(t.x-a,t.y-s+h),r),this.setWidth(p,r)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(t){e.console.assert(!t||t instanceof e.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),t instanceof e.Rect?this._clip=t.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getFlip:function(){return!!this.flipped},setFlip:function(e){this.flipped=!!e,this._needsDraw=!0,this._raiseBoundsChange()},getOpacity:function(){return this.opacity},setOpacity:function(e){e!==this.opacity&&(this.opacity=e,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(e){this._preload=!!e,this._needsDraw=!0},getRotation:function(e){return e?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(e,t){this._degreesSpring.target.value===e&&this._degreesSpring.isAtTargetValue()||(t?this._degreesSpring.resetTo(e):this._degreesSpring.springTo(e),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(e){return this.getBoundsNoRotate(e).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(e){e!==this.compositeOperation&&(this.compositeOperation=e,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},setAjaxHeaders:function(t,n){null===t&&(t={}),e.isPlainObject(t)?(this._ownAjaxHeaders=t,this._updateAjaxHeaders(n)):console.error("[TiledImage.setAjaxHeaders] Ignoring invalid headers, must be a plain object")},_updateAjaxHeaders:function(t){if(void 0===t&&(t=!0),e.isPlainObject(this.viewer.ajaxHeaders)?this.ajaxHeaders=e.extend({},this.viewer.ajaxHeaders,this._ownAjaxHeaders):this.ajaxHeaders=this._ownAjaxHeaders,t){var n,r,i,o;for(var a in this.tilesMatrix)for(var s in n=this.source.getNumTiles(a),this.tilesMatrix[a])for(var l in r=(n.x+s%n.x)%n.x,this.tilesMatrix[a][s])if(i=(n.y+l%n.y)%n.y,(o=this.tilesMatrix[a][s][l]).loadWithAjax=this.loadTilesWithAjax,o.loadWithAjax){var c=this.source.getTileAjaxHeaders(a,r,i);o.ajaxHeaders=e.extend({},this.ajaxHeaders,c)}else o.ajaxHeaders=null;for(var u=0;u<this._imageLoader.jobQueue.length;u++){var d=this._imageLoader.jobQueue[u];d.loadWithAjax=d.tile.loadWithAjax,d.ajaxHeaders=d.tile.loadWithAjax?d.tile.ajaxHeaders:null}}},_setScale:function(e,t){var n=this._scaleSpring.target.value===e;if(t){if(n&&this._scaleSpring.current.value===e)return;this._scaleSpring.resetTo(e),this._updateForScale(),this._needsDraw=!0}else{if(n)return;this._scaleSpring.springTo(e),this._updateForScale(),this._needsDraw=!0}n||this._raiseBoundsChange()},_updateForScale:function(){this._worldWidthTarget=this._scaleSpring.target.value,this._worldHeightTarget=this.normHeight*this._scaleSpring.target.value,this._worldWidthCurrent=this._scaleSpring.current.value,this._worldHeightCurrent=this.normHeight*this._scaleSpring.current.value},_raiseBoundsChange:function(){this.raiseEvent("bounds-change")},_isBottomItem:function(){return this.viewer.world.getItemAt(0)===this},_getLevelsInterval:function(){var e=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),t=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,n=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(t/this.minPixelRatio)/Math.log(2))));return n=Math.max(n,this.source.minLevel||0),{lowestLevel:e=Math.min(e,n),highestLevel:n}},_updateViewport:function(){for(this._needsDraw=!1,this._tilesLoading=0,this.loadingCoverage={};this.lastDrawn.length>0;){this.lastDrawn.pop().beingDrawn=!1}var t=this.viewport,n=this._viewportToTiledImageRectangle(t.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var r=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(null===(n=n.intersection(r)))return}for(var i=this._getLevelsInterval(),o=i.lowestLevel,a=i.highestLevel,s=null,l=!1,c=e.now(),u=a;u>=o;u--){var d=!1,p=t.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(u),!0).x*this._scaleSpring.current.value;if(u===o||!l&&p>=this.minPixelRatio)d=!0,l=!0;else if(!l)continue;var h=t.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(u),!1).x*this._scaleSpring.current.value,f=t.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,m=this.immediateRender?1:f,g=Math.min(1,(p-.5)/.5),v=m/Math.abs(m-h);if(s=this._updateLevel(l,d,u,g,v,n,c,s),this._providesCoverage(this.coverage,u))break}this._drawTiles(this.lastDrawn),s&&!s.context2D?(this._loadTile(s,c),this._needsDraw=!0,this._setFullyLoaded(!1)):this._setFullyLoaded(0===this._tilesLoading)},_getCornerTiles:function(t,n,r){var i,o,a,s;this.wrapHorizontal?(i=e.positiveModulo(n.x,1),o=e.positiveModulo(r.x,1)):(i=Math.max(0,n.x),o=Math.min(1,r.x));var l=1/this.source.aspectRatio;this.wrapVertical?(a=e.positiveModulo(n.y,l),s=e.positiveModulo(r.y,l)):(a=Math.max(0,n.y),s=Math.min(l,r.y));var c=this.source.getTileAtPoint(t,new e.Point(i,a)),u=this.source.getTileAtPoint(t,new e.Point(o,s)),d=this.source.getNumTiles(t);return this.wrapHorizontal&&(c.x+=d.x*Math.floor(n.x),u.x+=d.x*Math.floor(r.x)),this.wrapVertical&&(c.y+=d.y*Math.floor(n.y/l),u.y+=d.y*Math.floor(r.y/l)),{topLeft:c,bottomRight:u}},_updateLevel:function(e,t,n,r,i,o,a,s){var l=o.getBoundingBox().getTopLeft(),c=o.getBoundingBox().getBottomRight();this.viewer&&this.viewer.raiseEvent("update-level",{tiledImage:this,havedrawn:e,level:n,opacity:r,visibility:i,drawArea:o,topleft:l,bottomright:c,currenttime:a,best:s}),this._resetCoverage(this.coverage,n),this._resetCoverage(this.loadingCoverage,n);var u=this._getCornerTiles(n,l,c),d=u.topLeft,p=u.bottomRight,h=this.source.getNumTiles(n),f=this.viewport.pixelFromPoint(this.viewport.getCenter());this.getFlip()&&(p.x+=1,this.wrapHorizontal||(p.x=Math.min(p.x,h.x-1)));for(var m=d.x;m<=p.x;m++)for(var g=d.y;g<=p.y;g++){var v;if(this.getFlip()){var y=(h.x+m%h.x)%h.x;v=m+h.x-y-y-1}else v=m;null!==o.intersection(this.getTileBounds(n,v,g))&&(s=this._updateTile(t,e,v,g,n,r,i,f,h,a,s))}return s},_updateTile:function(e,t,n,r,i,o,a,s,l,c,u){var d=this._getTile(n,r,i,c,l,this._worldWidthCurrent,this._worldHeightCurrent),p=t;this.viewer&&this.viewer.raiseEvent("update-tile",{tiledImage:this,tile:d}),this._setCoverage(this.coverage,i,n,r,!1);var h=d.loaded||d.loading||this._isCovered(this.loadingCoverage,i,n,r);if(this._setCoverage(this.loadingCoverage,i,n,r,h),!d.exists)return u;if(e&&!p&&(this._isCovered(this.coverage,i,n,r)?this._setCoverage(this.coverage,i,n,r,!0):p=!0),!p)return u;if(this._positionTile(d,this.source.tileOverlap,this.viewport,s,a),!d.loaded)if(d.context2D)this._setTileLoaded(d);else{var f=this._tileCache.getImageRecord(d.cacheKey);f&&this._setTileLoaded(d,f.getData())}d.loaded?this._blendTile(d,n,r,i,o,c)&&(this._needsDraw=!0):d.loading?this._tilesLoading++:h||(u=this._compareTiles(u,d));return u},_getTile:function(t,n,r,i,o,a,s){var l,c,u,d,p,h,f,m,g,v,y=this.tilesMatrix,b=this.source;return y[r]||(y[r]={}),y[r][t]||(y[r][t]={}),y[r][t][n]&&!y[r][t][n].flipped==!this.flipped||(l=(o.x+t%o.x)%o.x,c=(o.y+n%o.y)%o.y,u=this.getTileBounds(r,t,n),d=b.getTileBounds(r,l,c,!0),p=b.tileExists(r,l,c),h=b.getTileUrl(r,l,c),f=b.getTilePostData(r,l,c),this.loadTilesWithAjax?(m=b.getTileAjaxHeaders(r,l,c),e.isPlainObject(this.ajaxHeaders)&&(m=e.extend({},this.ajaxHeaders,m))):m=null,g=b.getContext2D?b.getContext2D(r,l,c):void 0,v=new e.Tile(r,t,n,u,p,h,g,this.loadTilesWithAjax,m,d,f,b.getTileHashKey(r,l,c,h,m,f)),this.getFlip()?0===l&&(v.isRightMost=!0):l===o.x-1&&(v.isRightMost=!0),c===o.y-1&&(v.isBottomMost=!0),v.flipped=this.flipped,y[r][t][n]=v),(v=y[r][t][n]).lastTouchTime=i,v},_loadTile:function(e,t){var n=this;e.loading=!0,this._imageLoader.addJob({src:e.getUrl(),tile:e,source:this.source,postData:e.postData,loadWithAjax:e.loadWithAjax,ajaxHeaders:e.ajaxHeaders,crossOriginPolicy:this.crossOriginPolicy,ajaxWithCredentials:this.ajaxWithCredentials,callback:function(r,i,o){n._onTileLoad(e,t,r,i,o)},abort:function(){e.loading=!1}})},_onTileLoad:function(t,n,r,i,o){if(!r)return e.console.error("Tile %s failed to load: %s - error: %s",t,t.getUrl(),i),this.viewer.raiseEvent("tile-load-failed",{tile:t,tiledImage:this,time:n,message:i,tileRequest:o}),t.loading=!1,void(t.exists=!1);if(t.exists=!0,n<this.lastResetTime)return e.console.warn("Ignoring tile %s loaded before reset: %s",t,t.getUrl()),void(t.loading=!1);var a=this,s=function(){var e=a.source.getClosestLevel();a._setTileLoaded(t,r,e,o)};this._midDraw?window.setTimeout(s,1):s()},_setTileLoaded:function(t,n,r,i){var o=0,a=!1,s=this;function l(){return a&&e.console.error("Event 'tile-loaded' argument getCompletionCallback must be called synchronously. Its return value should be called asynchronously."),o++,c}function c(){0===--o&&(t.loading=!1,t.loaded=!0,t.hasTransparency=s.source.hasTransparency(t.context2D,t.getUrl(),t.ajaxHeaders,t.postData),t.context2D||s._tileCache.cacheTile({data:n,tile:t,cutoff:r,tiledImage:s}),s._needsDraw=!0)}var u=l();this.viewer.raiseEvent("tile-loaded",{tile:t,tiledImage:this,tileRequest:i,get image(){return e.console.error("[tile-loaded] event 'image' has been deprecated. Use 'data' property instead."),n},data:n,getCompletionCallback:l}),a=!0,u()},_positionTile:function(t,n,r,i,o){var a=t.bounds.getTopLeft();a.x*=this._scaleSpring.current.value,a.y*=this._scaleSpring.current.value,a.x+=this._xSpring.current.value,a.y+=this._ySpring.current.value;var s=t.bounds.getSize();s.x*=this._scaleSpring.current.value,s.y*=this._scaleSpring.current.value;var l=r.pixelFromPointNoRotate(a,!0),c=r.pixelFromPointNoRotate(a,!1),u=r.deltaPixelsFromPointsNoRotate(s,!0),d=r.deltaPixelsFromPointsNoRotate(s,!1),p=c.plus(d.divide(2)),h=i.squaredDistanceTo(p);n||(u=u.plus(new e.Point(1,1))),t.isRightMost&&this.wrapHorizontal&&(u.x+=.75),t.isBottomMost&&this.wrapVertical&&(u.y+=.75),t.position=l,t.size=u,t.squaredDistance=h,t.visibility=o},_blendTile:function(e,t,n,r,i,o){var a,s,l=1e3*this.blendTime;if(e.blendStart||(e.blendStart=o),a=o-e.blendStart,s=l?Math.min(1,a/l):1,this.alwaysBlend&&(s*=i),e.opacity=s,this.lastDrawn.push(e),1===s)this._setCoverage(this.coverage,r,t,n,!0),this._hasOpaqueTile=!0;else if(a<l)return!0;return!1},_compareTiles:function(e,t){return e?t.visibility>e.visibility||t.visibility===e.visibility&&t.squaredDistance<e.squaredDistance?t:e:t},_drawTiles:function(i){if(0!==this.opacity&&(0!==i.length||this.placeholderFillStyle)){var o,a,s,l=i[0];l&&(o=this.opacity<1||this.compositeOperation&&"source-over"!==this.compositeOperation||!this._isBottomItem()&&this.source.hasTransparency(l.context2D,l.getUrl(),l.ajaxHeaders,l.postData));var c,u=this.viewport.getZoom(!0),d=this.viewportToImageZoom(u);i.length>1&&d>this.smoothTileEdgesMinZoom&&!this.iOSDevice&&this.getRotation(!0)%360==0&&e.supportsCanvas&&this.viewer.useCanvas&&(o=!0,a=l.getScaleForEdgeSmoothing(),s=l.getTranslationForEdgeSmoothing(a,this._drawer.getCanvasSize(!1),this._drawer.getCanvasSize(!0))),o&&(a||(c=this.viewport.viewportToViewerElementRectangle(this.getClippedBounds(!0)).getIntegerBoundingBox(),this._drawer.viewer.viewport.getFlip()&&(this.viewport.getRotation(!0)%360==0&&this.getRotation(!0)%360==0||(c.x=this._drawer.viewer.container.clientWidth-(c.x+c.width))),c=c.times(e.pixelDensityRatio)),this._drawer._clear(!0,c)),a||(this.viewport.getRotation(!0)%360!=0&&this._drawer._offsetForRotation({degrees:this.viewport.getRotation(!0),useSketch:o}),this.getRotation(!0)%360!=0&&this._drawer._offsetForRotation({degrees:this.getRotation(!0),point:this.viewport.pixelFromPointNoRotate(this._getRotationPoint(!0),!0),useSketch:o}),this.viewport.getRotation(!0)%360==0&&this.getRotation(!0)%360==0&&this._drawer.viewer.viewport.getFlip()&&this._drawer._flip());var p=!1;if(this._clip){this._drawer.saveContext(o);var h=this.imageToViewportRectangle(this._clip,!0);h=h.rotate(-this.getRotation(!0),this._getRotationPoint(!0));var f=this._drawer.viewportToDrawerRectangle(h);a&&(f=f.times(a)),s&&(f=f.translate(s)),this._drawer.setClip(f,o),p=!0}if(this._croppingPolygons){var m=this;this._drawer.saveContext(o);try{var g=this._croppingPolygons.map((function(e){return e.map((function(e){var t=m.imageToViewportCoordinates(e.x,e.y,!0).rotate(-m.getRotation(!0),m._getRotationPoint(!0)),n=m._drawer.viewportCoordToDrawerCoord(t);return a&&(n=n.times(a)),s&&(n=n.plus(s)),n}))}));this._drawer.clipWithPolygons(g,o)}catch(t){e.console.error(t)}p=!0}if(this.placeholderFillStyle&&!1===this._hasOpaqueTile){var v=this._drawer.viewportToDrawerRectangle(this.getBounds(!0));a&&(v=v.times(a)),s&&(v=v.translate(s));var y=null;y="function"==typeof this.placeholderFillStyle?this.placeholderFillStyle(this,this._drawer.context):this.placeholderFillStyle,this._drawer.drawRectangle(v,y,o)}var b=function(i){if("number"==typeof i)return r(i);if(!i||!e.Browser)return t;var o=i[e.Browser.vendor];n(o)&&(o=i["*"]);return r(o)}(this.subPixelRoundingForTransparency),w=!1;if(b===e.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS)w=!0;else if(b===e.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST){w=!(this.viewer&&this.viewer.isAnimating())}for(var x=i.length-1;x>=0;x--)l=i[x],this._drawer.drawTile(l,this._drawingHandler,o,a,s,w,this.source),l.beingDrawn=!0,this.viewer&&this.viewer.raiseEvent("tile-drawn",{tiledImage:this,tile:l});p&&this._drawer.restoreContext(o),a||(this.getRotation(!0)%360!=0&&this._drawer._restoreRotationChanges(o),this.viewport.getRotation(!0)%360!=0&&this._drawer._restoreRotationChanges(o)),o&&(a&&(this.viewport.getRotation(!0)%360!=0&&this._drawer._offsetForRotation({degrees:this.viewport.getRotation(!0),useSketch:!1}),this.getRotation(!0)%360!=0&&this._drawer._offsetForRotation({degrees:this.getRotation(!0),point:this.viewport.pixelFromPointNoRotate(this._getRotationPoint(!0),!0),useSketch:!1})),this._drawer.blendSketch({opacity:this.opacity,scale:a,translate:s,compositeOperation:this.compositeOperation,bounds:c}),a&&(this.getRotation(!0)%360!=0&&this._drawer._restoreRotationChanges(!1),this.viewport.getRotation(!0)%360!=0&&this._drawer._restoreRotationChanges(!1))),a||this.viewport.getRotation(!0)%360==0&&this.getRotation(!0)%360==0&&this._drawer.viewer.viewport.getFlip()&&this._drawer._flip(),this._drawDebugInfo(i)}},_drawDebugInfo:function(t){if(this.debugMode)for(var n=t.length-1;n>=0;n--){var r=t[n];try{this._drawer.drawDebugInfo(r,t.length,n,this)}catch(t){e.console.error(t)}}},_providesCoverage:function(e,t,n,r){var i,o,a,s;if(!e[t])return!1;if(void 0===n||void 0===r){for(a in i=e[t])if(Object.prototype.hasOwnProperty.call(i,a))for(s in o=i[a])if(Object.prototype.hasOwnProperty.call(o,s)&&!o[s])return!1;return!0}return void 0===e[t][n]||void 0===e[t][n][r]||!0===e[t][n][r]},_isCovered:function(e,t,n,r){return void 0===n||void 0===r?this._providesCoverage(e,t+1):this._providesCoverage(e,t+1,2*n,2*r)&&this._providesCoverage(e,t+1,2*n,2*r+1)&&this._providesCoverage(e,t+1,2*n+1,2*r)&&this._providesCoverage(e,t+1,2*n+1,2*r+1)},_setCoverage:function(t,n,r,i,o){t[n]?(t[n][r]||(t[n][r]={}),t[n][r][i]=o):e.console.warn("Setting coverage for a tile before its level's coverage has been reset: %s",n)},_resetCoverage:function(e,t){e[t]={}}});var t=e.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER;function n(t){return t!==e.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS&&t!==e.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST&&t!==e.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER}function r(e){return n(e)?t:e}}(s),function(e){var t=function(t){e.console.assert(t,"[TileCache.cacheTile] options is required"),e.console.assert(t.tile,"[TileCache.cacheTile] options.tile is required"),e.console.assert(t.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=t.tile,this.tiledImage=t.tiledImage},n=function(t){e.console.assert(t,"[ImageRecord] options is required"),e.console.assert(t.data,"[ImageRecord] options.data is required"),this._tiles=[],t.create.apply(null,[this,t.data,t.ownerTile]),this._destroyImplementation=t.destroy.bind(null,this),this.getImage=t.getImage.bind(null,this),this.getData=t.getData.bind(null,this),this.getRenderedContext=t.getRenderedContext.bind(null,this)};n.prototype={destroy:function(){this._destroyImplementation(),this._tiles=null},addTile:function(t){e.console.assert(t,"[ImageRecord.addTile] tile is required"),this._tiles.push(t)},removeTile:function(t){for(var n=0;n<this._tiles.length;n++)if(this._tiles[n]===t)return void this._tiles.splice(n,1);e.console.warn("[ImageRecord.removeTile] trying to remove unknown tile",t)},getTileCount:function(){return this._tiles.length}},e.TileCache=function(t){t=t||{},this._maxImageCacheCount=t.maxImageCacheCount||e.DEFAULT_SETTINGS.maxImageCacheCount,this._tilesLoaded=[],this._imagesLoaded=[],this._imagesLoadedCount=0},e.TileCache.prototype={numTilesLoaded:function(){return this._tilesLoaded.length},cacheTile:function(r){e.console.assert(r,"[TileCache.cacheTile] options is required"),e.console.assert(r.tile,"[TileCache.cacheTile] options.tile is required"),e.console.assert(r.tile.cacheKey,"[TileCache.cacheTile] options.tile.cacheKey is required"),e.console.assert(r.tiledImage,"[TileCache.cacheTile] options.tiledImage is required");var i=r.cutoff||0,o=this._tilesLoaded.length,a=this._imagesLoaded[r.tile.cacheKey];if(a||(r.data||(e.console.error("[TileCache.cacheTile] options.image was renamed to options.data. '.image' attribute has been deprecated and will be removed in the future."),r.data=r.image),e.console.assert(r.data,"[TileCache.cacheTile] options.data is required to create an ImageRecord"),a=this._imagesLoaded[r.tile.cacheKey]=new n({data:r.data,ownerTile:r.tile,create:r.tiledImage.source.createTileCache,destroy:r.tiledImage.source.destroyTileCache,getImage:r.tiledImage.source.getTileCacheDataAsImage,getData:r.tiledImage.source.getTileCacheData,getRenderedContext:r.tiledImage.source.getTileCacheDataAsContext2D}),this._imagesLoadedCount++),a.addTile(r.tile),r.tile.cacheImageRecord=a,this._imagesLoadedCount>this._maxImageCacheCount){for(var s,l,c,u,d,p,h=null,f=-1,m=null,g=this._tilesLoaded.length-1;g>=0;g--)(s=(p=this._tilesLoaded[g]).tile).level<=i||s.beingDrawn||(h?(u=s.lastTouchTime,l=h.lastTouchTime,d=s.level,c=h.level,(u<l||u===l&&d>c)&&(h=s,f=g,m=p)):(h=s,f=g,m=p));h&&f>=0&&(this._unloadTile(m),o=f)}this._tilesLoaded[o]=new t({tile:r.tile,tiledImage:r.tiledImage})},clearTilesFor:function(t){var n;e.console.assert(t,"[TileCache.clearTilesFor] tiledImage is required");for(var r=0;r<this._tilesLoaded.length;++r)(n=this._tilesLoaded[r]).tiledImage===t&&(this._unloadTile(n),this._tilesLoaded.splice(r,1),r--)},getImageRecord:function(t){return e.console.assert(t,"[TileCache.getImageRecord] cacheKey is required"),this._imagesLoaded[t]},_unloadTile:function(t){e.console.assert(t,"[TileCache._unloadTile] tileRecord is required");var n=t.tile,r=t.tiledImage;n.unload(),n.cacheImageRecord=null;var i=this._imagesLoaded[n.cacheKey];i.removeTile(n),i.getTileCount()||(i.destroy(),delete this._imagesLoaded[n.cacheKey],this._imagesLoadedCount--),r.viewer.raiseEvent("tile-unloaded",{tile:n,tiledImage:r})}}}(s),function(e){e.World=function(t){var n=this;e.console.assert(t.viewer,"[World] options.viewer is required"),e.EventSource.call(this),this.viewer=t.viewer,this._items=[],this._needsDraw=!1,this._autoRefigureSizes=!0,this._needsSizesFigured=!1,this._delegatedFigureSizes=function(e){n._autoRefigureSizes?n._figureSizes():n._needsSizesFigured=!0},this._figureSizes()},e.extend(e.World.prototype,e.EventSource.prototype,{addItem:function(t,n){if(e.console.assert(t,"[World.addItem] item is required"),e.console.assert(t instanceof e.TiledImage,"[World.addItem] only TiledImages supported at this time"),void 0!==(n=n||{}).index){var r=Math.max(0,Math.min(this._items.length,n.index));this._items.splice(r,0,t)}else this._items.push(t);this._autoRefigureSizes?this._figureSizes():this._needsSizesFigured=!0,this._needsDraw=!0,t.addHandler("bounds-change",this._delegatedFigureSizes),t.addHandler("clip-change",this._delegatedFigureSizes),this.raiseEvent("add-item",{item:t})},getItemAt:function(t){return e.console.assert(void 0!==t,"[World.getItemAt] index is required"),this._items[t]},getIndexOfItem:function(t){return e.console.assert(t,"[World.getIndexOfItem] item is required"),e.indexOf(this._items,t)},getItemCount:function(){return this._items.length},setItemIndex:function(t,n){e.console.assert(t,"[World.setItemIndex] item is required"),e.console.assert(void 0!==n,"[World.setItemIndex] index is required");var r=this.getIndexOfItem(t);if(n>=this._items.length)throw new Error("Index bigger than number of layers.");n!==r&&-1!==r&&(this._items.splice(r,1),this._items.splice(n,0,t),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:t,previousIndex:r,newIndex:n}))},removeItem:function(t){e.console.assert(t,"[World.removeItem] item is required");var n=e.indexOf(this._items,t);-1!==n&&(t.removeHandler("bounds-change",this._delegatedFigureSizes),t.removeHandler("clip-change",this._delegatedFigureSizes),t.destroy(),this._items.splice(n,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(t))},removeAll:function(){var e,t;for(this.viewer._cancelPendingImages(),t=0;t<this._items.length;t++)(e=this._items[t]).removeHandler("bounds-change",this._delegatedFigureSizes),e.removeHandler("clip-change",this._delegatedFigureSizes),e.destroy();var n=this._items;for(this._items=[],this._figureSizes(),this._needsDraw=!0,t=0;t<n.length;t++)e=n[t],this._raiseRemoveItem(e)},resetItems:function(){for(var e=0;e<this._items.length;e++)this._items[e].reset()},update:function(){for(var e=!1,t=0;t<this._items.length;t++)e=this._items[t].update()||e;return e},draw:function(){for(var e=0;e<this._items.length;e++)this._items[e].draw();this._needsDraw=!1},needsDraw:function(){for(var e=0;e<this._items.length;e++)if(this._items[e].needsDraw())return!0;return this._needsDraw},getHomeBounds:function(){return this._homeBounds.clone()},getContentFactor:function(){return this._contentFactor},setAutoRefigureSizes:function(e){this._autoRefigureSizes=e,e&this._needsSizesFigured&&(this._figureSizes(),this._needsSizesFigured=!1)},arrange:function(t){var n,r=(t=t||{}).immediately||!1,i=t.layout||e.DEFAULT_SETTINGS.collectionLayout,o=t.rows||e.DEFAULT_SETTINGS.collectionRows,a=t.columns||e.DEFAULT_SETTINGS.collectionColumns,s=t.tileSize||e.DEFAULT_SETTINGS.collectionTileSize,l=s+(t.tileMargin||e.DEFAULT_SETTINGS.collectionTileMargin);n=!t.rows&&a?a:Math.ceil(this._items.length/o);var c,u,d,p,h,f=0,m=0;this.setAutoRefigureSizes(!1);for(var g=0;g<this._items.length;g++)g&&g%n==0&&("horizontal"===i?(m+=l,f=0):(f+=l,m=0)),p=(d=(u=(c=this._items[g]).getBounds()).width>u.height?s:s*(u.width/u.height))*(u.height/u.width),h=new e.Point(f+(s-d)/2,m+(s-p)/2),c.setPosition(h,r),c.setWidth(d,r),"horizontal"===i?f+=l:m+=l;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var t=this._homeBounds?this._homeBounds.clone():null,n=this._contentSize?this._contentSize.clone():null,r=this._contentFactor||0;if(this._items.length){var i=this._items[0],o=i.getBounds();this._contentFactor=i.getContentSize().x/o.width;for(var a=i.getClippedBounds().getBoundingBox(),s=a.x,l=a.y,c=a.x+a.width,u=a.y+a.height,d=1;d<this._items.length;d++)o=(i=this._items[d]).getBounds(),this._contentFactor=Math.max(this._contentFactor,i.getContentSize().x/o.width),a=i.getClippedBounds().getBoundingBox(),s=Math.min(s,a.x),l=Math.min(l,a.y),c=Math.max(c,a.x+a.width),u=Math.max(u,a.y+a.height);this._homeBounds=new e.Rect(s,l,c-s,u-l),this._contentSize=new e.Point(this._homeBounds.width*this._contentFactor,this._homeBounds.height*this._contentFactor)}else this._homeBounds=new e.Rect(0,0,1,1),this._contentSize=new e.Point(1,1),this._contentFactor=1;this._contentFactor===r&&this._homeBounds.equals(t)&&this._contentSize.equals(n)||this.raiseEvent("metrics-change",{})},_raiseRemoveItem:function(e){this.raiseEvent("remove-item",{item:e})}})}(s)},8997:(e,t,n)=>{"use strict";var r=n(2043);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},7833:(e,t,n)=>{e.exports=n(8997)()},2043:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1849:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(4639),o=s(i),a=s(n(7833));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(e){}return e}},{key:"eventListenerOptions",value:function(){this.props.useCapture;return this.isPassiveSupported()?{useCapture:this.props.useCapture,passive:!0}:{passive:!1}}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),r=void 0;if(this.props.useWindow){var i=document.documentElement||document.body.parentNode||document.body,o=void 0!==t.pageYOffset?t.pageYOffset:i.scrollTop;r=this.props.isReverse?o:this.calculateOffset(e,o)}else r=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;r<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"==typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,r=t.element,i=t.hasMore,a=(t.initialLoad,t.isReverse),s=t.loader,l=(t.loadMore,t.pageStart,t.ref),c=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));c.ref=function(t){e.scrollComponent=t,l&&l(t)};var u=[n];return i&&(s?a?u.unshift(s):u.push(s):this.defaultLoader&&(a?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),o.default.createElement(r,c,u)}}]),t}(i.Component);l.propTypes={children:a.default.node.isRequired,element:a.default.node,hasMore:a.default.bool,initialLoad:a.default.bool,isReverse:a.default.bool,loader:a.default.node,loadMore:a.default.func.isRequired,pageStart:a.default.number,ref:a.default.func,getScrollParent:a.default.func,threshold:a.default.number,useCapture:a.default.bool,useWindow:a.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t.default},5922:(e,t,n)=>{e.exports=n(1849)},1419:(e,t)=>{"use strict";var n=60103,r=60106,i=60107,o=60108,a=60114,s=60109,l=60110,c=60112,u=60113,d=60120,p=60115,h=60116,f=60121,m=60122,g=60117,v=60129,y=60131;if("function"==typeof Symbol&&Symbol.for){var b=Symbol.for;n=b("react.element"),r=b("react.portal"),i=b("react.fragment"),o=b("react.strict_mode"),a=b("react.profiler"),s=b("react.provider"),l=b("react.context"),c=b("react.forward_ref"),u=b("react.suspense"),d=b("react.suspense_list"),p=b("react.memo"),h=b("react.lazy"),f=b("react.block"),m=b("react.server.block"),g=b("react.fundamental"),v=b("react.debug_trace_mode"),y=b("react.legacy_hidden")}function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e.type){case i:case a:case o:case u:case d:return e;default:switch(e&&e.$$typeof){case l:case c:case h:case p:case s:return e;default:return t}}case r:return t}}}},1663:(e,t,n)=>{"use strict";n(1419)},7060:(e,t)=>{"use strict";var n,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case o:case s:case a:case p:case h:return e;default:switch(e=e&&e.$$typeof){case u:case c:case d:case m:case f:case l:return e;default:return t}}case i:return t}}}n=Symbol.for("react.module.reference"),t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=d,t.Fragment=o,t.Lazy=m,t.Memo=f,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.SuspenseList=h,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return v(e)===c},t.isContextProvider=function(e){return v(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return v(e)===d},t.isFragment=function(e){return v(e)===o},t.isLazy=function(e){return v(e)===m},t.isMemo=function(e){return v(e)===f},t.isPortal=function(e){return v(e)===i},t.isProfiler=function(e){return v(e)===s},t.isStrictMode=function(e){return v(e)===a},t.isSuspense=function(e){return v(e)===p},t.isSuspenseList=function(e){return v(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===a||e===p||e===h||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===f||e.$$typeof===l||e.$$typeof===c||e.$$typeof===d||e.$$typeof===n||void 0!==e.getModuleId)},t.typeOf=v},2169:(e,t,n)=>{"use strict";e.exports=n(7060)},6032:(e,t,n)=>{"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||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 i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Object.defineProperty(t,"__esModule",{value:!0});function o(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var a={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((function(e){a[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=r(e,2),n=t[0],i=t[1];a[n]=new o(n,1,!1,i,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){a[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){a[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((function(e){a[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){a[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){a[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){a[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){a[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));var s=/[\-\:]([a-z])/g,l=function(e){return e[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((function(e){var t=e.replace(s,l);a[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((function(e){var t=e.replace(s,l);a[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(s,l);a[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){a[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)}));a.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){a[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));var c=n(7102),u=c.CAMELCASE,d=c.SAME,p=c.possibleStandardNames,h=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),f=Object.keys(p).reduce((function(e,t){var n=p[t];return n===d?e[t]=t:n===u?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return a.hasOwnProperty(e)?a[e]:null},t.isCustomAttribute=h,t.possibleStandardNames=f},7102:(e,t)=>{t.SAME=0;t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},3152:(e,t)=>{"use strict";var n,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case o:case s:case a:case p:case h:return e;default:switch(e=e&&e.$$typeof){case u:case c:case d:case m:case f:case l:return e;default:return t}}case i:return t}}}n=Symbol.for("react.module.reference"),t.isContextConsumer=function(e){return v(e)===c}},5683:(e,t,n)=>{"use strict";e.exports=n(3152)},8654:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=a(n(4639)),o=a(n(2252));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"render",value:function(){return i.default.createElement("input",this.props,this.props.children)}}]),t}(i.default.Component);t.default=(0,o.default)(s)},3592:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=l(n(4639)),a=l(n(7466)),s=l(n(7833));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"render",value:function(){var e=this,t=r({},this.props);return t.parentBindings&&delete t.parentBindings,o.default.createElement("div",r({},t,{ref:function(t){e.props.parentBindings.domNode=t}}),this.props.children)}}]),t}(o.default.Component);c.propTypes={name:s.default.string,id:s.default.string},t.default=(0,a.default)(c)},9210:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(4639)),i=o(n(2252));function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var s=function(e){function t(){var e,n,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,s=Array(o),l=0;l<o;l++)s[l]=arguments[l];return n=i=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),i.render=function(){return r.default.createElement("a",i.props,i.props.children)},a(i,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r.default.Component);t.default=(0,i.default)(s)},7259:(e,t,n)=>{"use strict";t.rU=void 0;var r=h(n(9210)),i=h(n(8654)),o=h(n(3592)),a=h(n(6717)),s=h(n(9387)),l=h(n(2753)),c=h(n(9421)),u=h(n(2252)),d=h(n(7466)),p=h(n(3821));function h(e){return e&&e.__esModule?e:{default:e}}t.rU=r.default,i.default,o.default,a.default,s.default,l.default,c.default,u.default,d.default,p.default,r.default,i.default,o.default,a.default,s.default,l.default,c.default,u.default,d.default,p.default},3821:(e,t,n)=>{"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=n(4639),c=(n(1346),n(1171),n(2753)),u=n(6717),d=n(7833),p=n(4803),h={to:d.string.isRequired,containerId:d.string,container:d.object,activeClass:d.string,spy:d.bool,smooth:d.oneOfType([d.bool,d.string]),offset:d.number,delay:d.number,isDynamic:d.bool,onClick:d.func,duration:d.oneOfType([d.number,d.func]),absolute:d.bool,onSetActive:d.func,onSetInactive:d.func,ignoreCancelEvents:d.bool,hashSpy:d.bool,spyThrottle:d.number},f={Scroll:function(e,t){console.warn("Helpers.Scroll is deprecated since v1.7.0");var n=t||u,d=function(t){function u(e){o(this,u);var t=a(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,e));return f.call(t),t.state={active:!1},t}return s(u,t),i(u,[{key:"getScrollSpyContainer",value:function(){var e=this.props.containerId,t=this.props.container;return e?document.getElementById(e):t&&t.nodeType?t:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var e=this.getScrollSpyContainer();c.isMounted(e)||c.mount(e,this.props.spyThrottle),this.props.hashSpy&&(p.isMounted()||p.mount(n),p.mapContainer(this.props.to,e)),this.props.spy&&c.addStateHandler(this.stateHandler),c.addSpyHandler(this.spyHandler,e),this.setState({container:e})}}},{key:"componentWillUnmount",value:function(){c.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var t="";t=this.state&&this.state.active?((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():this.props.className;var n=r({},this.props);for(var i in h)n.hasOwnProperty(i)&&delete n[i];return n.className=t,n.onClick=this.handleClick,l.createElement(e,n)}}]),u}(l.Component),f=function(){var e=this;this.scrollTo=function(t,i){n.scrollTo(t,r({},e.state,i))},this.handleClick=function(t){e.props.onClick&&e.props.onClick(t),t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),e.scrollTo(e.props.to,e.props)},this.stateHandler=function(){n.getActiveLink()!==e.props.to&&(null!==e.state&&e.state.active&&e.props.onSetInactive&&e.props.onSetInactive(),e.setState({active:!1}))},this.spyHandler=function(t){var r=e.getScrollSpyContainer();if(!p.isMounted()||p.isInitialized()){var i=e.props.to,o=null,a=0,s=0,l=0;if(r.getBoundingClientRect)l=r.getBoundingClientRect().top;if(!o||e.props.isDynamic){if(!(o=n.get(i)))return;var u=o.getBoundingClientRect();s=(a=u.top-l+t)+u.height}var d=t-e.props.offset,h=d>=Math.floor(a)&&d<Math.floor(s),f=d<Math.floor(a)||d>=Math.floor(s),m=n.getActiveLink();return f?(i===m&&n.setActiveLink(void 0),e.props.hashSpy&&p.getHash()===i&&p.changeHash(),e.props.spy&&e.state.active&&(e.setState({active:!1}),e.props.onSetInactive&&e.props.onSetInactive()),c.updateStates()):h&&m!==i?(n.setActiveLink(i),e.props.hashSpy&&p.changeHash(i),e.props.spy&&(e.setState({active:!0}),e.props.onSetActive&&e.props.onSetActive(i)),c.updateStates()):void 0}}};return d.propTypes=h,d.defaultProps={offset:0},d},Element:function(e){console.warn("Helpers.Element is deprecated since v1.7.0");var t=function(t){function n(e){o(this,n);var t=a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.childBindings={domNode:null},t}return s(n,t),i(n,[{key:"componentDidMount",value:function(){if("undefined"==typeof window)return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(e){this.props.name!==e.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if("undefined"==typeof window)return!1;u.unregister(this.props.name)}},{key:"registerElems",value:function(e){u.register(e,this.childBindings.domNode)}},{key:"render",value:function(){return l.createElement(e,r({},this.props,{parentBindings:this.childBindings}))}}]),n}(l.Component);return t.propTypes={name:d.string,id:d.string},t}};e.exports=f},9421:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=(s(n(1171)),s(n(9599))),o=s(n(8061)),a=s(n(9387));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e){return i.default[e.smooth]||i.default.defaultEasing},c=function(){if("undefined"!=typeof window)return window.requestAnimationFrame||window.webkitRequestAnimationFrame}()||function(e,t,n){window.setTimeout(e,n||1e3/60,(new Date).getTime())},u=function(e){var t=e.data.containerElement;if(t&&t!==document&&t!==document.body)return t.scrollLeft;var n=void 0!==window.pageXOffset,r="CSS1Compat"===(document.compatMode||"");return n?window.pageXOffset:r?document.documentElement.scrollLeft:document.body.scrollLeft},d=function(e){var t=e.data.containerElement;if(t&&t!==document&&t!==document.body)return t.scrollTop;var n=void 0!==window.pageXOffset,r="CSS1Compat"===(document.compatMode||"");return n?window.pageYOffset:r?document.documentElement.scrollTop:document.body.scrollTop},p=function e(t,n,r){var i=n.data;if(n.ignoreCancelEvents||!i.cancel)if(i.delta=Math.round(i.targetPosition-i.startPosition),null===i.start&&(i.start=r),i.progress=r-i.start,i.percent=i.progress>=i.duration?1:t(i.progress/i.duration),i.currentPosition=i.startPosition+Math.ceil(i.delta*i.percent),i.containerElement&&i.containerElement!==document&&i.containerElement!==document.body?n.horizontal?i.containerElement.scrollLeft=i.currentPosition:i.containerElement.scrollTop=i.currentPosition:n.horizontal?window.scrollTo(i.currentPosition,0):window.scrollTo(0,i.currentPosition),i.percent<1){var o=e.bind(null,t,n);c.call(window,o)}else a.default.registered.end&&a.default.registered.end(i.to,i.target,i.currentPosition);else a.default.registered.end&&a.default.registered.end(i.to,i.target,i.currentPositionY)},h=function(e){e.data.containerElement=e?e.containerId?document.getElementById(e.containerId):e.container&&e.container.nodeType?e.container:document:null},f=function(e,t,n,r){if(t.data=t.data||{currentPosition:0,startPosition:0,targetPosition:0,progress:0,duration:0,cancel:!1,target:null,containerElement:null,to:null,start:null,delta:null,percent:null,delayTimeout:null},window.clearTimeout(t.data.delayTimeout),o.default.subscribe((function(){t.data.cancel=!0})),h(t),t.data.start=null,t.data.cancel=!1,t.data.startPosition=t.horizontal?u(t):d(t),t.data.targetPosition=t.absolute?e:e+t.data.startPosition,t.data.startPosition!==t.data.targetPosition){var i;t.data.delta=Math.round(t.data.targetPosition-t.data.startPosition),t.data.duration=("function"==typeof(i=t.duration)?i:function(){return i})(t.data.delta),t.data.duration=isNaN(parseFloat(t.data.duration))?1e3:parseFloat(t.data.duration),t.data.to=n,t.data.target=r;var s=l(t),f=p.bind(null,s,t);t&&t.delay>0?t.data.delayTimeout=window.setTimeout((function(){a.default.registered.begin&&a.default.registered.begin(t.data.to,t.data.target),c.call(window,f)}),t.delay):(a.default.registered.begin&&a.default.registered.begin(t.data.to,t.data.target),c.call(window,f))}else a.default.registered.end&&a.default.registered.end(t.data.to,t.data.target,t.data.currentPosition)},m=function(e){return(e=r({},e)).data=e.data||{currentPosition:0,startPosition:0,targetPosition:0,progress:0,duration:0,cancel:!1,target:null,containerElement:null,to:null,start:null,delta:null,percent:null,delayTimeout:null},e.absolute=!0,e};t.default={animateTopScroll:f,getAnimationType:l,scrollToTop:function(e){f(0,m(e))},scrollToBottom:function(e){e=m(e),h(e),f(e.horizontal?function(e){var t=e.data.containerElement;if(t&&t!==document&&t!==document.body)return t.scrollWidth-t.offsetWidth;var n=document.body,r=document.documentElement;return Math.max(n.scrollWidth,n.offsetWidth,r.clientWidth,r.scrollWidth,r.offsetWidth)}(e):function(e){var t=e.data.containerElement;if(t&&t!==document&&t!==document.body)return t.scrollHeight-t.offsetHeight;var n=document.body,r=document.documentElement;return Math.max(n.scrollHeight,n.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight)}(e),e)},scrollTo:function(e,t){f(e,m(t))},scrollMore:function(e,t){t=m(t),h(t);var n=t.horizontal?u(t):d(t);f(e+n,t)}}},8061:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5491),i=["mousedown","mousewheel","touchmove","keydown"];t.default={subscribe:function(e){return"undefined"!=typeof document&&i.forEach((function(t){return(0,r.addPassiveEventListener)(document,t,e)}))}}},5491:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.addPassiveEventListener=function(e,t,n){var r=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch(e){}return e}();e.addEventListener(t,n,!!r&&{passive:!0})},t.removePassiveEventListener=function(e,t,n){e.removeEventListener(t,n)}},7466:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=l(n(4639)),a=(l(n(1346)),l(n(6717))),s=l(n(7833));function l(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.childBindings={domNode:null},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),i(n,[{key:"componentDidMount",value:function(){if("undefined"==typeof window)return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(e){this.props.name!==e.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if("undefined"==typeof window)return!1;a.default.unregister(this.props.name)}},{key:"registerElems",value:function(e){a.default.register(e,this.childBindings.domNode)}},{key:"render",value:function(){return o.default.createElement(e,r({},this.props,{parentBindings:this.childBindings}))}}]),n}(o.default.Component);return t.propTypes={name:s.default.string,id:s.default.string},t}},9387:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={registered:{},scrollEvent:{register:function(e,t){n.registered[e]=t},remove:function(e){n.registered[e]=null}}};t.default=n},4803:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(5491);var r,i=n(1171),o=(r=i)&&r.__esModule?r:{default:r};var a={mountFlag:!1,initialized:!1,scroller:null,containers:{},mount:function(e){this.scroller=e,this.handleHashChange=this.handleHashChange.bind(this),window.addEventListener("hashchange",this.handleHashChange),this.initStateFromHash(),this.mountFlag=!0},mapContainer:function(e,t){this.containers[e]=t},isMounted:function(){return this.mountFlag},isInitialized:function(){return this.initialized},initStateFromHash:function(){var e=this,t=this.getHash();t?window.setTimeout((function(){e.scrollTo(t,!0),e.initialized=!0}),10):this.initialized=!0},scrollTo:function(e,t){var n=this.scroller;if(n.get(e)&&(t||e!==n.getActiveLink())){var r=this.containers[e]||document;n.scrollTo(e,{container:r})}},getHash:function(){return o.default.getHash()},changeHash:function(e,t){this.isInitialized()&&o.default.getHash()!==e&&o.default.updateHash(e,t)},handleHashChange:function(){this.scrollTo(this.getHash())},unmount:function(){this.scroller=null,this.containers=null,window.removeEventListener("hashchange",this.handleHashChange)}};t.default=a},2252:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=u(n(4639)),a=u(n(2753)),s=u(n(6717)),l=u(n(7833)),c=u(n(4803));function u(e){return e&&e.__esModule?e:{default:e}}var d={to:l.default.string.isRequired,containerId:l.default.string,container:l.default.object,activeClass:l.default.string,activeStyle:l.default.object,spy:l.default.bool,horizontal:l.default.bool,smooth:l.default.oneOfType([l.default.bool,l.default.string]),offset:l.default.number,delay:l.default.number,isDynamic:l.default.bool,onClick:l.default.func,duration:l.default.oneOfType([l.default.number,l.default.func]),absolute:l.default.bool,onSetActive:l.default.func,onSetInactive:l.default.func,ignoreCancelEvents:l.default.bool,hashSpy:l.default.bool,saveHashHistory:l.default.bool,spyThrottle:l.default.number};t.default=function(e,t){var n=t||s.default,l=function(t){function s(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,e));return u.call(t),t.state={active:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(s,t),i(s,[{key:"getScrollSpyContainer",value:function(){var e=this.props.containerId,t=this.props.container;return e&&!t?document.getElementById(e):t&&t.nodeType?t:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var e=this.getScrollSpyContainer();a.default.isMounted(e)||a.default.mount(e,this.props.spyThrottle),this.props.hashSpy&&(c.default.isMounted()||c.default.mount(n),c.default.mapContainer(this.props.to,e)),a.default.addSpyHandler(this.spyHandler,e),this.setState({container:e})}}},{key:"componentWillUnmount",value:function(){a.default.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var t="";t=this.state&&this.state.active?((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():this.props.className;var n={};n=this.state&&this.state.active?r({},this.props.style,this.props.activeStyle):r({},this.props.style);var i=r({},this.props);for(var a in d)i.hasOwnProperty(a)&&delete i[a];return i.className=t,i.style=n,i.onClick=this.handleClick,o.default.createElement(e,i)}}]),s}(o.default.PureComponent),u=function(){var e=this;this.scrollTo=function(t,i){n.scrollTo(t,r({},e.state,i))},this.handleClick=function(t){e.props.onClick&&e.props.onClick(t),t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),e.scrollTo(e.props.to,e.props)},this.spyHandler=function(t,r){var i=e.getScrollSpyContainer();if(!c.default.isMounted()||c.default.isInitialized()){var o=e.props.horizontal,a=e.props.to,s=null,l=void 0,u=void 0;if(o){var d=0,p=0,h=0;if(i.getBoundingClientRect)h=i.getBoundingClientRect().left;if(!s||e.props.isDynamic){if(!(s=n.get(a)))return;var f=s.getBoundingClientRect();p=(d=f.left-h+t)+f.width}var m=t-e.props.offset;l=m>=Math.floor(d)&&m<Math.floor(p),u=m<Math.floor(d)||m>=Math.floor(p)}else{var g=0,v=0,y=0;if(i.getBoundingClientRect)y=i.getBoundingClientRect().top;if(!s||e.props.isDynamic){if(!(s=n.get(a)))return;var b=s.getBoundingClientRect();v=(g=b.top-y+r)+b.height}var w=r-e.props.offset;l=w>=Math.floor(g)&&w<Math.floor(v),u=w<Math.floor(g)||w>=Math.floor(v)}var x=n.getActiveLink();if(u){if(a===x&&n.setActiveLink(void 0),e.props.hashSpy&&c.default.getHash()===a){var S=e.props.saveHashHistory,E=void 0!==S&&S;c.default.changeHash("",E)}e.props.spy&&e.state.active&&(e.setState({active:!1}),e.props.onSetInactive&&e.props.onSetInactive(a,s))}if(l&&(x!==a||!1===e.state.active)){n.setActiveLink(a);var T=e.props.saveHashHistory,P=void 0!==T&&T;e.props.hashSpy&&c.default.changeHash(a,P),e.props.spy&&(e.setState({active:!0}),e.props.onSetActive&&e.props.onSetActive(a,s))}}}};return l.propTypes=d,l.defaultProps={offset:0},l}},2753:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(7948),o=(r=i)&&r.__esModule?r:{default:r},a=n(5491);var s={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e,t){if(e){var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:66;return(0,o.default)(e,t)}((function(t){s.scrollHandler(e)}),t);s.scrollSpyContainers.push(e),(0,a.addPassiveEventListener)(e,"scroll",n)}},isMounted:function(e){return-1!==s.scrollSpyContainers.indexOf(e)},currentPositionX:function(e){if(e===document){var t=void 0!==window.pageYOffset,n="CSS1Compat"===(document.compatMode||"");return t?window.pageXOffset:n?document.documentElement.scrollLeft:document.body.scrollLeft}return e.scrollLeft},currentPositionY:function(e){if(e===document){var t=void 0!==window.pageXOffset,n="CSS1Compat"===(document.compatMode||"");return t?window.pageYOffset:n?document.documentElement.scrollTop:document.body.scrollTop}return e.scrollTop},scrollHandler:function(e){(s.scrollSpyContainers[s.scrollSpyContainers.indexOf(e)].spyCallbacks||[]).forEach((function(t){return t(s.currentPositionX(e),s.currentPositionY(e))}))},addStateHandler:function(e){s.spySetState.push(e)},addSpyHandler:function(e,t){var n=s.scrollSpyContainers[s.scrollSpyContainers.indexOf(t)];n.spyCallbacks||(n.spyCallbacks=[]),n.spyCallbacks.push(e),e(s.currentPositionX(t),s.currentPositionY(t))},updateStates:function(){s.spySetState.forEach((function(e){return e()}))},unmount:function(e,t){s.scrollSpyContainers.forEach((function(e){return e.spyCallbacks&&e.spyCallbacks.length&&e.spyCallbacks.indexOf(t)>-1&&e.spyCallbacks.splice(e.spyCallbacks.indexOf(t),1)})),s.spySetState&&s.spySetState.length&&s.spySetState.indexOf(e)>-1&&s.spySetState.splice(s.spySetState.indexOf(e),1),document.removeEventListener("scroll",s.scrollHandler)},update:function(){return s.scrollSpyContainers.forEach((function(e){return s.scrollHandler(e)}))}};t.default=s},6717:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=s(n(1171)),o=s(n(9421)),a=s(n(9387));function s(e){return e&&e.__esModule?e:{default:e}}var l={},c=void 0;t.default={unmount:function(){l={}},register:function(e,t){l[e]=t},unregister:function(e){delete l[e]},get:function(e){return l[e]||document.getElementById(e)||document.getElementsByName(e)[0]||document.getElementsByClassName(e)[0]},setActiveLink:function(e){return c=e},getActiveLink:function(){return c},scrollTo:function(e,t){var n=this.get(e);if(n){var s=(t=r({},t,{absolute:!1})).containerId,l=t.container,c=void 0;c=s?document.getElementById(s):l&&l.nodeType?l:document,t.absolute=!0;var u=t.horizontal,d=i.default.scrollOffset(c,n,u)+(t.offset||0);if(!t.smooth)return a.default.registered.begin&&a.default.registered.begin(e,n),c===document?t.horizontal?window.scrollTo(d,0):window.scrollTo(0,d):c.scrollTop=d,void(a.default.registered.end&&a.default.registered.end(e,n));o.default.animateTopScroll(d,t,e,n)}else console.warn("target Element not found")}}},9599:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={defaultEasing:function(e){return e<.5?Math.pow(2*e,2)/2:1-Math.pow(2*(1-e),2)/2},linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:(4-2*e)*e-1},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}}},1171:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){for(var n=e.offsetTop,r=e.offsetParent;r&&!t(r);)n+=r.offsetTop,r=r.offsetParent;return{offsetTop:n,offsetParent:r}};t.default={updateHash:function(e,t){var n=0===e.indexOf("#")?e.substring(1):e,r=n?"#"+n:"",i=window&&window.location,o=r?i.pathname+i.search+r:i.pathname+i.search;t?history.pushState(history.state,"",o):history.replaceState(history.state,"",o)},getHash:function(){return window.location.hash.replace(/^#/,"")},filterElementInContainer:function(e){return function(t){return e.contains?e!=t&&e.contains(t):!!(16&e.compareDocumentPosition(t))}},scrollOffset:function(e,t,r){if(r)return e===document?t.getBoundingClientRect().left+(window.scrollX||window.pageXOffset):"static"!==getComputedStyle(e).position?t.offsetLeft:t.offsetLeft-e.offsetLeft;if(e===document)return t.getBoundingClientRect().top+(window.scrollY||window.pageYOffset);if("static"!==getComputedStyle(e).position){if(t.offsetParent!==e){var i=n(t,(function(t){return t===e||t===document})),o=i.offsetTop;if(i.offsetParent!==e)throw new Error("Seems containerElement is not an ancestor of the Element");return o}return t.offsetTop}if(t.offsetParent===e.offsetParent)return t.offsetTop-e.offsetTop;var a=function(e){return e===document};return n(t,a).offsetTop-n(e,a).offsetTop}}},9209:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(5696)),o=n(6417);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,i.default)(e,(function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)})),n):n}},6417:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,r=/-([a-z])/g,i=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||i.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(a,l):e.replace(o,l)).replace(r,s))}},5696:(e,t,n)=>{var r=n(7892);function i(e,t){var n,i=null;if(!e||"string"!=typeof e)return i;for(var o,a,s=r(e),l="function"==typeof t,c=0,u=s.length;c<u;c++)o=(n=s[c]).property,a=n.value,l?t(o,a,n):a&&(i||(i={}),i[o]=a);return i}e.exports=i,e.exports.default=i},4460:(e,t,n)=>{"use strict";var r=n(4639);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,a=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,u=r[1];return s((function(){i.value=n,i.getSnapshot=t,c(i)&&u({inst:i})}),[e,n,t]),a((function(){return c(i)&&u({inst:i}),e((function(){c(i)&&u({inst:i})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},5535:(e,t,n)=>{"use strict";var r=n(4639),i=n(690);var o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=i.useSyncExternalStore,s=r.useRef,l=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=c((function(){function e(e){if(!l){if(l=!0,a=e,e=r(e),void 0!==i&&p.hasValue){var t=p.value;if(i(t,e))return s=t}return s=e}if(t=s,o(a,e))return t;var n=r(e);return void 0!==i&&i(t,n)?t:(a=e,s=n)}var a,s,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,r,i]);var h=a(e,d[0],d[1]);return l((function(){p.hasValue=!0,p.value=h}),[h]),u(h),h}},690:(e,t,n)=>{"use strict";e.exports=n(4460)},8736:(e,t,n)=>{"use strict";e.exports=n(5535)},8879:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(9564),i=n.n(r),o=n(4481),a=n.n(o)()(i());a.push([e.id,'.r6o-editor{top:0;left:0;margin-left:-19px}.a9s-annotationlayer{position:absolute;top:0;left:0;width:100%;height:100%;outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.a9s-annotationlayer.no-cursor,.a9s-annotationlayer.no-cursor *{cursor:none!important}.a9s-crosshair line{stroke-width:1px;stroke:#00000080;pointer-events:none;vector-effect:non-scaling-stroke;shape-rendering:crispEdges}.a9s-selection-mask{stroke:none;fill:transparent;pointer-events:none}.a9s-annotation rect,.a9s-annotation circle,.a9s-annotation ellipse,.a9s-annotation path,.a9s-annotation polygon,.a9s-annotation line,.a9s-selection rect,.a9s-selection circle,.a9s-selection ellipse,.a9s-selection path,.a9s-selection polygon,.a9s-selection line{fill:transparent;cursor:pointer;vector-effect:non-scaling-stroke}.a9s-annotation .a9s-inner,.a9s-selection .a9s-inner{stroke:#fff;stroke-width:1px;fill:transparent}.a9s-annotation .a9s-inner:hover,.a9s-selection .a9s-inner:hover{stroke:#fff000}.a9s-annotation .a9s-outer,.a9s-selection .a9s-outer{stroke:#000000b3;stroke-width:3px;fill:none}.a9s-annotation .a9s-formatter-el,.a9s-selection .a9s-formatter-el{overflow:visible}.a9s-annotation.a9s-point .a9s-inner{display:none}.a9s-annotation.a9s-point .a9s-outer{stroke:#5a5a5a;stroke-width:1.5px;fill:#ffffff80}.a9s-annotation.a9s-point .a9s-outer:hover{fill:#fff000}.a9s-annotation.selected .a9s-inner,.a9s-selection .a9s-inner{stroke:#fff000}.a9s-annotation.editable .a9s-inner{stroke:#fff000;cursor:move!important}.a9s-annotation.editable .a9s-inner:hover{fill:#fff0001a}.a9s-handle{cursor:move}.a9s-handle .a9s-handle-inner{stroke:#fff000;fill:#000}.a9s-handle .a9s-handle-outer{stroke:#000;fill:#fff}.a9s-handle:hover .a9s-handle-inner{fill:#fff000}.r6o-btn{background-color:#4483c4;border:1px solid #4483c4;box-sizing:border-box;color:#fff;cursor:pointer;display:inline-block;font-size:14px;margin:0;outline:none;text-decoration:none;white-space:nowrap;padding:6px 18px;min-width:70px;vertical-align:middle;-webkit-border-radius:2px;-khtml-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.r6o-btn *{vertical-align:middle;cursor:pointer}.r6o-btn .r6o-icon{margin-right:4px}.r6o-btn:disabled{border-color:#a3c2e2!important;background-color:#a3c2e2!important}.r6o-btn:hover{background-color:#4f92d7;border-color:#4f92d7}.r6o-btn.outline{border:1px solid #4483c4;color:#4483c4;background-color:transparent;text-shadow:none}.r6o-autocomplete{display:inline;position:relative}.r6o-autocomplete div[role=combobox]{display:inline}.r6o-autocomplete input{outline:none;border:none;width:80px;height:100%;line-height:14px;white-space:pre;box-sizing:border-box;background-color:transparent;font-size:14px;color:#3f3f3f}.r6o-autocomplete ul{position:absolute;margin:0;padding:0;list-style-type:none;background-color:#fff;border-radius:3px;border:1px solid #d6d7d9;box-sizing:border-box;box-shadow:0 0 20px #00000040}.r6o-autocomplete ul:empty{display:none}.r6o-autocomplete li{box-sizing:border-box;padding:2px 12px;width:100%;cursor:pointer}.r6o-editable-text{max-height:120px;overflow:auto;outline:none;min-height:2em;font-size:14px;font-family:Lato,sans-serif}.r6o-editable-text:empty:not(:focus):before{content:attr(data-placeholder);color:#c2c2c2}.r6o-widget.comment{font-size:14px;min-height:3em;background-color:#fff;position:relative}.r6o-widget.comment .r6o-editable-text,.r6o-widget.comment .r6o-readonly-comment{padding:10px;width:100%;box-sizing:border-box;outline:none;border:none;background-color:transparent;resize:none}.r6o-widget.comment .r6o-readonly-comment{white-space:pre-line}.r6o-widget.comment .r6o-editable-text::-webkit-input-placeholder{color:#c2c2c2}.r6o-widget.comment .r6o-editable-text::-moz-placeholder{color:#c2c2c2}.r6o-widget.comment .r6o-editable-text:-moz-placeholder{color:#c2c2c2}.r6o-widget.comment .r6o-editable-text:-ms-input-placeholder{color:#c2c2c2}.r6o-widget.comment .r6o-lastmodified{border:1px solid #e5e5e5;display:inline-block;border-radius:2px;margin:0 10px 8px;padding:4px 5px;line-height:100%;font-size:12px}.r6o-widget.comment .r6o-lastmodified .r6o-lastmodified-at{color:#757575;padding-left:3px}.r6o-widget.comment .r6o-arrow-down{position:absolute;height:20px;width:20px;top:9px;right:9px;line-height:22px;background-color:#fff;text-align:center;-webkit-font-smoothing:antialiased;border:1px solid #e5e5e5;cursor:pointer;-webkit-border-radius:1px;-khtml-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.r6o-widget.comment .r6o-arrow-down.r6o-menu-open{border-color:#4483c4}.r6o-widget.comment .r6o-comment-dropdown-menu{position:absolute;top:32px;right:8px;background-color:#fff;border:1px solid #e5e5e5;list-style-type:none;margin:0;padding:5px 0;z-index:9999;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.2);-moz-box-shadow:0 2px 4px rgba(0,0,0,.2);box-shadow:0 2px 4px #0003}.r6o-widget.comment .r6o-comment-dropdown-menu li{padding:0 15px;cursor:pointer}.r6o-widget.comment .r6o-comment-dropdown-menu li:hover{background-color:#ecf0f1}.r6o-widget.comment .r6o-purposedropdown{position:relative;z-index:2}.r6o-widget.comment.editable{background-color:#ecf0f1}.r6o-widget.r6o-tag:empty{display:none}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.r6o-widget.tag .r6o-taglist li{height:27px}.r6o-widget.tag .r6o-taglist li .r6o-delete-wrapper .r6o-delete{position:relative;top:-4px}}.r6o-widget.r6o-tag{background-color:#ecf0f1;border-bottom:1px solid #e5e5e5;padding:1px 3px;display:flex}.r6o-widget.r6o-tag ul{margin:0;padding:0;list-style-type:none;z-index:1}.r6o-widget.r6o-tag ul.r6o-taglist{flex:0;white-space:nowrap}.r6o-widget.r6o-tag ul.r6o-taglist li{display:inline-block;margin:1px 1px 1px 0;padding:0;vertical-align:middle;overflow:hidden;font-size:12px;background-color:#fff;border:1px solid #d6d7d9;cursor:pointer;position:relative;line-height:180%;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-border-radius:2px;-khtml-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 0 4px rgba(0,0,0,.1);-moz-box-shadow:0 0 4px rgba(0,0,0,.1);box-shadow:0 0 4px #0000001a}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-label{padding:2px 8px;display:inline-block}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-wrapper{display:inline-block;padding:2px 0;color:#fff;width:0;height:100%;background-color:#4483c4;-webkit-border-top-right-radius:2px;-webkit-border-bottom-right-radius:2px;-khtml-border-radius-topright:2px;-khtml-border-radius-bottomright:2px;-moz-border-radius-topright:2px;-moz-border-radius-bottomright:2px;border-top-right-radius:2px;border-bottom-right-radius:2px}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-wrapper .r6o-delete{padding:2px 6px}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-wrapper svg{vertical-align:text-top}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-enter-active{width:24px;transition:width .2s}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-enter-done,.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-exit{width:24px}.r6o-widget.r6o-tag ul.r6o-taglist li .r6o-delete-exit-active{width:0;transition:width .2s}.r6o-widget.r6o-tag .r6o-autocomplete{flex:1;position:relative}.r6o-widget.r6o-tag .r6o-autocomplete li{font-size:14px}.r6o-widget.r6o-tag input{width:100%;padding:0 3px;min-width:80px;outline:none;border:none;line-height:170%;background-color:transparent;color:#3f3f3f}.r6o-widget.r6o-tag input::-webkit-input-placeholder{color:#c2c2c2}.r6o-widget.r6o-tag input::-moz-placeholder{color:#c2c2c2}.r6o-widget.r6o-tag input:-moz-placeholder{color:#c2c2c2}.r6o-widget.r6o-tag input:-ms-input-placeholder{color:#c2c2c2}.r6o-editor{position:absolute;z-index:99999;width:400px;color:#3f3f3f;opacity:0;font-family:Lato,sans-serif;font-size:17px;line-height:27px;-webkit-transition:opacity .2s ease-in;-moz-transition:opacity .2s ease-in;transition:opacity .2s ease-in}.r6o-editor .r6o-arrow{position:absolute;overflow:hidden;top:-12px;left:12px;width:28px;height:12px;display:none}.r6o-editor .r6o-arrow:after{content:"";position:absolute;top:5px;left:5px;width:18px;height:18px;background-color:#fff;-webkit-backface-visibility:hidden;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.r6o-editor .r6o-editor-inner{background-color:#fff;-webkit-border-radius:2px;-khtml-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-webkit-box-shadow:2px 2px 42px rgba(0,0,0,.4);-moz-box-shadow:2px 2px 42px rgba(0,0,0,.4);box-shadow:2px 2px 42px #0006}.r6o-editor .r6o-editor-inner .r6o-widget:first-child{-webkit-border-top-left-radius:2px;-webkit-border-top-right-radius:2px;-khtml-border-radius-topleft:2px;-khtml-border-radius-topright:2px;-moz-border-radius-topleft:2px;-moz-border-radius-topright:2px;border-top-left-radius:2px;border-top-right-radius:2px}.r6o-editor .r6o-editor-inner .r6o-widget{border-bottom:1px solid #e5e5e5}.r6o-editor .r6o-footer{position:relative;text-align:right;padding:8px 0}.r6o-editor .r6o-footer .r6o-btn{margin-right:8px}.r6o-editor .r6o-footer .r6o-btn.delete-annotation{position:absolute;top:7px;left:7px;background-color:transparent;border:none;color:#4483c4;width:32px;height:32px;min-width:0;border-radius:100%;padding:0;display:flex;justify-content:center;align-items:center;-webkit-transition:all .1s ease-in;-moz-transition:all .1s ease-in;-o-transition:all .1s ease-in;transition:all .1s ease-in}.r6o-editor .r6o-footer .r6o-btn.delete-annotation:hover{color:#fff;background-color:#ef352c}@media (max-width: 640px){.r6o-editor{width:260px}}.r6o-editor.r6o-arrow-top .r6o-arrow{display:block}.r6o-editor.r6o-arrow-right{margin-left:8px}.r6o-editor.r6o-arrow-right .r6o-arrow{left:auto;right:12px}.r6o-editor.r6o-arrow-bottom .r6o-arrow{display:block;top:auto;bottom:-12px}.r6o-editor.r6o-arrow-bottom .r6o-arrow:after{top:-11px;box-shadow:none}.r6o-editor.pushed .r6o-arrow,.r6o-editor.dragged .r6o-arrow{display:none}.r6o-editor .r6o-draggable{cursor:move}.r6o-purposedropdown{width:150px;display:inline-block}.r6o-noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.a9s-annotation.hover .a9s-inner{stroke:#fff000}.a9s-annotation:not(.hover):hover .a9s-inner{stroke:#fff}.a9s-osd-crosshair-container{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;pointer-events:none}\n',""]);const s=a},5369:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(9564),i=n.n(r),o=n(4481),a=n.n(o),s=n(9924),l=n.n(s),c=new URL(n(4966),n.b),u=a()(i());u.push([e.id,"@import url(https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css);"]),u.push([e.id,"@import url(https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Martel+Sans:wght@200&family=Martel:wght@400;700&family=Taviraj:wght@300;500&display=swap);"]),u.push([e.id,"@import url(https://fonts.googleapis.com/icon?family=Material+Icons);"]),u.push([e.id,"@import url(https://use.fontawesome.com/releases/v5.0.8/css/all.css);"]);var d=l()(c);u.push([e.id,".editioncrafter *{box-sizing:border-box}.editioncrafter div{width:auto}.editioncrafter body{padding:0;margin:0;box-sizing:border-box}.editioncrafter .warning{color:#ff0}.editioncrafter .fa{width:max(1.5rem,24px);padding:max(.2rem,3.2px) max(.1rem,1.6px) max(.1rem,1.6px);text-align:center}.editioncrafter .fa.active{background-color:rgba(158,158,158,.0392156863);border:max(.2rem,3.2px) solid #ff9800}.editioncrafter .fa-book.active{border-radius:0 max(2rem,32px) max(2rem,32px) 0}.editioncrafter .fa:not(.active){color:gray}.editioncrafter .fa.fa-lock,.editioncrafter .fa.fa-lock-open{border-radius:max(2rem,32px) 0 0 max(2rem,32px)}.editioncrafter .line-clamp{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:3}.editioncrafter .line-clamp.two-lines{-webkit-line-clamp:2}.editioncrafter .flex-parent{display:flex}.editioncrafter .flex-parent.half-width{width:50%}.editioncrafter .flex-parent.full-width{width:100%}.editioncrafter .flex-parent.column{flex-direction:column}.editioncrafter .flex-parent.jc-start{justify-content:flex-start}.editioncrafter .flex-parent.jc-center{justify-content:center}.editioncrafter .flex-parent.jc-end{justify-content:flex-end}.editioncrafter .flex-parent.jc-space-btw{justify-content:space-between}.editioncrafter .flex-parent.jc-space-around{justify-content:space-around}.editioncrafter .flex-parent.ai-start{align-items:flex-start}.editioncrafter .flex-parent.ai-center{align-items:center}.editioncrafter .flex-parent.ai-end{align-items:flex-end}.editioncrafter .flex-parent.wrap{flex-wrap:wrap}.editioncrafter .flex-parent.row-reverse{flex-direction:row-reverse}.editioncrafter .flex-parent.column-reverse{flex-direction:column-reverse}.editioncrafter .flex-parent .flex-1{flex:1}.editioncrafter .flex-parent .flex-2{flex:2}.editioncrafter .flex-parent .flex-3{flex:3}.editioncrafter .flex-parent .flex-4{flex:4}.editioncrafter .flex-parent .flex-5{flex:5}.editioncrafter .flex-parent .flex-6{flex:6}.editioncrafter .flex-parent .flex-7{flex:7}.editioncrafter .flex-parent .flex-8{flex:8}.editioncrafter .flex-parent .flex-9{flex:9}.editioncrafter .flex-parent .flex-10{flex:10}.editioncrafter .flex-parent .flex-11{flex:11}.editioncrafter .flex-parent .flex-12{flex:12}.editioncrafter .bg-maroon-gradient{background-image:linear-gradient(to right, #792421, #66211c, #531d17, #411912, #30140d)}.editioncrafter .bg-dark-gradient-bt{background-image:linear-gradient(to bottom, hsl(30, 50%, 90%), hsl(50, 43%, 83%), hsl(43, 54%, 77%))}.editioncrafter .bg-dark-gradient-tb{background-image:linear-gradient(to bottom, hsl(43, 54%, 77%), hsl(50, 43%, 83%), hsl(30, 50%, 90%))}.editioncrafter .bg-light-gradient-bt{background-image:linear-gradient(to bottom, hsl(30, 50%, 99%), hsl(50, 43%, 90%), hsl(43, 54%, 85%))}.editioncrafter .bg-light-gradient-tb{background-image:linear-gradient(to bottom, hsl(43, 54%, 85%), hsl(50, 43%, 90%), hsl(30, 50%, 99%))}.editioncrafter .accent-bar{height:10px;width:100%}.editioncrafter .invisible{opacity:0}.editioncrafter .disabled{opacity:.5}.editioncrafter .figure-dialog-img-container img{display:block;width:100%;height:auto}.editioncrafter a:hover{text-decoration:underline}.editioncrafter a{color:#792421;text-decoration:none}@-webkit-keyframes slide-down{0%{height:2px;bottom:-5px}100%{height:6px;bottom:-9px}}@-moz-keyframes slide-down{0%{height:2px;bottom:-5px}100%{height:6px;bottom:-9px}}@-ms-keyframes slide-down{0%{height:2px;bottom:-5px}100%{height:6px;bottom:-9px}}@-o-keyframes slide-down{0%{height:2px;bottom:-5px}100%{height:6px;bottom:-9px}}@keyframes slide-down{0%{height:2px;bottom:-5px}100%{height:6px;bottom:-9px}}.editioncrafter #globalNavigation{display:flex;align-items:center;flex-direction:row-reverse;font-size:max(.9rem,14.4px);position:relative;top:min(-4rem,-64px);right:max(2rem,32px);float:right}@container diplomatic (min-width: 960px){.editioncrafter #globalNavigation{display:block}}.editioncrafter #globalNavigation .expandedViewOnly span,.editioncrafter #globalNavigation .expandedViewOnly a{color:#fff;margin-left:max(1rem,16px);cursor:pointer}.editioncrafter #globalNavigation span .francais{font-weight:100}.editioncrafter #globalNavigation input{height:max(1.5rem,24px);padding:0 0 0 max(.5rem,8px);font-style:italic;border:1px solid rgba(0,0,0,.3882352941);color:#756c6c;background-color:#d8d8d8}.editioncrafter #loadingStateModal{position:fixed;z-index:9000;background-color:rgba(0,0,0,.48);width:100vw;height:100vh}.editioncrafter .spinner{width:100%;height:100%;margin:calc(50vh - (max(1rem, 16px)/2)) auto 0 auto;text-align:center}.editioncrafter .spinner>div{width:max(1rem,16px);height:max(1rem,16px);background-color:#fff;border-radius:100%;display:inline-block;-webkit-animation:sk-bouncedelay 1.4s infinite ease-in-out both;animation:sk-bouncedelay 1.4s infinite ease-in-out both}.editioncrafter .spinner .bounce1{-webkit-animation-delay:-0.32s;animation-delay:-0.32s}.editioncrafter .spinner .bounce2{-webkit-animation-delay:-0.16s;animation-delay:-0.16s}@-webkit-keyframes sk-bouncedelay{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes sk-bouncedelay{0%,100%,80%{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}.editioncrafter figure{padding:max(.3rem,4.8px) 0 0;border-radius:max(.2rem,3.2px);margin:0;text-align:center}.editioncrafter figure.current{background-color:rgba(7,122,255,.831)}.editioncrafter .thumbnail-caption.current{color:rgba(7,122,255,.831) !important;font-weight:900}.editioncrafter .watermarkContainer .navigationComponent{position:absolute}.editioncrafter .watermark{width:100%;height:100%;margin:calc(50% - (max(10rem, 160px)/2)) auto 0 auto}.editioncrafter .transcriptContent .watermark{margin:calc(50% - 12.5rem) auto 0 auto}.editioncrafter .watermark_contents{width:max(10rem,160px);height:max(10rem,160px);background-image:url("+d+');background-size:100%;background-repeat:no-repeat;margin:auto auto auto auto}.editioncrafter .third_pane_blank{min-width:8px}.editioncrafter .navigationComponent{position:sticky;display:none;z-index:2;height:48px;width:100%;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:4px;background-color:#fff;border-radius:max(.3rem,4.8px)}.editioncrafter .navigationComponent #tool-bar-buttons{font-size:15px}@container diplomatic (min-width: 600px){.editioncrafter .navigationComponent{top:80px}}@container diplomatic (min-width: 960px){.editioncrafter .navigationComponent{top:0;left:0;display:flex}}.editioncrafter .navigationComponent button{cursor:pointer}.editioncrafter .navigationComponentNarrow{display:flex;width:auto;z-index:2;height:48px;width:100%;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:4px;background-color:#fff}.editioncrafter .navigationComponentNarrow #tool-bar-buttons{font-size:15px}@container diplomatic (min-width: 960px){.editioncrafter .navigationComponentNarrow{display:none}}.editioncrafter .navigationComponentNarrow button{cursor:pointer}.editioncrafter .navigationRow{display:none;justify-content:space-between;align-items:center;gap:10px;width:100%;padding:12px 10px 12px 10px}@container diplomatic (min-width: 960px){.editioncrafter .navigationRow{display:flex}}.editioncrafter .navigationRowNarrow{display:flex;justify-content:space-between;align-items:center;gap:10px;width:100%;padding:6px 5px 6px 5px}@container diplomatic (min-width: 960px){.editioncrafter .navigationRowNarrow{display:none}}.editioncrafter .helpIcon{display:inline-block;margin-top:6px;margin-right:16px}@container diplomatic (min-width: 960px){.editioncrafter .helpIcon{display:block}}.editioncrafter .dropdownV2{width:150px;margin-right:10px}.editioncrafter .imageViewComponent .navigationComponent{background-color:#4a4a4a;border-radius:max(.3rem,4.8px);opacity:.8}@container diplomatic (min-width: 960px){.editioncrafter .imageViewComponent .navigationComponent{background-color:#000;color:#fff;border-radius:0;opacity:1}}.editioncrafter .imageViewComponent .navigationComponentNarrow{background-color:#000;color:#fff;border-radius:0;opacity:1}.editioncrafter .transcriptionViewComponent .navigationComponent{background-color:#fff;color:#000}.editioncrafter #doc-type-help:after{color:#978e8e}.editioncrafter #doc-type-help .dark .MuiSvgIcon-root.MuiSelect-icon{color:#fff}.editioncrafter .breadcrumbs{overflow-x:hidden;display:hidden;align-items:baseline;max-width:70%}@container diplomatic (min-width: 960px){.editioncrafter .breadcrumbs{display:flex}}.editioncrafter .breadcrumbsNarrow{overflow-x:hidden;display:flex;align-items:baseline;max-width:70%}@container diplomatic (min-width: 960px){.editioncrafter .breadcrumbsNarrow{display:none}}.editioncrafter .breadcrumbs .folioName,.editioncrafter .breadcrumbsNarrow .folioName{display:inline;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:900;text-decoration:underline}.editioncrafter .closeX{float:right;padding:3px;font-style:bold}.editioncrafter .closeX:hover{cursor:pointer}.editioncrafter .helpContainer .MuiListItem-root{display:flex;gap:10px}.editioncrafter .helpContainer{padding:12px;width:335px;height:min(600px,100vh - 40px);position:relative;top:40px;overflow-x:auto}.editioncrafter .helpContainer .readingGuide td{padding:8px}.editioncrafter .helpContainer .readingGuide h2{margin-top:16px;margin-bottom:10px}.editioncrafter .searchHelpContainer{padding:10px 15px 10px 0;width:335px}.editioncrafter .helpHeader{text-align:center}.editioncrafter .paginationComponent{white-space:nowrap;text-align:center;font-size:max(1.2rem,19.2px);font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-top:52px}@container diplomatic (min-width: 960px){.editioncrafter .paginationComponent{margin-bottom:0}}.editioncrafter .paginationComponent.bottom{margin-top:0}.editioncrafter .paginationControl{padding:16px}.editioncrafter .paginationControl .arrow{font-size:max(1.8rem,28.8px);color:#4a4a4a;margin:max(1rem,16px) max(1rem,16px) 0;cursor:pointer;display:inline-block}.editioncrafter .arrow svg{font-size:inherit !important}.editioncrafter .paginationControl .folioName{position:relative;top:min(-0.2rem,-3.2px);color:#4a4a4a}#diplomatic.editioncrafter{container-type:inline-size;container-name:diplomatic}#diplomatic.editioncrafter #content-view h1,#diplomatic.editioncrafter #content-view h2,#diplomatic.editioncrafter #content-view h3,#diplomatic.editioncrafter #content-view h4,#diplomatic.editioncrafter .header-wrapper h1,#diplomatic.editioncrafter .header-wrapper h2,#diplomatic.editioncrafter .header-wrapper h3,#diplomatic.editioncrafter .header-wrapper h4,#diplomatic.editioncrafter #entry-list-view h1,#diplomatic.editioncrafter #entry-list-view h2,#diplomatic.editioncrafter #entry-list-view h3,#diplomatic.editioncrafter #entry-list-view h4,#diplomatic.editioncrafter #annotation-list-view h1,#diplomatic.editioncrafter #annotation-list-view h2,#diplomatic.editioncrafter #annotation-list-view h3,#diplomatic.editioncrafter #annotation-list-view h4{font-family:"Lato",sans-serif;color:#000;padding:0;margin:0}#diplomatic.editioncrafter #content-view h1,#diplomatic.editioncrafter .header-wrapper h1,#diplomatic.editioncrafter #entry-list-view h1,#diplomatic.editioncrafter #annotation-list-view h1{font-family:"Taviraj",serif;font-size:32px}#diplomatic.editioncrafter #content-view h2,#diplomatic.editioncrafter #content-view h3,#diplomatic.editioncrafter .header-wrapper h2,#diplomatic.editioncrafter .header-wrapper h3,#diplomatic.editioncrafter #entry-list-view h2,#diplomatic.editioncrafter #entry-list-view h3,#diplomatic.editioncrafter #annotation-list-view h2,#diplomatic.editioncrafter #annotation-list-view h3{font-weight:700}#diplomatic.editioncrafter #content-view h2,#diplomatic.editioncrafter .header-wrapper h2,#diplomatic.editioncrafter #entry-list-view h2,#diplomatic.editioncrafter #annotation-list-view h2{font-size:22px}#diplomatic.editioncrafter #content-view h3,#diplomatic.editioncrafter .header-wrapper h3,#diplomatic.editioncrafter #entry-list-view h3,#diplomatic.editioncrafter #annotation-list-view h3{font-size:18px}#diplomatic.editioncrafter #content-view h4,#diplomatic.editioncrafter .header-wrapper h4,#diplomatic.editioncrafter #entry-list-view h4,#diplomatic.editioncrafter #annotation-list-view h4{font-size:18px;font-weight:700}#diplomatic.editioncrafter #content-view p,#diplomatic.editioncrafter .header-wrapper p,#diplomatic.editioncrafter #entry-list-view p,#diplomatic.editioncrafter #annotation-list-view p{font-family:"Martel",serif;line-height:1.25}#diplomatic.editioncrafter #content-view span,#diplomatic.editioncrafter .header-wrapper span,#diplomatic.editioncrafter #entry-list-view span,#diplomatic.editioncrafter #annotation-list-view span{font-family:"Martel",serif;line-height:1.25;margin:0}#diplomatic.editioncrafter #content-view a.MuiButton-containedPrimary.cta-button,#diplomatic.editioncrafter .header-wrapper a.MuiButton-containedPrimary.cta-button,#diplomatic.editioncrafter #entry-list-view a.MuiButton-containedPrimary.cta-button,#diplomatic.editioncrafter #annotation-list-view a.MuiButton-containedPrimary.cta-button{color:#fff;padding:10px 70px;border-radius:0}#diplomatic.editioncrafter #content-view a.MuiButton-containedPrimary.cta-button .MuiButton-label span,#diplomatic.editioncrafter .header-wrapper a.MuiButton-containedPrimary.cta-button .MuiButton-label span,#diplomatic.editioncrafter #entry-list-view a.MuiButton-containedPrimary.cta-button .MuiButton-label span,#diplomatic.editioncrafter #annotation-list-view a.MuiButton-containedPrimary.cta-button .MuiButton-label span{font-family:"Lato",sans-serif;font-size:20px}#diplomatic.editioncrafter #content-view a,#diplomatic.editioncrafter .header-wrapper a,#diplomatic.editioncrafter #entry-list-view a,#diplomatic.editioncrafter #annotation-list-view a{color:#792421}#diplomatic.editioncrafter #content-view a:hover,#diplomatic.editioncrafter .header-wrapper a:hover,#diplomatic.editioncrafter #entry-list-view a:hover,#diplomatic.editioncrafter #annotation-list-view a:hover{color:#cba374}#diplomatic.editioncrafter #content-view .cta-link.MuiLink-underlineHover:hover,#diplomatic.editioncrafter .header-wrapper .cta-link.MuiLink-underlineHover:hover,#diplomatic.editioncrafter #entry-list-view .cta-link.MuiLink-underlineHover:hover,#diplomatic.editioncrafter #annotation-list-view .cta-link.MuiLink-underlineHover:hover{text-decoration:none}#diplomatic.editioncrafter #content-view a.cta-link,#diplomatic.editioncrafter .header-wrapper a.cta-link,#diplomatic.editioncrafter #entry-list-view a.cta-link,#diplomatic.editioncrafter #annotation-list-view a.cta-link{color:#000;text-align:center;width:fit-content;text-decoration:none;font-family:"Lato",sans-serif;font-size:16px;font-weight:700;position:relative;cursor:pointer;margin-bottom:5px}@container diplomatic (min-width: 960px){#diplomatic.editioncrafter #content-view a.cta-link,#diplomatic.editioncrafter .header-wrapper a.cta-link,#diplomatic.editioncrafter #entry-list-view a.cta-link,#diplomatic.editioncrafter #annotation-list-view a.cta-link{font-size:18px}}#diplomatic.editioncrafter #content-view a.cta-link.with-icon:after,#diplomatic.editioncrafter .header-wrapper a.cta-link.with-icon:after,#diplomatic.editioncrafter #entry-list-view a.cta-link.with-icon:after,#diplomatic.editioncrafter #annotation-list-view a.cta-link.with-icon:after{font-family:"Font Awesome 5 Free";margin-left:7px;font-weight:600;content:"";font-size:15px}#diplomatic.editioncrafter #content-view a.cta-link:before,#diplomatic.editioncrafter .header-wrapper a.cta-link:before,#diplomatic.editioncrafter #entry-list-view a.cta-link:before,#diplomatic.editioncrafter #annotation-list-view a.cta-link:before{position:absolute;content:"";height:2px;background-color:#000;width:50%;right:30%;bottom:-5px;border-radius:2px}#diplomatic.editioncrafter #content-view a.cta-link:hover:before,#diplomatic.editioncrafter .header-wrapper a.cta-link:hover:before,#diplomatic.editioncrafter #entry-list-view a.cta-link:hover:before,#diplomatic.editioncrafter #annotation-list-view a.cta-link:hover:before{background-color:#792421;text-decoration:none;height:6px;bottom:-9px;-webkit-animation:slide-down .2s;-moz-animation:slide-down .2s;-ms-animation:slide-down .2s;-o-animation:slide-down .2s;animation:slide-down .2s}#diplomatic.editioncrafter #content-view a.cta-link:hover:after,#diplomatic.editioncrafter .header-wrapper a.cta-link:hover:after,#diplomatic.editioncrafter #entry-list-view a.cta-link:hover:after,#diplomatic.editioncrafter #annotation-list-view a.cta-link:hover:after{color:#792421}#diplomatic.editioncrafter #content-view a.cta-link.active:before,#diplomatic.editioncrafter .header-wrapper a.cta-link.active:before,#diplomatic.editioncrafter #entry-list-view a.cta-link.active:before,#diplomatic.editioncrafter #annotation-list-view a.cta-link.active:before{background-color:#792421;text-decoration:none;height:6px;bottom:-9px;-webkit-animation:slide-down .2s;-moz-animation:slide-down .2s;-ms-animation:slide-down .2s;-o-animation:slide-down .2s;animation:slide-down .2s}#diplomatic.editioncrafter #content-view a.cta-link.active:after,#diplomatic.editioncrafter .header-wrapper a.cta-link.active:after,#diplomatic.editioncrafter #entry-list-view a.cta-link.active:after,#diplomatic.editioncrafter #annotation-list-view a.cta-link.active:after{color:#792421}#diplomatic.editioncrafter #content-view a.cta-link.light,#diplomatic.editioncrafter .header-wrapper a.cta-link.light,#diplomatic.editioncrafter #entry-list-view a.cta-link.light,#diplomatic.editioncrafter #annotation-list-view a.cta-link.light{color:#444}#diplomatic.editioncrafter #content-view a.cta-link.light:before,#diplomatic.editioncrafter .header-wrapper a.cta-link.light:before,#diplomatic.editioncrafter #entry-list-view a.cta-link.light:before,#diplomatic.editioncrafter #annotation-list-view a.cta-link.light:before{background-color:#444}#diplomatic.editioncrafter #content-view a.cta-link.light:hover:before,#diplomatic.editioncrafter .header-wrapper a.cta-link.light:hover:before,#diplomatic.editioncrafter #entry-list-view a.cta-link.light:hover:before,#diplomatic.editioncrafter #annotation-list-view a.cta-link.light:hover:before{background-color:#792421}#diplomatic.editioncrafter #content-view a.cta-link.video-link:after,#diplomatic.editioncrafter .header-wrapper a.cta-link.video-link:after,#diplomatic.editioncrafter #entry-list-view a.cta-link.video-link:after,#diplomatic.editioncrafter #annotation-list-view a.cta-link.video-link:after{content:"";font-size:12px;margin-bottom:-2px}#diplomatic.editioncrafter #content-view a.cta-link.search-link:after,#diplomatic.editioncrafter .header-wrapper a.cta-link.search-link:after,#diplomatic.editioncrafter #entry-list-view a.cta-link.search-link:after,#diplomatic.editioncrafter #annotation-list-view a.cta-link.search-link:after{font-family:"Material Icons";content:"search";font-size:16px}#diplomatic.editioncrafter #header{width:100%;padding:0px 20px;background-color:#fff;border-radius:0}@container diplomatic (min-width: 1280px){#diplomatic.editioncrafter #header{padding:5px 50px}}#diplomatic.editioncrafter #header img{width:210px}@container diplomatic (min-width: 600px){#diplomatic.editioncrafter #header img{width:300px}}@container diplomatic (min-width: 960px){#diplomatic.editioncrafter #header img{width:300px}}#diplomatic.editioncrafter #header .expandedViewOnly{width:100%}#diplomatic.editioncrafter #header .nav-item{font-size:16px;margin-right:5px;white-space:nowrap;margin-bottom:15px}#diplomatic.editioncrafter #header .search-btn{margin-bottom:10px;font-size:18px}#diplomatic.editioncrafter .maroon-dropdown{background-color:#460c0a;border-radius:0;-webkit-box-shadow:inset 0 5px 5px -5px rgba(0,0,0,.8),0 5px 5px -5px rgba(0,0,0,.8);-moz-box-shadow:inset 0 5px 5px -5px rgba(0,0,0,.8),0 5px 5px -5px rgba(0,0,0,.8);box-shadow:inset 0 5px 5px -5px rgba(0,0,0,.8),0 5px 5px -5px rgba(0,0,0,.8)}#diplomatic.editioncrafter .mobile-menu{padding:50px 0}#diplomatic.editioncrafter .mobile-menu .list-container{position:relative}#diplomatic.editioncrafter .mobile-menu .list-container .list{color:"white"}#diplomatic.editioncrafter .search-bar{height:162px}#diplomatic.editioncrafter .search-bar .label{font-size:32px;color:#fff;font-weight:400;white-space:nowrap}#diplomatic.editioncrafter .search-bar .content{width:50%}#diplomatic.editioncrafter .search-bar #search input{border:1px solid #dededf;border-radius:4px;width:300px;height:38px;font-size:14px;padding:5px 15px;font-family:"Lato",sans-serif}#diplomatic.editioncrafter.sticky .header-wrapper.sticky{position:sticky;top:0;z-index:2}#diplomatic.editioncrafter #footer{color:#fff;background-color:#460c0a;display:flex;flex-direction:column;padding:10px 20px}@container diplomatic (min-width: 600px){#diplomatic.editioncrafter #footer{padding:20px 30px}}@container diplomatic (min-width: 960px){#diplomatic.editioncrafter #footer{padding:30px 40px}}#diplomatic.editioncrafter #footer p,#diplomatic.editioncrafter #footer a{font-family:"Lato",sans-serif;font-size:16px;color:#fafafa;line-height:1.5;margin:0}#diplomatic.editioncrafter #footer a:hover{color:#cba374;fill:#cba374}#diplomatic.editioncrafter #footer .top{margin-bottom:10px}#diplomatic.editioncrafter #footer .top p{margin:0 5px;white-space:nowrap}#diplomatic.editioncrafter #footer .doi{text-align:center}#diplomatic.editioncrafter #footer .copyright .symbols{text-decoration:none}#diplomatic.editioncrafter #footer .copyright svg{width:14px;height:14px}#diplomatic.editioncrafter #footer .logos{margin-bottom:10px}#diplomatic.editioncrafter #footer .logos img{width:150px}@container diplomatic (min-width: 600px){#diplomatic.editioncrafter #footer .logos img{width:200px}}@container diplomatic (min-width: 600px){#diplomatic.editioncrafter #footer .logos img{width:250px}}#diplomatic.editioncrafter #footer .footer-links{width:100%;text-align:center;font-size:12px;line-height:2}#diplomatic.editioncrafter{background:#fff;width:auto;height:min(100%,100dvh);overflow-y:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:"OpenSans",sans-serif;font-size:max(.9rem,14.4px)}#diplomatic.editioncrafter #content{line-height:max(1.2rem,19.2px)}#diplomatic.editioncrafter h1,#diplomatic.editioncrafter h2,#diplomatic.editioncrafter h3,#diplomatic.editioncrafter h4{color:rgba(0,0,0,.7215686275);font-family:"OpenSans",sans-serif;font-weight:700;padding:0;line-height:max(1.5rem,24px)}.editioncrafter .imageGridComponent{background-color:#000;font-size:max(.8rem,12.8px);overflow:scroll;height:100%;max-height:100dvh}.editioncrafter .imageGridComponent .thumbnail{background-color:inherit;border:none}.editioncrafter .imageGridComponent>ul{display:flex;flex-wrap:wrap;list-style:none;padding-left:0;margin:max(1.5rem,24px) 0 max(8rem,128px) max(2rem,32px)}.editioncrafter .imageGridComponent>ul>li{margin-bottom:20px;width:150px}.editioncrafter .imageGridComponent>ul>li>figure{margin:8px}.editioncrafter .imageGridComponent>ul>li>figure:hover{border:2px #eee solid;margin:6px}.editioncrafter .imageGridComponent>ul>li>.thumbnail-caption{text-align:center;color:#fff;margin:0 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.editioncrafter .hidden{display:none}.editioncrafter .imageGridComponent .imageGridToolbar{padding:5px;color:#fff}.editioncrafter .imageGridComponent .imageGridToolbar .jump-to{float:right;display:"inline";margin-right:30px}.editioncrafter .imageGridComponent .imageGridToolbar .jump-to #jump-to-input{margin-left:5px}.editioncrafter .imageGridComponent .imageGridToolbar .jump-to #jump-to-button{margin-left:5px;cursor:pointer}.editioncrafter .imageGridComponent .imageGridToolbar .doc-select{display:inline;margin-left:30px;font-size:max(.8rem,12.8px)}.editioncrafter .imageGridComponent .imageGridToolbar .doc-select .MuiInputBase-root{font-size:max(.8rem,12.8px)}.editioncrafter .split-pane-view{height:100%;width:100%;display:grid}.editioncrafter .split-pane-view.two-pane{grid-template-areas:"image_viewer divider transcription"}.editioncrafter .split-pane-view.three-pane{grid-template-areas:"image_viewer divider transcription divider_two third_pane"}.editioncrafter .split-pane-view>.divider{z-index:2;width:max(1rem,16px);background:#bbb;cursor:ew-resize;display:flex}.editioncrafter .split-pane-view>.divider.first_divider{grid-area:divider}.editioncrafter .split-pane-view>.divider.second_divider{grid-area:divider_two}.editioncrafter .split-pane-view>.divider>.drawer-button{align-self:center;cursor:auto}.editioncrafter .split-pane-view>.divider>.drawer-button:hover{color:#fff}.editioncrafter .split-pane-view>.divider>.hidden{display:none}.editioncrafter .split-pane-view #annotation-view{font-size:16px}.editioncrafter #image-view-seadragon-left,.editioncrafter #image-view-seadragon-right,.editioncrafter #image-view-seadragon-third{width:100%;height:100%;max-height:100dvh;grid-area:image_viewer;background:#000}.editioncrafter .imageViewComponent{position:relative;padding:0;margin:0;width:100%;height:100%;max-height:100dvh}.editioncrafter .imageViewComponent .navigationComponent{position:absolute}.editioncrafter .a9s-annotation.a9s-annotation.selected>rect,.editioncrafter .a9s-annotation.a9s-annotation.selected>polygon{stroke:#4385f6 !important;stroke-linejoin:round;fill:rgba(67,133,246,.1) !important}.editioncrafter .a9s-annotation.a9s-annotation.hover>rect,.editioncrafter .a9s-annotation.a9s-annotation.hover>polygon{stroke:#4385f6 !important;stroke-linejoin:round}.editioncrafter .ImageZoomControl{position:absolute;z-index:1;top:max(8rem,128px);color:#fff;list-style:none;background:#4a4a4a;opacity:.4;margin:0;padding:max(.4rem,6.4px) max(.5rem,8px);border-radius:max(.3rem,4.8px)}@container diplomatic (min-width: 960px){.editioncrafter .ImageZoomControl{top:max(4rem,64px);left:max(2rem,32px)}}.editioncrafter .ImageZoomControl>li{color:#e0e0e0;margin:0 !important}.editioncrafter .ImageZoomControl>li>.zoom-in{margin-top:8px}.editioncrafter .ImageZoomControl>li:hover{color:#fff}.editioncrafter .ImageZoomControl>li>.zoom-3{margin-top:8px}.editioncrafter .ImageZoomControl>li>.zoom-2{margin-top:8px;margin-left:5px}.editioncrafter .ImageZoomControl>li>.zoom-1{margin-top:8px;margin-left:7px}.editioncrafter .ImageZoomControl>li>.zoom-out{margin-top:8px}.editioncrafter .ImageZoomControl>li>.zoom-grid{margin-top:30px}.editioncrafter .transcriptionViewComponent .transcriptContent{padding:50px 16px;font-size:max(.9rem,14.4px);-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}@container diplomatic (min-width: 960px){.editioncrafter .transcriptionViewComponent .transcriptContent{padding:5px 16px}}.editioncrafter .transcriptionViewComponent .transcriptContent figure{display:inline-flex;flex-direction:column;width:100%;align-items:center;gap:6px}.editioncrafter .transcriptionViewComponent .transcriptContent .block[data-layout=right-middle]{max-width:250px}.editioncrafter .transcriptionViewComponent .transcriptContent .block[data-layout=right-top]{max-width:250px}.editioncrafter .transcriptionViewComponent .transcriptContent .block[data-layout=right-bottom]{max-width:250px}.editioncrafter .transcriptionViewComponent .transcriptContent .x-small-inline-figure{margin:5px;border:1px solid gray;width:30px}.editioncrafter .transcriptionViewComponent .transcriptContent .small-inline-figure{margin:5px;border:1px solid gray;width:60px}.editioncrafter .transcriptionViewComponent .transcriptContent .medium-inline-figure{margin:5px;border:1px solid gray;width:200px}.editioncrafter .transcriptionViewComponent .transcriptContent .large-inline-figure{margin:5px;border:1px solid gray;width:350px}.editioncrafter .transcriptionViewComponent .transcriptContent .surface{grid-area:transcription;margin:0;padding:0;list-style:none}.editioncrafter .transcriptionViewComponent .transcriptContent .grid-mode{display:grid;grid-auto-rows:minmax(min-content, 0fr);grid-gap:2px}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>.small-font{font-size:11pt}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>div{padding:10px}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z0{grid-area:z0}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z1{grid-area:z1}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z2{grid-area:z2}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z3{grid-area:z3}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z4{grid-area:z4}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z5{grid-area:z5}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z6{grid-area:z6}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z7{grid-area:z7}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z8{grid-area:z8}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z9{grid-area:z9}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z10{grid-area:z10}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z11{grid-area:z11}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z12{grid-area:z12}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z13{grid-area:z13}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z14{grid-area:z14}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z15{grid-area:z15}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z16{grid-area:z16}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z17{grid-area:z17}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z18{grid-area:z18}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z19{grid-area:z19}.editioncrafter .transcriptionViewComponent .transcriptContent .surface>#z20{grid-area:z20}.editioncrafter .transcriptionViewComponent .transcriptContent .highlight{background-color:#ff0}.editioncrafter tei-line{display:block}.editioncrafter tei-add{color:blue;vertical-align:super;font-size:10pt}.editioncrafter .selected-zone{background:#eaf1fd;border-radius:5px}.editioncrafter .editor-comment-content{word-wrap:break-word}.editioncrafter .inline-image{max-width:90%;max-height:360px;margin:auto;text-align:center}.editioncrafter .xmlViewComponent .navigationComponent{background-color:#fff;color:#000}.editioncrafter .xmlContent{padding:0;margin:4.5rem 0 0;width:calc(100% - 1.2rem);max-height:100vh;min-height:100%;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;min-width:max(10rem,160px)}.editioncrafter .xmlViewComponent{overflow:auto;margin:0 0 0 max(1rem,16px);max-height:calc(100vh - max(7rem,112px))}.editioncrafter .xmlContentInner{max-height:100%}.editioncrafter .xmlContentInner pre{overflow-x:auto}.editioncrafter #glossaryView #glossaryViewInner{margin:5px 0 0 0;width:calc(100% - 1.2rem);max-height:calc(100vh - 170px);padding:5px 16px}@container diplomatic (min-width: 960px){.editioncrafter #glossaryView #glossaryViewInner{margin:52px 0 0 0}}.editioncrafter #glossaryView .cite-header{text-align:center;margin-bottom:5px}.editioncrafter #glossaryView .cite-instructions{margin:20px;margin-left:15%;margin-right:15%}.editioncrafter #glossaryView .glossaryNav{background:#fff;padding:5px;position:relative}.editioncrafter #glossaryView .glossaryNav #glossary-filter{margin-right:10px}.editioncrafter #glossaryView .glossaryNav .alphaNav{display:none}@container diplomatic (min-width: 960px){.editioncrafter #glossaryView .glossaryNav .alphaNav{display:block}}.editioncrafter #glossaryView .alphaNav{color:blue;display:inline}.editioncrafter #glossaryView .title{white-space:nowrap;position:relative;width:calc(100% - max(1.7rem,27.2px));text-align:center;top:-2em;font-size:max(1.8rem,28.8px);font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@container diplomatic (min-width: 960px){.editioncrafter #glossaryView .title{top:-1em}}.editioncrafter #glossaryView .subtitle{white-space:nowrap;position:relative;width:calc(100% - max(1.7rem,27.2px));text-align:center;top:-2em;font-style:italic;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@container diplomatic (min-width: 960px){.editioncrafter #glossaryView .subtitle{top:-1em}}.editioncrafter #glossaryView #glossaryContent{padding:max(80px,5rem) 0 0;max-height:100vh;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;min-width:max(10rem,160px)}@container diplomatic (min-width: 960px){.editioncrafter #glossaryView #glossaryContent{padding:max(3.5rem,56px) 0 0}}.editioncrafter .jumpToFolio_component{margin:max(1rem,16px) 0 0 min(-4.5rem,-72px);padding:max(.6rem,9.6px);height:max(1.2rem,19.2px);width:max(9.5rem,152px);background:#e7e7e7;border:1px solid rgba(90,98,102,.53);border-radius:max(.3rem,4.8px);-webkit-box-shadow:6px 6px 5px 0 rgba(0,0,0,.211765);-moz-box-shadow:6px 6px 5px 0 rgba(0,0,0,.211765);box-shadow:6px 6px 5px 0 rgba(0,0,0,.211765);font-family:sans-serif}.editioncrafter .jumpToFolio_component input:focus{outline:none}.editioncrafter .jumpToFolio_component:after,.editioncrafter .jumpToFolio_component:before{bottom:100%;left:50%;border:solid rgba(0,0,0,0);content:" ";height:0;width:0;position:absolute;pointer-events:none}.editioncrafter .jumpToFolio_component:after{border-color:rgba(255,255,255,0);border-bottom-color:#e7e7e7;border-width:9px;margin-left:-9px}.editioncrafter .jumpToFolio_component:before{border-color:rgba(194,225,245,0);border-bottom-color:rgba(90,98,102,.53);border-width:11px;margin-left:-11px}.editioncrafter [lang=ar],.editioncrafter [lang=ota],.editioncrafter [lang=fa],.editioncrafter [lang=he],.editioncrafter [lang*=-Arab-AR]{direction:rtl;text-align:right}.editioncrafter [lang=en],.editioncrafter [lang=fr],.editioncrafter [lang=de],.editioncrafter [lang=it],.editioncrafter [lang*=ar-Latn-],.editioncrafter [lang*=ota-Latn-]{direction:ltr;text-align:left}.editioncrafter tei-choice tei-abbr+tei-expan:before,.editioncrafter tei-choice tei-expan+tei-abbr:before,.editioncrafter tei-choice tei-sic+tei-corr:before,.editioncrafter tei-choice tei-corr+tei-sic:before,.editioncrafter tei-choice tei-orig+tei-reg:before,.editioncrafter tei-choice tei-reg+tei-orig:before{content:" ("}.editioncrafter tei-choice tei-abbr+tei-expan:after,.editioncrafter tei-choice tei-expan+tei-abbr:after,.editioncrafter tei-choice tei-sic+tei-corr:after,.editioncrafter tei-choice tei-corr+tei-sic:after,.editioncrafter tei-choice tei-orig+tei-reg:after,.editioncrafter tei-choice tei-reg+tei-orig:after{content:")"}.editioncrafter tei-ab{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-accMat{display:block}.editioncrafter tei-accMat:before{content:"accompanying materials: "}.editioncrafter tei-acquisition{display:block;margin-top:0;margin-bottom:0}.editioncrafter tei-acquisition:before{font-weight:bold;content:"acquisition"}.editioncrafter tei-activity{display:block}.editioncrafter tei-activity:before{content:"activity: "}.editioncrafter tei-add[place=above]{color:blue;vertical-align:super;font-size:10pt}.editioncrafter tei-add[place=inline]:before{content:"«"}.editioncrafter tei-add[place=inline]:after{content:"»"}.editioncrafter tei-add[place=below]{vertical-align:sub}.editioncrafter tei-additional{display:block}.editioncrafter tei-additions{display:block}.editioncrafter tei-additions:before{content:"Significant additions within the document: "}.editioncrafter tei-addrLine{display:block}.editioncrafter tei-address[data-tei-rend~=block],.editioncrafter addresss[data-tei-rendition~="#block"]{display:block}.editioncrafter tei-adminInfo{display:block}.editioncrafter tei-app tei-note{display:none}.editioncrafter tei-appInfo{display:block}.editioncrafter tei-appInfo:before{content:"Application information: "}.editioncrafter tei-application{display:block}.editioncrafter tei-application:after{content:" " attr(version)}.editioncrafter tei-argument{display:block}.editioncrafter tei-att{font-family:Courier,monospace}.editioncrafter tei-att:before{content:"@"}.editioncrafter tei-titlestmt>tei-author{display:block;margin-bottom:1em}.editioncrafter tei-publicationstmt>tei-availability{font-size:80%}.editioncrafter tei-publicationstmt>tei-availability:before{font-weight:bold;content:"Availability: "}.editioncrafter tei-publicationstmt>tei-availability[data-tei-status]:before{font-weight:bold;content:"Availability (" attr(status) "): "}.editioncrafter tei-back{display:block}.editioncrafter tei-bibl[data-tei-rend~=block],.editioncrafter bibl[data-tei-rendition~="#block"]{display:block;padding-left:2em;text-indent:-2em}.editioncrafter tei-biblFull{display:block}.editioncrafter tei-binding{display:block}.editioncrafter tei-binding:before{content:"Binding: \\a";white-space:pre-wrap}.editioncrafter tei-binding[data-tei-contemporary]:before{content:"Binding: \\a" "Contemporary: " attr(contemporary) "\\a";white-space:pre-wrap}.editioncrafter tei-bindingdesc{display:block}.editioncrafter tei-bindngdesc:before{content:"Binding description: \\a"}.editioncrafter tei-birth{display:block}.editioncrafter tei-birth:before{content:"Birth: "}.editioncrafter tei-cRefPattern{display:none}.editioncrafter tei-caption{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-case[data-tei-value]:before{font-weight:bold;content:attr(value) " "}.editioncrafter tei-castgroup{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-castitem{display:list-item}.editioncrafter tei-castlist{display:block;list-style-type:none;margin-top:1em;margin-bottom:1em;margin-left:2em}.editioncrafter tei-cb{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-cb:before{content:"[column break]"}.editioncrafter tei-cell{border-right:thin solid #000;border-bottom:thin solid #000;padding:2px}.editioncrafter tei-cell[data-tei-role=label]{font-weight:bold}.editioncrafter tei-climate{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-climate:before{font-weight:bold;content:"Climate: "}.editioncrafter tei-code{font-family:Courier,monospace}.editioncrafter tei-collation{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-condition{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-constitution{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-constitution:before{font-weight:bold;content:"Constitution: "}.editioncrafter tei-constitution[data-tei-type]{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-constitution[data-tei-type]:before{font-weight:bold;content:"Constitution (" attr(type) "): "}.editioncrafter tei-constitution[data-tei-type=frags]{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-constitution[data-tei-type=frags]:before{font-weight:bold;content:"Constitution (fragments): "}.editioncrafter tei-custevent{display:list-item}.editioncrafter tei-custodialhist{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-date[data-tei-when]:empty:before{content:attr(when)}.editioncrafter tei-del{color:red}.editioncrafter tei-editionstmt{display:block}.editioncrafter teieg-egxml{display:block;font-size:80%;margin-left:1em;padding-left:1em;border-left:1px solid #aaa;margin-top:.75em;margin-bottom:.75em;padding-top:.75em;padding-bottom:.75em;font-family:monospace;white-space:pre}.editioncrafter tei-emph{font-style:italic}.editioncrafter tei-encodingdesc{display:none}.editioncrafter tei-epigraph{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-explicit{font-style:italic}.editioncrafter tei-filedesc>tei-extent{display:none}.editioncrafter tei-figure{display:block;text-align:center;margin-left:auto;margin-right:auto}.editioncrafter tei-gap[data-tei-reason=lost]:before{content:"["}.editioncrafter tei-gap[data-tei-reason=lost]:after{content:attr(data-content) "]"}.editioncrafter tei-gap[data-tei-reason=illegible]:after{content:attr(data-content)}.editioncrafter tei-gi{font-family:Courier,monospace}.editioncrafter tei-gi:before{content:"<"}.editioncrafter tei-gi:after{content:">"}.editioncrafter tei-head{display:block;font-family:"OpenSans",sans-serif;font-weight:700;font-size:1.5em;line-height:max(1.5rem,24px)}.editioncrafter tei-body>tei-head{font-size:180%;text-indent:-0.5em}.editioncrafter tei-div.textpart{display:none}.editioncrafter tei-div>tei-head{font-size:170%;text-indent:-0.5em}.editioncrafter tei-div>tei-div>tei-head{font-size:155%}.editioncrafter tei-div>tei-div>tei-div>tei-head{font-size:140%}.editioncrafter tei-div>tei-div>tei-div>tei-div>tei-head,.editioncrafter list>tei-head{font-size:130%}.editioncrafter tei-div>tei-div>tei-div>tei-div>tei-div>tei-head{font-size:120%}.editioncrafter tei-div>tei-div>tei-div>tei-div>tei-div>tei-div tei-head{font-size:110%}.editioncrafter tei-figure>tei-head{display:block;margin:1.5em auto 1.5em auto;padding:.5em 1.5em 1.5em 1.5em;border:1px solid #000;border-radius:15px;width:325px;position:relative;border:1px solid #aaa;background:#fafafa;text-indent:0;font-size:85%;text-align:justify;-webkit-box-shadow:0px 1px 3px rgba(0,0,0,.25);-moz-box-shadow:0px 1px 3px rgba(0,0,0,.25);box-shadow:0px 1px 3px rgba(0,0,0,.25);width:85%;font-family:Georgia,Serif;font-size:13pt}.editioncrafter tei-hi[rend~=caps]{font-weight:bold}.editioncrafter tei-hi[rend~=italic]{font-style:italic}.editioncrafter tei-hi[rend~=underline]{text-decoration:underline}.editioncrafter tei-ident{font-family:Courier,monospace}.editioncrafter tei-incipit{font-style:italic}.editioncrafter tei-item{display:list-item;margin-left:1em}.editioncrafter tei-cell item{margin-left:1em}.editioncrafter tei-l{display:block}.editioncrafter tei-l[data-lineno]:before{content:attr(data-lineno);position:absolute;left:2em}.editioncrafter tei-lb:after{content:"\\a";white-space:pre}.editioncrafter tei-lg{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-list{display:block;margin-top:1em;margin-bottom:1em;list-style-type:none}.editioncrafter tei-item>tei-list{margin-top:0}.editioncrafter tei-sourcedesc tei-list{list-style-type:none}.editioncrafter tei-sourcedesc>tei-list>tei-head{font-size:140%;font-weight:bold}.editioncrafter tei-sourcedesc tei-list>tei-item{display:list-item}.editioncrafter tei-text tei-list[type=simple]{list-style-type:none}.editioncrafter tei-text tei-list[type=bulleted]{list-style-type:disc}.editioncrafter tei-text tei-list[type=ordered]{list-style-type:none;counter-reset:items 0}.editioncrafter tei-text tei-list[type=ordered]>tei-item{display:list-item;margin-left:0}.editioncrafter tei-item>tei-list[type=ordered]{margin-left:1em}.editioncrafter tei-text tei-list[type=ordered]>item:before{counter-increment:items 1;content:counter(items, decimal) ". "}.editioncrafter tei-text tei-list[type=gloss]{list-style-type:none}.editioncrafter tei-list[type=gloss]>tei-label{display:block;margin-top:.25em;margin-bottom:.25em;font-weight:bold}.editioncrafter tei-list[type=gloss]>tei-item{margin-left:2em}.editioncrafter tei-item>tei-list[type=ordered]{margin-left:1em}.editioncrafter tei-listapp{display:block;margin:1em;padding:1em}.editioncrafter tei-listbibl{display:block;list-style-type:none;margin-left:.5 em;margin-top:.5em}.editioncrafter tei-listbibl>tei-head{font-size:120%;font-weight:bold}.editioncrafter tei-listbibl>tei-bibl{display:list-item;margin-left:.5em}.editioncrafter tei-listwit{display:block;list-style-type:none;margin-left:.5em}.editioncrafter tei-listwit>tei-head{font-size:120%;font-weight:bold}.editioncrafter tei-listwit>tei-witness{display:list-item;margin-left:2em;text-indent:-1.1em}.editioncrafter tei-witness>tei-listwit{display:inline}.editioncrafter tei-witness>tei-listwit>tei-head{display:inline}.editioncrafter tei-witness>tei-listwit>tei-witness{display:inline}.editioncrafter tei-locus{display:none}.editioncrafter tei-milestone{display:none;margin-left:auto;margin-right:auto;text-align:center}.editioncrafter tei-musicNotation{font-weight:bold}.editioncrafter tei-musicNotation:before{font-weight:bold;content:"Musical Notation: "}.editioncrafter tei-node{display:none}.editioncrafter tei-note{display:none}.editioncrafter tei-notesstmt{display:none}.editioncrafter tei-ovar{font-style:italic}.editioncrafter tei-origPlace{font-weight:bold}.editioncrafter tei-origPlace:before{font-weight:bold;content:"Place of Origin: "}.editioncrafter tei-p{display:block;margin-top:1em;margin-bottom:1em;text-align:justify}.editioncrafter *[data-tei-rendition~="#center"] p{text-align:center}.editioncrafter tei-availability>p:first-child{margin-top:0em}.editioncrafter tei-performance{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-person{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-personGrp{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-postscript{display:block;margin-top:2em}.editioncrafter tei-principal{font-weight:bold}.editioncrafter tei-principal:before{font-weight:bold;content:"Principal: "}.editioncrafter tei-profiledesc{display:none}.editioncrafter tei-publicationstmt>*{display:none}.editioncrafter tei-publicationstmt{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-publicationstmt>date{display:none}.editioncrafter tei-publicationstmt>publisher{display:none}.editioncrafter tei-q{quotes:"“" "”" "‘" "’" "“" "”" "‘" "’" "“" "”" "‘" "’" "“" "”"}.editioncrafter tei-q:before{content:""}.editioncrafter tei-q:after{content:""}.editioncrafter tei-q[data-tei-next]:after{content:"" !important}.editioncrafter tei-q[data-tei-prev]:before{content:"" !important}.editioncrafter tei-quote{font-style:italic}.editioncrafter tei-app tei-rdg{display:none}.editioncrafter tei-re{display:block;margin-top:0;margin-bottom:0}.editioncrafter tei-recordhist{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-ref{color:#5f0000}.editioncrafter tei-remarks{font-weight:bold}.editioncrafter tei-remarks:before{font-weight:bold;content:"remarks: "}.editioncrafter tei-respstmt{display:block;margin-top:0;margin-bottom:0}.editioncrafter tei-revisiondesc{display:none}.editioncrafter tei-row{display:grid;grid-auto-flow:column;grid-auto-columns:1fr}.editioncrafter tei-salute{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-samplingdecl{display:block;margin-top:0;margin-bottom:0}.editioncrafter tei-scriptnote{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-seal{display:block;margin-top:0;margin-bottom:0}.editioncrafter tei-seal:before{font-weight:bold;content:"Seal: "}.editioncrafter tei-sealdesc{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-secFol:before{font-weight:bold;content:"Second Folio: "}.editioncrafter tei-secl>*:first-child:before{content:"\\a[";white-space:pre}.editioncrafter tei-secl>*:last-child:after{content:"]\\a\\a";white-space:pre}.editioncrafter tei-seg{outline:0px solid rgba(0,0,0,0)}.editioncrafter tei-sense{display:block;margin-top:0;margin-bottom:0}.editioncrafter tei-seriesstmt{display:none}.editioncrafter tei-setting{display:block;margin-top:0;margin-bottom:0}.editioncrafter tei-signed{display:block;margin-top:2em}.editioncrafter tei-soCalled{quotes:"“" "”" "‘" "’" "“" "”" "‘" "’" "“" "”" "‘" "’" "“" "”"}.editioncrafter tei-soCalled:before{content:open-quote}.editioncrafter tei-soCalled:after{content:close-quote}.editioncrafter tei-soCalled[data-tei-next]:after{content:"" !important}.editioncrafter tei-soCalled[data-tei-prev]:before{content:"" !important}.editioncrafter tei-sound{font-style:italic}.editioncrafter tei-source{display:block;margin-top:0;margin-bottom:0}.editioncrafter tei-sourcedesc{display:none}.editioncrafter tei-space:before{font-weight:bold;content:""}.editioncrafter tei-span[data-tei-data-n]:before{content:attr(data-n)}.editioncrafter tei-speaker{font-weight:bold;margin-right:0}.editioncrafter tei-sponsor{display:block;margin-top:0;margin-bottom:0}.editioncrafter tei-sponsor:before{font-weight:bold;content:"Sponsor:"}.editioncrafter tei-stage{display:block;margin-top:1em;margin-bottom:1em;font-style:italic}.editioncrafter tei-stamp{display:block;margin-top:1em;margin-bottom:1em}.editioncrafter tei-stamp:before{font-weight:bold;content:"Stamped: "}.editioncrafter tei-surplus>*:first-child:before{content:"\\a[";white-space:pre}.editioncrafter tei-surplus>*:last-child:after{content:"]\\a\\a";white-space:pre}.editioncrafter tei-tei{display:block}.editioncrafter tei-table{display:block;border-top:thin solid #000;border-left:thin solid #000}.editioncrafter tei-table{margin-top:2em;margin-bottom:2em;font-size:12pt}.editioncrafter tei-table>tei-head{border-bottom:thin solid #000;border-right:thin solid #000;font-size:120%;font-weight:bold;padding:2px;text-align:center}.editioncrafter tei-teiheader{display:block;margin-top:2em;margin-bottom:2em}.editioncrafter tei-tei>tei-text{display:block;line-height:1.5}.editioncrafter tei-textclass{display:none}.editioncrafter tei-textdesc{display:none}.editioncrafter tei-tei tei-title{display:inline}.editioncrafter tei-tei tei-title[level=a]{quotes:"“" "”" "‘" "’" "“" "”" "‘" "’" "“" "”" "‘" "’" "“" "”"}.editioncrafter tei-tei tei-title[level=a]:before{content:open-quote}.editioncrafter tei-tei tei-title[level=a]:after{content:close-quote}.editioncrafter tei-tei tei-title[level=a][next]:after{content:"" !important}.editioncrafter tei-tei tei-title[level=a][prev]:before{content:"" !important}.editioncrafter tei-title[level=m]{font-style:italic}.editioncrafter tei-titlestmt>tei-title{display:block;font-family:Arvo,sans-serif;font-weight:normal;font-weight:bold !important;font-size:150%}.editioncrafter tei-typedesc{display:none}.editioncrafter tei-u:before{content:"-"}.editioncrafter tei-view{font-style:italic}.editioncrafter tei-wit{display:inline}.editioncrafter tei-witdetail{display:none}.editioncrafter .inline-ring-spinner{display:inline-block;margin-left:10px;margin-right:10px;width:16px;height:16px}.editioncrafter .inline-ring-spinner .light{border:3px solid #fff;border-color:#fff rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.editioncrafter .inline-ring-spinner .dark{border:3px solid #000;border-color:#000 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.editioncrafter .inline-ring-spinner div{box-sizing:border-box;display:block;position:absolute;width:16px;height:16px;border-radius:50%;animation:inline-ring-spinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite}.editioncrafter .inline-ring-spinner div:nth-child(1){animation-delay:-0.45s}.editioncrafter .inline-ring-spinner div:nth-child(2){animation-delay:-0.3s}.editioncrafter .inline-ring-spinner div:nth-child(3){animation-delay:-0.15s}@keyframes inline-ring-spinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.editioncrafter .big-ring-spinner{width:100%;height:100vh;display:flex;justify-content:center}.editioncrafter .big-ring-spinner div{box-sizing:border-box;display:block;position:absolute;width:128px;height:128px;margin-top:30vh;border-radius:50%;animation:big-ring-spinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite}.editioncrafter .big-ring-spinner.dark div{border:16px solid #000;border-color:#000 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.editioncrafter .big-ring-spinner.light div{border:16px solid #fff;border-color:#fff rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.editioncrafter .big-ring-spinner div:nth-child(1){animation-delay:-0.45s}.editioncrafter .big-ring-spinner div:nth-child(2){animation-delay:-0.3s}.editioncrafter .big-ring-spinner div:nth-child(3){animation-delay:-0.15s}@keyframes big-ring-spinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.editioncrafter .single-pane-view{height:100%;width:100%;overflow:auto}.editioncrafter .single-pane-view>div{height:100%}',""]);const p=u},3379:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var o={},a=[],s=0;s<e.length;s++){var l=e[s],c=r.base?l[0]+r.base:l[0],u=o[c]||0,d="".concat(c," ").concat(u);o[c]=u+1;var p=n(d),h={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)t[p].references++,t[p].updater(h);else{var f=i(h,r);r.byIndex=s,t.splice(s,0,{identifier:d,updater:f,references:1})}a.push(d)}return a}function i(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var o=r(e=e||[],i=i||{});return function(e){e=e||[];for(var a=0;a<o.length;a++){var s=n(o[a]);t[s].references--}for(var l=r(e,i),c=0;c<o.length;c++){var u=n(o[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}o=l}}},569:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},4966:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIYAAABKCAYAAAB+UyxeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAB4ISURBVHgB7V1LcBtncu4ZgNRjt4rQLTeOKntgZb0reNd2uWpTReiWnAQdNpbsrRJ88EZyUiXylhupUyonkVVZy9k9CKqyrTg5EDrmJPDmJJsVmN2kdNPw5pwMVa1lPoD50193/4PBiwRAkJJldRUJYGYw8z/678fX3T8CmpDKV65HFIYb5FyBWq3LtX/9TYNe0UtDIU1KQbDKTBHzayGYmZ2nV/RSUZ4mIJYWFWaIa/IhoKZrt5/SK3qpKEcT0MKP3togcnV+++/MGW8zk5QXfvjT/3v8h99+69VJubxUWPjJT64svPZGxP15TN9RCmhMwsDRmd1HrEbeZ4YoiuRIkm1+rfPpS3z8Xu2fP67St4TK7914SI77QdTkv6jrpKpKMDvG6RL/VWufffQ+fQdofFXy/VaRkiDiAeMBFamBQV3mv5Xa/TsXy7/421L53Q9XmVli2jldq9XWmvQikwvOy2uSYMLj9PjO6Wa27dwnnNum7wiNzRi1T/6xzoPUlDUEieGoyt5JxAN7Sy5Idpu1z36zWr56Y4nO7j3ia+u0v7/+wnotYO6AFrkPt8XDCgLtx9m9iKVJkxmH/1yJj8DAjuk7QhMZn/Rs9nz6/uxemQfuGg/spriwLiiwumERvMerzTWYcSKamdkQZkqS9RdSzThaZ+a4xn8NYQ7natzO2J/mtoOpS9mviEo9vVOUxSFqxm3V7n+8RC8JTcYYp3cKzAgl1rdV/lTlgYPk4NUWFuGl4Hzts4/9uQq/VniwHewRliTXTAXdyw7+c6MgiFmi1Zl5uc13VgdekyRN7u88t/sS92eRoD6DPV4E4TovkjXuLxgnppeIJmMMUSG8sjrUrN3/aBVvRGrkgjIPYIEHtJoyD44D+8BEBEHExx6KmmEV9JwZJKZcDrZE2h9ta7gkKgYGKdSmk1O4Zpv7vsWfYzG8v7d3k9ohS0Lt/yAqX+HF0d5vfJtAwMkYQwYr6BiVrjOoNslreC+G6NUPl6jNEmLnVJ2NuYqIYFU/GHBInjVmkK+eI4P4yYrSI0B0iYDNPJB2Es3xaihzn0skHgp7KrmwJnbV17PxoQZ2jm5TkMdzLtK3hCaVGCwNwg73u2Rt0GUwVPmlLuokv1dlNVKnb9hYdY6N12CTsFph2AUY6+CuWP5JAhVTp5OkdhsMKpLCmLNorupNCrltCd2jkJnbtZbZsB5r1XOfyyJtWMpm7v/C06QSI85+OKyzqTphCcIYiDIRqxkW12WOs6xRPh/xEQzgUx7ASvndGzcpcQ9OyFAt8vObwqwdguta4kbWa59qG1jyrdXuj8kU715fYWP8HDPdZb7/mrj4RKnhnhqwJGNYpxeIJlcl7V0ZpHKFO7e7szqKRZ5KELU3yixqCqLfT52q0+4uG3NJQ6384AJWquAhcBOPW80E7gLrD3gj2k5j5O6L3PjxIFU9MTN/zO0vcn+cMQNUL3tBexxaYFefbTRmomUz2F8ImpQxCqkhtcfW+ZixuF47hHZ2oiDMPXFBOxKjDqvVATgDxhDA21likRzLqp42aDY7W+M+fCXvFb3tU4uy8sPcOo1LLtji/6yOwqIY41BPIjFD4ECRXQWVyh4Pe2xXrscviuSYNLoade6QFMT/n5AgRaAyXNLmQeTVA29nf3/V7slShZQJnFOX8MxuBZJEdPcUqFYVJlu3Z5R6zwtTJGFg0m5kEskQBM7uq5gOGC9gaShMweLJsXFL7it5zeVuMdO/MF5LAN2pb1mcwo1Uoyum4fAv/PkI8Dc+lH9xvURtNtIo2BbVgBXuLX3V23Gqv0MRm3rcH2u3m1AnXlVYnkcJmAFhNTHYxJ8ripNQU7wE4CD5PAzVkrXnAcS1qKUeKHtUMrzlJquR1zvHxEbYknuD1K2NVIoFBUNKC4PGR+NI/ClxVf5/znCQiN+zEesCGeMwrI/LcCdFeQr2q0QzbBQFNVJ0DxPBnMwT4Vi0gwALhyGQSxhK24b2Zeke4xi1QQ+QifaE+IkamiT3T5KCMAtPOksAHuCgKZMPCkQMlwVLgO5X97gormIYLDJDIez/QDwaiOuZmRJBupzdq/EkD2ZqnRgj3M8V7BX2Q0S9i8GFeP45ys8wU2PB5GJ5RqvVkDYxE8p1cL+JGVltCrjvTWFW2Er63Cfc+XllJjGwGzYekTEknn1BXrEwMTYBOibSxI/FvIxHkqzxIrpFx0x5uF88KYiU3uVJusgPvssdbw55uEw+X7/YddTlhq7QAUZjTGOSIqtuSUSxY28ml49MWvjVign1KicSZhkjPiMGNOwMhuy7TsiKl4mI+75zhSXl2b2SSDJFcjcFBcPEk6gLTDSkBn833GbJAYn6gCXt2oFtUZwnYsnVsOdE3ijm+VmH9Cy/88ul2ue/PvA+R6U07K4iPLhN1GKGmNkQ1HIAc4jqSAQOX5XP4qdDFZyMSJQVpvEMlmJtHrwZSC8M3qJJspqt1hJpD+fk8zcCsA1k4JQx4KYGfO+2U+kXhpJewJOpC0I9ipuM7DJD9KlbXdGeWUXtiVQ8D8aycYvM4znqGNw97sBk6pVI469c5/D5TIWXyUUMCnPm0z7OTEIM7kr55x/UpGEQj63dmE6I/MCqy5sv2+DXAVDxJG6LOHds7wROjb9A4Osyr8IlHtAnfO1mr2cDA9SCfPWe4NlTexZAuBV2L0tir8NzcrTF6Gc9aLfnXRBU7Sub/LwafX2qSt9nfMKFG+n92rBLaDo0O7vMfb3L7y7TMVGXu2rMUeXOVyQRJ5ffuHz1xlcb9+/cSy/SgFIz5VZnWMQJU5/L2xZ7aF6tf9gljKxCjDuo6mRVxHHICGeQRzoAUNZqH8rKABQfR19xb9xvjo9tsCRtqq4XKbAujAhGSZJrTg3RLX7+WhaQYwnR3eB+I3XyvoORr97YPE6V0ueuyoCH+4gDQDTewmqQFZM9z2I8NSqn2OFJSVze+3eUmaEKJbuMCub6NgB5o90CZzuHJKLzYguw4cso64bkjpD05bKoyGezMMDrpHYLpANUCTME39ex9xaGD5lZinLs2ey52qe/KvahtG0dl/I7f31TPmvQMaIpkdgqudxil3E/RRoIcIlBeuV6kdqtgPK5usQxrly/mIpFHkD+W+MBrVqm1olLjEHUYyQuidE6MwO9D3UgriYkhDI60M6AXWKAWmLcFczrapiaQYxHvQE1aCvmAW3CSD/UzQSau7eHmNCWqaLpL6DELfN92S6cvko5UOvZSooliQVuooreOD0vRtvX0biBpedBho9UCFB0x5tpGm4D9HFFjjiH95AQms+q6mNLvIyEttgtL434SIX0kcTEng0/G/hIzRuy0yIxaveT4rRVyqHmkDBHm5kDojPglfPNqaUXPo+TugJUiyr2AzJAyvAQURPblkBU1hS/4J43QM2LQNALTI+g2k1BRp27NU5wz3AKMN0W33vpOGI+/Iw1VpnVaXopI9nJKXPkxB0D6lmiF4w6qXZh2RJsYiIDmmAvYcUqUyxKog2kAuBp5yom5iWlLwMmgSqGUawLVhMmZQm4JeKm1sQ9hipltfO8w+mwlejZqfentWhHdqCYKxkedggZz/FfzMyxTFOiNGOKo6ujrkbV22HZoHzNrNLVPS8uKQeufKWcfGGfDeqZmaKIdk1ivkcBR3OdqAugr5sGczcF+xBElO+prnBJ7qG2hrPjkgXPsZuSeC7ETAU32SU1xDxOWqqqERpWDsokG4fG8qzL7/3NbUEgsRqHAGCTEDMd9C4AJkC+r/euPqtlqcgKB+kEPbXvbKdxFDUoedLwHi6lMM68xS0KMvmSkifJu400Xc9xACtAsg7iIHzcPAqVKAyJQ8oEkryzLMG8PNvsrs3SQpBNze5CvgUkUS53U1x6H29S1VSnEyABG5N2NA17YzzG0DwKACvbsrrarfpRG2HSgnW5ru7uINYHPBl5QOEIqAGomtP4Bk9um8V7XnJPGxaQQwnAkmWHeXh8S1Y+0vD+mG/01IlUCKpCXUiXws4S1Q2K5F1Lj10g6ReEupp2u2gBR6gcZUowXiLf2ZRnOjE4NRioObJq5EICHaNEsZqe6lFV2/iMoWIVQFLRVsrlSS1tYzQYeJvka2EliBQ80MF23XUdqhb4PHkYPE7tA+89IHoJDKKHEUboF1DR970qE4MOBifxsQMSaARcg/RwMhZqm4QSLPMeD8CvJyxJzgmDS+BQgLeYNPK8BeY+aCJFbWLcmTkP65PB+7ePWjE3HmNoMAvGZ00wDDXeoJcvTsKhmv2190hwBAwm1AADSAEbhI4kCnlJJIRmZMO+uZRpuTKCo8YgiTBWOyCCxU4gK0ASAxTPinysY6T7QOVJpZ4E+LxUceoNUcOkConk8JJNc15hLNcFdGMbJat6JMM8ELtIFoJPdziwHZC07aB0FGk+HmPAhWvlCQEz48wnmZyL98dhDvF0kGyrIhtA2S2ONC+y77hKEk6HbSCJO0X7yrYgkBjgnpjGSM9ThLCkMRVvG5BGQ/EsSD8lgcqlT5Ai7KoOCnyBCUZhxAyz4P5z5hEp5uzM2PVMgryPU6cigfd10W1p7MdxRJmvYfeZ2zKaJwlVOcE4eZqYMezhKm6dw0DOM8ZxeWTxnYpqT4hoBhGpmogVaBpsH0xCGVyCxJ4hxixCyXRv8kRUUlWmBJCrSsAfYORCJfjEIjUq0cYLbGOtj7MqU1UchrEwiqoazxgcjOTXmXBRJEySQPXM6Zg436Zxx3jVR8HHpfFyPtVazzYK1j/rskCTZs7uPeQVcnHEhlepizF88g8P1rNTr0/dOMufbrCE0/snUH134sxZrcfV9ggcTt6GUbsj7r2dFlblH/Hr3Kjemd2n6p+Z3kulCjNMqyDZXZBocLe1LQUD57ZFipzd+8pKJhuHht7ZCMVeJpNk24dpJ0ejct+R/TbrztayNDphH/7s7l3p6CFkiSgY0Ka8Ppt9nTu/jpV8HBa75XY2TSpdG9CeJUnzR+U+JAnKG7A6h4hiO47EmVUevxU6Stu4vxx7gW1RlXa4BO3A+BTUWxO7Z96kVpUlyy3JspuZeXjgfSUgGo4zvympxEBW0Hsf3uzkVcrRpqWZmfiUNLiyVLd7Ap6AxkmirossTa8xsuSQ7wVbaXnjux9GhjROhdiOeWigVUxaWRaL2gvD2/wsYCaXu3JE/5ivS2p/kkQEiYGK93c/9G3tze/0iTkkzHH1RoUZaSqSTiD5dz9EemVRgnzAUgJRfyVBXfMc8m9LEnZ86L3YPrIyjFUag5QxdII0RY199q6MpbMoDyBE8hgSDvi9JcaCQkQeaVm+F4YF1dMCgClzXL1x63BX1gMIpPUdSW4i17eXzDiOSJN3G7pNQ7AkfdUoKRJ0V7idT23y2QuRUgiTLFKz2uyAYoEa2Wof4L4rinaKq40IZzxlSSdM6N1O8+B4bFiSJeKSR1piMQKFiUSUxwHalDFg8bZpWbyETMKsdTTVYTyAm13fdoI1FFLIOAgemNF0TQaNXUBmjuE4hxYalSGKRU+76Saz8Mt5WS2B1HZUSPASnnjkUPRMIrdhza4BxYTw+6cfDdXf3K+mMoTwNd6XWOp+hXJGloBLdHSK+o4E9KR2X1RYrNABg2UjUO2Tj+tSclFeGtmIV8bQdL2IDQbWbTOwEaoDb9Bd4Y6WBvT1bJXO7K2KqmkbFKxZ0Cz2WGwjl+PnH8SDjCSbvAq2O+KBLhGNuALGILPKVw+9Tm2GQ69Lr1dmr2Uqy6g23UDavBVfKbUQKQ7THFOfLDwyzTJym+yBYVdHuTxMH4L4QZIDlLvOcYnBxhQbmD2dn9cgEkuVUAAcwRhEbCtQBOCmwLGFjQMNoDYyr0jRzp38eB1+ziSGI7LDph1dFbzD0bRIFmEgmXelUa7PpPaxtGCdK64NI01DLO11RuJghUfmeRQFlBFmIAOOOHCFHFBELzvGq0DfLDkGSgQZ2Pt31lh0n/s25HocN+kiwqIKtntOxXQEknRAr/YPoZQxLAtrW4wUuEw51pk9EykIYJ5dOehiFNnAvfNVZN+cqkK3in5lQMqCW7dI60GbkgSTz9+WPUJf0cEkScviIc6lkrZlVXxHJcM2DrusC/lUS373LhI+RG8iknoI0pbmM3r7IzReC826hwXvABzJ+XUYptkI6isaTClKCuNewvvBpWyNy5HuPQJcHgxskCV8SDCGZm4eFqmzKGnR/Pwo3WEnsCxr9fcXDaDZ1JI93YNr1JjDd52mPU6IVR1UFTcwViIuXrvVpN2zVVYZVYsQdm1kYhHJEvkUe/j3ug9E7DsiUge71eRyBUu5A+TcEIRUP/td8uTeds/iIHxfmPTZ9wQrGDZIg44L02ZALPmMcoKMlzTOTjdZL6SHovSdL3rOkqYAesq+p6kbriOQX8zDJNBgxlBw6JHgFCQRPsYl9hmyzpd6uUzsEKTMqcizu7YYgDlVEMM0OynIXUgSv59mZFcj1P7IPqOxyHrq90z0vD/u389nrgCDnUuBqGwtqy+W1syviBTV9WHvgg9pp/fXzwULmFHnPkRdx7ITjIUxjJDRhb9sQTcKxjW6GvXc056Xqe7vPHc+c/4pBTRcguj3OxFkuYd89lX6m1LW2WotD4IShkZXTcc9DJxblRI8pK6pGrgwLGiUqhRMnIaVm6ntEdggYPBV0lySyTAY2UoV5jVe0kNe6gwj20oBb0de+cPd5/7jYZfhN+x73ZSdmG7Kehpx//dcJ9qqgTzPrCqFIHky/T10bAY9C9/JS2YcShsgrcu9Fx9cV2LMIZE9ZFMjP2FAsY0v2JVVg4f6jnTS9OO003oultzREBlNUoDc1DxMJN6kg4K/edLcTke+kssXC2vrm+lq6PRoLruLoD1vy57du9cWUXbrhcEUd33KSgb0VYqrhXEiW/1NqcPRNlSpwwgFOS79JRooJXxppDLVJdKxWxdp7JD5LjkjUL9PDSPK0oO+vg1+hp1DfgfFw4q9D83HsEnXXxtwkhA7MFtL1E+rVZQPPSpk4H0B6TLjpEXKWsV+SWD1DkWCkXRWSER+og64v6gsapFsHi/iuscY1gzvFB72mWnyjFZr0AYvcdcD/CrNYgLqnjes/rckW1A/m00DiZpIjRwMlCIg4Zj7NDND6XOhajxpfTBL6KTm0wrTfBIkJPvNaLSdGEfZVJfV/NQq0katK6laIktM4OJMh/uu9YMsd2/Fw6rUerdPsKqtyHCPiLKTISsmzff0n5u2f5aooICC2sZnv3pgkUS0AWL8HOnWRprQ6wfUT6AZkgOz0nX3Y/3zBIbPy94ckXzWzWSy0qlhk1riGV+pfXbnfHpPnVgkUmt2WJJ0XPsu1YG9T5EYFABPKmfGC6J/JZtFn7YTJaKWRT+tX0cYp67kkXHpOW7ck1G5U7O+5G1MVjsqxzPuUidTXGDxrIHpSb6rK9/jJXxdWwJ1ZbFnEt0dz1ZyZN/XxBtncHu3wdlh7OzWTygNwH08Q8zOxiJnBnkimBAk2GjNa7atRXt2VWpcpMwTOASrxXCAwQoJ5L0YzyQOv+bwUYexlOFXSPc9b2TGJ/UIBXhkb/JEywfM3rDfKeFGtMPF2uf/NP5Odv5+6Ggm61lyJ8AYPhcS1LHMbbDAmGh1riGqQmOAuLYpaGuG+txWUS9Ecl1GSphXRV6UmyqI+hrcwWmU0BavAjSh13tBHRsLKkuZtCTGO+tzyf/MuPVDx4fHI5v4a1IbdsdFkVJqjHYY0koGplWuOH7OJ+wNFmeyUrUirUZjkuV5LKE6zHdASuwSt9wn1v0kqSUdCVOy2wwGqX16Zy1VXZ5xQIDpJ9llb+brKLXw/Q56tkGr/3xo+n4H54hYJJSovV9DKMAYBdsrbKdMBVKGxFjiOcrkgZuTX21wbG99M7uaem2aJXerMxamfpRqCIZq3sbuxrjJ2b00FmNIxzWJdw66rHz1+hp3YO1Q7v8rtidQHERYQXm9NklKWSBLVJXUiKb6tpsgLjNJwX3AFQZkJ/MzEb4SbJD6yNgZ9uxiqjr8Dn1DjNtBdkkKX2uN7LbZHjFLxFgkhK+ub7UaI7vTshNxJ6/DCqRQVHXPcBFTqfJbMTFhkWZ3PhwhnHEQjb8B7OzsKht8D+Xhp06v0i5yMWjpwO/ssQjN7TIbhgWpuUBV15nd3slv6IoXjAOGo7p5fmKTXdbnVLSkXV3FZ3bxviaG7M6Oeg+aEKa76mURyA5zoOCH34dFS7ap4/QgCZNKK9gSuMsuUgz2ijBwGImtCYinbSzKvXXbyZoBdEVJSUgyKkY3gu30CZu6aD1tiTrFVA0xTANa7ENyvWuuRjHeFcS7oW78xqr1b7FURmbZRMbo2BIDZMbiBou5ixZsKx+Eu6e1FSBzZel7uxWogvQabDj2bHbZioT9gGeMMvJ7WCkaiJ1xTvN9kL6X9Ryy5BFHpeig1LYBUHeUvvPuq9gMmIiZYt8NMMlH2Ge0qy22l0ePRK0QJIbWvPTbPGCqZ7Nde4tZFHV+khrjiRhDHmpIJare5X2rVT/I4LE61JLA5UgIQu5HNp9xZ6fKg1qx4pwotbQPwiuyRmIakwmyzMQqQgp3zpOv3/Ab3HZqXHGPOL1PFsDKMhZ0uqmyXjXW1SafIc/2CsbDtzE1ajV9END2tm60zxMMo9TcY7ETNGZ0Ket6ZnYrrMkBfM//zgrUSlpEtb+ehQhg5DN6/aRrH7URaGLGsIdixS8C15A9sg/YVMUitUWbEKy4+ZQxbBuEcXMlU0+jWzLQUVeteCoW15ByTJvcIMxdAFZCx0wG/nVFtRX3cemEj1X1Bw8wY+iPQpNuMi+EhB4xGs/s3hVE7vQBOYUcGWWdZ6tjr9C1LVweCCeNPZF90LyKW6xWDEDXIKTIrLqXkRyE22iruktH4xh+181/7pyL6STIb2KbJd3uCqkL2A0ZOykXU1RWbJvUoK733g4qCe4u93N1VIaa6Ad5s7Tww5/+Gzfs79TYo6cLP/zJ24//57++6Ltu4e3TtJ97jJW8cOENNoqCysKfvf4U1y78+A1hjKP+AO7j3/9ng9vTrP3Lr/vu87jxxc7j//6PmK/5Es+Rv//93Zdy7g+/7WPKx4/5ev6j50ALP37rbX4JuK319NiP3jrDY/w5T2xj4Qd//iXlW6pGULGmpZanoVoWXnujgD723fO1NxqwCxd+8LPPR+nXkSQGSEGVDy5TOPOIUbdlyuculd/5JfWib93WtWyGxjZB/jZz8jy1Zb8NQO41OiI97y2Pjo0gEXyA0pPGe+qjfF3m6eqNeyLdR9jl78gSA/T497/7kjmS4d4cY/nuL5lz7/DKLfBK3Bx0/cKf/qxBs1L93TSg7DS/PmZOfyA/oV0s/gmvCpEyeD9oRb/MtPCjN+WlW2K8+RcwriEVRZrxmIwr0fg7XyxcePP6wmtvPj1MOk/6eyV9ZO7qPSlaSmTL6Qpz6O2B10J6JJIAFEhI3LwIMZKQZJzPd9zBF2QP0RMltYNkWynJyNescY00H5VcC9HZ24fVsx7JKxlEYowC+gWTILaiUG0fyNIL3rzK/ewmM6TL9rExje2T0nsD30Ck9oANb6bPGJ3knmWJaxzwSwav6PnRYcwxFRsjS9B9bF/ApbpP35z5B8rtf46kEz62xediekUvBPFcNNhuCXhu/p69wzO9nuTUbIwsCQfmODx/ZndF3qvNcahee0UnS1qZliyzd7jSOzfHwhjy0E8EaNmGAWrMcVkKnEfYVOVloUwp59Hvxfc5jrGTeVLQrKuEdOo2Ri9Zyt5cGlORzCbbrlFJU+Kz6fC9P7InLbU9PT36OGp2dH+NR2SvMR2e8R0POBZlMsC3qZOxhX5sdV2p10WGSq7K7sc+A83/JpvGa5ojtAkZYRorybl1aqeb2/rv+qTj+QHfzWyS29WnyEIUwJCK2Y3fjp0xQJJ9ZDvv2/uG1LoOi6v4SGenDqObWpnNWzwNuxakOZqNNJ4yhQjo86CugNwUt1/QmJebDxzVfLDtZBjDsoqQqoZMrdpn08tmfkVHI8umQ1rlumSItdvyQ4knwhjSAP191gLp7rg+p6DQk0dZoKP+4MvwQp/e655mRHGhL59T8z4Kdi62M9uU3ZJ6lHZD/UHCzdiP+vmQu1KceR51korSrHhKd0fuiP1mWu7oyypQHe9y7H6Gw/udrf7rrgTM1ufEJL/L4honxhgg7JwjZY9h7p78dqlPsOku3xusKo5CvWrGknHHqVmdhLIZYNNSXYYTZcsaCl0lDFmmymbVy7lAfhyg64YD2oZn/D8pcUShcyMVEAAAAABJRU5ErkJggg=="},4639:t=>{"use strict";t.exports=e},1346:e=>{"use strict";e.exports=t}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,exports:{}};return n[e].call(o.exports,o,o.exports,i),o.exports}i.m=n,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.b=document.baseURI||self.location.href,i.nc=void 0;var o={};return(()=>{"use strict";var e=i(3379),t=i.n(e),n=i(7795),r=i.n(n),o=i(569),a=i.n(o),s=i(3565),l=i.n(s),c=i(9216),u=i.n(c),d=i(4589),p=i.n(d),h=i(5369),f={};f.styleTagTransform=p(),f.setAttributes=l(),f.insert=a().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u();t()(h.Z,f),h.Z&&h.Z.locals&&h.Z.locals})(),(()=>{"use strict";i.d(o,{default:()=>JE});var e={};i.r(e),i.d(e,{hasBrowserEnv:()=>fs,hasStandardBrowserEnv:()=>ms,hasStandardBrowserWebWorkerEnv:()=>gs});var t={};i.r(t),i.d(t,{attentionMarkers:()=>Kw,contentInitial:()=>Ww,disable:()=>Jw,document:()=>Vw,flow:()=>qw,flowInitial:()=>Gw,insideSpan:()=>Yw,string:()=>Xw,text:()=>Zw});var n={};i.r(n),i.d(n,{boolean:()=>pS,booleanish:()=>hS,commaOrSpaceSeparated:()=>yS,commaSeparated:()=>vS,number:()=>mS,overloadedBoolean:()=>fS,spaceSeparated:()=>gS});var r=i(4639),a=i.n(r);function s(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function l(e,t){if(null==e)return{};var n,r,i=s(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function d(e){return e&&"object"===u(e)&&e.constructor===Object}function p(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?c({},e):e;return d(e)&&d(t)&&Object.keys(t).forEach((function(i){"__proto__"!==i&&(d(t[i])&&i in e?r[i]=p(e[i],t[i],n):r[i]=t[i])})),r}var h=["xs","sm","md","lg","xl"];function f(e){var t=function(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===u(t)?t:String(t)}function m(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e,t,n){var r;return c({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),c({paddingLeft:t(2),paddingRight:t(2)},n,m({},e.up("sm"),c({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},m(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),m(r,e.up("sm"),{minHeight:64}),r)},n)}function v(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}const y={black:"#000",white:"#fff"};const b={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"};const w={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"};const x={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"};const S={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};const E={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};const T={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};const P={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function C(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function k(e){if(e.type)return e;if("#"===e.charAt(0))return k(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(v(3,e));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function O(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function _(e){var t="hsl"===(e=k(e)).type?k(function(e){var t=(e=k(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),O({type:s,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function R(e,t){if(e=k(e),t=C(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return O(e)}function A(e,t){if(e=k(e),t=C(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return O(e)}var D={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:y.white,default:b[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},I={text:{primary:y.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:b[800],default:"#303030"},action:{active:y.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function M(e,t,n,r){var i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=A(e.main,i):"dark"===t&&(e.dark=R(e.main,o)))}function L(e){var t=e.primary,n=void 0===t?{light:w[300],main:w[500],dark:w[700]}:t,r=e.secondary,i=void 0===r?{light:x.A200,main:x.A400,dark:x.A700}:r,o=e.error,a=void 0===o?{light:S[300],main:S[500],dark:S[700]}:o,s=e.warning,u=void 0===s?{light:E[300],main:E[500],dark:E[700]}:s,d=e.info,h=void 0===d?{light:T[300],main:T[500],dark:T[700]}:d,f=e.success,m=void 0===f?{light:P[300],main:P[500],dark:P[700]}:f,g=e.type,C=void 0===g?"light":g,k=e.contrastThreshold,O=void 0===k?3:k,R=e.tonalOffset,A=void 0===R?.2:R,L=l(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function j(e){var t=function(e,t){var n=_(e),r=_(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,I.text.primary)>=O?I.text.primary:D.text.primary;return t}var N=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=c({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(v(4,t));if("string"!=typeof e.main)throw new Error(v(5,JSON.stringify(e.main)));return M(e,"light",n,A),M(e,"dark",r,A),e.contrastText||(e.contrastText=j(e.main)),e},F={dark:I,light:D};return p(c({common:y,type:C,primary:N(n),secondary:N(i,"A400","A200","A700"),error:N(a),warning:N(u),info:N(h),success:N(m),grey:b,contrastThreshold:O,getContrastText:j,augmentColor:N,tonalOffset:A},F[C]),L)}function j(e){return Math.round(1e5*e)/1e5}function N(e){return j(e)}var F={textTransform:"uppercase"},B='"Roboto", "Helvetica", "Arial", sans-serif';function z(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,i=void 0===r?B:r,o=n.fontSize,a=void 0===o?14:o,s=n.fontWeightLight,u=void 0===s?300:s,d=n.fontWeightRegular,h=void 0===d?400:d,f=n.fontWeightMedium,m=void 0===f?500:f,g=n.fontWeightBold,v=void 0===g?700:g,y=n.htmlFontSize,b=void 0===y?16:y,w=n.allVariants,x=n.pxToRem,S=l(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var E=a/14,T=x||function(e){return"".concat(e/b*E,"rem")},P=function(e,t,n,r,o){return c({fontFamily:i,fontWeight:e,fontSize:T(t),lineHeight:n},i===B?{letterSpacing:"".concat(j(r/t),"em")}:{},o,w)},C={h1:P(u,96,1.167,-1.5),h2:P(u,60,1.2,-.5),h3:P(h,48,1.167,0),h4:P(h,34,1.235,.25),h5:P(h,24,1.334,0),h6:P(m,20,1.6,.15),subtitle1:P(h,16,1.75,.15),subtitle2:P(m,14,1.57,.1),body1:P(h,16,1.5,.15),body2:P(h,14,1.43,.15),button:P(m,14,1.75,.4,F),caption:P(h,12,1.66,.4),overline:P(h,12,2.66,1,F)};return p(c({htmlFontSize:b,pxToRem:T,round:N,fontFamily:i,fontSize:a,fontWeightLight:u,fontWeightRegular:h,fontWeightMedium:m,fontWeightBold:v},C),S,{clone:!1})}function H(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}const U=["none",H(0,2,1,-1,0,1,1,0,0,1,3,0),H(0,3,1,-2,0,2,2,0,0,1,5,0),H(0,3,3,-2,0,3,4,0,0,1,8,0),H(0,2,4,-1,0,4,5,0,0,1,10,0),H(0,3,5,-1,0,5,8,0,0,1,14,0),H(0,3,5,-1,0,6,10,0,0,1,18,0),H(0,4,5,-2,0,7,10,1,0,2,16,1),H(0,5,5,-3,0,8,10,1,0,3,14,2),H(0,5,6,-3,0,9,12,1,0,3,16,2),H(0,6,6,-3,0,10,14,1,0,4,18,3),H(0,6,7,-4,0,11,15,1,0,4,20,3),H(0,7,8,-4,0,12,17,2,0,5,22,4),H(0,7,8,-4,0,13,19,2,0,5,24,4),H(0,7,9,-4,0,14,21,2,0,5,26,4),H(0,8,9,-5,0,15,22,2,0,6,28,5),H(0,8,10,-5,0,16,24,2,0,6,30,5),H(0,8,11,-5,0,17,26,2,0,6,32,5),H(0,9,11,-5,0,18,28,2,0,7,34,6),H(0,9,12,-6,0,19,29,2,0,7,36,6),H(0,10,13,-6,0,20,31,3,0,8,38,7),H(0,10,13,-6,0,21,33,3,0,8,40,7),H(0,10,14,-6,0,22,35,3,0,8,42,7),H(0,11,14,-7,0,23,36,3,0,9,44,8),H(0,11,15,-7,0,24,38,3,0,9,46,8)];const V={borderRadius:4};function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function G(e,t){if(e){if("string"==typeof e)return W(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(e,t):void 0}}function q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||G(e,t)||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.")}()}var X={xs:0,sm:600,md:960,lg:1280,xl:1920},Z={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(X[e],"px)")}};const Y=function(e,t){return t?p(e,t,{clone:!1}):e};var K={m:"margin",p:"padding"},J={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Q={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},$=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){if(e.length>2){if(!Q[e])return[e];e=Q[e]}var t=q(e.split(""),2),n=t[0],r=t[1],i=K[n],o=J[r]||"";return Array.isArray(o)?o.map((function(e){return i+e})):[i+o]})),ee=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function te(e){var t=e.spacing||8;return"number"==typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"==typeof t?t:function(){}}function ne(e,t){return function(n){return e.reduce((function(e,r){return e[r]=function(e,t){if("string"==typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:"-".concat(n)}(t,n),e}),{})}}function re(e){var t=te(e.theme);return Object.keys(e).map((function(n){if(-1===ee.indexOf(n))return null;var r=ne($(n),t),i=e[n];return function(e,t,n){if(Array.isArray(t)){var r=e.theme.breakpoints||Z;return t.reduce((function(e,i,o){return e[r.up(r.keys[o])]=n(t[o]),e}),{})}if("object"===u(t)){var i=e.theme.breakpoints||Z;return Object.keys(t).reduce((function(e,r){return e[i.up(r)]=n(t[r]),e}),{})}return n(t)}(e,i,r)})).reduce(Y,{})}re.propTypes={},re.filterProps=ee;var ie={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},oe={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function ae(e){return"".concat(Math.round(e),"ms")}const se={easing:ie,duration:oe,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?oe.standard:n,i=t.easing,o=void 0===i?ie.easeInOut:i,a=t.delay,s=void 0===a?0:a;l(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:ae(r)," ").concat(o," ").concat("string"==typeof s?s:ae(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}};const le={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function ce(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,i=void 0===r?{}:r,o=e.palette,a=void 0===o?{}:o,s=e.spacing,u=e.typography,d=void 0===u?{}:u,f=l(e,["breakpoints","mixins","palette","spacing","typography"]),m=L(a),v=function(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,i=void 0===r?"px":r,o=e.step,a=void 0===o?5:o,s=l(e,["values","unit","step"]);function u(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(i,")")}function d(e,t){var r=h.indexOf(t);return r===h.length-1?u(e):"@media (min-width:".concat("number"==typeof n[e]?n[e]:e).concat(i,") and ")+"(max-width:".concat((-1!==r&&"number"==typeof n[h[r+1]]?n[h[r+1]]:t)-a/100).concat(i,")")}return c({keys:h,values:n,up:u,down:function(e){var t=h.indexOf(e)+1,r=n[h[t]];return t===h.length?u("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(i,")")},between:d,only:function(e){return d(e,e)},width:function(e){return n[e]}},s)}(n),y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=te({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"==typeof e)return e;var n=t(e);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}(s),b=p({breakpoints:v,direction:"ltr",mixins:g(v,y,i),overrides:{},palette:m,props:{},shadows:U,typography:z(m,d),spacing:y,shape:V,transitions:se,zIndex:le},f),w=arguments.length,x=new Array(w>1?w-1:0),S=1;S<w;S++)x[S-1]=arguments[S];return b=x.reduce((function(e,t){return p(e,t)}),b)}const ue=ce;const de=a().createContext(null);function pe(){return a().useContext(de)}const he="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";const fe=function(e){var t=e.children,n=e.theme,r=pe(),i=a().useMemo((function(){var e=null===r?n:function(e,t){return"function"==typeof t?t(e):c({},e,t)}(r,n);return null!=e&&(e[he]=null!==r),e}),[n,r]);return a().createElement(de.Provider,{value:i},t)};function me(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var i,o=t.props[n];for(i in o)void 0===r[i]&&(r[i]=o[i]);return r}var ge=i(9019),ve=i.n(ge);const ye=ue();function be(){return pe()||ye}function we(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=pe(),i=me({theme:n,name:"MuiUseMediaQuery",props:{}});var o="function"==typeof e?e(n):e;o=o.replace(/^@media( ?)/m,"");var a="undefined"!=typeof window&&void 0!==window.matchMedia,s=c({},i,t),l=s.defaultMatches,u=void 0!==l&&l,d=s.matchMedia,p=void 0===d?a?window.matchMedia:null:d,h=s.noSsr,f=void 0!==h&&h,m=s.ssrMatchMedia,g=void 0===m?null:m,v=r.useState((function(){return f&&a?p(o).matches:g?g(o).matches:u})),y=v[0],b=v[1];return r.useEffect((function(){var e=!0;if(a){var t=p(o),n=function(){e&&b(t.matches)};return n(),t.addListener(n),function(){e=!1,t.removeListener(n)}}}),[o,p,a]),y}var xe="undefined"==typeof window?r.useEffect:r.useLayoutEffect;const Se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=e.withTheme,i=void 0!==n&&n,o=e.noSSR,a=void 0!==o&&o,s=e.initialWidth;function u(e){var n=be(),o=e.theme||n,u=me({theme:o,name:"MuiWithWidth",props:c({},e)}),d=u.initialWidth,p=u.width,h=l(u,["initialWidth","width"]),f=r.useState(!1),m=f[0],g=f[1];xe((function(){g(!0)}),[]);var v=o.breakpoints.keys.slice().reverse().reduce((function(e,t){var n=we(o.breakpoints.up(t));return!e&&n?t:e}),null),y=c({width:p||(m||a?v:void 0)||d||s},i?{theme:o}:{},h);return void 0===y.width?null:r.createElement(t,y)}return ve()(u,t),u}};var Ee;!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(Ee||(Ee={}));var Te=function(e){return e};var Pe="beforeunload",Ce="popstate";function ke(e){e.preventDefault(),e.returnValue=""}function Oe(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function _e(){return Math.random().toString(36).substr(2,8)}function Re(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,i=void 0===r?"":r,o=e.hash,a=void 0===o?"":o;return i&&"?"!==i&&(n+="?"===i.charAt(0)?i:"?"+i),a&&"#"!==a&&(n+="#"===a.charAt(0)?a:"#"+a),n}function Ae(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var De=i(690),Ie=i(8736),Me=i(1346),Le=i.n(Me);var je=function(e){e()},Ne=function(){return je},Fe=(0,r.createContext)(null);var Be=function(){throw new Error("uSES not initialized!")};var ze=i(5683),He=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Ue(e,t,n,r,i){var o,a,s,l,c,u=i.areStatesEqual,d=i.areOwnPropsEqual,p=i.areStatePropsEqual,h=!1;function f(i,h){var f,m,g=!d(h,a),v=!u(i,o,h,a);return o=i,a=h,g&&v?(s=e(o,a),t.dependsOnOwnProps&&(l=t(r,a)),c=n(s,l,a)):g?(e.dependsOnOwnProps&&(s=e(o,a)),t.dependsOnOwnProps&&(l=t(r,a)),c=n(s,l,a)):v?(f=e(o,a),m=!p(f,s),s=f,m&&(c=n(s,l,a)),c):c}return function(i,u){return h?f(i,u):(s=e(o=i,a=u),l=t(r,a),c=n(s,l,a),h=!0,c)}}function Ve(e){return function(t){var n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function We(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function Ge(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e,void 0)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=We(e);var i=r(t,n);return"function"==typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=We(i),i=r(t,n)),i},r}}function qe(e,t){return function(n,r){throw new Error("Invalid value of type ".concat(typeof e," for ").concat(t," argument when connecting component ").concat(r.wrappedComponentName,"."))}}function Xe(e,t,n){return c({},n,e,t)}var Ze={notify:function(){},get:function(){return[]}};function Ye(e,t){var n,r=Ze;function i(){a.onStateChange&&a.onStateChange()}function o(){n||(n=t?t.addNestedSub(i):e.subscribe(i),r=function(){var e=Ne(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}())}var a={addNestedSub:function(e){return o(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:i,isSubscribed:function(){return Boolean(n)},trySubscribe:o,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=Ze)},getListeners:function(){return r}};return a}var Ke=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?r.useLayoutEffect:r.useEffect;function Je(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function Qe(e,t){if(Je(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!Je(e[n[i]],t[n[i]]))return!1;return!0}function $e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||tt(e,t)||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 et(e){return function(e){if(Array.isArray(e))return nt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||tt(e)||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 tt(e,t){if(e){if("string"==typeof e)return nt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nt(e,t):void 0}}function nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var rt=["reactReduxForwardedRef"],it=Be,ot=[null,null];function at(e,t,n,r,i,o){e.current=r,n.current=!1,i.current&&(i.current=null,o())}function st(e,t){return e===t}const lt=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=(i.pure,i.areStatesEqual),l=void 0===o?st:o,u=i.areOwnPropsEqual,d=void 0===u?Qe:u,p=i.areStatePropsEqual,h=void 0===p?Qe:p,f=i.areMergedPropsEqual,m=void 0===f?Qe:f,g=i.forwardRef,v=void 0!==g&&g,y=i.context,b=void 0===y?Fe:y,w=function(e){return e?"function"==typeof e?Ge(e):qe(e,"mapStateToProps"):Ve((function(){return{}}))}(e),x=function(e){return e&&"object"==typeof e?Ve((function(t){return function(e,t){var n={},r=function(){var r=e[i];"function"==typeof r&&(n[i]=function(){return t(r.apply(void 0,arguments))})};for(var i in e)r();return n}(e,t)})):e?"function"==typeof e?Ge(e):qe(e,"mapDispatchToProps"):Ve((function(e){return{dispatch:e}}))}(t),S=function(e){return e?"function"==typeof e?function(e){return function(t,n){n.displayName;var r,i=n.areMergedPropsEqual,o=!1;return function(t,n,a){var s=e(t,n,a);return o?i(s,r)||(r=s):(o=!0,r=s),r}}}(e):qe(e,"mergeProps"):function(){return Xe}}(n),E=Boolean(e);return function(e){var t=e.displayName||e.name||"Component",n="Connect(".concat(t,")"),i={shouldHandleStateChanges:E,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:w,initMapDispatchToProps:x,initMergeProps:S,areStatesEqual:l,areStatePropsEqual:h,areOwnPropsEqual:d,areMergedPropsEqual:m};function o(t){var n=(0,r.useMemo)((function(){var e=t.reactReduxForwardedRef,n=s(t,rt);return[t.context,e,n]}),[t]),o=$e(n,3),l=o[0],u=o[1],d=o[2],p=(0,r.useMemo)((function(){return l&&l.Consumer&&(0,ze.isContextConsumer)(a().createElement(l.Consumer,null))?l:b}),[l,b]),h=(0,r.useContext)(p),f=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),m=Boolean(h)&&Boolean(h.store);var g=f?t.store:h.store,v=m?h.getServerState:g.getState,y=(0,r.useMemo)((function(){return function(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,o=s(t,He);return Ue(n(e,o),r(e,o),i(e,o),e,o)}(g.dispatch,i)}),[g]),w=(0,r.useMemo)((function(){if(!E)return ot;var e=Ye(g,f?void 0:h.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[g,f,h]),x=$e(w,2),S=x[0],T=x[1],P=(0,r.useMemo)((function(){return f?h:c({},h,{subscription:S})}),[f,h,S]),C=(0,r.useRef)(),k=(0,r.useRef)(d),O=(0,r.useRef)(),_=(0,r.useRef)(!1),R=((0,r.useRef)(!1),(0,r.useRef)(!1)),A=(0,r.useRef)();Ke((function(){return R.current=!0,function(){R.current=!1}}),[]);var D,I,M,L,j=(0,r.useMemo)((function(){return function(){return O.current&&d===k.current?O.current:y(g.getState(),d)}}),[g,d]),N=(0,r.useMemo)((function(){return function(e){return S?function(e,t,n,r,i,o,a,s,l,c,u){if(!e)return function(){};var d=!1,p=null,h=function(){if(!d&&s.current){var e,n,h=t.getState();try{e=r(h,i.current)}catch(e){n=e,p=e}n||(p=null),e===o.current?a.current||c():(o.current=e,l.current=e,a.current=!0,u())}};return n.onStateChange=h,n.trySubscribe(),h(),function(){if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}(E,g,S,y,k,C,_,R,O,T,e):function(){}}}),[S]);D=at,I=[k,C,_,d,O,T],Ke((function(){return D.apply(void 0,et(I))}),M);try{L=it(N,j,v?function(){return y(v(),d)}:j)}catch(e){throw A.current&&(e.message+="\nThe error may be correlated with this previous error:\n".concat(A.current.stack,"\n\n")),e}Ke((function(){A.current=void 0,O.current=void 0,C.current=L}));var F=(0,r.useMemo)((function(){return a().createElement(e,c({},L,{ref:u}))}),[u,e,L]);return(0,r.useMemo)((function(){return E?a().createElement(p.Provider,{value:P},F):F}),[p,F,P])}var u=a().memo(o);if(u.WrappedComponent=e,u.displayName=o.displayName=n,v){var p=a().forwardRef((function(e,t){return a().createElement(u,c({},e,{reactReduxForwardedRef:t}))}));return p.displayName=n,p.WrappedComponent=e,ve()(p,e)}return ve()(u,e)}};const ct=function(e){var t=e.store,n=e.context,i=e.children,o=e.serverState,s=(0,r.useMemo)((function(){var e=Ye(t);return{store:t,subscription:e,getServerState:o?function(){return o}:void 0}}),[t,o]),l=(0,r.useMemo)((function(){return t.getState()}),[t]);Ke((function(){var e=s.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),l!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=void 0}}),[s,l]);var c=n||Fe;return a().createElement(c.Provider,{value:s},i)};var ut,dt,pt;function ht(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mt(r.key),r)}}function ft(e,t,n){return t&&ht(e.prototype,t),n&&ht(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mt(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function gt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vt(e){var t=wt();return function(){var n,r=St(e);if(t){var i=St(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function yt(e){var t="function"==typeof Map?new Map:void 0;return yt=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return bt(e,arguments,St(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),xt(n,e)},yt(e)}function bt(e,t,n){return bt=wt()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&xt(i,n.prototype),i},bt.apply(null,arguments)}function wt(){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(e){return!1}}function xt(e,t){return xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xt(e,t)}function St(e){return St=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},St(e)}function Et(e,t){return Pt(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||Ot(e,t)||Tt()}function Tt(){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 Pt(e){if(Array.isArray(e))return e}function Ct(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ot(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function kt(e){return function(e){if(Array.isArray(e))return Rt(e)}(e)||_t(e)||Ot(e)||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 Ot(e,t){if(e){if("string"==typeof e)return Rt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rt(e,t):void 0}}function _t(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function At(){return At=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},At.apply(this,arguments)}ut=Ie.useSyncExternalStoreWithSelector,function(e){it=e}(De.useSyncExternalStore),dt=Me.unstable_batchedUpdates,je=dt,function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(pt||(pt={}));var Dt,It="popstate";function Mt(e,t){if(!1===e||null==e)throw new Error(t)}function Lt(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function jt(e,t){return{usr:e.state,key:e.key,idx:t}}function Nt(e,t,n,r){return void 0===n&&(n=null),At({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?Bt(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function Ft(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,i=void 0===r?"":r,o=e.hash,a=void 0===o?"":o;return i&&"?"!==i&&(n+="?"===i.charAt(0)?i:"?"+i),a&&"#"!==a&&(n+="#"===a.charAt(0)?a:"#"+a),n}function Bt(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zt(e,t,n,r){void 0===r&&(r={});var i=r,o=i.window,a=void 0===o?document.defaultView:o,s=i.v5Compat,l=void 0!==s&&s,c=a.history,u=pt.Pop,d=null,p=h();function h(){return(c.state||{idx:null}).idx}function f(){u=pt.Pop;var e=h(),t=null==e?null:e-p;p=e,d&&d({action:u,location:g.location,delta:t})}function m(e){var t="null"!==a.location.origin?a.location.origin:a.location.href,n="string"==typeof e?e:Ft(e);return Mt(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==p&&(p=0,c.replaceState(At({},c.state,{idx:p}),""));var g={get action(){return u},get location(){return e(a,c)},listen:function(e){if(d)throw new Error("A history only accepts one active listener");return a.addEventListener(It,f),d=e,function(){a.removeEventListener(It,f),d=null}},createHref:function(e){return t(a,e)},createURL:m,encodeLocation:function(e){var t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){u=pt.Push;var r=Nt(g.location,e,t);n&&n(r,e);var i=jt(r,p=h()+1),o=g.createHref(r);try{c.pushState(i,"",o)}catch(e){a.location.assign(o)}l&&d&&d({action:u,location:g.location,delta:1})},replace:function(e,t){u=pt.Replace;var r=Nt(g.location,e,t);n&&n(r,e);var i=jt(r,p=h()),o=g.createHref(r);c.replaceState(i,"",o),l&&d&&d({action:u,location:g.location,delta:0})},go:function(e){return c.go(e)}};return g}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Dt||(Dt={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function Ht(e,t,n){void 0===n&&(n="/");var r=tn(("string"==typeof t?Bt(t):t).pathname||"/",n);if(null==r)return null;var i=Ut(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var o=null,a=0;null==o&&a<i.length;++a)o=Qt(i[a],en(r));return o}function Ut(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");var i=function(e,i,o){var a={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(Mt(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));var s=an([r,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(Mt(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),Ut(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:Jt(s,e.index),routesMeta:l})};return e.forEach((function(e,t){var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?")){var r,o=Ct(Vt(e.path));try{for(o.s();!(r=o.n()).done;){var a=r.value;i(e,t,a)}}catch(e){o.e(e)}finally{o.f()}}else i(e,t)})),t}function Vt(e){var t=e.split("/");if(0===t.length)return[];var n,r=Pt(n=t)||_t(n)||Ot(n)||Tt(),i=r[0],o=r.slice(1),a=i.endsWith("?"),s=i.replace(/\?$/,"");if(0===o.length)return a?[s,""]:[s];var l=Vt(o.join("/")),c=[];return c.push.apply(c,kt(l.map((function(e){return""===e?s:[s,e].join("/")})))),a&&c.push.apply(c,kt(l)),c.map((function(t){return e.startsWith("/")&&""===t?"/":t}))}var Wt=/^:\w+$/,Gt=3,qt=2,Xt=1,Zt=10,Yt=-2,Kt=function(e){return"*"===e};function Jt(e,t){var n=e.split("/"),r=n.length;return n.some(Kt)&&(r+=Yt),t&&(r+=qt),n.filter((function(e){return!Kt(e)})).reduce((function(e,t){return e+(Wt.test(t)?Gt:""===t?Xt:Zt)}),r)}function Qt(e,t){for(var n=e.routesMeta,r={},i="/",o=[],a=0;a<n.length;++a){var s=n[a],l=a===n.length-1,c="/"===i?t:t.slice(i.length)||"/",u=$t({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},c);if(!u)return null;Object.assign(r,u.params);var d=s.route;o.push({params:r,pathname:an([i,u.pathname]),pathnameBase:sn(an([i,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(i=an([i,u.pathnameBase]))}return o}function $t(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});var n=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);Lt("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');var r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(function(e,t){return r.push(t),"/([^\\/]+)"}));e.endsWith("*")?(r.push("*"),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");var o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),r=Et(n,2),i=r[0],o=r[1],a=t.match(i);if(!a)return null;var s=a[0],l=s.replace(/(.)\/+$/,"$1"),c=a.slice(1),u=o.reduce((function(e,t,n){if("*"===t){var r=c[n]||"";l=s.slice(0,s.length-r.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return Lt(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(c[n]||"",t),e}),{});return{params:u,pathname:s,pathnameBase:l,pattern:e}}function en(e){try{return decodeURI(e)}catch(t){return Lt(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function tn(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function nn(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function rn(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function on(e,t,n,r){var i;void 0===r&&(r=!1),"string"==typeof e?i=Bt(e):(Mt(!(i=At({},e)).pathname||!i.pathname.includes("?"),nn("?","pathname","search",i)),Mt(!i.pathname||!i.pathname.includes("#"),nn("#","pathname","hash",i)),Mt(!i.search||!i.search.includes("#"),nn("#","search","hash",i)));var o,a=""===e||""===i.pathname,s=a?"/":i.pathname;if(r||null==s)o=n;else{var l=t.length-1;if(s.startsWith("..")){for(var c=s.split("/");".."===c[0];)c.shift(),l-=1;i.pathname=c.join("/")}o=l>=0?t[l]:"/"}var u=function(e,t){void 0===t&&(t="/");var n="string"==typeof e?Bt(e):e,r=n.pathname,i=n.search,o=void 0===i?"":i,a=n.hash,s=void 0===a?"":a,l=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:l,search:ln(o),hash:cn(s)}}(i,o),d=s&&"/"!==s&&s.endsWith("/"),p=(a||"."===s)&&n.endsWith("/");return u.pathname.endsWith("/")||!d&&!p||(u.pathname+="/"),u}var an=function(e){return e.join("/").replace(/\/\/+/g,"/")},sn=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},ln=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},cn=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""},un=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xt(e,t)}(n,e);var t=vt(n);function n(){return gt(this,n),t.apply(this,arguments)}return ft(n)}(yt(Error));function dn(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}var pn=["post","put","patch","delete"],hn=(new Set(pn),["get"].concat(pn));new Set(hn),new Set([301,302,303,307,308]),new Set([307,308]),"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement;Symbol("deferred");function fn(e){return function(e){if(Array.isArray(e))return gn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||mn(e)||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 mn(e,t){if(e){if("string"==typeof e)return gn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gn(e,t):void 0}}function gn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wn(r.key),r)}}function bn(e,t,n){return t&&yn(e.prototype,t),n&&yn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function wn(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function xn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sn(e,t)}function Sn(e,t){return Sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sn(e,t)}function En(e){var t=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(e){return!1}}();return function(){var n,r=Tn(e);if(t){var i=Tn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function Tn(e){return Tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Tn(e)}function Pn(){return Pn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pn.apply(this,arguments)}var Cn=r.createContext(null);var kn=r.createContext(null);var On=r.createContext(null);var _n=r.createContext(null);var Rn=r.createContext(null);var An=r.createContext({outlet:null,matches:[],isDataRoute:!1});var Dn=r.createContext(null);function In(){return null!=r.useContext(Rn)}function Mn(){return In()||Mt(!1),r.useContext(Rn).location}function Ln(e){r.useContext(_n).static||r.useLayoutEffect(e)}function jn(){return r.useContext(An).isDataRoute?function(){var e=Gn(Bn.UseNavigateStable).router,t=Xn(zn.UseNavigateStable),n=r.useRef(!1);Ln((function(){n.current=!0}));var i=r.useCallback((function(r,i){void 0===i&&(i={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,Pn({fromRouteId:t},i)))}),[e,t]);return i}():function(){In()||Mt(!1);var e=r.useContext(_n),t=e.basename,n=e.navigator,i=r.useContext(An).matches,o=Mn().pathname,a=JSON.stringify(rn(i).map((function(e){return e.pathnameBase}))),s=r.useRef(!1);Ln((function(){s.current=!0}));var l=r.useCallback((function(e,r){if(void 0===r&&(r={}),s.current)if("number"!=typeof e){var i=on(e,JSON.parse(a),o,"path"===r.relative);"/"!==t&&(i.pathname="/"===i.pathname?t:an([t,i.pathname])),(r.replace?n.replace:n.push)(i,r.state,r)}else n.go(e)}),[t,n,a,o]);return l}()}function Nn(e,t,n){In()||Mt(!1);var i,o=r.useContext(_n).navigator,a=r.useContext(An).matches,s=a[a.length-1],l=s?s.params:{},c=(s&&s.pathname,s?s.pathnameBase:"/"),u=(s&&s.route,Mn());if(t){var d,p="string"==typeof t?Bt(t):t;"/"===c||(null==(d=p.pathname)?void 0:d.startsWith(c))||Mt(!1),i=p}else i=u;var h=i.pathname||"/",f=Ht(e,{pathname:"/"===c?h:h.slice(c.length)||"/"});var m=Wn(f&&f.map((function(e){return Object.assign({},e,{params:Object.assign({},l,e.params),pathname:an([c,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:an([c,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})})),a,n);return t&&m?r.createElement(Rn.Provider,{value:{location:Pn({pathname:"/",search:"",hash:"",state:null,key:"default"},i),navigationType:pt.Pop}},m):m}function Fn(){var e=function(){var e,t=r.useContext(Dn),n=qn(zn.UseRouteError),i=Xn(zn.UseRouteError);if(t)return t;return null==(e=n.errors)?void 0:e[i]}(),t=dn(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i};return r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:o},n):null,null)}var Bn,zn,Hn=r.createElement(Fn,null),Un=function(e){xn(n,e);var t=En(n);function n(e){var r;return vn(this,n),(r=t.call(this,e)).state={location:e.location,revalidation:e.revalidation,error:e.error},r}return bn(n,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?r.createElement(An.Provider,{value:this.props.routeContext},r.createElement(Dn.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}}]),n}(r.Component);function Vn(e){var t=e.routeContext,n=e.match,i=e.children,o=r.useContext(Cn);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),r.createElement(An.Provider,{value:t},i)}function Wn(e,t,n){var i;if(void 0===t&&(t=[]),void 0===n&&(n=null),null==e){var o;if(null==(o=n)||!o.errors)return null;e=n.matches}var a=e,s=null==(i=n)?void 0:i.errors;if(null!=s){var l=a.findIndex((function(e){return e.route.id&&(null==s?void 0:s[e.route.id])}));l>=0||Mt(!1),a=a.slice(0,Math.min(a.length,l+1))}return a.reduceRight((function(e,i,o){var l=i.route.id?null==s?void 0:s[i.route.id]:null,c=null;n&&(c=i.route.errorElement||Hn);var u=t.concat(a.slice(0,o+1)),d=function(){var t;return t=l?c:i.route.Component?r.createElement(i.route.Component,null):i.route.element?i.route.element:e,r.createElement(Vn,{match:i,routeContext:{outlet:e,matches:u,isDataRoute:null!=n},children:t})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===o)?r.createElement(Un,{location:n.location,revalidation:n.revalidation,component:c,error:l,children:d(),routeContext:{outlet:null,matches:u,isDataRoute:!0}}):d()}),null)}function Gn(e){var t=r.useContext(Cn);return t||Mt(!1),t}function qn(e){var t=r.useContext(kn);return t||Mt(!1),t}function Xn(e){var t=function(e){var t=r.useContext(An);return t||Mt(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||Mt(!1),n.route.id}!function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"}(Bn||(Bn={})),function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"}(zn||(zn={}));var Zn;function Yn(e){var t=e.to,n=e.replace,i=e.state,o=e.relative;In()||Mt(!1);var a=r.useContext(An).matches,s=Mn().pathname,l=jn(),c=on(t,rn(a).map((function(e){return e.pathnameBase})),s,"path"===o),u=JSON.stringify(c);return r.useEffect((function(){return l(JSON.parse(u),{replace:n,state:i,relative:o})}),[l,u,o,n,i]),null}function Kn(e){Mt(!1)}function Jn(e){var t=e.basename,n=void 0===t?"/":t,i=e.children,o=void 0===i?null:i,a=e.location,s=e.navigationType,l=void 0===s?pt.Pop:s,c=e.navigator,u=e.static,d=void 0!==u&&u;In()&&Mt(!1);var p=n.replace(/^\/*/,"/"),h=r.useMemo((function(){return{basename:p,navigator:c,static:d}}),[p,c,d]);"string"==typeof a&&(a=Bt(a));var f=a,m=f.pathname,g=void 0===m?"/":m,v=f.search,y=void 0===v?"":v,b=f.hash,w=void 0===b?"":b,x=f.state,S=void 0===x?null:x,E=f.key,T=void 0===E?"default":E,P=r.useMemo((function(){var e=tn(g,p);return null==e?null:{location:{pathname:e,search:y,hash:w,state:S,key:T},navigationType:l}}),[p,g,y,w,S,T,l]);return null==P?null:r.createElement(_n.Provider,{value:h},r.createElement(Rn.Provider,{children:o,value:P}))}function Qn(e){var t=e.children,n=e.location;return Nn(er(t),n)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Zn||(Zn={}));var $n=new Promise((function(){}));r.Component;function er(e,t){void 0===t&&(t=[]);var n=[];return r.Children.forEach(e,(function(e,i){if(r.isValidElement(e)){var o=[].concat(fn(t),[i]);if(e.type!==r.Fragment){e.type!==Kn&&Mt(!1),e.props.index&&e.props.children&&Mt(!1);var a={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=er(e.props.children,o)),n.push(a)}else n.push.apply(n,er(e.props.children,o))}})),n}function tr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||rr(e,t)||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 nr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=rr(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function rr(e,t){if(e){if("string"==typeof e)return ir(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ir(e,t):void 0}}function ir(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function or(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((function(t,n){var r=e[n];return t.concat(Array.isArray(r)?r.map((function(e){return[n,e]})):[[n,r]])}),[]))}function ar(e){var t=e.basename,n=e.children,i=e.window,o=r.useRef();null==o.current&&(o.current=function(e){return void 0===e&&(e={}),zt((function(e,t){var n=Bt(e.location.hash.substr(1)),r=n.pathname,i=void 0===r?"/":r,o=n.search,a=void 0===o?"":o,s=n.hash;return Nt("",{pathname:i,search:a,hash:void 0===s?"":s},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){var n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){var i=e.location.href,o=i.indexOf("#");r=-1===o?i:i.slice(0,o)}return r+"#"+("string"==typeof t?t:Ft(t))}),(function(e,t){Lt("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:i,v5Compat:!0}));var a=o.current,s=tr(r.useState({action:a.action,location:a.location}),2),l=s[0],c=s[1];return r.useLayoutEffect((function(){return a.listen(c)}),[a]),r.createElement(Jn,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a})}"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement;var sr,lr;function cr(e){var t=r.useRef(or(e)),n=r.useRef(!1),i=Mn(),o=r.useMemo((function(){return function(e,t){var n=or(e);if(t){var r,i=nr(t.keys());try{var o=function(){var e=r.value;n.has(e)||t.getAll(e).forEach((function(t){n.append(e,t)}))};for(i.s();!(r=i.n()).done;)o()}catch(e){i.e(e)}finally{i.f()}}return n}(i.search,n.current?null:t.current)}),[i.search]),a=jn(),s=r.useCallback((function(e,t){var r=or("function"==typeof e?e(o):e);n.current=!0,a("?"+r,t)}),[a,o]);return[o,s]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(sr||(sr={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(lr||(lr={}));function ur(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ur(Object(n),!0).forEach((function(t){pr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ur(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pr(e,t,n){return(t=fr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fr(r.key),r)}}function fr(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function mr(e,t){return mr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},mr(e,t)}function gr(e){var t=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(e){return!1}}();return function(){var n,r=yr(e);if(t){var i=yr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return vr(e)}(this,n)}}function vr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yr(e){return yr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yr(e)}var br=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mr(e,t)}(o,e);var t,n,r,i=gr(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).onDrag=function(e){if(t.dragging){var n,r,i,o=window.innerWidth-2*t.dividerWidth;1===t.activeDivider?r=o-(n=e.clientX-t.dividerWidth/2)-(i=o*t.splitFractionRight):(i=o-e.clientX-t.dividerWidth/2,r=o-(n=o*t.splitFraction)-i),n>=t.leftPaneMinWidth&&r>=t.rightPaneMinWidth&&i>=t.thirdPaneMinWidth&&(console.log(o,n,i),t.splitFraction=0===o?0:n/o,t.splitFractionRight=0===o?0:i/o,t.updateUI()),t.updatePaneSize()}},t.onStartDrag=function(e){t.dragging=!0,t.activeDivider="first"===e?1:2},t.onEndDrag=function(e){t.dragging=!1,t.activeDivider=0},t.onResize=function(e){t.updatePaneSize()},t.firstFolio=e.document.folios[0],t.rightPaneMinWidth="glossary"===e.rightPane.props.documentView.right.transcriptionType?450:200,t.leftPaneMinWidth="glossary"===e.leftPane.props.documentView.left.transcriptionType?450:200,t.thirdPaneMinWidth="glossary"===e.thirdPane.props.documentView.third.transcriptionType?450:"g"===e.thirdPane.props.documentView.third.transcriptionType?0:200,t.splitFraction=e.threePanel?.49:.5,t.splitFractionRight=e.threePanel?.01:0,t.dividerWidth=16;window.innerWidth;return t.state={style:{gridTemplateColumns:"".concat(t.splitFraction,"fr ").concat(t.dividerWidth,"px ").concat(1-t.splitFraction-t.splitFractionRight,"fr ").concat(t.dividerWidth,"px ").concat(t.splitFractionRight,"fr")}},t.dragging=!1,t.activeDivider=0,t.onDrag=t.onDrag.bind(vr(t)),t.onResize=t.onResize.bind(vr(t)),t.onEndDrag=t.onEndDrag.bind(vr(t)),t.updatePaneSize=t.updatePaneSize.bind(vr(t)),t.updatePaneSize=t.updatePaneSize.bind(vr(t)),t}return t=o,n=[{key:"updateUI",value:function(){var e=this.splitFraction,t=this.splitFractionRight,n=1-e-t;this.setState(dr(dr({},this.state),{},{style:dr(dr({},this.state.style),{},{gridTemplateColumns:"".concat(e,"fr ").concat(this.dividerWidth,"px ").concat(n,"fr ").concat(this.dividerWidth,"px ").concat(t,"fr")})}))}},{key:"updatePaneSize",value:function(){var e=Math.floor(Math.abs(window.innerWidth*this.splitFraction)),t=Math.floor(Math.abs(window.innerWidth*this.splitFractionRight)),n=Math.floor(window.innerWidth*(1-this.splitFraction-this.splitFractionRight));this.props.onWidth&&e>=this.leftPaneMinWidth&&n>=this.rightPaneMinWidth&&t>=this.thirdPaneMinWidth&&this.props.onWidth(e,n,t)}},{key:"componentDidMount",value:function(){if(this.updateUI(),window.addEventListener("pointermove",this.onDrag),window.addEventListener("pointerup",this.onEndDrag),window.addEventListener("resize",this.onResize),console.log(this.props),this.props.onWidth){var e=Math.floor(Math.abs(window.innerWidth*this.splitFraction)),t=Math.floor(window.innerWidth*(1-this.splitFraction)),n=Math.floor(window.innerWidth*(1-this.splitFraction));this.props.onWidth(e,t,n)}}},{key:"componentDidUpdate",value:function(e){this.rightPaneMinWidth="glossary"===this.props.rightPane.props.documentView.right.transcriptionType?450:200,this.leftPaneMinWidth="glossary"===this.props.leftPane.props.documentView.left.transcriptionType?450:200,this.thirdPaneMinWidth="glossary"===this.props.thirdPane.props.documentView.third.transcriptionType?450:"g"===this.props.thirdPane.props.documentView.third.transcriptionType?0:200}},{key:"componentWillUnmount",value:function(){window.removeEventListener("pointermove",this.onDrag),window.removeEventListener("pointerup",this.onEndDrag),window.removeEventListener("resize",this.onResize)}},{key:"renderDivider",value:function(e){var t=this;return a().createElement("div",{className:"divider ".concat(e,"_divider"),onPointerDown:function(){return t.onStartDrag(e)}},a().createElement("div",{className:"drawer-button hidden",onClick:this.onDrawerButton},a().createElement("i",{className:"drawer-icon fas fa-caret-left fa-2x"}," ")))}},{key:"render",value:function(){return a().createElement("div",{className:"split-pane-view three-pane",style:dr({},this.state.style)},this.props.leftPane,this.renderDivider("first"),this.props.rightPane,this.props.threePanel&&this.renderDivider("second"),this.props.threePanel&&this.props.thirdPane)}}],n&&hr(t.prototype,n),r&&hr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(r.Component);const wr=lt((function(e){return{document:e.document}}))(br);function xr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Sr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xr(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Er(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Tr="function"==typeof Symbol&&Symbol.observable||"@@observable",Pr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Cr={INIT:"@@redux/INIT"+Pr(),REPLACE:"@@redux/REPLACE"+Pr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Pr()}};function kr(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Or(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Er(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Er(1));return n(Or)(e,t)}if("function"!=typeof e)throw new Error(Er(2));var i=e,o=t,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function u(){if(l)throw new Error(Er(3));return o}function d(e){if("function"!=typeof e)throw new Error(Er(4));if(l)throw new Error(Er(5));var t=!0;return c(),s.push(e),function(){if(t){if(l)throw new Error(Er(6));t=!1,c();var n=s.indexOf(e);s.splice(n,1),a=null}}}function p(e){if(!kr(e))throw new Error(Er(7));if(void 0===e.type)throw new Error(Er(8));if(l)throw new Error(Er(9));try{l=!0,o=i(o,e)}finally{l=!1}for(var t=a=s,n=0;n<t.length;n++){(0,t[n])()}return e}return p({type:Cr.INIT}),(r={dispatch:p,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Er(10));i=e,p({type:Cr.REPLACE})}})[Tr]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(Er(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}})[Tr]=function(){return this},e},r}function _r(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];0,"function"==typeof e[i]&&(n[i]=e[i])}var o,a=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:Cr.INIT}))throw new Error(Er(12));if(void 0===n(void 0,{type:Cr.PROBE_UNKNOWN_ACTION()}))throw new Error(Er(13))}))}(n)}catch(e){o=e}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var r=!1,i={},s=0;s<a.length;s++){var l=a[s],c=n[l],u=e[l],d=c(u,t);if(void 0===d){t&&t.type;throw new Error(Er(14))}i[l]=d,r=r||d!==u}return(r=r||a.length!==Object.keys(e).length)?i:e}}function Rr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}var Ar=function(e){return"@@redux-saga/"+e},Dr=Ar("CANCEL_PROMISE"),Ir=Ar("CHANNEL_END"),Mr=Ar("IO"),Lr=Ar("MATCH"),jr=Ar("MULTICAST"),Nr=Ar("SAGA_ACTION"),Fr=Ar("SELF_CANCELLATION"),Br=Ar("TASK"),zr=Ar("TASK_CANCEL"),Hr=Ar("TERMINATE"),Ur=Ar("LOCATION"),Vr=function(e){return null==e},Wr=function(e){return null!=e},Gr=function(e){return"function"==typeof e},qr=function(e){return"string"==typeof e},Xr=Array.isArray,Zr=function(e){return e&&Gr(e.then)},Yr=function(e){return e&&Gr(e.next)&&Gr(e.throw)},Kr=function e(t){return t&&(qr(t)||$r(t)||Gr(t)||Xr(t)&&t.every(e))},Jr=function(e){return e&&Gr(e.take)&&Gr(e.close)},Qr=function(e){return Gr(e)&&e.hasOwnProperty("toString")},$r=function(e){return Boolean(e)&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype},ei=function(e){return Jr(e)&&e[jr]};var ti=function(e){return function(){return e}}(!0),ni=function(){};var ri=function(e){return e};"function"==typeof Symbol&&Symbol.asyncIterator&&Symbol.asyncIterator;var ii=function(e,t){c(e,t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach((function(n){e[n]=t[n]}))};function oi(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}var ai=function(e){throw e},si=function(e){return{value:e,done:!0}};function li(e,t,n){void 0===t&&(t=ai),void 0===n&&(n="iterator");var r={meta:{name:n},next:e,throw:t,return:si,isSagaIterator:!0};return"undefined"!=typeof Symbol&&(r[Symbol.iterator]=function(){return r}),r}function ci(e,t){var n=t.sagaStack;console.error(e),console.error(n)}var ui=function(e){return Array.apply(null,new Array(e))},di=function(e){return function(t){return e(Object.defineProperty(t,Nr,{value:!0}))}},pi=function(e){return e===Hr},hi=function(e){return e===zr},fi=function(e){return pi(e)||hi(e)};function mi(e,t){var n=Object.keys(e),r=n.length;var i,o=0,a=Xr(e)?ui(r):{},s={};return n.forEach((function(e){var n=function(n,s){i||(s||fi(n)?(t.cancel(),t(n,s)):(a[e]=n,++o===r&&(i=!0,t(a))))};n.cancel=ni,s[e]=n})),t.cancel=function(){i||(i=!0,n.forEach((function(e){return s[e].cancel()})))},s}function gi(e){return{name:e.name||"anonymous",location:vi(e)}}function vi(e){return e[Ur]}function yi(e,t){void 0===e&&(e=10);var n=new Array(e),r=0,i=0,o=0,a=function(t){n[i]=t,i=(i+1)%e,r++},s=function(){if(0!=r){var t=n[o];return n[o]=null,r--,o=(o+1)%e,t}},l=function(){for(var e=[];r;)e.push(s());return e};return{isEmpty:function(){return 0==r},put:function(s){var c;if(r<e)a(s);else switch(t){case 1:throw new Error("Channel's Buffer overflow!");case 3:n[i]=s,o=i=(i+1)%e;break;case 4:c=2*e,n=l(),r=n.length,i=n.length,o=0,n.length=c,e=c,a(s)}},take:s,flush:l}}var bi=function(e){return yi(e,4)},wi="TAKE",xi="PUT",Si="ALL",Ei="RACE",Ti="CALL",Pi="CPS",Ci="FORK",ki="JOIN",Oi="CANCEL",_i="SELECT",Ri="ACTION_CHANNEL",Ai="CANCELLED",Di="FLUSH",Ii="GET_CONTEXT",Mi="SET_CONTEXT",Li=function(e,t){var n;return(n={})[Mr]=!0,n.combinator=!1,n.type=e,n.payload=t,n};function ji(e,t){return void 0===e&&(e="*"),Kr(e)?(Wr(t)&&console.warn("take(pattern) takes one argument but two were provided. Consider passing an array for listening to several action types"),Li(wi,{pattern:e})):ei(e)&&Wr(t)&&Kr(t)?Li(wi,{channel:e,pattern:t}):Jr(e)?(Wr(t)&&console.warn("take(channel) takes one argument but two were provided. Second argument is ignored."),Li(wi,{channel:e})):void 0}function Ni(e,t){return Vr(t)&&(t=e,e=void 0),Li(xi,{channel:e,action:t})}function Fi(e,t){var n,r=null;return Gr(e)?n=e:(Xr(e)?(r=e[0],n=e[1]):(r=e.context,n=e.fn),r&&qr(n)&&Gr(r[n])&&(n=r[n])),{context:r,fn:n,args:t}}function Bi(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Li(Ci,Fi(e,n))}function zi(e){void 0===e&&(e=ri);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Li(_i,{selector:e,args:n})}function Hi(){var e={};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e}const Ui=Hi;var Vi=[],Wi=0;function Gi(e){try{Zi(),e()}finally{Yi()}}function qi(e){Vi.push(e),Wi||(Zi(),Ki())}function Xi(e){try{return Zi(),e()}finally{Ki()}}function Zi(){Wi++}function Yi(){Wi--}function Ki(){var e;for(Yi();!Wi&&void 0!==(e=Vi.shift());)Gi(e)}var Ji=function(e){return function(t){return e.some((function(e){return no(e)(t)}))}},Qi=function(e){return function(t){return e(t)}},$i=function(e){return function(t){return t.type===String(e)}},eo=function(e){return function(t){return t.type===e}},to=function(){return ti};function no(e){var t="*"===e?to:qr(e)?$i:Xr(e)?Ji:Qr(e)?$i:Gr(e)?Qi:$r(e)?eo:null;if(null===t)throw new Error("invalid pattern: "+e);return t(e)}var ro={type:Ir},io=function(e){return e&&e.type===Ir};function oo(e){void 0===e&&(e=bi());var t=!1,n=[];return{take:function(r){t&&e.isEmpty()?r(ro):e.isEmpty()?(n.push(r),r.cancel=function(){oi(n,r)}):r(e.take())},put:function(r){if(!t){if(0===n.length)return e.put(r);n.shift()(r)}},flush:function(n){t&&e.isEmpty()?n(ro):n(e.flush())},close:function(){if(!t){t=!0;var e=n;n=[];for(var r=0,i=e.length;r<i;r++){(0,e[r])(ro)}}}}}function ao(){var e=function(){var e,t=!1,n=[],r=n,i=function(){r===n&&(r=n.slice())},o=function(){t=!0;var e=n=r;r=[],e.forEach((function(e){e(ro)}))};return(e={})[jr]=!0,e.put=function(e){if(!t)if(io(e))o();else for(var i=n=r,a=0,s=i.length;a<s;a++){var l=i[a];l[Lr](e)&&(l.cancel(),l(e))}},e.take=function(e,n){void 0===n&&(n=to),t?e(ro):(e[Lr]=n,i(),r.push(e),e.cancel=function(e){var t=!1;return function(){t||(t=!0,e())}}((function(){i(),oi(r,e)})))},e.close=o,e}(),t=e.put;return e.put=function(e){e[Nr]?t(e):qi((function(){t(e)}))},e}var so=0,lo=1,co=2,uo=3;function po(e,t){var n=e[Dr];Gr(n)&&(t.cancel=n),e.then(t,(function(e){t(e,!0)}))}var ho,fo=0,mo=function(){return++fo};function go(e){e.isRunning()&&e.cancel()}var vo=((ho={})[wi]=function(e,t,n){var r=t.channel,i=void 0===r?e.channel:r,o=t.pattern,a=t.maybe,s=function(e){e instanceof Error?n(e,!0):!io(e)||a?n(e):n(Hr)};try{i.take(s,Wr(o)?no(o):null)}catch(e){return void n(e,!0)}n.cancel=s.cancel},ho[xi]=function(e,t,n){var r=t.channel,i=t.action,o=t.resolve;qi((function(){var t;try{t=(r?r.put:e.dispatch)(i)}catch(e){return void n(e,!0)}o&&Zr(t)?po(t,n):n(t)}))},ho[Si]=function(e,t,n,r){var i=r.digestEffect,o=fo,a=Object.keys(t);if(0!==a.length){var s=mi(t,n);a.forEach((function(e){i(t[e],o,s[e],e)}))}else n(Xr(t)?[]:{})},ho[Ei]=function(e,t,n,r){var i=r.digestEffect,o=fo,a=Object.keys(t),s=Xr(t)?ui(a.length):{},l={},c=!1;a.forEach((function(e){var t=function(t,r){c||(r||fi(t)?(n.cancel(),n(t,r)):(n.cancel(),c=!0,s[e]=t,n(s)))};t.cancel=ni,l[e]=t})),n.cancel=function(){c||(c=!0,a.forEach((function(e){return l[e].cancel()})))},a.forEach((function(e){c||i(t[e],o,l[e],e)}))},ho[Ti]=function(e,t,n,r){var i=t.context,o=t.fn,a=t.args,s=r.task;try{var l=o.apply(i,a);if(Zr(l))return void po(l,n);if(Yr(l))return void Oo(e,l,s.context,fo,gi(o),!1,n);n(l)}catch(e){n(e,!0)}},ho[Pi]=function(e,t,n){var r=t.context,i=t.fn,o=t.args;try{var a=function(e,t){Vr(e)?n(t):n(e,!0)};i.apply(r,o.concat(a)),a.cancel&&(n.cancel=a.cancel)}catch(e){n(e,!0)}},ho[Ci]=function(e,t,n,r){var i=t.context,o=t.fn,a=t.args,s=t.detached,l=r.task,c=function(e){var t=e.context,n=e.fn,r=e.args;try{var i=n.apply(t,r);if(Yr(i))return i;var o=!1;return li((function(e){return o?{value:e,done:!0}:(o=!0,{value:i,done:!Zr(i)})}))}catch(e){return li((function(){throw e}))}}({context:i,fn:o,args:a}),u=function(e,t){return e.isSagaIterator?{name:e.meta.name}:gi(t)}(c,o);Xi((function(){var t=Oo(e,c,l.context,fo,u,s,void 0);s?n(t):t.isRunning()?(l.queue.addTask(t),n(t)):t.isAborted()?l.queue.abort(t.error()):n(t)}))},ho[ki]=function(e,t,n,r){var i=r.task,o=function(e,t){if(e.isRunning()){var n={task:i,cb:t};t.cancel=function(){e.isRunning()&&oi(e.joiners,n)},e.joiners.push(n)}else e.isAborted()?t(e.error(),!0):t(e.result())};if(Xr(t)){if(0===t.length)return void n([]);var a=mi(t,n);t.forEach((function(e,t){o(e,a[t])}))}else o(t,n)},ho[Oi]=function(e,t,n,r){var i=r.task;t===Fr?go(i):Xr(t)?t.forEach(go):go(t),n()},ho[_i]=function(e,t,n){var r=t.selector,i=t.args;try{n(r.apply(void 0,[e.getState()].concat(i)))}catch(e){n(e,!0)}},ho[Ri]=function(e,t,n){var r=t.pattern,i=oo(t.buffer),o=no(r),a=function t(n){io(n)||e.channel.take(t,o),i.put(n)},s=i.close;i.close=function(){a.cancel(),s()},e.channel.take(a,o),n(i)},ho[Ai]=function(e,t,n,r){n(r.task.isCancelled())},ho[Di]=function(e,t,n){t.flush(n)},ho[Ii]=function(e,t,n,r){n(r.task.context[t])},ho[Mi]=function(e,t,n,r){var i=r.task;ii(i.context,t),n()},ho);function yo(e,t){return e+"?"+t}function bo(e){var t=e.name,n=e.location;return n?t+" "+yo(n.fileName,n.lineNumber):t}function wo(e){var t=function(e,t){var n;return(n=[]).concat.apply(n,t.map(e))}((function(e){return e.cancelledTasks}),e);return t.length?["Tasks cancelled due to error:"].concat(t).join("\n"):""}var xo=null,So=[],Eo=function(e){e.crashedEffect=xo,So.push(e)},To=function(){xo=null,So.length=0},Po=function(e){xo=e},Co=function(){var e=So[0],t=So.slice(1),n=e.crashedEffect?function(e){var t=vi(e);return t?t.code+" "+yo(t.fileName,t.lineNumber):""}(e.crashedEffect):null;return["The above error occurred in task "+bo(e.meta)+(n?" \n when executing effect "+n:"")].concat(t.map((function(e){return" created by "+bo(e.meta)})),[wo(So)]).join("\n")};function ko(e,t,n,r,i,o,a){var s;void 0===a&&(a=ni);var l,c,u=so,d=null,p=[],h=Object.create(n),f=function(e,t,n){var r,i=[],o=!1;function a(e){t(),l(),n(e,!0)}function s(t){i.push(t),t.cont=function(s,l){o||(oi(i,t),t.cont=ni,l?a(s):(t===e&&(r=s),i.length||(o=!0,n(r))))}}function l(){o||(o=!0,i.forEach((function(e){e.cont=ni,e.cancel()})),i=[])}return s(e),{addTask:s,cancelAll:l,abort:a,getTasks:function(){return i}}}(t,(function(){p.push.apply(p,f.getTasks().map((function(e){return e.meta.name})))}),m);function m(t,n){if(n){if(u=co,Eo({meta:i,cancelledTasks:p}),g.isRoot){var r=Co();To(),e.onError(t,{sagaStack:r})}c=t,d&&d.reject(t)}else t===zr?u=lo:u!==lo&&(u=uo),l=t,d&&d.resolve(t);g.cont(t,n),g.joiners.forEach((function(e){e.cb(t,n)})),g.joiners=null}var g=((s={})[Br]=!0,s.id=r,s.meta=i,s.isRoot=o,s.context=h,s.joiners=[],s.queue=f,s.cancel=function(){u===so&&(u=lo,f.cancelAll(),m(zr,!1))},s.cont=a,s.end=m,s.setContext=function(e){ii(h,e)},s.toPromise=function(){return d||(d=Ui(),u===co?d.reject(c):u!==so&&d.resolve(l)),d.promise},s.isRunning=function(){return u===so},s.isCancelled=function(){return u===lo||u===so&&t.status===lo},s.isAborted=function(){return u===co},s.result=function(){return l},s.error=function(){return c},s);return g}function Oo(e,t,n,r,i,o,a){var s=e.finalizeRunEffect((function(t,n,r){if(Zr(t))po(t,r);else if(Yr(t))Oo(e,t,c.context,n,i,!1,r);else if(t&&t[Mr]){(0,vo[t.type])(e,t.payload,r,u)}else r(t)}));d.cancel=ni;var l={meta:i,cancel:function(){l.status===so&&(l.status=lo,d(zr))},status:so},c=ko(e,l,n,r,i,o,a),u={task:c,digestEffect:p};return a&&(a.cancel=c.cancel),d(),c;function d(e,n){try{var i;n?(i=t.throw(e),To()):hi(e)?(l.status=lo,d.cancel(),i=Gr(t.return)?t.return(zr):{done:!0,value:zr}):i=pi(e)?Gr(t.return)?t.return():{done:!0}:t.next(e),i.done?(l.status!==lo&&(l.status=uo),l.cont(i.value)):p(i.value,r,d)}catch(e){if(l.status===lo)throw e;l.status=co,l.cont(e,!0)}}function p(t,n,r,i){void 0===i&&(i="");var o,a=mo();function l(n,i){o||(o=!0,r.cancel=ni,e.sagaMonitor&&(i?e.sagaMonitor.effectRejected(a,n):e.sagaMonitor.effectResolved(a,n)),i&&Po(t),r(n,i))}e.sagaMonitor&&e.sagaMonitor.effectTriggered({effectId:a,parentEffectId:n,label:i,effect:t}),l.cancel=ni,r.cancel=function(){o||(o=!0,l.cancel(),l.cancel=ni,e.sagaMonitor&&e.sagaMonitor.effectCancelled(a))},s(t,a,l)}}function _o(e,t){var n=e.channel,r=void 0===n?ao():n,i=e.dispatch,o=e.getState,a=e.context,s=void 0===a?{}:a,l=e.sagaMonitor,c=e.effectMiddlewares,u=e.onError,d=void 0===u?ci:u;for(var p=arguments.length,h=new Array(p>2?p-2:0),f=2;f<p;f++)h[f-2]=arguments[f];var m=t.apply(void 0,h);var g,v=mo();if(l&&(l.rootSagaStarted=l.rootSagaStarted||ni,l.effectTriggered=l.effectTriggered||ni,l.effectResolved=l.effectResolved||ni,l.effectRejected=l.effectRejected||ni,l.effectCancelled=l.effectCancelled||ni,l.actionDispatched=l.actionDispatched||ni,l.rootSagaStarted({effectId:v,saga:t,args:h})),c){var y=Rr.apply(void 0,c);g=function(e){return function(t,n,r){return y((function(t){return e(t,n,r)}))(t)}}}else g=ri;var b={channel:r,dispatch:di(i),getState:o,sagaMonitor:l,onError:d,finalizeRunEffect:g};return Xi((function(){var e=Oo(b,m,s,v,gi(t),!0,void 0);return l&&l.effectResolved(v,e),e}))}const Ro=function(e){var t,n=void 0===e?{}:e,r=n.context,i=void 0===r?{}:r,o=n.channel,a=void 0===o?ao():o,l=n.sagaMonitor,u=s(n,["context","channel","sagaMonitor"]);function d(e){var n=e.getState,r=e.dispatch;return t=_o.bind(null,c({},u,{context:i,channel:a,dispatch:r,getState:n,sagaMonitor:l})),function(e){return function(t){l&&l.actionDispatched&&l.actionDispatched(t);var n=e(t);return a.put(t),n}}}return d.run=function(){return t.apply(void 0,arguments)},d.setContext=function(e){ii(i,e)},d},Ao=Ro;var Do=function(e){return{done:!0,value:e}},Io={};function Mo(e){return Jr(e)?"channel":Qr(e)?String(e):Gr(e)?e.name:String(e)}function Lo(e,t,n){var r,i,o,a=t;function s(t,n){if(a===Io)return Do(t);if(n&&!i)throw a=Io,n;r&&r(t);var s=n?e[i](n):e[a]();return a=s.nextState,o=s.effect,r=s.stateUpdater,i=s.errorState,a===Io?Do(t):o}return li(s,(function(e){return s(null,e)}),n)}function jo(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o,a={done:!1,value:ji(e)},s=function(e){return o=e};return Lo({q1:function(){return{nextState:"q2",effect:a,stateUpdater:s}},q2:function(){return{nextState:"q1",effect:(e=o,{done:!1,value:Bi.apply(void 0,[t].concat(r,[e]))})};var e}},"q1","takeEvery("+Mo(e)+", "+t.name+")")}function No(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return Bi.apply(void 0,[jo,e,t].concat(r))}function Fo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fo(Object(n),!0).forEach((function(t){zo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function zo(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ho={loadGlossary:function(e,t){return Bo(Bo({},e),{},{loaded:!0,glossary:t})}};const Uo=Ho;function Vo(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Wo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wo(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Go(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Go(Object(n),!0).forEach((function(t){Xo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Go(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xo(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zo={},Yo="https://github.com/cu-mkp/editioncrafter-project/text-partial-resource.md";function Ko(e){throw new Error("IIIF manifest parser error: ".concat(e))}function Jo(e){var t,n=Vo(e.items);try{for(n.s();!(t=n.n()).done;){var r=t.value;"AnnotationPage"!==r.type&&Ko("Expected AnnotationPage in items property of ".concat(e.id)),r.items||Ko("Expected items property in AnnotationPage ".concat(r.id));var i,o=Vo(r.items);try{for(o.s();!(i=o.n()).done;){var a=i.value;if("Annotation"!==a.type&&Ko("Expected Annotation in items property of ".concat(r.id)),"painting"===a.motivation)return a.body||Ko("Expected body property in Annotation ".concat(a.id)),a.body.id?{bodyId:a.body.id,imageURL:"".concat(a.body.id,"/info.json")}:null}}catch(e){o.e(e)}finally{o.f()}}}catch(e){n.e(e)}finally{n.f()}return Ko("Unable to find painting Annotation for canvas: ".concat(e.id)),null}function Qo(e){return e.label?e.label.none[0]:(t="".concat(e.id," does not have a label property."),console.warn("IIIF manifest parser warning: ".concat(t)),"");var t}function $o(e,t){var n={};if(e.annotations){var r,i=Vo(e.annotations);try{for(i.s();!(r=i.n()).done;){var o=r.value;if("AnnotationPage"===o.type){o.items||Ko("Expected items property in AnnotationPage ".concat(o.id));var a,s=Vo(o.items);try{for(s.s();!(a=s.n()).done;){var l=a.value;if("Annotation"!==l.type&&Ko("Expected Annotation in items property of ".concat(o.id)),"supplementing"===l.motivation){l.body||Ko("Expected body property in Annotation ".concat(l.id));var c=l.body;if(c.profile===Yo&&"TextPartial"===c.type){c.id||Ko("Expected id property in TextPartial in ".concat(l.id)),c.format||Ko("Expected format property in TextPartial in ".concat(l.id));var u=c.id,d=c.format,p=u.split("/");p.length<5&&Ko("TextPartial id property is in the wrong format: ".concat(u));var h=p[p.length-2];t[h]&&(n[h]||(n[h]={}),"text/html"===d&&(n[h].htmlURL=u),"text/xml"===d&&(n[h].xmlURL=u))}}}}catch(e){s.e(e)}finally{s.f()}}}}catch(e){i.e(e)}finally{i.f()}}return n}Zo.loadDocument=function(e,t){var n=function(e,t){if("variorum"===e.type){var n=[];return Object.keys(e.documentData).forEach((function(r){n=n.concat(ta(e.documentData[r],t[r],r))})),n}return ta(e,t)}(t,e.transcriptionTypes),r=function(e){for(var t={},n={},r=0;r<e.length;r++){var i=e[r];t[i.id]=i,n[i.name]=i}return{folioIndex:t,folioByName:n}}(n),i=r.folioIndex,o=r.folioByName;return qo(qo({},e),{},{loaded:!0,folios:n,folioIndex:i,folioByName:o})},Zo.loadFolio=function(e,t){var n=e.folioIndex[t.id],r=e.folios.indexOf(n);return e.folios[r]=t,e.folioIndex[t.id]=t,e.folioByName[t.name]=t,qo({},e)};var ea=130;function ta(e,t,n){var r=[];e["@context"]&&e["@context"].includes("http://iiif.io/api/presentation/3/context.json")||Ko("Expected root object to have a @context containing: http://iiif.io/api/presentation/3/context.json"),"Manifest"!==e.type&&Ko("Expected root object of type 'Manifest'."),e.items||Ko("Expected manifest to have an items property.");for(var i=e.items,o=0;o<i.length;o++){var a=i[o];if("Canvas"!==a.type&&Ko("Expected items[".concat(o,"] to be of type 'Canvas'.")),a.id||Ko("Expected items[".concat(o,"] to have an id property.")),Jo(a)){var s=a.id.substr(a.id.lastIndexOf("/")+1),l=Qo(a),c=Jo(a),u=c.bodyId,d=c.imageURL,p=$o(a,t),h=a.width/a.height,f=[];f=h>1?[ea,Math.round(ea/h)]:[Math.round(ea*h),ea];var m="".concat(u,"/full/").concat(f.join(","),"/0/default.jpg"),g={id:n?"".concat(n,"_").concat(s):s,doc_id:n||e.id,name:l,pageNumber:o,image_zoom_url:d,image_thumbnail_url:m,annotationURLs:p,annotations:a.annotations?a.annotations.filter((function(e){return"tagging"===e.motivation})):[]};r.push(g)}}return r}const na=Zo;function ra(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ia(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ra(Object(n),!0).forEach((function(t){oa(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ra(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oa(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var aa={setFixedFrameMode:function(e,t){return ia(ia({},e),{},{fixedFrameMode:t})}};const sa=aa,la={fixedFrameMode:!1};function ca(e){return{glossary:{},loaded:!1,URL:e}}function ua(e,t,n){return{documentName:t,derivativeNames:arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,manifestURL:e,transcriptionTypes:n,variorum:arguments.length>3&&void 0!==arguments[3]&&arguments[3],threePanel:arguments.length>5&&void 0!==arguments[5]&&arguments[5],folios:[],loaded:!1,folioIndex:{},folioByName:{}}}function da(e,t){return function(){return e.apply(t,arguments)}}var pa=Object.prototype.toString,ha=Object.getPrototypeOf,fa=function(e){return function(t){var n=pa.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())}}(Object.create(null)),ma=function(e){return e=e.toLowerCase(),function(t){return fa(t)===e}},ga=function(e){return function(t){return typeof t===e}},va=Array.isArray,ya=ga("undefined");var ba=ma("ArrayBuffer");var wa=ga("string"),xa=ga("function"),Sa=ga("number"),Ea=function(e){return null!==e&&"object"==typeof e},Ta=function(e){if("object"!==fa(e))return!1;var t=ha(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Pa=ma("Date"),Ca=ma("File"),ka=ma("Blob"),Oa=ma("FileList"),_a=ma("URLSearchParams");function Ra(e,t){var n,r,i=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,o=void 0!==i&&i;if(null!=e)if("object"!=typeof e&&(e=[e]),va(e))for(n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else{var a,s=o?Object.getOwnPropertyNames(e):Object.keys(e),l=s.length;for(n=0;n<l;n++)a=s[n],t.call(null,e[a],a,e)}}function Aa(e,t){t=t.toLowerCase();for(var n,r=Object.keys(e),i=r.length;i-- >0;)if(t===(n=r[i]).toLowerCase())return n;return null}var Da="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Ia=function(e){return!ya(e)&&e!==Da};var Ma,La,ja=(Ma="undefined"!=typeof Uint8Array&&ha(Uint8Array),function(e){return Ma&&e instanceof Ma}),Na=ma("HTMLFormElement"),Fa=(La=Object.prototype.hasOwnProperty,function(e,t){return La.call(e,t)}),Ba=ma("RegExp"),za=function(e,t){var n=Object.getOwnPropertyDescriptors(e),r={};Ra(n,(function(n,i){var o;!1!==(o=t(n,i,e))&&(r[i]=o||n)})),Object.defineProperties(e,r)},Ha="abcdefghijklmnopqrstuvwxyz",Ua="0123456789",Va={DIGIT:Ua,ALPHA:Ha,ALPHA_DIGIT:Ha+Ha.toUpperCase()+Ua};var Wa=ma("AsyncFunction");const Ga={isArray:va,isArrayBuffer:ba,isBuffer:function(e){return null!==e&&!ya(e)&&null!==e.constructor&&!ya(e.constructor)&&xa(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||xa(e.append)&&("formdata"===(t=fa(e))||"object"===t&&xa(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&ba(e.buffer)},isString:wa,isNumber:Sa,isBoolean:function(e){return!0===e||!1===e},isObject:Ea,isPlainObject:Ta,isUndefined:ya,isDate:Pa,isFile:Ca,isBlob:ka,isRegExp:Ba,isFunction:xa,isStream:function(e){return Ea(e)&&xa(e.pipe)},isURLSearchParams:_a,isTypedArray:ja,isFileList:Oa,forEach:Ra,merge:function e(){for(var t=(Ia(this)&&this||{}).caseless,n={},r=function(r,i){var o=t&&Aa(n,i)||i;Ta(n[o])&&Ta(r)?n[o]=e(n[o],r):Ta(r)?n[o]=e({},r):va(r)?n[o]=r.slice():n[o]=r},i=0,o=arguments.length;i<o;i++)arguments[i]&&Ra(arguments[i],r);return n},extend:function(e,t,n){return Ra(t,(function(t,r){n&&xa(t)?e[r]=da(t,n):e[r]=t}),{allOwnKeys:(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).allOwnKeys}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,r){var i,o,a,s={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a=i[o],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&ha(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:fa,kindOfTest:ma,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;if(va(e))return e;var t=e.length;if(!Sa(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},forEachEntry:function(e,t){for(var n,r=(e&&e[Symbol.iterator]).call(e);(n=r.next())&&!n.done;){var i=n.value;t.call(e,i[0],i[1])}},matchAll:function(e,t){for(var n,r=[];null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Na,hasOwnProperty:Fa,hasOwnProp:Fa,reduceDescriptors:za,freezeMethods:function(e){za(e,(function(t,n){if(xa(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var r=e[n];xa(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:function(e,t){var n={},r=function(e){e.forEach((function(e){n[e]=!0}))};return va(e)?r(e):r(String(e).split(t)),n},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))},noop:function(){},toFiniteNumber:function(e,t){return e=+e,Number.isFinite(e)?e:t},findKey:Aa,global:Da,isContextDefined:Ia,ALPHABET:Va,generateString:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Va.ALPHA_DIGIT,n="",r=t.length;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&xa(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:function(e){var t=new Array(10);return function e(n,r){if(Ea(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[r]=n;var i=va(n)?[]:{};return Ra(n,(function(t,n){var o=e(t,r+1);!ya(o)&&(i[n]=o)})),t[r]=void 0,i}}return n}(e,0)},isAsyncFn:Wa,isThenable:function(e){return e&&(Ea(e)||xa(e))&&xa(e.then)&&xa(e.catch)}};function qa(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}Ga.inherits(qa,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ga.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Xa=qa.prototype,Za={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){Za[e]={value:e}})),Object.defineProperties(qa,Za),Object.defineProperty(Xa,"isAxiosError",{value:!0}),qa.from=function(e,t,n,r,i,o){var a=Object.create(Xa);return Ga.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),qa.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const Ya=qa;function Ka(e){return Ga.isPlainObject(e)||Ga.isArray(e)}function Ja(e){return Ga.endsWith(e,"[]")?e.slice(0,-2):e}function Qa(e,t,n){return e?e.concat(t).map((function(e,t){return e=Ja(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}var $a=Ga.toFlatObject(Ga,{},null,(function(e){return/^is[A-Z]/.test(e)}));const es=function(e,t,n){if(!Ga.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var r=(n=Ga.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Ga.isUndefined(t[e])}))).metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Ga.isSpecCompliantForm(t);if(!Ga.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Ga.isDate(e))return e.toISOString();if(!s&&Ga.isBlob(e))throw new Ya("Blob is not supported. Use a Buffer instead.");return Ga.isArrayBuffer(e)||Ga.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,i){var s=e;if(e&&!i&&"object"==typeof e)if(Ga.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Ga.isArray(e)&&function(e){return Ga.isArray(e)&&!e.some(Ka)}(e)||(Ga.isFileList(e)||Ga.endsWith(n,"[]"))&&(s=Ga.toArray(e)))return n=Ja(n),s.forEach((function(e,r){!Ga.isUndefined(e)&&null!==e&&t.append(!0===a?Qa([n],r,o):null===a?n:n+"[]",l(e))})),!1;return!!Ka(e)||(t.append(Qa(i,n,o),l(e)),!1)}var u=[],d=Object.assign($a,{defaultVisitor:c,convertValue:l,isVisitable:Ka});if(!Ga.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Ga.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),Ga.forEach(n,(function(n,o){!0===(!(Ga.isUndefined(n)||null===n)&&i.call(t,n,Ga.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])})),u.pop()}}(e),t};function ts(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ns(e,t){this._pairs=[],e&&es(e,this,t)}var rs=ns.prototype;rs.append=function(e,t){this._pairs.push([e,t])},rs.toString=function(e){var t=e?function(t){return e.call(this,t,ts)}:ts;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const is=ns;function os(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function as(e,t,n){if(!t)return e;var r,i=n&&n.encode||os,o=n&&n.serialize;if(r=o?o(t,n):Ga.isURLSearchParams(t)?t.toString():new is(t,n).toString(i)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}function ss(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ls(r.key),r)}}function ls(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var cs=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.handlers=[]}var t,n,r;return t=e,n=[{key:"use",value:function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){Ga.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}],n&&ss(t.prototype,n),r&&ss(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();const us=cs,ds={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ps={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:is,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};var hs,fs="undefined"!=typeof window&&"undefined"!=typeof document,ms=(hs="undefined"!=typeof navigator&&navigator.product,fs&&["ReactNative","NativeScript","NS"].indexOf(hs)<0),gs="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;function vs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ys(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vs(Object(n),!0).forEach((function(t){bs(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bs(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ws=ys(ys({},e),ps);const xs=function(e){function t(e,n,r,i){var o=e[i++];if("__proto__"===o)return!0;var a=Number.isFinite(+o),s=i>=e.length;return o=!o&&Ga.isArray(r)?r.length:o,s?(Ga.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a):(r[o]&&Ga.isObject(r[o])||(r[o]=[]),t(e,n,r[o],i)&&Ga.isArray(r[o])&&(r[o]=function(e){var t,n,r={},i=Object.keys(e),o=i.length;for(t=0;t<o;t++)r[n=i[t]]=e[n];return r}(r[o])),!a)}if(Ga.isFormData(e)&&Ga.isFunction(e.entries)){var n={};return Ga.forEachEntry(e,(function(e,r){t(function(e){return Ga.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),r,n,0)})),n}return null};var Ss={transitional:ds,adapter:["xhr","http"],transformRequest:[function(e,t){var n,r=t.getContentType()||"",i=r.indexOf("application/json")>-1,o=Ga.isObject(e);if(o&&Ga.isHTMLForm(e)&&(e=new FormData(e)),Ga.isFormData(e))return i?JSON.stringify(xs(e)):e;if(Ga.isArrayBuffer(e)||Ga.isBuffer(e)||Ga.isStream(e)||Ga.isFile(e)||Ga.isBlob(e))return e;if(Ga.isArrayBufferView(e))return e.buffer;if(Ga.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return es(e,new ws.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ws.isNode&&Ga.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=Ga.isFileList(e))||r.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return es(n?{"files[]":e}:e,a&&new a,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),function(e,t,n){if(Ga.isString(e))try{return(t||JSON.parse)(e),Ga.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Ss.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&Ga.isString(e)&&(n&&!this.responseType||r)){var i=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw Ya.from(e,Ya.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ws.classes.FormData,Blob:ws.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ga.forEach(["delete","get","head","post","put","patch"],(function(e){Ss.headers[e]={}}));const Es=Ss;var Ts=Ga.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);function Ps(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Cs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cs(e,t)}(e,t)||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 Cs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ks(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Os(r.key),r)}}function Os(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var _s=Symbol("internals");function Rs(e){return e&&String(e).trim().toLowerCase()}function As(e){return!1===e||null==e?e:Ga.isArray(e)?e.map(As):String(e)}function Ds(e,t,n,r,i){return Ga.isFunction(r)?r.call(this,t,n):(i&&(t=n),Ga.isString(t)?Ga.isString(r)?-1!==t.indexOf(r):Ga.isRegExp(r)?r.test(t):void 0:void 0)}var Is=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&this.set(t)}var t,n,r;return t=e,n=[{key:"set",value:function(e,t,n){var r=this;function i(e,t,n){var i=Rs(t);if(!i)throw new Error("header name must be a non-empty string");var o=Ga.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=As(e))}var o=function(e,t){return Ga.forEach(e,(function(e,n){return i(e,n,t)}))};return Ga.isPlainObject(e)||e instanceof this.constructor?o(e,t):Ga.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?o(function(e){var t,n,r,i={};return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),t=e.substring(0,r).trim().toLowerCase(),n=e.substring(r+1).trim(),!t||i[t]&&Ts[t]||("set-cookie"===t?i[t]?i[t].push(n):i[t]=[n]:i[t]=i[t]?i[t]+", "+n:n)})),i}(e),t):null!=e&&i(t,e,n),this}},{key:"get",value:function(e,t){if(e=Rs(e)){var n=Ga.findKey(this,e);if(n){var r=this[n];if(!t)return r;if(!0===t)return function(e){for(var t,n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=r.exec(e);)n[t[1]]=t[2];return n}(r);if(Ga.isFunction(t))return t.call(this,r,n);if(Ga.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=Rs(e)){var n=Ga.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ds(0,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,r=!1;function i(e){if(e=Rs(e)){var i=Ga.findKey(n,e);!i||t&&!Ds(0,n[i],i,t)||(delete n[i],r=!0)}}return Ga.isArray(e)?e.forEach(i):i(e),r}},{key:"clear",value:function(e){for(var t=Object.keys(this),n=t.length,r=!1;n--;){var i=t[n];e&&!Ds(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n={};return Ga.forEach(this,(function(r,i){var o=Ga.findKey(n,i);if(o)return t[o]=As(r),void delete t[i];var a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))}(i):String(i).trim();a!==i&&delete t[i],t[a]=As(r),n[a]=!0})),this}},{key:"concat",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=this.constructor).concat.apply(e,[this].concat(n))}},{key:"toJSON",value:function(e){var t=Object.create(null);return Ga.forEach(this,(function(n,r){null!=n&&!1!==n&&(t[r]=e&&Ga.isArray(n)?n.join(", "):n)})),t}},{key:Symbol.iterator,value:function(){return Object.entries(this.toJSON())[Symbol.iterator]()}},{key:"toString",value:function(){return Object.entries(this.toJSON()).map((function(e){var t=Ps(e,2);return t[0]+": "+t[1]})).join("\n")}},{key:Symbol.toStringTag,get:function(){return"AxiosHeaders"}}],r=[{key:"from",value:function(e){return e instanceof this?e:new this(e)}},{key:"concat",value:function(e){for(var t=new this(e),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.forEach((function(e){return t.set(e)})),t}},{key:"accessor",value:function(e){var t=(this[_s]=this[_s]={accessors:{}}).accessors,n=this.prototype;function r(e){var r=Rs(e);t[r]||(function(e,t){var n=Ga.toCamelCase(" "+t);["get","set","has"].forEach((function(r){Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[r]=!0)}return Ga.isArray(e)?e.forEach(r):r(e),this}}],n&&ks(t.prototype,n),r&&ks(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();Is.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ga.reduceDescriptors(Is.prototype,(function(e,t){var n=e.value,r=t[0].toUpperCase()+t.slice(1);return{get:function(){return n},set:function(e){this[r]=e}}})),Ga.freezeMethods(Is);const Ms=Is;function Ls(e,t){var n=this||Es,r=t||n,i=Ms.from(r.headers),o=r.data;return Ga.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function js(e){return!(!e||!e.__CANCEL__)}function Ns(e,t,n){Ya.call(this,null==e?"canceled":e,Ya.ERR_CANCELED,t,n),this.name="CanceledError"}Ga.inherits(Ns,Ya,{__CANCEL__:!0});const Fs=Ns;const Bs=ws.hasStandardBrowserEnv?{write:function(e,t,n,r,i,o){var a=[e+"="+encodeURIComponent(t)];Ga.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Ga.isString(r)&&a.push("path="+r),Ga.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function zs(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Hs=ws.hasStandardBrowserEnv?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=Ga.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0};const Us=function(e,t){e=e||10;var n,r=new Array(e),i=new Array(e),o=0,a=0;return t=void 0!==t?t:1e3,function(s){var l=Date.now(),c=i[a];n||(n=l),r[o]=s,i[o]=l;for(var u=a,d=0;u!==o;)d+=r[u++],u%=e;if((o=(o+1)%e)===a&&(a=(a+1)%e),!(l-n<t)){var p=c&&l-c;return p?Math.round(1e3*d/p):void 0}}};function Vs(e){return function(e){if(Array.isArray(e))return qs(e)}(e)||Xs(e)||Gs(e)||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 Ws(e){return function(e){if(Array.isArray(e))return e}(e)||Xs(e)||Gs(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 Gs(e,t){if(e){if("string"==typeof e)return qs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qs(e,t):void 0}}function qs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xs(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Zs(e,t){var n=0,r=Us(50,250);return function(i){var o=i.loaded,a=i.lengthComputable?i.total:void 0,s=o-n,l=r(s);n=o;var c={loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&o<=a?(a-o)/l:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}const Ys="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){var r,i,o=e.data,a=Ms.from(e.headers).normalize(),s=e.responseType,l=e.withXSRFToken;function c(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}if(Ga.isFormData(o))if(ws.hasStandardBrowserEnv||ws.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if(!1!==(i=a.getContentType())){var u=Ws(i?i.split(";").map((function(e){return e.trim()})).filter(Boolean):[]),d=u[0],p=u.slice(1);a.setContentType([d||"multipart/form-data"].concat(Vs(p)).join("; "))}var h=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(f+":"+m))}var g=zs(e.baseURL,e.url);function v(){if(h){var r=Ms.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());!function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Ya("Request failed with status code "+n.status,[Ya.ERR_BAD_REQUEST,Ya.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),c()}),(function(e){n(e),c()}),{data:s&&"text"!==s&&"json"!==s?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}}if(h.open(e.method.toUpperCase(),as(g,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=v:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(v)},h.onabort=function(){h&&(n(new Ya("Request aborted",Ya.ECONNABORTED,e,h)),h=null)},h.onerror=function(){n(new Ya("Network Error",Ya.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||ds;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Ya(t,r.clarifyTimeoutError?Ya.ETIMEDOUT:Ya.ECONNABORTED,e,h)),h=null},ws.hasStandardBrowserEnv&&(l&&Ga.isFunction(l)&&(l=l(e)),l||!1!==l&&Hs(g))){var y=e.xsrfHeaderName&&e.xsrfCookieName&&Bs.read(e.xsrfCookieName);y&&a.set(e.xsrfHeaderName,y)}void 0===o&&a.setContentType(null),"setRequestHeader"in h&&Ga.forEach(a.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),Ga.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),s&&"json"!==s&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",Zs(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",Zs(e.onUploadProgress)),(e.cancelToken||e.signal)&&(r=function(t){h&&(n(!t||t.type?new Fs(null,e,h):t),h.abort(),h=null)},e.cancelToken&&e.cancelToken.subscribe(r),e.signal&&(e.signal.aborted?r():e.signal.addEventListener("abort",r)));var b,w=(b=/^([-+\w]{1,25})(:?\/\/|:)/.exec(g))&&b[1]||"";w&&-1===ws.protocols.indexOf(w)?n(new Ya("Unsupported protocol "+w+":",Ya.ERR_BAD_REQUEST,e)):h.send(o||null)}))};function Ks(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Js(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Js(e,t)}(e,t)||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 Js(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Qs={http:null,xhr:Ys};Ga.forEach(Qs,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var $s=function(e){return"- ".concat(e)},el=function(e){return Ga.isFunction(e)||null===e||!1===e};const tl=function(e){for(var t,n,r=(e=Ga.isArray(e)?e:[e]).length,i={},o=0;o<r;o++){var a=void 0;if(n=t=e[o],!el(t)&&void 0===(n=Qs[(a=String(t)).toLowerCase()]))throw new Ya("Unknown adapter '".concat(a,"'"));if(n)break;i[a||"#"+o]=n}if(!n){var s=Object.entries(i).map((function(e){var t=Ks(e,2),n=t[0],r=t[1];return"adapter ".concat(n," ")+(!1===r?"is not supported by the environment":"is not available in the build")})),l=r?s.length>1?"since :\n"+s.map($s).join("\n"):" "+$s(s[0]):"as no adapter specified";throw new Ya("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return n};function nl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Fs(null,e)}function rl(e){return nl(e),e.headers=Ms.from(e.headers),e.data=Ls.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tl(e.adapter||Es.adapter)(e).then((function(t){return nl(e),t.data=Ls.call(e,e.transformResponse,t),t.headers=Ms.from(t.headers),t}),(function(t){return js(t)||(nl(e),t&&t.response&&(t.response.data=Ls.call(e,e.transformResponse,t.response),t.response.headers=Ms.from(t.response.headers))),Promise.reject(t)}))}function il(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ol(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var al=function(e){return e instanceof Ms?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?il(Object(n),!0).forEach((function(t){ol(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):il(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e):e};function sl(e,t){t=t||{};var n={};function r(e,t,n){return Ga.isPlainObject(e)&&Ga.isPlainObject(t)?Ga.merge.call({caseless:n},e,t):Ga.isPlainObject(t)?Ga.merge({},t):Ga.isArray(t)?t.slice():t}function i(e,t,n){return Ga.isUndefined(t)?Ga.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function o(e,t){if(!Ga.isUndefined(t))return r(void 0,t)}function a(e,t){return Ga.isUndefined(t)?Ga.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}var l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t){return i(al(e),al(t),!0)}};return Ga.forEach(Object.keys(Object.assign({},e,t)),(function(r){var o=l[r]||i,a=o(e[r],t[r],r);Ga.isUndefined(a)&&o!==s||(n[r]=a)})),n}var ll="1.6.8",cl={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){cl[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var ul={};cl.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.8] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,o){if(!1===e)throw new Ya(r(i," has been removed"+(t?" in "+t:"")),Ya.ERR_DEPRECATED);return t&&!ul[i]&&(ul[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};const dl={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Ya("options must be an object",Ya.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],a=t[o];if(a){var s=e[o],l=void 0===s||a(s,o,e);if(!0!==l)throw new Ya("option "+o+" must be "+l,Ya.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Ya("Unknown option "+o,Ya.ERR_BAD_OPTION)}},validators:cl};function pl(){pl=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,a=Object.create(o.prototype),s=new R(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",h="suspendedYield",f="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(A([])));S&&S!==n&&r.call(S,a)&&(w=S);var E=b.prototype=v.prototype=Object.create(w);function T(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=p;return function(o,a){if(i===f)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=k(s,r);if(l){if(l===g)continue;return l}}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=f;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?m:h,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function k(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=d(i,t.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[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=b,i(E,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,l,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},T(P.prototype),c(P.prototype,s,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},T(E),c(E,l,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=A,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!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 l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){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(e,t){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"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function hl(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function fl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ml(r.key),r)}}function ml(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var gl=dl.validators,vl=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.defaults=e,this.interceptors={request:new us,response:new us}}var n,r,i;return n=t,r=[{key:"request",value:function(t,n){return(e=e||function(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){hl(o,r,i,a,s,"next",e)}function s(e){hl(o,r,i,a,s,"throw",e)}a(void 0)}))}}(pl().mark((function e(t,n){var r,i;return pl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._request(t,n);case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),e.t0 instanceof Error&&(Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error,i=r.stack?r.stack.replace(/^.+\n/,""):"",e.t0.stack?i&&!String(e.t0.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(e.t0.stack+="\n"+i):e.t0.stack=i),e.t0;case 10:case"end":return e.stop()}}),e,this,[[0,6]])})))).apply(this,arguments)}},{key:"_request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var n=t=sl(this.defaults,t),r=n.transitional,i=n.paramsSerializer,o=n.headers;void 0!==r&&dl.assertOptions(r,{silentJSONParsing:gl.transitional(gl.boolean),forcedJSONParsing:gl.transitional(gl.boolean),clarifyTimeoutError:gl.transitional(gl.boolean)},!1),null!=i&&(Ga.isFunction(i)?t.paramsSerializer={serialize:i}:dl.assertOptions(i,{encode:gl.function,serialize:gl.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();var a=o&&Ga.merge(o.common,o[t.method]);o&&Ga.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete o[e]})),t.headers=Ms.concat(a,o);var s=[],l=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(l=l&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));var c,u=[];this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));var d,p=0;if(!l){var h=[rl.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,u),d=h.length,c=Promise.resolve(t);p<d;)c=c.then(h[p++],h[p++]);return c}d=s.length;var f=t;for(p=0;p<d;){var m=s[p++],g=s[p++];try{f=m(f)}catch(e){g.call(this,e);break}}try{c=rl.call(this,f)}catch(e){return Promise.reject(e)}for(p=0,d=u.length;p<d;)c=c.then(u[p++],u[p++]);return c}},{key:"getUri",value:function(e){return as(zs((e=sl(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}],r&&fl(n.prototype,r),i&&fl(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}();Ga.forEach(["delete","get","head","options"],(function(e){vl.prototype[e]=function(t,n){return this.request(sl(n||{},{method:e,url:t,data:(n||{}).data}))}})),Ga.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,i){return this.request(sl(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}vl.prototype[e]=t(),vl.prototype[e+"Form"]=t(!0)}));const yl=vl;function bl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wl(r.key),r)}}function wl(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var xl=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"function"!=typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var r=this;this.promise.then((function(e){if(r._listeners){for(var t=r._listeners.length;t-- >0;)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},t((function(e,t,i){r.reason||(r.reason=new Fs(e,t,i),n(r.reason))}))}var t,n,r;return t=e,n=[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}}],r=[{key:"source",value:function(){var t;return{token:new e((function(e){t=e})),cancel:t}}}],n&&bl(t.prototype,n),r&&bl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();const Sl=xl;function El(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Tl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tl(e,t)}(e,t)||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 Tl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Pl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pl).forEach((function(e){var t=El(e,2),n=t[0],r=t[1];Pl[r]=n}));const Cl=Pl;var kl=function e(t){var n=new yl(t),r=da(yl.prototype.request,n);return Ga.extend(r,yl.prototype,n,{allOwnKeys:!0}),Ga.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(sl(t,n))},r}(Es);kl.Axios=yl,kl.CanceledError=Fs,kl.CancelToken=Sl,kl.isCancel=js,kl.VERSION=ll,kl.toFormData=es,kl.AxiosError=Ya,kl.Cancel=kl.CanceledError,kl.all=function(e){return Promise.all(e)},kl.spread=function(e){return function(t){return e.apply(null,t)}},kl.isAxiosError=function(e){return Ga.isObject(e)&&!0===e.isAxiosError},kl.mergeConfig=sl,kl.AxiosHeaders=Ms,kl.formToJSON=function(e){return xs(Ga.isHTMLForm(e)?new FormData(e):e)},kl.getAdapter=tl,kl.HttpStatusCode=Cl,kl.default=kl;const Ol=kl;var _l=i(2908),Rl=i.n(_l);const Al=function(e){return JSON.parse(JSON.stringify(e))};function Dl(e){return function(e){if(Array.isArray(e))return Ll(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ml(e)||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 Il(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ml(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ml(e,t){if(e){if("string"==typeof e)return Ll(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ll(e,t):void 0}}function Ll(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var jl={middle:!1,top:!1,"left-middle":!1,"right-middle":!1,bottom:!1,"left-top":!1,"right-top":!1,"left-bottom":!1,"right-bottom":!1},Nl=["tall","extra-tall","wide","full"];function Fl(e,t,n,r){switch(e){case"top":t[0][1]=r.id,"wide"===n&&(t[0][2]=r.id),"full"===n&&(t[0][0]=r.id,t[0][2]=r.id);break;case"left-middle":t[1][0]=r.id,"tall"===n?t[2][0]=r.id:"wide"===n&&(t[1][1]=r.id,t[1][2]=r.id);break;case"right-middle":t[1][2]=r.id,"tall"===n&&(t[2][2]=r.id);break;case"bottom":t[2][1]=r.id,"wide"===n&&(t[2][2]=r.id),"full"===n&&(t[2][0]=r.id,t[2][2]=r.id);break;case"left-top":t[0][0]=r.id,"tall"===n?t[1][0]=r.id:"wide"===n&&(t[0][1]=r.id,t[0][2]=r.id);break;case"right-top":t[0][2]=r.id,"tall"===n&&(t[1][2]=r.id);break;case"left-bottom":t[2][0]=r.id,"wide"===n&&(t[2][1]=r.id,t[2][2]=r.id);break;case"right-bottom":t[2][2]=r.id;break;default:t[1][1]=r.id,t[1][2]=r.id,"full"===n&&(t[1][0]=r.id)}}function Bl(e,t,n){var r,i=document.createElement("div");i.innerHTML=e,r=i.getElementsByTagName("tei-surface").length>0?[i.getElementsByTagName("tei-surface")[0]]:i.getElementsByTagName("tei-body")[0].children;var o=function(e){var t=e.getAttribute("rend");return Object.keys(jl).includes(t)?t:"middle"};function a(e){var t=e.getAttribute("style");return Nl.includes(t)?t:null}var s=[],l="",c=0,u=0;try{var d,p=Il(r);try{for(p.s();!(d=p.n()).done;){var h,f=d.value,m=Al(t),g=Al(jl),v=f.id,y=f.children,b=f.getAttribute("facs"),w=Il(y);try{for(w.s();!(h=w.n()).done;){var x=h.value,S=o(x),E=a(x);x.setAttribute("data-entry-id",v),g[S]?(x.id=g[S][0].id,g[S].push(x)):(c++,x.id="z".concat(c),g[S]=[x]),n(S,m,E,x)}}catch(e){w.e(e)}finally{w.f()}for(var T=0,P=Object.values(g);T<P.length;T++){var C=P[T];C&&(l=l.concat(Hl(C,b)))}s[u]=Ul(m[0],s[u]),s[u+1]=Ul(m[1],s[u+1]),s[u+2]=Ul(m[2],s[u+2]),u+=1}}catch(e){p.e(e)}finally{p.f()}}catch(e){console.log(e)}return{html:l,layout:zl(s)}}function zl(e){var t=Dl(e);e[0]&&"."===e[0][0]&&"."===e[0][1]&&t.shift();var n,r="",i=Il(t);try{for(i.s();!(n=i.n()).done;){var o=n.value.join(" ");r+=" '".concat(o,"'")}}catch(e){i.e(e)}finally{i.f()}return r}function Hl(e,t){for(var n=e[0],r=n.id,i=n.attributes["data-entry-id"].value,o="",a=0;a<n.classList.length;a++)o="".concat(o," ").concat(n.classList.item(a));var s,l='<div id="'.concat(r,'" className="').concat(o,'" data-entry-id="').concat(i,'" data-facs="').concat(t||"",'">'),c=Il(e);try{for(c.s();!(s=c.n()).done;){var u=s.value;u.getAttribute("facs")&&u.setAttribute("data-facs",u.getAttribute("facs")),u.setAttribute("className","block"),l="div"===u.name?l.concat("".concat(u.innerHTML," <br/>")):l.concat("".concat(u.outerHTML))}}catch(e){c.e(e)}finally{c.f()}return l.concat("</div>")}function Ul(e,t){if(t){for(var n=[],r=0;r<4;r++)"."!==e[r]?n[r]=e[r]:n[r]=t[r];return n}return e}function Vl(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Wl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wl(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Wl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ql(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gl(Object(n),!0).forEach((function(t){Xl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xl(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zl(e){if(e.loading)return new Promise((function(t){t(e)}));e.loading=!0;var t=ql({},e);return new Promise((function(n,r){var i=Object.keys(t.annotationURLs),o=Object.fromEntries(i.map((function(e){return[e,!1]})));i.length>0?Ol.get(t.image_zoom_url).then((function(a){t.tileSource=new(Rl().IIIFTileSource)(a.data);var s,l=Vl(i);try{var c=function(){var i=s.value,a=t.annotationURLs[i],l=a.htmlURL,c=a.xmlURL;t.transcription||(t.transcription={}),t.transcription[i]={},Ol.all([Ol.get(l),Ol.get(c)]).then(Ol.spread((function(e,n){var a=function(e,t){var n=function(e){return Bl(e,[[".",".","."],[".",".","."],[".",".","."]],Fl)}(e);return ql(ql({},n),{},{xml:t})}(e.data,n.data);a?(t.transcription[i]=a,t.loading=!1,o[i]=!0):r(new Error("Unable to load transcription: ".concat(l)))}))).catch((function(t){e.loading=!1,r(t)})).finally((function(){0===Object.values(o).filter((function(e){return!e})).length&&n(t)}))};for(l.s();!(s=l.n()).done;)c()}catch(e){l.e(e)}finally{l.f()}})).catch((function(t){e.loading=!1,r(t)})):Ol.get(t.image_zoom_url).then((function(e){t.tileSource=new(Rl().IIIFTileSource)(e.data),t.loading=!1,n(t)})).catch((function(t){e.loading=!1,r(t)}))}))}function Yl(){Yl=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,a=Object.create(o.prototype),s=new R(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",h="suspendedYield",f="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(A([])));S&&S!==n&&r.call(S,a)&&(w=S);var E=b.prototype=v.prototype=Object.create(w);function T(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=p;return function(o,a){if(i===f)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=k(s,r);if(l){if(l===g)continue;return l}}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=f;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?m:h,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function k(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=d(i,t.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[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=b,i(E,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,l,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},T(P.prototype),c(P.prototype,s,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},T(E),c(E,l,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=A,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!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 l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){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(e,t){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"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}var Kl=Yl().mark(rc),Jl=Yl().mark(ic),Ql=Yl().mark(oc),$l=Yl().mark(ac),ec=Yl().mark(sc),tc=function(e){return e.document},nc=function(e){return e.glossary};function rc(e){var t,n;return Yl().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t=e.payload.params[0].pathname,!((n=t.split("/")).length>1)){r.next=14;break}r.t0=n[1],r.next="ec"===r.t0?6:14;break;case 6:return r.next=8,ic();case 8:return r.sent,r.next=11,ac();case 11:return r.next=13,oc(n);case 13:return r.abrupt("break",14);case 14:case"end":return r.stop()}}),Kl)}function ic(){var e,t,n,r,i,o,a,s;return Yl().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,zi(tc);case 2:if((e=l.sent).loaded){l.next=26;break}if(!e.variorum){l.next=20;break}t={},n=0,r=Object.keys(e.manifestURL);case 7:if(!(n<r.length)){l.next=16;break}return i=r[n],l.next=11,Ol.get(e.manifestURL[i]);case 11:o=l.sent,t[i]=o.data;case 13:n++,l.next=7;break;case 16:return a={type:"variorum",documentData:t},l.next=19,bc("DocumentActions.loadDocument",a);case 19:return l.abrupt("return",a);case 20:return l.next=22,Ol.get(e.manifestURL);case 22:return s=l.sent,l.next=25,bc("DocumentActions.loadDocument",s.data);case 25:return l.abrupt("return",s.data);case 26:return l.abrupt("return",null);case 27:case"end":return l.stop()}}),Jl)}function oc(e){var t,n,r,i,o,a,s,l,c,u;return Yl().wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,zi(tc);case 2:if(!(t=d.sent).loaded){d.next=22;break}e.length>2&&(n=e[2],e.length>4&&(r=e[4],e.length>6&&(i=e[6]))),(o=[]).push(n),r&&r!==n&&o.push(r),i&&i!==n&&i!==r&&o.push(i),a=0,s=o;case 10:if(!(a<s.length)){d.next=22;break}if(l=s[a],!(c=t.folioIndex[l])||c.loading){d.next=19;break}return d.next=16,Zl(c);case 16:return u=d.sent,d.next=19,bc("DocumentActions.loadFolio",u);case 19:a++,d.next=10;break;case 22:case"end":return d.stop()}}),Ql)}function ac(){var e,t;return Yl().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,zi(nc);case 2:if((e=n.sent).loaded||!e.URL){n.next=9;break}return n.next=6,Ol.get(e.URL);case 6:return t=n.sent,n.next=9,bc("GlossaryActions.loadGlossary",t.data);case 9:case"end":return n.stop()}}),$l)}function sc(){return Yl().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,No("RouteListenerSaga.userNavigatation",rc);case 2:case"end":return e.stop()}}),ec)}function lc(){lc=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,a=Object.create(o.prototype),s=new R(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",h="suspendedYield",f="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(A([])));S&&S!==n&&r.call(S,a)&&(w=S);var E=b.prototype=v.prototype=Object.create(w);function T(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=p;return function(o,a){if(i===f)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=k(s,r);if(l){if(l===g)continue;return l}}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=f;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?m:h,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function k(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=d(i,t.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[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=b,i(E,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,l,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},T(P.prototype),c(P.prototype,s,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},T(E),c(E,l,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=A,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!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 l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){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(e,t){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"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}var cc=lc().mark(uc);function uc(){return lc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t=[sc()],n=void 0,(n=Li(Si,t)).combinator=!0,n;case 2:case"end":return e.stop()}var t,n}),cc)}function dc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pc(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hc(e){return function(e){if(Array.isArray(e))return fc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return fc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fc(e,t)}(e)||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 fc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mc(){mc=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,a=Object.create(o.prototype),s=new R(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",h="suspendedYield",f="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(A([])));S&&S!==n&&r.call(S,a)&&(w=S);var E=b.prototype=v.prototype=Object.create(w);function T(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=p;return function(o,a){if(i===f)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=k(s,r);if(l){if(l===g)continue;return l}}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=f;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?m:h,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function k(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=d(i,t.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[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=b,i(E,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,l,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},T(P.prototype),c(P.prototype,s,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},T(E),c(E,l,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=A,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!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 l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){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(e,t){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"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}var gc=mc().mark(bc);function vc(e){var t=Ao(),n=Or(function(e){var t=e.documentName,n=e.documentInfo,r=e.glossaryURL,i=e.threePanel,o=void 0!==i&&i,a=n&&Object.keys(n).length>1,s={},l={},c={};a&&Object.keys(e.documentInfo).forEach((function(t){s[t]=e.documentInfo[t].transcriptionTypes,l[t]=e.documentInfo[t].iiifManifest,c[t]=e.documentInfo[t].documentName}));var u=a?s:e.transcriptionTypes,d=a?l:e.iiifManifest,p=a&&c;return _r({diplomatic:wc("DiplomaticActions",sa,la),document:wc("DocumentActions",na,ua(d,t,u,a,p,o)),glossary:wc("GlossaryActions",Uo,ca(r))})}(e),window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__(),function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(Er(15))},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},o=t.map((function(e){return e(i)}));return r=Rr.apply(void 0,o)(n.dispatch),Sr(Sr({},n),{},{dispatch:r})}}}(t));return t.run(uc),n}function yc(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];e.dispatch({type:t,payload:{params:r,dispatcher:{dispatch:e.dispatch}}})}function bc(e){var t,n,r,i=arguments;return mc().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:for(t=i.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=i[r];return o.next=3,Ni({type:e,payload:{params:n}});case 3:return o.abrupt("return",o.sent);case 4:case"end":return o.stop()}}),gc)}function wc(e,t,n){for(var r=[],i=0,o=Object.keys(t);i<o.length;i++){var a=o[i];r.push("".concat(e,".").concat(a))}return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,i=arguments.length>1?arguments[1]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t;return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:r).includes(i.type)?function(e,t,n){var r=n.payload&&n.payload.params?n.payload.params:[];return t.apply(void 0,[e].concat(hc(r),[n.payload.dispatcher]))}(e,function(e,t){return t[e.split(".")[1]]}(i.type,o),i):function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dc(Object(n),!0).forEach((function(t){pc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e)}}var xc=i(74),Sc={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ec=a().createContext&&a().createContext(Sc),Tc=function(){return Tc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Tc.apply(this,arguments)},Pc=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Cc(e){return e&&e.map((function(e,t){return a().createElement(e.tag,Tc({key:t},e.attr),Cc(e.child))}))}function kc(e){return function(t){return a().createElement(Oc,Tc({attr:Tc({},e.attr)},t),Cc(e.child))}}function Oc(e){var t=function(t){var n,r=e.attr,i=e.size,o=e.title,s=Pc(e,["attr","size","title"]),l=i||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),a().createElement("svg",Tc({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,s,{className:n,style:Tc(Tc({color:e.color||t.color},t.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),o&&a().createElement("title",null,o),e.children)};return void 0!==Ec?a().createElement(Ec.Consumer,null,(function(e){return t(e)})):t(Sc)}function _c(e){return kc({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 504C119 504 8 393 8 256S119 8 256 8s248 111 248 248-111 248-248 248zm28.9-143.6L209.4 288H392c13.3 0 24-10.7 24-24v-16c0-13.3-10.7-24-24-24H209.4l75.5-72.4c9.7-9.3 9.9-24.8.4-34.3l-11-10.9c-9.4-9.4-24.6-9.4-33.9 0L107.7 239c-9.4 9.4-9.4 24.6 0 33.9l132.7 132.7c9.4 9.4 24.6 9.4 33.9 0l11-10.9c9.5-9.5 9.3-25-.4-34.3z"}}]})(e)}function Rc(e){return kc({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8c137 0 248 111 248 248S393 504 256 504 8 393 8 256 119 8 256 8zm-28.9 143.6l75.5 72.4H120c-13.3 0-24 10.7-24 24v16c0 13.3 10.7 24 24 24h182.6l-75.5 72.4c-9.7 9.3-9.9 24.8-.4 34.3l11 10.9c9.4 9.4 24.6 9.4 33.9 0L404.3 273c9.4-9.4 9.4-24.6 0-33.9L271.6 106.3c-9.4-9.4-24.6-9.4-33.9 0l-11 10.9c-9.5 9.6-9.3 25.1.4 34.4z"}}]})(e)}function Ac(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var r=c({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}i(1663);function Dc(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Dc(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}const Ic=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Dc(e))&&(r&&(r+=" "),r+=t);return r};function Mc(e){return e&&e.ownerDocument||document}function Lc(e){if("string"!=typeof e)throw new Error(v(7));return e.charAt(0).toUpperCase()+e.slice(1)}var jc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};const Nc="object"===("undefined"==typeof window?"undefined":jc(window))&&"object"===("undefined"==typeof document?"undefined":jc(document))&&9===document.nodeType;function Fc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function Bc(e,t,n){return t&&Fc(e.prototype,t),n&&Fc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function zc(e,t){return zc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zc(e,t)}function Hc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,zc(e,t)}function Uc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Vc={}.constructor;function Wc(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(Wc);if(e.constructor!==Vc)return e;var t={};for(var n in e)t[n]=Wc(e[n]);return t}function Gc(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=Wc(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var qc=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},Xc=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&"!important"!==e[n];n++)t&&(t+=", "),t+=qc(e[n]," ");else t=qc(e,", ");return"!important"===e[e.length-1]&&(t+=" !important"),t};function Zc(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function Yc(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function Kc(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,o=void 0===i?0:i,a=t.fallbacks;!1===n.format&&(o=-1/0);var s=Zc(n),l=s.linebreak,c=s.space;if(e&&o++,a)if(Array.isArray(a))for(var u=0;u<a.length;u++){var d=a[u];for(var p in d){var h=d[p];null!=h&&(r&&(r+=l),r+=Yc(p+":"+c+Xc(h)+";",o))}}else for(var f in a){var m=a[f];null!=m&&(r&&(r+=l),r+=Yc(f+":"+c+Xc(m)+";",o))}for(var g in t){var v=t[g];null!=v&&"fallbacks"!==g&&(r&&(r+=l),r+=Yc(g+":"+c+Xc(v)+";",o))}return(r||n.allowEmpty)&&e?(r&&(r=""+l+r+l),Yc(""+e+c+"{"+r,--o)+Yc("}",o)):r}var Jc=/([[\].#*$><+~=|^:(),"'`\s])/g,Qc="undefined"!=typeof CSS&&CSS.escape,$c=function(e){return Qc?Qc(e):e.replace(Jc,"\\$1")},eu=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!r)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var l=this.options.sheet;return l&&l.attached,this},e}(),tu=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=r.selector,a=r.scoped,s=r.sheet,l=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=l(Uc(Uc(i)),s),i.selectorText="."+$c(i.id)),i}Hc(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=Xc(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?c({},e,{allowEmpty:!0}):e;return Kc(this.selectorText,this.style,n)},Bc(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(eu),nu={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new tu(e,t,n)}},ru={indent:1,children:!0},iu=/@([\w-]+)/,ou=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(iu);for(var i in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new _u(c({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=ru);var t=Zc(e).linebreak;if(null==e.indent&&(e.indent=ru.indent),null==e.children&&(e.children=ru.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),au=/@container|@media|@supports\s+/,su={onCreateRule:function(e,t,n){return au.test(e)?new ou(e,t,n):null}},lu={indent:1,children:!0},cu=/@keyframes\s+([\w-]+)/,uu=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match(cu);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,o=n.sheet,a=n.generateId;for(var s in this.id=!1===i?this.name:$c(a(this,o)),this.rules=new _u(c({},n,{parent:this})),t)this.rules.add(s,t[s],c({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=lu);var t=Zc(e).linebreak;if(null==e.indent&&(e.indent=lu.indent),null==e.children&&(e.children=lu.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),du=/@keyframes\s+/,pu=/\$([\w-]+)/g,hu=function(e,t){return"string"==typeof e?e.replace(pu,(function(e,n){return n in t?t[n]:e})):e},fu=function(e,t,n){var r=e[t],i=hu(r,n);i!==r&&(e[t]=i)},mu={onCreateRule:function(e,t,n){return"string"==typeof e&&du.test(e)?new uu(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&fu(e,"animation-name",n.keyframes),"animation"in e&&fu(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return hu(e,r.keyframes);default:return e}}},gu=function(e){function t(){return e.apply(this,arguments)||this}return Hc(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?c({},e,{allowEmpty:!0}):e;return Kc(this.key,this.style,n)},t}(eu),vu={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new gu(e,t,n):null}},yu=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=Zc(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r<this.style.length;r++)n+=Kc(this.at,this.style[r]),this.style[r+1]&&(n+=t);return n}return Kc(this.at,this.style,e)},e}(),bu=/@font-face/,wu={onCreateRule:function(e,t,n){return bu.test(e)?new yu(e,t,n):null}},xu=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return Kc(this.key,this.style,e)},e}(),Su={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new xu(e,t,n):null}},Eu=function(){function e(e,t,n){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),Tu={"@charset":!0,"@import":!0,"@namespace":!0},Pu={onCreateRule:function(e,t,n){return e in Tu?new Eu(e,t,n):null}},Cu=[nu,su,mu,vu,wu,Su,Pu],ku={process:!0},Ou={force:!0,process:!0},_u=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,i=r.parent,o=r.sheet,a=r.jss,s=r.Renderer,l=r.generateId,u=r.scoped,d=c({classes:this.classes,parent:i,sheet:o,jss:a,Renderer:s,generateId:l,scoped:u,name:e,keyframes:this.keyframes,selector:void 0},n),p=e;e in this.raw&&(p=e+"-d"+this.counter++),this.raw[p]=t,p in this.classes&&(d.selector="."+$c(this.classes[p]));var h=Gc(p,t,d);if(!h)return null;this.register(h);var f=void 0===d.index?this.index.length:d.index;return this.index.splice(f,0,h),h},t.replace=function(e,t,n){var r=this.get(e),i=this.index.indexOf(r);r&&this.remove(r);var o=n;return-1!==i&&(o=c({},n,{index:i})),this.add(e,t,o)},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof tu?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof uu&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof tu?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof uu&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=ku);var i=this.options,o=i.jss.plugins,a=i.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var s=t.style;if(o.onUpdate(n,t,a,r),r.process&&s&&s!==t.style){for(var l in o.onProcessStyle(t.style,t,a),t.style){var c=t.style[l];c!==s[l]&&t.prop(l,c,Ou)}for(var u in s){var d=t.style[u],p=s[u];null==d&&d!==p&&t.prop(u,null,Ou)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=Zc(e).linebreak,o=0;o<this.index.length;o++){var a=this.index[o].toString(e);(a||r)&&(t&&(t+=i),t+=a)}return t},e}(),Ru=function(){function e(e,t){for(var n in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=c({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new _u(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.replaceRule=function(e,t,n){var r=this.rules.get(e);if(!r)return this.addRule(e,t,n);var i=this.rules.replace(e,t,n);return i&&this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(this.renderer&&(i?r.renderable&&this.renderer.replaceRule(r.renderable,i):this.renderer.deleteRule(r)),i):i:(this.deployed=!1,i)},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"==typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),Au=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),Du=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=s(t,["attached"]),i=Zc(r).linebreak,o="",a=0;a<this.registry.length;a++){var l=this.registry[a];null!=n&&l.attached!==n||(o&&(o+=i),o+=l.toString(r))}return o},Bc(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),Iu=new Du,Mu="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),Lu="2f1acc6c3a606b082e5eef5e54414ffb";null==Mu[Lu]&&(Mu[Lu]=0);var ju=Mu[Lu]++,Nu=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",o="";return r&&(r.options.classNamePrefix&&(o=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(o||"c")+ju+i+t:o+n.key+"-"+ju+(i?"-"+i:"")+"-"+t}},Fu=function(e){var t;return function(){return t||(t=e()),t}},Bu=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}},zu=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=Xc(n)),e.attributeStyleMap)e.attributeStyleMap.set(t,r);else{var i=r?r.indexOf("!important"):-1,o=i>-1?r.substr(0,i-1):r;e.style.setProperty(t,o,i>-1?"important":"")}}catch(e){return!1}return!0},Hu=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}},Uu=function(e,t){return e.selectorText=t,e.selectorText===t},Vu=Fu((function(){return document.querySelector("head")}));function Wu(e){var t=Iu.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var i=function(e){for(var t=Vu(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var Gu=Fu((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),qu=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(e){return!1}return e.cssRules[n]},Xu=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},Zu=function(){function e(e){this.getPropertyValue=Bu,this.setProperty=zu,this.removeProperty=Hu,this.setSelector=Uu,this.hasInsertedRules=!1,this.cssRules=[],e&&Iu.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=Gu();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=Wu(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else Vu().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;if("conditional"===e.type||"keyframes"===e.type){var o=Xu(n,t);if(!1===(i=qu(n,r.toString({children:!1}),o)))return!1;this.refCssRule(e,o,i)}return this.insertRules(r.rules,i),i}var a=e.toString();if(!a)return!1;var s=Xu(n,t),l=qu(n,a,s);return!1!==l&&(this.hasInsertedRules=!0,this.refCssRule(e,s,l),l)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof Ru&&this.cssRules.splice(t,0,n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),Yu=0,Ku=function(){function e(e){this.id=Yu++,this.version="10.10.0",this.plugins=new Au,this.options={id:{minify:!1},createGenerateId:Nu,Renderer:Nc?Zu:null,plugins:[]},this.generateId=Nu({minify:!1});for(var t=0;t<Cu.length;t++)this.plugins.use(Cu[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=c({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===Iu.index?0:Iu.index+1);var r=new Ru(e,c({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),Iu.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var r=c({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var i=Gc(e,t,r);return i&&this.plugins.onProcessRule(i),i},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}(),Ju=function(e){return new Ku(e)},Qu="object"==typeof CSS&&null!=CSS&&"number"in CSS;function $u(e){var t=null;for(var n in e){var r=e[n],i=typeof r;if("function"===i)t||(t={}),t[n]=r;else if("object"===i&&null!==r&&!Array.isArray(r)){var o=$u(r);o&&(t||(t={}),t[n]=o)}}return t}Ju();var ed={set:function(e,t,n,r){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}};const td=ed;var nd=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var rd=Date.now(),id="fnValues"+rd,od="fnStyle"+ ++rd;const ad=function(){return{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=Gc(e,{},n);return r[od]=t,r},onProcessStyle:function(e,t){if(id in t||od in t)return e;var n={};for(var r in e){var i=e[r];"function"==typeof i&&(delete e[r],n[r]=i)}return t[id]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[od];o&&(i.style=o(e)||{});var a=i[id];if(a)for(var s in a)i.prop(s,a[s](e),r)}}};var sd="@global",ld="@global ",cd=function(){function e(e,t,n){for(var r in this.type="global",this.at=sd,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new _u(c({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),ud=function(){function e(e,t,n){this.type="global",this.at=sd,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr(8);this.rule=n.jss.createRule(r,t,c({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),dd=/\s*,\s*/g;function pd(e,t){for(var n=e.split(dd),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}const hd=function(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===sd)return new cd(e,t,n);if("@"===e[0]&&e.substr(0,8)===ld)return new ud(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,i=r?r[sd]:null;if(i){for(var o in i)t.addRule(o,i[o],c({},n,{selector:pd(o,e.selector)}));delete r[sd]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var i in r)if("@"===i[0]&&i.substr(0,sd.length)===sd){var o=pd(i.substr(sd.length),e.selector);t.addRule(o,r[i],c({},n,{selector:o})),delete r[i]}}(e,t))}}};var fd=/\s*,\s*/g,md=/&/g,gd=/\$([\w-]+)/g;const vd=function(){function e(e,t){return function(n,r){var i=e.getRule(r)||t&&t.getRule(r);return i?i.selector:r}}function t(e,t){for(var n=t.split(fd),r=e.split(fd),i="",o=0;o<n.length;o++)for(var a=n[o],s=0;s<r.length;s++){var l=r[s];i&&(i+=", "),i+=-1!==l.indexOf("&")?l.replace(md,a):a+" "+l}return i}function n(e,t,n){if(n)return c({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var i=c({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete i.name,i}return{onProcessStyle:function(r,i,o){if("style"!==i.type)return r;var a,s,l=i,u=l.options.parent;for(var d in r){var p=-1!==d.indexOf("&"),h="@"===d[0];if(p||h){if(a=n(l,u,a),p){var f=t(d,l.selector);s||(s=e(u,o)),f=f.replace(gd,s);var m=l.key+"-"+d;"replaceRule"in u?u.replaceRule(m,r[d],c({},a,{selector:f})):u.addRule(m,r[d],c({},a,{selector:f}))}else h&&u.addRule(d,{},a).addRule(l.key,r[d],{selector:l.selector});delete r[d]}}return r}}};var yd=/[A-Z]/g,bd=/^ms-/,wd={};function xd(e){return"-"+e.toLowerCase()}const Sd=function(e){if(wd.hasOwnProperty(e))return wd[e];var t=e.replace(yd,xd);return wd[e]=bd.test(t)?"-"+t:t};function Ed(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:Sd(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(Ed):t.fallbacks=Ed(e.fallbacks)),t}const Td=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=Ed(e[t]);return e}return Ed(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=Sd(t);return t===r?e:(n.prop(r,e),null)}}};var Pd=Qu&&CSS?CSS.px:"px",Cd=Qu&&CSS?CSS.ms:"ms",kd=Qu&&CSS?CSS.percent:"%";function Od(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var _d=Od({"animation-delay":Cd,"animation-duration":Cd,"background-position":Pd,"background-position-x":Pd,"background-position-y":Pd,"background-size":Pd,border:Pd,"border-bottom":Pd,"border-bottom-left-radius":Pd,"border-bottom-right-radius":Pd,"border-bottom-width":Pd,"border-left":Pd,"border-left-width":Pd,"border-radius":Pd,"border-right":Pd,"border-right-width":Pd,"border-top":Pd,"border-top-left-radius":Pd,"border-top-right-radius":Pd,"border-top-width":Pd,"border-width":Pd,"border-block":Pd,"border-block-end":Pd,"border-block-end-width":Pd,"border-block-start":Pd,"border-block-start-width":Pd,"border-block-width":Pd,"border-inline":Pd,"border-inline-end":Pd,"border-inline-end-width":Pd,"border-inline-start":Pd,"border-inline-start-width":Pd,"border-inline-width":Pd,"border-start-start-radius":Pd,"border-start-end-radius":Pd,"border-end-start-radius":Pd,"border-end-end-radius":Pd,margin:Pd,"margin-bottom":Pd,"margin-left":Pd,"margin-right":Pd,"margin-top":Pd,"margin-block":Pd,"margin-block-end":Pd,"margin-block-start":Pd,"margin-inline":Pd,"margin-inline-end":Pd,"margin-inline-start":Pd,padding:Pd,"padding-bottom":Pd,"padding-left":Pd,"padding-right":Pd,"padding-top":Pd,"padding-block":Pd,"padding-block-end":Pd,"padding-block-start":Pd,"padding-inline":Pd,"padding-inline-end":Pd,"padding-inline-start":Pd,"mask-position-x":Pd,"mask-position-y":Pd,"mask-size":Pd,height:Pd,width:Pd,"min-height":Pd,"max-height":Pd,"min-width":Pd,"max-width":Pd,bottom:Pd,left:Pd,top:Pd,right:Pd,inset:Pd,"inset-block":Pd,"inset-block-end":Pd,"inset-block-start":Pd,"inset-inline":Pd,"inset-inline-end":Pd,"inset-inline-start":Pd,"box-shadow":Pd,"text-shadow":Pd,"column-gap":Pd,"column-rule":Pd,"column-rule-width":Pd,"column-width":Pd,"font-size":Pd,"font-size-delta":Pd,"letter-spacing":Pd,"text-decoration-thickness":Pd,"text-indent":Pd,"text-stroke":Pd,"text-stroke-width":Pd,"word-spacing":Pd,motion:Pd,"motion-offset":Pd,outline:Pd,"outline-offset":Pd,"outline-width":Pd,perspective:Pd,"perspective-origin-x":kd,"perspective-origin-y":kd,"transform-origin":kd,"transform-origin-x":kd,"transform-origin-y":kd,"transform-origin-z":kd,"transition-delay":Cd,"transition-duration":Cd,"vertical-align":Pd,"flex-basis":Pd,"shape-margin":Pd,size:Pd,gap:Pd,grid:Pd,"grid-gap":Pd,"row-gap":Pd,"grid-row-gap":Pd,"grid-column-gap":Pd,"grid-template-rows":Pd,"grid-template-columns":Pd,"grid-auto-rows":Pd,"grid-auto-columns":Pd,"box-shadow-x":Pd,"box-shadow-y":Pd,"box-shadow-blur":Pd,"box-shadow-spread":Pd,"font-line-height":Pd,"text-shadow-x":Pd,"text-shadow-y":Pd,"text-shadow-blur":Pd});function Rd(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=Rd(e,t[r],n);else if("object"==typeof t)if("fallbacks"===e)for(var i in t)t[i]=Rd(i,t[i],n);else for(var o in t)t[o]=Rd(e+"-"+o,t[o],n);else if("number"==typeof t&&!1===isNaN(t)){var a=n[e]||_d[e];return!a||0===t&&a===Pd?t.toString():"function"==typeof a?a(t).toString():""+t+a}return t}const Ad=function(e){void 0===e&&(e={});var t=Od(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=Rd(r,e[r],t);return e},onChangeValue:function(e,n){return Rd(n,e,t)}}};function Dd(e){return function(e){if(Array.isArray(e))return W(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||G(e)||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 Id="",Md="",Ld="",jd="",Nd=Nc&&"ontouchstart"in document.documentElement;if(Nc){var Fd={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Bd=document.createElement("p").style;for(var zd in Fd)if(zd+"Transform"in Bd){Id=zd,Md=Fd[zd];break}"Webkit"===Id&&"msHyphens"in Bd&&(Id="ms",Md=Fd.ms,jd="edge"),"Webkit"===Id&&"-apple-trailing-word"in Bd&&(Ld="apple")}var Hd={js:Id,css:Md,vendor:Ld,browser:jd,isTouch:Nd};var Ud={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===Hd.js?"-webkit-"+e:Hd.css+e)}},Vd={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===Hd.js?Hd.css+"print-"+e:e)}},Wd=/[-\s]+(.)?/g;function Gd(e,t){return t?t.toUpperCase():""}function qd(e){return e.replace(Wd,Gd)}function Xd(e){return qd("-"+e)}var Zd,Yd={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===Hd.js){var n="mask-image";if(qd(n)in t)return e;if(Hd.js+Xd(n)in t)return Hd.css+e}return e}},Kd={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==Hd.vendor||Hd.isTouch?e:Hd.css+e)}},Jd={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:Hd.css+e)}},Qd={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:Hd.css+e)}},$d={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===Hd.js||"ms"===Hd.js&&"edge"!==Hd.browser?Hd.css+e:e)}},ep={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===Hd.js||"ms"===Hd.js||"apple"===Hd.vendor?Hd.css+e:e)}},tp={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===Hd.js?"WebkitColumn"+Xd(e)in t&&Hd.css+"column-"+e:"Moz"===Hd.js&&("page"+Xd(e)in t&&"page-"+e))}},np={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===Hd.js)return e;var n=e.replace("-inline","");return Hd.js+Xd(n)in t&&Hd.css+n}},rp={supportedProperty:function(e,t){return qd(e)in t&&e}},ip={supportedProperty:function(e,t){var n=Xd(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:Hd.js+n in t?Hd.css+e:"Webkit"!==Hd.js&&"Webkit"+n in t&&"-webkit-"+e}},op={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===Hd.js?""+Hd.css+e:e)}},ap={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===Hd.js?Hd.css+"scroll-chaining":e)}},sp={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},lp={supportedProperty:function(e,t){var n=sp[e];return!!n&&(Hd.js+Xd(n)in t&&Hd.css+n)}},cp={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},up=Object.keys(cp),dp=function(e){return Hd.css+e},pp={supportedProperty:function(e,t,n){var r=n.multiple;if(up.indexOf(e)>-1){var i=cp[e];if(!Array.isArray(i))return Hd.js+Xd(i)in t&&Hd.css+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(Hd.js+Xd(i[0])in t))return!1;return i.map(dp)}return!1}},hp=[Ud,Vd,Yd,Kd,Jd,Qd,$d,ep,tp,np,rp,ip,op,ap,lp,pp],fp=hp.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),mp=hp.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Dd(t.noPrefill)),e}),[]),gp={};if(Nc){Zd=document.createElement("p");var vp=window.getComputedStyle(document.documentElement,"");for(var yp in vp)isNaN(yp)||(gp[vp[yp]]=vp[yp]);mp.forEach((function(e){return delete gp[e]}))}function bp(e,t){if(void 0===t&&(t={}),!Zd)return e;if(null!=gp[e])return gp[e];"transition"!==e&&"transform"!==e||(t[e]=e in Zd.style);for(var n=0;n<fp.length&&(gp[e]=fp[n](e,Zd.style,t),!gp[e]);n++);try{Zd.style[e]=""}catch(e){return!1}return gp[e]}var wp,xp={},Sp={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Ep=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function Tp(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?bp(t):", "+bp(n);return r||(t||n)}function Pp(e,t){var n=t;if(!wp||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=xp[r])return xp[r];try{wp.style[e]=n}catch(e){return xp[r]=!1,!1}if(Sp[e])n=n.replace(Ep,Tp);else if(""===wp.style[e]&&("-ms-flex"===(n=Hd.css+n)&&(wp.style[e]="-ms-flexbox"),wp.style[e]=n,""===wp.style[e]))return xp[r]=!1,!1;return wp.style[e]="",xp[r]=n,xp[r]}Nc&&(wp=document.createElement("p"));const Cp=function(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var i=!1,o=bp(n);o&&o!==n&&(i=!0);var a=!1,s=Pp(o,Xc(r));s&&s!==r&&(a=!0),(i||a)&&(i&&delete t[n],t[o||n]=s||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===Hd.js?e:"@"+Hd.css+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return Pp(t,Xc(e))||e}}};const kp=function(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o<i.length;o++)r[i[o]]=t[i[o]];return r}}};var Op=Ju({plugins:[ad(),hd(),vd(),Td(),Ad(),"undefined"==typeof window?null:Cp(),kp()]}),_p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,i=void 0===r?"jss":r,o=e.seed,a=void 0===o?"":o,s=""===a?"":"".concat(a,"-"),l=0,c=function(){return l+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==nd.indexOf(e.key))return"Mui-".concat(e.key);var o="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[he]&&""===a?"".concat(o,"-").concat(c()):o}return"".concat(s).concat(i).concat(c())}}(),Rp={disableGeneration:!1,generateClassName:_p,jss:Op,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},Ap=a().createContext(Rp);var Dp=-1e9;const Ip={};function Mp(e,t){var n=e.state,r=e.theme,i=e.stylesOptions,o=e.stylesCreator,a=e.name;if(!i.disableGeneration){var s=td.get(i.sheetsManager,o,r);s||(s={refs:0,staticSheet:null,dynamicStyles:null},td.set(i.sheetsManager,o,r,s));var l=c({},o.options,i,{theme:r,flip:"boolean"==typeof i.flip?i.flip:"rtl"===r.direction});l.generateId=l.serverGenerateClassName||l.generateClassName;var u=i.sheetsRegistry;if(0===s.refs){var d;i.sheetsCache&&(d=td.get(i.sheetsCache,o,r));var p=o.create(r,a);d||((d=i.jss.createStyleSheet(p,c({link:!1},l))).attach(),i.sheetsCache&&td.set(i.sheetsCache,o,r,d)),u&&u.add(d),s.staticSheet=d,s.dynamicStyles=$u(p)}if(s.dynamicStyles){var h=i.jss.createStyleSheet(s.dynamicStyles,c({link:!0},l));h.update(t),h.attach(),n.dynamicSheet=h,n.classes=Ac({baseClasses:s.staticSheet.classes,newClasses:h.classes}),u&&u.add(h)}else n.classes=s.staticSheet.classes;s.refs+=1}}function Lp(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,r=t.classNamePrefix,i=t.Component,o=t.defaultTheme,s=void 0===o?Ip:o,u=l(t,["name","classNamePrefix","Component","defaultTheme"]),d=function(e){var t="function"==typeof e;return{create:function(n,r){var i;try{i=t?e(n):e}catch(e){throw e}if(!r||!n.overrides||!n.overrides[r])return i;var o=n.overrides[r],a=c({},i);return Object.keys(o).forEach((function(e){a[e]=p(a[e],o[e])})),a},options:{}}}(e),h=n||r||"makeStyles";d.options={index:Dp+=1,name:n,meta:h,classNamePrefix:h};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=pe()||s,r=c({},a().useContext(Ap),u),o=a().useRef(),l=a().useRef();!function(e,t){var n,r=a().useRef([]),i=a().useMemo((function(){return{}}),t);r.current!==i&&(r.current=i,n=e()),a().useEffect((function(){return function(){n&&n()}}),[i])}((function(){var i={name:n,state:{},stylesCreator:d,stylesOptions:r,theme:t};return Mp(i,e),l.current=!1,o.current=i,function(){!function(e){var t=e.state,n=e.theme,r=e.stylesOptions,i=e.stylesCreator;if(!r.disableGeneration){var o=td.get(r.sheetsManager,i,n);o.refs-=1;var a=r.sheetsRegistry;0===o.refs&&(td.delete(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}(i)}}),[t,d]),a().useEffect((function(){l.current&&function(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}(o.current,e),l.current=!0}));var p=function(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,i=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,i=!0),i&&(r.cacheClasses.value=Ac({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}(o.current,e.classes,i);return p}}const jp=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=t.defaultTheme,i=t.withTheme,o=void 0!==i&&i,s=t.name,u=l(t,["defaultTheme","withTheme","name"]);var d=s,p=Lp(e,c({defaultTheme:r,Component:n,name:s||n.displayName,classNamePrefix:d},u)),h=a().forwardRef((function(e,t){e.classes;var i,u=e.innerRef,d=l(e,["classes","innerRef"]),h=p(c({},n.defaultProps,e)),f=d;return("string"==typeof s||o)&&(i=pe()||r,s&&(f=me({theme:i,name:s,props:d})),o&&!f.theme&&(f.theme=i)),a().createElement(n,c({ref:u||t,classes:h},f))}));return ve()(h,n),h}};const Np=function(e,t){return jp(e,c({defaultTheme:ye},t))};function Fp(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=this;clearTimeout(t),t=setTimeout((function(){e.apply(a,i)}),n)}return r.clear=function(){clearTimeout(t)},r}function Bp(e){return Mc(e).defaultView||window}function zp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}}),(function(){}))}function Hp(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Up(e,t){return r.useMemo((function(){return null==e&&null==t?null:function(n){Hp(e,n),Hp(t,n)}}),[e,t])}var Vp="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;const Wp=r.forwardRef((function(e,t){var n=e.children,i=e.container,o=e.disablePortal,a=void 0!==o&&o,s=e.onRendered,l=r.useState(null),c=l[0],u=l[1],d=Up(r.isValidElement(n)?n.ref:null,t);return Vp((function(){a||u(function(e){return e="function"==typeof e?e():e,Me.findDOMNode(e)}(i)||document.body)}),[i,a]),Vp((function(){if(c&&!a)return Hp(t,c),function(){Hp(t,null)}}),[t,c,a]),Vp((function(){s&&(c||a)&&s()}),[s,c,a]),a?r.isValidElement(n)?r.cloneElement(n,{ref:d}):n:c?Me.createPortal(n,c):c}));var Gp="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function qp(e){var t=r.useRef(e);return Gp((function(){t.current=e})),r.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}function Xp(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}function Zp(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Yp(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function Kp(e,t,n){var r=arguments.length>4?arguments[4]:void 0,i=[t,n].concat(Dd(arguments.length>3&&void 0!==arguments[3]?arguments[3]:[])),o=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===i.indexOf(e)&&-1===o.indexOf(e.tagName)&&Zp(e,r)}))}function Jp(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function Qp(e,t){var n,r=[],i=[],o=e.container;if(!t.disableScrollLock){if(function(e){var t=Mc(e);return t.body===e?Bp(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){var a=Xp();r.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(Yp(o)+a,"px"),n=Mc(o).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(Yp(e)+a,"px")}))}var s=o.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:o;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var $p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return Bc(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&Zp(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);Kp(t,e.mountNode,e.modalRef,r,!0);var i=Jp(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=Jp(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=Qp(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=Jp(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&Zp(e.modalRef,!0),Kp(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&Zp(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();const eh=function(e){var t=e.children,n=e.disableAutoFocus,i=void 0!==n&&n,o=e.disableEnforceFocus,a=void 0!==o&&o,s=e.disableRestoreFocus,l=void 0!==s&&s,c=e.getDoc,u=e.isEnabled,d=e.open,p=r.useRef(),h=r.useRef(null),f=r.useRef(null),m=r.useRef(),g=r.useRef(null),v=r.useCallback((function(e){g.current=Me.findDOMNode(e)}),[]),y=Up(t.ref,v),b=r.useRef();return r.useEffect((function(){b.current=d}),[d]),!b.current&&d&&"undefined"!=typeof window&&(m.current=c().activeElement),r.useEffect((function(){if(d){var e=Mc(g.current);i||!g.current||g.current.contains(e.activeElement)||(g.current.hasAttribute("tabIndex")||g.current.setAttribute("tabIndex",-1),g.current.focus());var t=function(){null!==g.current&&(e.hasFocus()&&!a&&u()&&!p.current?g.current&&!g.current.contains(e.activeElement)&&g.current.focus():p.current=!1)},n=function(t){!a&&u()&&9===t.keyCode&&e.activeElement===g.current&&(p.current=!0,t.shiftKey?f.current.focus():h.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var r=setInterval((function(){t()}),50);return function(){clearInterval(r),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),l||(m.current&&m.current.focus&&m.current.focus(),m.current=null)}}}),[i,a,l,u,d]),r.createElement(r.Fragment,null,r.createElement("div",{tabIndex:0,ref:h,"data-test":"sentinelStart"}),r.cloneElement(t,{ref:y}),r.createElement("div",{tabIndex:0,ref:f,"data-test":"sentinelEnd"}))};var th={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}};const nh=r.forwardRef((function(e,t){var n=e.invisible,i=void 0!==n&&n,o=e.open,a=l(e,["invisible","open"]);return o?r.createElement("div",c({"aria-hidden":!0,ref:t},a,{style:c({},th.root,i?th.invisible:{},a.style)})):null}));var rh=new $p,ih=r.forwardRef((function(e,t){var n=pe(),i=me({name:"MuiModal",props:c({},e),theme:n}),o=i.BackdropComponent,a=void 0===o?nh:o,s=i.BackdropProps,u=i.children,d=i.closeAfterTransition,p=void 0!==d&&d,h=i.container,f=i.disableAutoFocus,m=void 0!==f&&f,g=i.disableBackdropClick,v=void 0!==g&&g,y=i.disableEnforceFocus,b=void 0!==y&&y,w=i.disableEscapeKeyDown,x=void 0!==w&&w,S=i.disablePortal,E=void 0!==S&&S,T=i.disableRestoreFocus,P=void 0!==T&&T,C=i.disableScrollLock,k=void 0!==C&&C,O=i.hideBackdrop,_=void 0!==O&&O,R=i.keepMounted,A=void 0!==R&&R,D=i.manager,I=void 0===D?rh:D,M=i.onBackdropClick,L=i.onClose,j=i.onEscapeKeyDown,N=i.onRendered,F=i.open,B=l(i,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),z=r.useState(!0),H=z[0],U=z[1],V=r.useRef({}),W=r.useRef(null),G=r.useRef(null),q=Up(G,t),X=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(i),Z=function(){return Mc(W.current)},Y=function(){return V.current.modalRef=G.current,V.current.mountNode=W.current,V.current},K=function(){I.mount(Y(),{disableScrollLock:k}),G.current.scrollTop=0},J=qp((function(){var e=function(e){return e="function"==typeof e?e():e,Me.findDOMNode(e)}(h)||Z().body;I.add(Y(),e),G.current&&K()})),Q=r.useCallback((function(){return I.isTopModal(Y())}),[I]),$=qp((function(e){W.current=e,e&&(N&&N(),F&&Q()?K():Zp(G.current,!0))})),ee=r.useCallback((function(){I.remove(Y())}),[I]);if(r.useEffect((function(){return function(){ee()}}),[ee]),r.useEffect((function(){F?J():X&&p||ee()}),[F,ee,X,p,J]),!A&&!F&&(!X||H))return null;var te=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:le}),ne={};return void 0===u.props.tabIndex&&(ne.tabIndex=u.props.tabIndex||"-1"),X&&(ne.onEnter=zp((function(){U(!1)}),u.props.onEnter),ne.onExited=zp((function(){U(!0),p&&ee()}),u.props.onExited)),r.createElement(Wp,{ref:$,container:h,disablePortal:E},r.createElement("div",c({ref:q,onKeyDown:function(e){"Escape"===e.key&&Q()&&(j&&j(e),x||(e.stopPropagation(),L&&L(e,"escapeKeyDown")))},role:"presentation"},B,{style:c({},te.root,!F&&H?te.hidden:{},B.style)}),_?null:r.createElement(a,c({open:F,onClick:function(e){e.target===e.currentTarget&&(M&&M(e),!v&&L&&L(e,"backdropClick"))}},s)),r.createElement(eh,{disableEnforceFocus:b,disableAutoFocus:m,disableRestoreFocus:P,getDoc:Z,isEnabled:Q,open:F},r.cloneElement(u,ne))))}));const oh=ih,ah=!1,sh=a().createContext(null);var lh="unmounted",ch="exited",uh="entering",dh="entered",ph="exiting",hh=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=ch,r.appearStatus=uh):i=dh:i=t.unmountOnExit||t.mountOnEnter?lh:ch,r.state={status:i},r.nextCallback=null,r}Hc(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===lh?{status:ch}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==uh&&n!==dh&&(t=uh):n!==uh&&n!==dh||(t=ph)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===uh){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Le().findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ch&&this.setState({status:lh})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[Le().findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||ah?this.safeSetState({status:dh},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:uh},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:dh},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Le().findDOMNode(this);t&&!ah?(this.props.onExit(r),this.safeSetState({status:ph},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:ch},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:ch},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Le().findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===lh)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,s(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a().createElement(sh.Provider,{value:null},"function"==typeof n?n(e,r):a().cloneElement(a().Children.only(n),r))},t}(a().Component);function fh(){}hh.contextType=sh,hh.propTypes={},hh.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:fh,onEntering:fh,onEntered:fh,onExit:fh,onExiting:fh,onExited:fh},hh.UNMOUNTED=lh,hh.EXITED=ch,hh.ENTERING=uh,hh.ENTERED=dh,hh.EXITING=ph;const mh=hh;var gh=function(e){return e.scrollTop};function vh(e,t){var n=e.timeout,r=e.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:i.transitionDelay}}function yh(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var bh={entering:{opacity:1,transform:yh(1)},entered:{opacity:1,transform:"none"}},wh=r.forwardRef((function(e,t){var n=e.children,i=e.disableStrictModeCompat,o=void 0!==i&&i,a=e.in,s=e.onEnter,u=e.onEntered,d=e.onEntering,p=e.onExit,h=e.onExited,f=e.onExiting,m=e.style,g=e.timeout,v=void 0===g?"auto":g,y=e.TransitionComponent,b=void 0===y?mh:y,w=l(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),x=r.useRef(),S=r.useRef(),E=be(),T=E.unstable_strictMode&&!o,P=r.useRef(null),C=Up(n.ref,t),k=Up(T?P:void 0,C),O=function(e){return function(t,n){if(e){var r=q(T?[P.current,t]:[t,n],2),i=r[0],o=r[1];void 0===o?e(i):e(i,o)}}},_=O(d),R=O((function(e,t){gh(e);var n,r=vh({style:m,timeout:v},{mode:"enter"}),i=r.duration,o=r.delay;"auto"===v?(n=E.transitions.getAutoHeightDuration(e.clientHeight),S.current=n):n=i,e.style.transition=[E.transitions.create("opacity",{duration:n,delay:o}),E.transitions.create("transform",{duration:.666*n,delay:o})].join(","),s&&s(e,t)})),A=O(u),D=O(f),I=O((function(e){var t,n=vh({style:m,timeout:v},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===v?(t=E.transitions.getAutoHeightDuration(e.clientHeight),S.current=t):t=r,e.style.transition=[E.transitions.create("opacity",{duration:t,delay:i}),E.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=yh(.75),p&&p(e)})),M=O(h);return r.useEffect((function(){return function(){clearTimeout(x.current)}}),[]),r.createElement(b,c({appear:!0,in:a,nodeRef:T?P:void 0,onEnter:R,onEntered:A,onEntering:_,onExit:I,onExited:M,onExiting:D,addEndListener:function(e,t){var n=T?e:t;"auto"===v&&(x.current=setTimeout(n,S.current||0))},timeout:"auto"===v?null:v},w),(function(e,t){return r.cloneElement(n,c({style:c({opacity:0,transform:yh(.75),visibility:"exited"!==e||a?void 0:"hidden"},bh[e],m,n.props.style),ref:k},t))}))}));wh.muiSupportAuto=!0;const xh=wh;var Sh=r.forwardRef((function(e,t){var n=e.classes,i=e.className,o=e.component,a=void 0===o?"div":o,s=e.square,u=void 0!==s&&s,d=e.elevation,p=void 0===d?1:d,h=e.variant,f=void 0===h?"elevation":h,m=l(e,["classes","className","component","square","elevation","variant"]);return r.createElement(a,c({className:Ic(n.root,i,"outlined"===f?n.outlined:n["elevation".concat(p)],!u&&n.rounded),ref:t},m))}));const Eh=Np((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),c({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(Sh);function Th(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Ph(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Ch(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function kh(e){return"function"==typeof e?e():e}var Oh=r.forwardRef((function(e,t){var n=e.action,i=e.anchorEl,o=e.anchorOrigin,a=void 0===o?{vertical:"top",horizontal:"left"}:o,s=e.anchorPosition,u=e.anchorReference,d=void 0===u?"anchorEl":u,p=e.children,h=e.classes,f=e.className,m=e.container,g=e.elevation,v=void 0===g?8:g,y=e.getContentAnchorEl,b=e.marginThreshold,w=void 0===b?16:b,x=e.onEnter,S=e.onEntered,E=e.onEntering,T=e.onExit,P=e.onExited,C=e.onExiting,k=e.open,O=e.PaperProps,_=void 0===O?{}:O,R=e.transformOrigin,A=void 0===R?{vertical:"top",horizontal:"left"}:R,D=e.TransitionComponent,I=void 0===D?xh:D,M=e.transitionDuration,L=void 0===M?"auto":M,j=e.TransitionProps,N=void 0===j?{}:j,F=l(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),B=r.useRef(),z=r.useCallback((function(e){if("anchorPosition"===d)return s;var t=kh(i),n=(t&&1===t.nodeType?t:Mc(B.current).body).getBoundingClientRect(),r=0===e?a.vertical:"center";return{top:n.top+Th(n,r),left:n.left+Ph(n,a.horizontal)}}),[i,a.horizontal,a.vertical,s,d]),H=r.useCallback((function(e){var t=0;if(y&&"anchorEl"===d){var n=y(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}0}return t}),[a.vertical,d,y]),U=r.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:Th(e,A.vertical)+t,horizontal:Ph(e,A.horizontal)}}),[A.horizontal,A.vertical]),V=r.useCallback((function(e){var t=H(e),n={width:e.offsetWidth,height:e.offsetHeight},r=U(n,t);if("none"===d)return{top:null,left:null,transformOrigin:Ch(r)};var o=z(t),a=o.top-r.vertical,s=o.left-r.horizontal,l=a+n.height,c=s+n.width,u=Bp(kh(i)),p=u.innerHeight-w,h=u.innerWidth-w;if(a<w){var f=a-w;a-=f,r.vertical+=f}else if(l>p){var m=l-p;a-=m,r.vertical+=m}if(s<w){var g=s-w;s-=g,r.horizontal+=g}else if(c>h){var v=c-h;s-=v,r.horizontal+=v}return{top:"".concat(Math.round(a),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:Ch(r)}}),[i,d,z,H,U,w]),W=r.useCallback((function(){var e=B.current;if(e){var t=V(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[V]),G=r.useCallback((function(e){B.current=Me.findDOMNode(e)}),[]);r.useEffect((function(){k&&W()})),r.useImperativeHandle(n,(function(){return k?{updatePosition:function(){W()}}:null}),[k,W]),r.useEffect((function(){if(k){var e=Fp((function(){W()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[k,W]);var q=L;"auto"!==L||I.muiSupportAuto||(q=void 0);var X=m||(i?Mc(kh(i)).body:void 0);return r.createElement(oh,c({container:X,open:k,ref:t,BackdropProps:{invisible:!0},className:Ic(h.root,f)},F),r.createElement(I,c({appear:!0,in:k,onEnter:x,onEntered:S,onExit:T,onExited:P,onExiting:C,timeout:q},N,{onEntering:zp((function(e,t){E&&E(e,t),W()}),N.onEntering)}),r.createElement(Eh,c({elevation:v,ref:G},_,{className:Ic(h.paper,_.className)}),p)))}));const _h=Np({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(Oh);const Rh=r.createContext({});var Ah=r.forwardRef((function(e,t){var n=e.children,i=e.classes,o=e.className,a=e.component,s=void 0===a?"ul":a,u=e.dense,d=void 0!==u&&u,p=e.disablePadding,h=void 0!==p&&p,f=e.subheader,m=l(e,["children","classes","className","component","dense","disablePadding","subheader"]),g=r.useMemo((function(){return{dense:d}}),[d]);return r.createElement(Rh.Provider,{value:g},r.createElement(s,c({className:Ic(i.root,o,d&&i.dense,!h&&i.padding,f&&i.subheader),ref:t},m),f,n))}));const Dh=Np({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(Ah);function Ih(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Mh(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Lh(e,t){if(void 0===t)return!0;var n=e.innerText;return void 0===n&&(n=e.textContent),0!==(n=n.trim().toLowerCase()).length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function jh(e,t,n,r,i,o){for(var a=!1,s=i(e,t,!!t&&n);s;){if(s===e.firstChild){if(a)return;a=!0}var l=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&Lh(s,o)&&!l)return void s.focus();s=i(e,s,n)}}var Nh="undefined"==typeof window?r.useEffect:r.useLayoutEffect,Fh=r.forwardRef((function(e,t){var n=e.actions,i=e.autoFocus,o=void 0!==i&&i,a=e.autoFocusItem,s=void 0!==a&&a,u=e.children,d=e.className,p=e.disabledItemsFocusable,h=void 0!==p&&p,f=e.disableListWrap,m=void 0!==f&&f,g=e.onKeyDown,v=e.variant,y=void 0===v?"selectedMenu":v,b=l(e,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),w=r.useRef(null),x=r.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Nh((function(){o&&w.current.focus()}),[o]),r.useImperativeHandle(n,(function(){return{adjustStyleForScrollbar:function(e,t){var n=!w.current.style.width;if(e.clientHeight<w.current.clientHeight&&n){var r="".concat(Xp(),"px");w.current.style["rtl"===t.direction?"paddingLeft":"paddingRight"]=r,w.current.style.width="calc(100% + ".concat(r,")")}return w.current}}}),[]);var S=Up(r.useCallback((function(e){w.current=Me.findDOMNode(e)}),[]),t),E=-1;r.Children.forEach(u,(function(e,t){r.isValidElement(e)&&(e.props.disabled||("selectedMenu"===y&&e.props.selected||-1===E)&&(E=t))}));var T=r.Children.map(u,(function(e,t){if(t===E){var n={};return s&&(n.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===y&&(n.tabIndex=0),r.cloneElement(e,n)}return e}));return r.createElement(Dh,c({role:"menu",ref:S,className:d,onKeyDown:function(e){var t=w.current,n=e.key,r=Mc(t).activeElement;if("ArrowDown"===n)e.preventDefault(),jh(t,r,m,h,Ih);else if("ArrowUp"===n)e.preventDefault(),jh(t,r,m,h,Mh);else if("Home"===n)e.preventDefault(),jh(t,null,m,h,Ih);else if("End"===n)e.preventDefault(),jh(t,null,m,h,Mh);else if(1===n.length){var i=x.current,o=n.toLowerCase(),a=performance.now();i.keys.length>0&&(a-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=a,i.keys.push(o);var s=r&&!i.repeating&&Lh(r,i);i.previousKeyMatched&&(s||jh(t,r,!1,h,Ih,i))?e.preventDefault():i.previousKeyMatched=!1}g&&g(e)},tabIndex:o?0:-1},b),T)}));const Bh=Fh;var zh={vertical:"top",horizontal:"right"},Hh={vertical:"top",horizontal:"left"},Uh=r.forwardRef((function(e,t){var n=e.autoFocus,i=void 0===n||n,o=e.children,a=e.classes,s=e.disableAutoFocusItem,u=void 0!==s&&s,d=e.MenuListProps,p=void 0===d?{}:d,h=e.onClose,f=e.onEntering,m=e.open,g=e.PaperProps,v=void 0===g?{}:g,y=e.PopoverClasses,b=e.transitionDuration,w=void 0===b?"auto":b,x=e.TransitionProps,S=(x=void 0===x?{}:x).onEntering,E=l(x,["onEntering"]),T=e.variant,P=void 0===T?"selectedMenu":T,C=l(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"]),k=be(),O=i&&!u&&m,_=r.useRef(null),R=r.useRef(null),A=-1;r.Children.map(o,(function(e,t){r.isValidElement(e)&&(e.props.disabled||("menu"!==P&&e.props.selected||-1===A)&&(A=t))}));var D=r.Children.map(o,(function(e,t){return t===A?r.cloneElement(e,{ref:function(t){R.current=Me.findDOMNode(t),Hp(e.ref,t)}}):e}));return r.createElement(_h,c({getContentAnchorEl:function(){return R.current},classes:y,onClose:h,TransitionProps:c({onEntering:function(e,t){_.current&&_.current.adjustStyleForScrollbar(e,k),f&&f(e,t),S&&S(e,t)}},E),anchorOrigin:"rtl"===k.direction?zh:Hh,transformOrigin:"rtl"===k.direction?zh:Hh,PaperProps:c({},v,{classes:c({},v.classes,{root:a.paper})}),open:m,ref:t,transitionDuration:w},C),r.createElement(Bh,c({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),h&&h(e,"tabKeyDown"))},actions:_,autoFocus:i&&(-1===A||u),autoFocusItem:O,variant:P},p,{className:Ic(a.list,p.className)}),D))}));const Vh=Np({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(Uh);function Wh(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function Gh(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(Wh(e.value)&&""!==e.value||t&&Wh(e.defaultValue)&&""!==e.defaultValue)}function qh(e,t){return"object"===u(t)&&null!==t?e===t:String(e)===String(t)}var Xh=r.forwardRef((function(e,t){var n=e["aria-label"],i=e.autoFocus,o=e.autoWidth,a=e.children,s=e.classes,u=e.className,d=e.defaultValue,p=e.disabled,h=e.displayEmpty,f=e.IconComponent,m=e.inputRef,g=e.labelId,y=e.MenuProps,b=void 0===y?{}:y,w=e.multiple,x=e.name,S=e.onBlur,E=e.onChange,T=e.onClose,P=e.onFocus,C=e.onOpen,k=e.open,O=e.readOnly,_=e.renderValue,R=e.SelectDisplayProps,A=void 0===R?{}:R,D=e.tabIndex,I=(e.type,e.value),M=e.variant,L=void 0===M?"standard":M,j=l(e,["aria-label","autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"]),N=function(e){var t=e.controlled,n=e.default,i=(e.name,e.state,r.useRef(void 0!==t).current),o=r.useState(n),a=o[0],s=o[1];return[i?t:a,r.useCallback((function(e){i||s(e)}),[])]}({controlled:I,default:d,name:"Select"}),F=q(N,2),B=F[0],z=F[1],H=r.useRef(null),U=r.useState(null),V=U[0],W=U[1],G=r.useRef(null!=k).current,X=r.useState(),Z=X[0],Y=X[1],K=r.useState(!1),J=K[0],Q=K[1],$=Up(t,m);r.useImperativeHandle($,(function(){return{focus:function(){V.focus()},node:H.current,value:B}}),[V,B]),r.useEffect((function(){i&&V&&V.focus()}),[i,V]),r.useEffect((function(){if(V){var e=Mc(V).getElementById(g);if(e){var t=function(){getSelection().isCollapsed&&V.focus()};return e.addEventListener("click",t),function(){e.removeEventListener("click",t)}}}}),[g,V]);var ee,te,ne=function(e,t){e?C&&C(t):T&&T(t),G||(Y(o?null:V.clientWidth),Q(e))},re=r.Children.toArray(a),ie=function(e){return function(t){var n;if(w||ne(!1,t),w){n=Array.isArray(B)?B.slice():[];var r=B.indexOf(e.props.value);-1===r?n.push(e.props.value):n.splice(r,1)}else n=e.props.value;e.props.onClick&&e.props.onClick(t),B!==n&&(z(n),E&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:n,name:x}}),E(t,e)))}},oe=null!==V&&(G?k:J);delete j["aria-invalid"];var ae=[],se=!1;(Gh({value:B})||h)&&(_?ee=_(B):se=!0);var le=re.map((function(e){if(!r.isValidElement(e))return null;var t;if(w){if(!Array.isArray(B))throw new Error(v(2));(t=B.some((function(t){return qh(t,e.props.value)})))&&se&&ae.push(e.props.children)}else(t=qh(B,e.props.value))&&se&&(te=e.props.children);return t&&!0,r.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:ie(e),onKeyUp:function(t){" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));se&&(ee=w?ae.join(", "):te);var ce,ue=Z;!o&&G&&V&&(ue=V.clientWidth),ce=void 0!==D?D:p?null:0;var de=A.id||(x?"mui-component-select-".concat(x):void 0);return r.createElement(r.Fragment,null,r.createElement("div",c({className:Ic(s.root,s.select,s.selectMenu,s[L],u,p&&s.disabled),ref:W,tabIndex:ce,role:"button","aria-disabled":p?"true":void 0,"aria-expanded":oe?"true":void 0,"aria-haspopup":"listbox","aria-label":n,"aria-labelledby":[g,de].filter(Boolean).join(" ")||void 0,onKeyDown:function(e){if(!O){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),ne(!0,e))}},onMouseDown:p||O?null:function(e){0===e.button&&(e.preventDefault(),V.focus(),ne(!0,e))},onBlur:function(e){!oe&&S&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:B,name:x}}),S(e))},onFocus:P},A,{id:de}),function(e){return null==e||"string"==typeof e&&!e.trim()}(ee)?r.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):ee),r.createElement("input",c({value:Array.isArray(B)?B.join(","):B,name:x,ref:H,"aria-hidden":!0,onChange:function(e){var t=re.map((function(e){return e.props.value})).indexOf(e.target.value);if(-1!==t){var n=re[t];z(n.props.value),E&&E(e,n)}},tabIndex:-1,className:s.nativeInput,autoFocus:i},j)),r.createElement(f,{className:Ic(s.icon,s["icon".concat(Lc(L))],oe&&s.iconOpen,p&&s.disabled)}),r.createElement(Vh,c({id:"menu-".concat(x||""),anchorEl:V,open:oe,onClose:function(e){ne(!1,e)}},b,{MenuListProps:c({"aria-labelledby":g,role:"listbox",disableListWrap:!0},b.MenuListProps),PaperProps:c({},b.PaperProps,{style:c({minWidth:ue},null!=b.PaperProps?b.PaperProps.style:null)})}),le))}));const Zh=Xh;function Yh(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&void 0===t[n]&&(e[n]=r[n]),e}),{})}var Kh=r.createContext();const Jh=Kh;function Qh(){return r.useContext(Jh)}var $h=r.forwardRef((function(e,t){var n=e.children,i=e.classes,o=e.className,a=e.color,s=void 0===a?"inherit":a,u=e.component,d=void 0===u?"svg":u,p=e.fontSize,h=void 0===p?"medium":p,f=e.htmlColor,m=e.titleAccess,g=e.viewBox,v=void 0===g?"0 0 24 24":g,y=l(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return r.createElement(d,c({className:Ic(i.root,o,"inherit"!==s&&i["color".concat(Lc(s))],"default"!==h&&"medium"!==h&&i["fontSize".concat(Lc(h))]),focusable:"false",viewBox:v,color:f,"aria-hidden":!m||void 0,role:m?"img":void 0,ref:t},y),n,m?r.createElement("title",null,m):null)}));$h.muiName="SvgIcon";const ef=Np((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})($h);const tf=function(e,t){var n=function(t,n){return a().createElement(ef,c({ref:n},t),e)};return n.muiName=ef.muiName,a().memo(a().forwardRef(n))}(r.createElement("path",{d:"M7 10l5 5 5-5z"}));function nf(e,t){return parseInt(e[t],10)||0}var rf="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,of={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"},af=r.forwardRef((function(e,t){var n=e.onChange,i=e.rows,o=e.rowsMax,a=e.rowsMin,s=e.maxRows,u=e.minRows,d=void 0===u?1:u,p=e.style,h=e.value,f=l(e,["onChange","rows","rowsMax","rowsMin","maxRows","minRows","style","value"]),m=s||o,g=i||a||d,v=r.useRef(null!=h).current,y=r.useRef(null),b=Up(t,y),w=r.useRef(null),x=r.useRef(0),S=r.useState({}),E=S[0],T=S[1],P=r.useCallback((function(){var t=y.current,n=window.getComputedStyle(t),r=w.current;r.style.width=n.width,r.value=t.value||e.placeholder||"x","\n"===r.value.slice(-1)&&(r.value+=" ");var i=n["box-sizing"],o=nf(n,"padding-bottom")+nf(n,"padding-top"),a=nf(n,"border-bottom-width")+nf(n,"border-top-width"),s=r.scrollHeight-o;r.value="x";var l=r.scrollHeight-o,c=s;g&&(c=Math.max(Number(g)*l,c)),m&&(c=Math.min(Number(m)*l,c));var u=(c=Math.max(c,l))+("border-box"===i?o+a:0),d=Math.abs(c-s)<=1;T((function(e){return x.current<20&&(u>0&&Math.abs((e.outerHeightStyle||0)-u)>1||e.overflow!==d)?(x.current+=1,{overflow:d,outerHeightStyle:u}):e}))}),[m,g,e.placeholder]);r.useEffect((function(){var e=Fp((function(){x.current=0,P()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[P]),rf((function(){P()})),r.useEffect((function(){x.current=0}),[h]);return r.createElement(r.Fragment,null,r.createElement("textarea",c({value:h,onChange:function(e){x.current=0,v||P(),n&&n(e)},ref:b,rows:g,style:c({height:E.outerHeightStyle,overflow:E.overflow?"hidden":null},p)},f)),r.createElement("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:w,tabIndex:-1,style:c({},of,p)}))}));const sf=af;var lf="undefined"==typeof window?r.useEffect:r.useLayoutEffect,cf=r.forwardRef((function(e,t){var n=e["aria-describedby"],i=e.autoComplete,o=e.autoFocus,a=e.classes,s=e.className,u=(e.color,e.defaultValue),d=e.disabled,p=e.endAdornment,h=(e.error,e.fullWidth),f=void 0!==h&&h,m=e.id,g=e.inputComponent,y=void 0===g?"input":g,b=e.inputProps,w=void 0===b?{}:b,x=e.inputRef,S=(e.margin,e.multiline),E=void 0!==S&&S,T=e.name,P=e.onBlur,C=e.onChange,k=e.onClick,O=e.onFocus,_=e.onKeyDown,R=e.onKeyUp,A=e.placeholder,D=e.readOnly,I=e.renderSuffix,M=e.rows,L=e.rowsMax,j=e.rowsMin,N=e.maxRows,F=e.minRows,B=e.startAdornment,z=e.type,H=void 0===z?"text":z,U=e.value,V=l(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","maxRows","minRows","startAdornment","type","value"]),W=null!=w.value?w.value:U,G=r.useRef(null!=W).current,q=r.useRef(),X=r.useCallback((function(e){0}),[]),Z=Up(w.ref,X),Y=Up(x,Z),K=Up(q,Y),J=r.useState(!1),Q=J[0],$=J[1],ee=r.useContext(Kh);var te=Yh({props:e,muiFormControl:ee,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});te.focused=ee?ee.focused:Q,r.useEffect((function(){!ee&&d&&Q&&($(!1),P&&P())}),[ee,d,Q,P]);var ne=ee&&ee.onFilled,re=ee&&ee.onEmpty,ie=r.useCallback((function(e){Gh(e)?ne&&ne():re&&re()}),[ne,re]);lf((function(){G&&ie({value:W})}),[W,ie,G]);r.useEffect((function(){ie(q.current)}),[]);var oe=y,ae=c({},w,{ref:K});"string"!=typeof oe?ae=c({inputRef:K,type:H},ae,{ref:null}):E?!M||N||F||L||j?(ae=c({minRows:M||F,rowsMax:L,maxRows:N},ae),oe=sf):oe="textarea":ae=c({type:H},ae);return r.useEffect((function(){ee&&ee.setAdornedStart(Boolean(B))}),[ee,B]),r.createElement("div",c({className:Ic(a.root,a["color".concat(Lc(te.color||"primary"))],s,te.disabled&&a.disabled,te.error&&a.error,f&&a.fullWidth,te.focused&&a.focused,ee&&a.formControl,E&&a.multiline,B&&a.adornedStart,p&&a.adornedEnd,"dense"===te.margin&&a.marginDense),onClick:function(e){q.current&&e.currentTarget===e.target&&q.current.focus(),k&&k(e)},ref:t},V),B,r.createElement(Jh.Provider,{value:null},r.createElement(oe,c({"aria-invalid":te.error,"aria-describedby":n,autoComplete:i,autoFocus:o,defaultValue:u,disabled:te.disabled,id:m,onAnimationStart:function(e){ie("mui-auto-fill-cancel"===e.animationName?q.current:{value:"x"})},name:T,placeholder:A,readOnly:D,required:te.required,rows:M,value:W,onKeyDown:_,onKeyUp:R},ae,{className:Ic(a.input,w.className,te.disabled&&a.disabled,E&&a.inputMultiline,te.hiddenLabel&&a.inputHiddenLabel,B&&a.inputAdornedStart,p&&a.inputAdornedEnd,"search"===H&&a.inputTypeSearch,"dense"===te.margin&&a.inputMarginDense),onBlur:function(e){P&&P(e),w.onBlur&&w.onBlur(e),ee&&ee.onBlur?ee.onBlur(e):$(!1)},onChange:function(e){if(!G){var t=e.target||q.current;if(null==t)throw new Error(v(1));ie({value:t.value})}for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];w.onChange&&w.onChange.apply(w,[e].concat(r)),C&&C.apply(void 0,[e].concat(r))},onFocus:function(e){te.disabled?e.stopPropagation():(O&&O(e),w.onFocus&&w.onFocus(e),ee&&ee.onFocus?ee.onFocus(e):$(!0))}}))),p,I?I(c({},te,{startAdornment:B})):null)}));const uf=Np((function(e){var t="light"===e.palette.type,n={color:"currentColor",opacity:t?.42:.5,transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},i={opacity:t?.42:.5};return{"@global":{"@keyframes mui-auto-fill":{},"@keyframes mui-auto-fill-cancel":{}},root:c({},e.typography.body1,{color:e.palette.text.primary,lineHeight:"1.1876em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center","&$disabled":{color:e.palette.text.disabled,cursor:"default"}}),formControl:{},focused:{},disabled:{},adornedStart:{},adornedEnd:{},error:{},marginDense:{},multiline:{padding:"".concat(6,"px 0 ").concat(7,"px"),"&$marginDense":{paddingTop:3}},colorSecondary:{},fullWidth:{width:"100%"},input:{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"".concat(6,"px 0 ").concat(7,"px"),border:0,boxSizing:"content-box",background:"none",height:"1.1876em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{"-webkit-appearance":"none"},"label[data-shrink=false] + $formControl &":{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus:-ms-input-placeholder":i,"&:focus::-ms-input-placeholder":i},"&$disabled":{opacity:1},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},inputMarginDense:{paddingTop:3},inputMultiline:{height:"auto",resize:"none",padding:0},inputTypeSearch:{"-moz-appearance":"textfield","-webkit-appearance":"textfield"},inputAdornedStart:{},inputAdornedEnd:{},inputHiddenLabel:{}}}),{name:"MuiInputBase"})(cf);var df=r.forwardRef((function(e,t){var n=e.disableUnderline,i=e.classes,o=e.fullWidth,a=void 0!==o&&o,s=e.inputComponent,u=void 0===s?"input":s,d=e.multiline,p=void 0!==d&&d,h=e.type,f=void 0===h?"text":h,m=l(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return r.createElement(uf,c({classes:c({},i,{root:Ic(i.root,!n&&i.underline),underline:null}),fullWidth:a,inputComponent:u,multiline:p,ref:t,type:f},m))}));df.muiName="Input";const pf=Np((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(t),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(t)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}}),{name:"MuiInput"})(df);const hf=r.forwardRef((function(e,t){var n=e.classes,i=e.className,o=e.disabled,a=e.IconComponent,s=e.inputRef,u=e.variant,d=void 0===u?"standard":u,p=l(e,["classes","className","disabled","IconComponent","inputRef","variant"]);return r.createElement(r.Fragment,null,r.createElement("select",c({className:Ic(n.root,n.select,n[d],i,o&&n.disabled),disabled:o,ref:s||t},p)),e.multiple?null:r.createElement(a,{className:Ic(n.icon,n["icon".concat(Lc(d))],o&&n.disabled)}))}));var ff=function(e){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},"&$disabled":{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:e.palette.background.paper},"&&":{paddingRight:24}},filled:{"&&":{paddingRight:32}},outlined:{borderRadius:e.shape.borderRadius,"&&":{paddingRight:32}},selectMenu:{height:"auto",minHeight:"1.1876em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",pointerEvents:"none",color:e.palette.action.active,"&$disabled":{color:e.palette.action.disabled}},iconOpen:{transform:"rotate(180deg)"},iconFilled:{right:7},iconOutlined:{right:7},nativeInput:{bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%"}}},mf=r.createElement(pf,null),gf=r.forwardRef((function(e,t){var n=e.children,i=e.classes,o=e.IconComponent,a=void 0===o?tf:o,s=e.input,u=void 0===s?mf:s,d=e.inputProps,p=(e.variant,l(e,["children","classes","IconComponent","input","inputProps","variant"])),h=Yh({props:e,muiFormControl:Qh(),states:["variant"]});return r.cloneElement(u,c({inputComponent:hf,inputProps:c({children:n,classes:i,IconComponent:a,variant:h.variant,type:void 0},d,u?u.props.inputProps:{}),ref:t},p))}));gf.muiName="Select";Np(ff,{name:"MuiNativeSelect"})(gf);var vf=r.forwardRef((function(e,t){var n=e.disableUnderline,i=e.classes,o=e.fullWidth,a=void 0!==o&&o,s=e.inputComponent,u=void 0===s?"input":s,d=e.multiline,p=void 0!==d&&d,h=e.type,f=void 0===h?"text":h,m=l(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return r.createElement(uf,c({classes:c({},i,{root:Ic(i.root,!n&&i.underline),underline:null}),fullWidth:a,inputComponent:u,multiline:p,ref:t,type:f},m))}));vf.muiName="Input";const yf=Np((function(e){var t="light"===e.palette.type,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:r,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:t?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:r}},"&$focused":{backgroundColor:t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)"},"&$disabled":{backgroundColor:t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(n),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:before":{borderBottom:"1px solid ".concat(e.palette.text.primary)},"&$disabled:before":{borderBottomStyle:"dotted"}},focused:{},disabled:{},adornedStart:{paddingLeft:12},adornedEnd:{paddingRight:12},error:{},marginDense:{},multiline:{padding:"27px 12px 10px","&$marginDense":{paddingTop:23,paddingBottom:6}},input:{padding:"27px 12px 10px","&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.type?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.type?null:"#fff",caretColor:"light"===e.palette.type?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},inputMarginDense:{paddingTop:23,paddingBottom:6},inputHiddenLabel:{paddingTop:18,paddingBottom:19,"&$inputMarginDense":{paddingTop:10,paddingBottom:11}},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiFilledInput"})(vf);var bf=r.forwardRef((function(e,t){e.children;var n=e.classes,i=e.className,o=e.label,a=e.labelWidth,s=e.notched,u=e.style,d=l(e,["children","classes","className","label","labelWidth","notched","style"]),p="rtl"===be().direction?"right":"left";if(void 0!==o)return r.createElement("fieldset",c({"aria-hidden":!0,className:Ic(n.root,i),ref:t,style:u},d),r.createElement("legend",{className:Ic(n.legendLabelled,s&&n.legendNotched)},o?r.createElement("span",null,o):r.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}})));var h=a>0?.75*a+8:.01;return r.createElement("fieldset",c({"aria-hidden":!0,style:c(m({},"padding".concat(Lc(p)),8),u),className:Ic(n.root,i),ref:t},d),r.createElement("legend",{className:n.legend,style:{width:s?h:.01}},r.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}})))}));const wf=Np((function(e){return{root:{position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden"},legend:{textAlign:"left",padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},legendLabelled:{display:"block",width:"auto",textAlign:"left",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),"& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},legendNotched:{maxWidth:1e3,transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}}),{name:"PrivateNotchedOutline"})(bf);var xf=r.forwardRef((function(e,t){var n=e.classes,i=e.fullWidth,o=void 0!==i&&i,a=e.inputComponent,s=void 0===a?"input":a,u=e.label,d=e.labelWidth,p=void 0===d?0:d,h=e.multiline,f=void 0!==h&&h,m=e.notched,g=e.type,v=void 0===g?"text":g,y=l(e,["classes","fullWidth","inputComponent","label","labelWidth","multiline","notched","type"]);return r.createElement(uf,c({renderSuffix:function(e){return r.createElement(wf,{className:n.notchedOutline,label:u,labelWidth:p,notched:void 0!==m?m:Boolean(e.startAdornment||e.filled||e.focused)})},classes:c({},n,{root:Ic(n.root,n.underline),notchedOutline:null}),fullWidth:o,inputComponent:s,multiline:f,ref:t,type:v},y))}));xf.muiName="Input";const Sf=Np((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative",borderRadius:e.shape.borderRadius,"&:hover $notchedOutline":{borderColor:e.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:t}},"&$focused $notchedOutline":{borderColor:e.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:e.palette.error.main},"&$disabled $notchedOutline":{borderColor:e.palette.action.disabled}},colorSecondary:{"&$focused $notchedOutline":{borderColor:e.palette.secondary.main}},focused:{},disabled:{},adornedStart:{paddingLeft:14},adornedEnd:{paddingRight:14},error:{},marginDense:{},multiline:{padding:"18.5px 14px","&$marginDense":{paddingTop:10.5,paddingBottom:10.5}},notchedOutline:{borderColor:t},input:{padding:"18.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.type?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.type?null:"#fff",caretColor:"light"===e.palette.type?null:"#fff",borderRadius:"inherit"}},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiOutlinedInput"})(xf);var Ef=ff,Tf=r.createElement(pf,null),Pf=r.createElement(yf,null),Cf=r.forwardRef((function e(t,n){var i=t.autoWidth,o=void 0!==i&&i,a=t.children,s=t.classes,u=t.displayEmpty,d=void 0!==u&&u,p=t.IconComponent,h=void 0===p?tf:p,f=t.id,m=t.input,g=t.inputProps,v=t.label,y=t.labelId,b=t.labelWidth,w=void 0===b?0:b,x=t.MenuProps,S=t.multiple,E=void 0!==S&&S,T=t.native,P=void 0!==T&&T,C=t.onClose,k=t.onOpen,O=t.open,_=t.renderValue,R=t.SelectDisplayProps,A=t.variant,D=void 0===A?"standard":A,I=l(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","label","labelId","labelWidth","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"]),M=P?hf:Zh,L=Yh({props:t,muiFormControl:Qh(),states:["variant"]}).variant||D,j=m||{standard:Tf,outlined:r.createElement(Sf,{label:v,labelWidth:w}),filled:Pf}[L];return r.cloneElement(j,c({inputComponent:M,inputProps:c({children:a,IconComponent:h,variant:L,type:void 0,multiple:E},P?{id:f}:{autoWidth:o,displayEmpty:d,labelId:y,MenuProps:x,onClose:C,onOpen:k,open:O,renderValue:_,SelectDisplayProps:c({id:f},R)},g,{classes:g?Ac({baseClasses:s,newClasses:g.classes,Component:e}):s},m?m.props.inputProps:{}),ref:n},I))}));Cf.muiName="Select";const kf=Np(Ef,{name:"MuiSelect"})(Cf);var Of=!0,_f=!1,Rf=null,Af={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Df(e){e.metaKey||e.altKey||e.ctrlKey||(Of=!0)}function If(){Of=!1}function Mf(){"hidden"===this.visibilityState&&_f&&(Of=!0)}function Lf(e){var t=e.target;try{return t.matches(":focus-visible")}catch(e){}return Of||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!Af[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function jf(){_f=!0,window.clearTimeout(Rf),Rf=window.setTimeout((function(){_f=!1}),100)}function Nf(){var e=r.useCallback((function(e){var t,n=Me.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",Df,!0),t.addEventListener("mousedown",If,!0),t.addEventListener("pointerdown",If,!0),t.addEventListener("touchstart",If,!0),t.addEventListener("visibilitychange",Mf,!0))}),[]);return{isFocusVisible:Lf,onBlurVisible:jf,ref:e}}function Ff(e,t){var n=Object.create(null);return e&&r.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)})),n}function Bf(e,t,n){return null!=n[t]?n[t]:e.props[t]}function zf(e,t,n){var i=Ff(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var c=i[l][r];s[i[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,i);return Object.keys(o).forEach((function(a){var s=o[a];if((0,r.isValidElement)(s)){var l=a in t,c=a in i,u=t[a],d=(0,r.isValidElement)(u)&&!u.props.in;!c||l&&!d?c||!l||d?c&&l&&(0,r.isValidElement)(u)&&(o[a]=(0,r.cloneElement)(s,{onExited:n.bind(null,s),in:u.props.in,exit:Bf(s,"exit",e),enter:Bf(s,"enter",e)})):o[a]=(0,r.cloneElement)(s,{in:!1}):o[a]=(0,r.cloneElement)(s,{onExited:n.bind(null,s),in:!0,exit:Bf(s,"exit",e),enter:Bf(s,"enter",e)})}})),o}var Hf=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},Uf=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(Uc(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}Hc(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,i,o=t.children,a=t.handleExited;return{children:t.firstRender?(n=e,i=a,Ff(n.children,(function(e){return(0,r.cloneElement)(e,{onExited:i.bind(null,e),in:!0,appear:Bf(e,"appear",n),enter:Bf(e,"enter",n),exit:Bf(e,"exit",n)})}))):zf(e,o,a),firstRender:!1}},n.handleExited=function(e,t){var n=Ff(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=c({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=s(e,["component","childFactory"]),i=this.state.contextValue,o=Hf(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a().createElement(sh.Provider,{value:i},o):a().createElement(sh.Provider,{value:i},a().createElement(t,r,o))},t}(a().Component);Uf.propTypes={},Uf.defaultProps={component:"div",childFactory:function(e){return e}};const Vf=Uf;var Wf="undefined"==typeof window?r.useEffect:r.useLayoutEffect;const Gf=function(e){var t=e.classes,n=e.pulsate,i=void 0!==n&&n,o=e.rippleX,a=e.rippleY,s=e.rippleSize,l=e.in,c=e.onExited,u=void 0===c?function(){}:c,d=e.timeout,p=r.useState(!1),h=p[0],f=p[1],m=Ic(t.ripple,t.rippleVisible,i&&t.ripplePulsate),g={width:s,height:s,top:-s/2+a,left:-s/2+o},v=Ic(t.child,h&&t.childLeaving,i&&t.childPulsate),y=qp(u);return Wf((function(){if(!l){f(!0);var e=setTimeout(y,d);return function(){clearTimeout(e)}}}),[y,l,d]),r.createElement("span",{className:m,style:g},r.createElement("span",{className:v}))};var qf=r.forwardRef((function(e,t){var n=e.center,i=void 0!==n&&n,o=e.classes,a=e.className,s=l(e,["center","classes","className"]),u=r.useState([]),d=u[0],p=u[1],h=r.useRef(0),f=r.useRef(null);r.useEffect((function(){f.current&&(f.current(),f.current=null)}),[d]);var m=r.useRef(!1),g=r.useRef(null),v=r.useRef(null),y=r.useRef(null);r.useEffect((function(){return function(){clearTimeout(g.current)}}),[]);var b=r.useCallback((function(e){var t=e.pulsate,n=e.rippleX,i=e.rippleY,a=e.rippleSize,s=e.cb;p((function(e){return[].concat(Dd(e),[r.createElement(Gf,{key:h.current,classes:o,timeout:550,pulsate:t,rippleX:n,rippleY:i,rippleSize:a})])})),h.current+=1,f.current=s}),[o]),w=r.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,o=void 0!==r&&r,a=t.center,s=void 0===a?i||t.pulsate:a,l=t.fakeElement,c=void 0!==l&&l;if("mousedown"===e.type&&m.current)m.current=!1;else{"touchstart"===e.type&&(m.current=!0);var u,d,p,h=c?null:y.current,f=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(f.width/2),d=Math.round(f.height/2);else{var w=e.touches?e.touches[0]:e,x=w.clientX,S=w.clientY;u=Math.round(x-f.left),d=Math.round(S-f.top)}if(s)(p=Math.sqrt((2*Math.pow(f.width,2)+Math.pow(f.height,2))/3))%2==0&&(p+=1);else{var E=2*Math.max(Math.abs((h?h.clientWidth:0)-u),u)+2,T=2*Math.max(Math.abs((h?h.clientHeight:0)-d),d)+2;p=Math.sqrt(Math.pow(E,2)+Math.pow(T,2))}e.touches?null===v.current&&(v.current=function(){b({pulsate:o,rippleX:u,rippleY:d,rippleSize:p,cb:n})},g.current=setTimeout((function(){v.current&&(v.current(),v.current=null)}),80)):b({pulsate:o,rippleX:u,rippleY:d,rippleSize:p,cb:n})}}),[i,b]),x=r.useCallback((function(){w({},{pulsate:!0})}),[w]),S=r.useCallback((function(e,t){if(clearTimeout(g.current),"touchend"===e.type&&v.current)return e.persist(),v.current(),v.current=null,void(g.current=setTimeout((function(){S(e,t)})));v.current=null,p((function(e){return e.length>0?e.slice(1):e})),f.current=t}),[]);return r.useImperativeHandle(t,(function(){return{pulsate:x,start:w,stop:S}}),[x,w,S]),r.createElement("span",c({className:Ic(o.root,a),ref:y},s),r.createElement(Vf,{component:null,exit:!0},d))}));const Xf=Np((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(r.memo(qf));var Zf=r.forwardRef((function(e,t){var n=e.action,i=e.buttonRef,o=e.centerRipple,a=void 0!==o&&o,s=e.children,u=e.classes,d=e.className,p=e.component,h=void 0===p?"button":p,f=e.disabled,m=void 0!==f&&f,g=e.disableRipple,v=void 0!==g&&g,y=e.disableTouchRipple,b=void 0!==y&&y,w=e.focusRipple,x=void 0!==w&&w,S=e.focusVisibleClassName,E=e.onBlur,T=e.onClick,P=e.onFocus,C=e.onFocusVisible,k=e.onKeyDown,O=e.onKeyUp,_=e.onMouseDown,R=e.onMouseLeave,A=e.onMouseUp,D=e.onTouchEnd,I=e.onTouchMove,M=e.onTouchStart,L=e.onDragLeave,j=e.tabIndex,N=void 0===j?0:j,F=e.TouchRippleProps,B=e.type,z=void 0===B?"button":B,H=l(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),U=r.useRef(null);var V=r.useRef(null),W=r.useState(!1),G=W[0],q=W[1];m&&G&&q(!1);var X=Nf(),Z=X.isFocusVisible,Y=X.onBlurVisible,K=X.ref;function J(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b;return qp((function(r){return t&&t(r),!n&&V.current&&V.current[e](r),!0}))}r.useImperativeHandle(n,(function(){return{focusVisible:function(){q(!0),U.current.focus()}}}),[]),r.useEffect((function(){G&&x&&!v&&V.current.pulsate()}),[v,x,G]);var Q=J("start",_),$=J("stop",L),ee=J("stop",A),te=J("stop",(function(e){G&&e.preventDefault(),R&&R(e)})),ne=J("start",M),re=J("stop",D),ie=J("stop",I),oe=J("stop",(function(e){G&&(Y(e),q(!1)),E&&E(e)}),!1),ae=qp((function(e){U.current||(U.current=e.currentTarget),Z(e)&&(q(!0),C&&C(e)),P&&P(e)})),se=function(){var e=Me.findDOMNode(U.current);return h&&"button"!==h&&!("A"===e.tagName&&e.href)},le=r.useRef(!1),ce=qp((function(e){x&&!le.current&&G&&V.current&&" "===e.key&&(le.current=!0,e.persist(),V.current.stop(e,(function(){V.current.start(e)}))),e.target===e.currentTarget&&se()&&" "===e.key&&e.preventDefault(),k&&k(e),e.target===e.currentTarget&&se()&&"Enter"===e.key&&!m&&(e.preventDefault(),T&&T(e))})),ue=qp((function(e){x&&" "===e.key&&V.current&&G&&!e.defaultPrevented&&(le.current=!1,e.persist(),V.current.stop(e,(function(){V.current.pulsate(e)}))),O&&O(e),T&&e.target===e.currentTarget&&se()&&" "===e.key&&!e.defaultPrevented&&T(e)})),de=h;"button"===de&&H.href&&(de="a");var pe={};"button"===de?(pe.type=z,pe.disabled=m):("a"===de&&H.href||(pe.role="button"),pe["aria-disabled"]=m);var he=Up(i,t),fe=Up(K,U),me=Up(he,fe),ge=r.useState(!1),ve=ge[0],ye=ge[1];r.useEffect((function(){ye(!0)}),[]);var be=ve&&!v&&!m;return r.createElement(de,c({className:Ic(u.root,d,G&&[u.focusVisible,S],m&&u.disabled),onBlur:oe,onClick:T,onFocus:ae,onKeyDown:ce,onKeyUp:ue,onMouseDown:Q,onMouseLeave:te,onMouseUp:ee,onDragLeave:$,onTouchEnd:re,onTouchMove:ie,onTouchStart:ne,ref:me,tabIndex:m?-1:N},pe,H),s,be?r.createElement(Xf,c({ref:V,center:a},F)):null)}));const Yf=Np({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(Zf);var Kf="undefined"==typeof window?r.useEffect:r.useLayoutEffect,Jf=r.forwardRef((function(e,t){var n=e.alignItems,i=void 0===n?"center":n,o=e.autoFocus,a=void 0!==o&&o,s=e.button,u=void 0!==s&&s,d=e.children,p=e.classes,h=e.className,f=e.component,m=e.ContainerComponent,g=void 0===m?"li":m,v=e.ContainerProps,y=(v=void 0===v?{}:v).className,b=l(v,["className"]),w=e.dense,x=void 0!==w&&w,S=e.disabled,E=void 0!==S&&S,T=e.disableGutters,P=void 0!==T&&T,C=e.divider,k=void 0!==C&&C,O=e.focusVisibleClassName,_=e.selected,R=void 0!==_&&_,A=l(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),D=r.useContext(Rh),I={dense:x||D.dense||!1,alignItems:i},M=r.useRef(null);Kf((function(){a&&M.current&&M.current.focus()}),[a]);var L,j,N=r.Children.toArray(d),F=N.length&&(L=N[N.length-1],j=["ListItemSecondaryAction"],r.isValidElement(L)&&-1!==j.indexOf(L.type.muiName)),B=Up(r.useCallback((function(e){M.current=Me.findDOMNode(e)}),[]),t),z=c({className:Ic(p.root,h,I.dense&&p.dense,!P&&p.gutters,k&&p.divider,E&&p.disabled,u&&p.button,"center"!==i&&p.alignItemsFlexStart,F&&p.secondaryAction,R&&p.selected),disabled:E},A),H=f||"li";return u&&(z.component=f||"div",z.focusVisibleClassName=Ic(p.focusVisible,O),H=Yf),F?(H=z.component||f?H:"div","li"===g&&("li"===H?H="div":"li"===z.component&&(z.component="div")),r.createElement(Rh.Provider,{value:I},r.createElement(g,c({className:Ic(p.container,y),ref:B},b),r.createElement(H,z,N),N.pop()))):r.createElement(Rh.Provider,{value:I},r.createElement(H,c({ref:B},z),N))}));const Qf=Np((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(Jf);var $f=r.forwardRef((function(e,t){var n,i=e.classes,o=e.className,a=e.component,s=void 0===a?"li":a,u=e.disableGutters,d=void 0!==u&&u,p=e.ListItemClasses,h=e.role,f=void 0===h?"menuitem":h,m=e.selected,g=e.tabIndex,v=l(e,["classes","className","component","disableGutters","ListItemClasses","role","selected","tabIndex"]);return e.disabled||(n=void 0!==g?g:-1),r.createElement(Qf,c({button:!0,role:f,tabIndex:n,component:s,selected:m,disableGutters:d,classes:c({dense:i.dense},p),className:Ic(i.root,o,m&&i.selected,!d&&i.gutters),ref:t},v))}));const em=Np((function(e){return{root:c({},e.typography.body1,m({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},e.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:c({},e.typography.body2,{minHeight:"auto"})}}),{name:"MuiMenuItem"})($f);function tm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return nm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nm(e,t)}(e,t)||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 nm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const rm=function(e){var t=tm((0,r.useState)(""),2),n=t[0],i=t[1],o=Boolean(e.anchorEl),s=o?"".concat(e.side,"_jumpInput"):void 0,l=(0,r.useRef)(null);(0,r.useEffect)((function(){l.current&&l.current.focus()}),[l,o]);e.positionY,e.positionX;return a().createElement(_h,{id:s,open:o,anchorEl:e.anchorEl,onClose:e.blurHandler,anchorOrigin:{vertical:"bottom",horizontal:"right"}},a().createElement("form",{onSubmit:function(t){t.preventDefault();var n=new FormData(t.target).get("folioID");e.submitHandler(n,e.side),e.blurHandler(),i("")}},a().createElement("input",{id:s,name:"folioID",onBlur:e.blurHandler,onChange:function(e){i(e.target.value)},placeholder:"Page Name (e.g. '3r')",ref:l,type:"text",value:n})))};var im={transcriptionTypeLabels:{f:"Facsimile",glossary:"Glossary"}};const om=im;var am="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,sm=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(am&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();var lm=am&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),sm))}};function cm(e){return e&&"[object Function]"==={}.toString.call(e)}function um(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function dm(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function pm(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=um(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:pm(dm(e))}function hm(e){return e&&e.referenceNode?e.referenceNode:e}var fm=am&&!(!window.MSInputMethodContext||!document.documentMode),mm=am&&/MSIE 10/.test(navigator.userAgent);function gm(e){return 11===e?fm:10===e?mm:fm||mm}function vm(e){if(!e)return document.documentElement;for(var t=gm(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===um(n,"position")?vm(n):n:e?e.ownerDocument.documentElement:document.documentElement}function ym(e){return null!==e.parentNode?ym(e.parentNode):e}function bm(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a,s,l=o.commonAncestorContainer;if(e!==l&&t!==l||r.contains(i))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&vm(a.firstElementChild)!==a?vm(l):l;var c=ym(e);return c.host?bm(c.host,t):bm(e,ym(t).host)}function wm(e){var t="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var r=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||r)[t]}return e[t]}function xm(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function Sm(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],gm(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function Em(e){var t=e.body,n=e.documentElement,r=gm(10)&&getComputedStyle(n);return{height:Sm("Height",t,n,r),width:Sm("Width",t,n,r)}}var Tm=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Pm=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Cm=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function km(e){return Cm({},e,{right:e.left+e.width,bottom:e.top+e.height})}function Om(e){var t={};try{if(gm(10)){t=e.getBoundingClientRect();var n=wm(e,"top"),r=wm(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?Em(e.ownerDocument):{},a=o.width||e.clientWidth||i.width,s=o.height||e.clientHeight||i.height,l=e.offsetWidth-a,c=e.offsetHeight-s;if(l||c){var u=um(e);l-=xm(u,"x"),c-=xm(u,"y"),i.width-=l,i.height-=c}return km(i)}function _m(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=gm(10),i="HTML"===t.nodeName,o=Om(e),a=Om(t),s=pm(e),l=um(t),c=parseFloat(l.borderTopWidth),u=parseFloat(l.borderLeftWidth);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var d=km({top:o.top-a.top-c,left:o.left-a.left-u,width:o.width,height:o.height});if(d.marginTop=0,d.marginLeft=0,!r&&i){var p=parseFloat(l.marginTop),h=parseFloat(l.marginLeft);d.top-=c-p,d.bottom-=c-p,d.left-=u-h,d.right-=u-h,d.marginTop=p,d.marginLeft=h}return(r&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(d=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=wm(t,"top"),i=wm(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}(d,t)),d}function Rm(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===um(e,"position"))return!0;var n=dm(e);return!!n&&Rm(n)}function Am(e){if(!e||!e.parentElement||gm())return document.documentElement;for(var t=e.parentElement;t&&"none"===um(t,"transform");)t=t.parentElement;return t||document.documentElement}function Dm(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?Am(e):bm(e,hm(t));if("viewport"===r)o=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=_m(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:wm(n),s=t?0:wm(n,"left");return km({top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o})}(a,i);else{var s=void 0;"scrollParent"===r?"BODY"===(s=pm(dm(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===r?e.ownerDocument.documentElement:r;var l=_m(s,a,i);if("HTML"!==s.nodeName||Rm(a))o=l;else{var c=Em(e.ownerDocument),u=c.height,d=c.width;o.top+=l.top-l.marginTop,o.bottom=u+l.top,o.left+=l.left-l.marginLeft,o.right=d+l.left}}var p="number"==typeof(n=n||0);return o.left+=p?n:n.left||0,o.top+=p?n:n.top||0,o.right-=p?n:n.right||0,o.bottom-=p?n:n.bottom||0,o}function Im(e){return e.width*e.height}function Mm(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=Dm(n,r,o,i),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},l=Object.keys(s).map((function(e){return Cm({key:e},s[e],{area:Im(s[e])})})).sort((function(e,t){return t.area-e.area})),c=l.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function Lm(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return _m(n,r?Am(t):bm(t,hm(n)),r)}function jm(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function Nm(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function Fm(e,t,n){n=n.split("-")[0];var r=jm(e),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",l=o?"height":"width",c=o?"width":"height";return i[a]=t[a]+t[l]/2-r[l]/2,i[s]=n===s?t[s]-r[c]:t[Nm(s)],i}function Bm(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function zm(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=Bm(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&cm(n)&&(t.offsets.popper=km(t.offsets.popper),t.offsets.reference=km(t.offsets.reference),t=n(t,e))})),t}function Hm(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=Lm(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=Mm(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=Fm(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=zm(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function Um(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function Vm(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var i=t[r],o=i?""+i+n:e;if(void 0!==document.body.style[o])return o}return null}function Wm(){return this.state.isDestroyed=!0,Um(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[Vm("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function Gm(e){var t=e.ownerDocument;return t?t.defaultView:window}function qm(e,t,n,r){var i="BODY"===e.nodeName,o=i?e.ownerDocument.defaultView:e;o.addEventListener(t,n,{passive:!0}),i||qm(pm(o.parentNode),t,n,r),r.push(o)}function Xm(e,t,n,r){n.updateBound=r,Gm(e).addEventListener("resize",n.updateBound,{passive:!0});var i=pm(e);return qm(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function Zm(){this.state.eventsEnabled||(this.state=Xm(this.reference,this.options,this.state,this.scheduleUpdate))}function Ym(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,Gm(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function Km(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function Jm(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&Km(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var Qm=am&&/Firefox/i.test(navigator.userAgent);function $m(e,t,n){var r=Bm(e,(function(e){return e.name===t})),i=!!r&&e.some((function(e){return e.name===n&&e.enabled&&e.order<r.order}));if(!i){var o="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return i}var eg=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],tg=eg.slice(3);function ng(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=tg.indexOf(e),r=tg.slice(n+1).concat(tg.slice(0,n));return t?r.reverse():r}var rg="flip",ig="clockwise",og="counterclockwise";function ag(e,t,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(Bm(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return c=c.map((function(e,r){var i=(1===r?!o:o)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return e;if(0===a.indexOf("%")){return km("%p"===a?n:r)[t]/100*o}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(e,i,t,n)}))})),c.forEach((function(e,t){e.forEach((function(n,r){Km(n)&&(i[t]+=n*("-"===e[r-1]?-1:1))}))})),i}var sg={shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",u={start:Pm({},l,o[l]),end:Pm({},l,o[l]+o[c]-a[c])};e.offsets.popper=Cm({},a,u[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],l=void 0;return l=Km(+n)?[+n,0]:ag(n,o,a,s),"left"===s?(o.top+=l[0],o.left-=l[1]):"right"===s?(o.top+=l[0],o.left+=l[1]):"top"===s?(o.left+=l[0],o.top-=l[1]):"bottom"===s&&(o.left+=l[0],o.top+=l[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||vm(e.instance.popper);e.instance.reference===n&&(n=vm(n));var r=Vm("transform"),i=e.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var l=Dm(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=a,i[r]=s,t.boundaries=l;var c=t.priority,u=e.offsets.popper,d={primary:function(e){var n=u[e];return u[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(u[e],l[e])),Pm({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=u[n];return u[e]>l[e]&&!t.escapeWithReference&&(r=Math.min(u[n],l[e]-("right"===e?u.width:u.height))),Pm({},n,r)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=Cm({},u,d[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]<o(r[l])&&(e.offsets.popper[l]=o(r[l])-n[c]),n[l]>o(r[s])&&(e.offsets.popper[l]=o(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!$m(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],o=e.offsets,a=o.popper,s=o.reference,l=-1!==["left","right"].indexOf(i),c=l?"height":"width",u=l?"Top":"Left",d=u.toLowerCase(),p=l?"left":"top",h=l?"bottom":"right",f=jm(r)[c];s[h]-f<a[d]&&(e.offsets.popper[d]-=a[d]-(s[h]-f)),s[d]+f>a[h]&&(e.offsets.popper[d]+=s[d]+f-a[h]),e.offsets.popper=km(e.offsets.popper);var m=s[d]+s[c]/2-f/2,g=um(e.instance.popper),v=parseFloat(g["margin"+u]),y=parseFloat(g["border"+u+"Width"]),b=m-e.offsets.popper[d]-v-y;return b=Math.max(Math.min(a[c]-f,b),0),e.arrowElement=r,e.offsets.arrow=(Pm(n={},d,Math.round(b)),Pm(n,p,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(Um(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=Dm(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=Nm(r),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case rg:a=[r,i];break;case ig:a=ng(r);break;case og:a=ng(r,!0);break;default:a=t.behavior}return a.forEach((function(s,l){if(r!==s||a.length===l+1)return e;r=e.placement.split("-")[0],i=Nm(r);var c=e.offsets.popper,u=e.offsets.reference,d=Math.floor,p="left"===r&&d(c.right)>d(u.left)||"right"===r&&d(c.left)<d(u.right)||"top"===r&&d(c.bottom)>d(u.top)||"bottom"===r&&d(c.top)<d(u.bottom),h=d(c.left)<d(n.left),f=d(c.right)>d(n.right),m=d(c.top)<d(n.top),g=d(c.bottom)>d(n.bottom),v="left"===r&&h||"right"===r&&f||"top"===r&&m||"bottom"===r&&g,y=-1!==["top","bottom"].indexOf(r),b=!!t.flipVariations&&(y&&"start"===o&&h||y&&"end"===o&&f||!y&&"start"===o&&m||!y&&"end"===o&&g),w=!!t.flipVariationsByContent&&(y&&"start"===o&&f||y&&"end"===o&&h||!y&&"start"===o&&g||!y&&"end"===o&&m),x=b||w;(p||v||x)&&(e.flipped=!0,(p||v)&&(r=a[l+1]),x&&(o=function(e){return"end"===e?"start":"start"===e?"end":e}(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=Cm({},e.offsets.popper,Fm(e.instance.popper,e.offsets.reference,e.placement)),e=zm(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),e.placement=Nm(t),e.offsets.popper=km(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!$m(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=Bm(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,i=e.offsets.popper,o=Bm(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==o?o:t.gpuAcceleration,s=vm(e.instance.popper),l=Om(s),c={position:i.position},u=function(e,t){var n=e.offsets,r=n.popper,i=n.reference,o=Math.round,a=Math.floor,s=function(e){return e},l=o(i.width),c=o(r.width),u=-1!==["left","right"].indexOf(e.placement),d=-1!==e.placement.indexOf("-"),p=t?u||d||l%2==c%2?o:a:s,h=t?o:s;return{left:p(l%2==1&&c%2==1&&!d&&t?r.left-1:r.left),top:h(r.top),bottom:h(r.bottom),right:p(r.right)}}(e,window.devicePixelRatio<2||!Qm),d="bottom"===n?"top":"bottom",p="right"===r?"left":"right",h=Vm("transform"),f=void 0,m=void 0;if(m="bottom"===d?"HTML"===s.nodeName?-s.clientHeight+u.bottom:-l.height+u.bottom:u.top,f="right"===p?"HTML"===s.nodeName?-s.clientWidth+u.right:-l.width+u.right:u.left,a&&h)c[h]="translate3d("+f+"px, "+m+"px, 0)",c[d]=0,c[p]=0,c.willChange="transform";else{var g="bottom"===d?-1:1,v="right"===p?-1:1;c[d]=m*g,c[p]=f*v,c.willChange=d+", "+p}var y={"x-placement":e.placement};return e.attributes=Cm({},y,e.attributes),e.styles=Cm({},c,e.styles),e.arrowStyles=Cm({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return Jm(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach((function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&Jm(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,i){var o=Lm(i,t,e,n.positionFixed),a=Mm(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),Jm(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}},lg={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:sg},cg=function(){function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=lm(this.update.bind(this)),this.options=Cm({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(Cm({},e.Defaults.modifiers,i.modifiers)).forEach((function(t){r.options.modifiers[t]=Cm({},e.Defaults.modifiers[t]||{},i.modifiers?i.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return Cm({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&cm(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return Tm(e,[{key:"update",value:function(){return Hm.call(this)}},{key:"destroy",value:function(){return Wm.call(this)}},{key:"enableEventListeners",value:function(){return Zm.call(this)}},{key:"disableEventListeners",value:function(){return Ym.call(this)}}]),e}();cg.Utils=("undefined"!=typeof window?window:i.g).PopperUtils,cg.placements=eg,cg.Defaults=lg;const ug=cg;function dg(e){return"function"==typeof e?e():e}var pg="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,hg={},fg=r.forwardRef((function(e,t){var n=e.anchorEl,i=e.children,o=e.container,a=e.disablePortal,s=void 0!==a&&a,u=e.keepMounted,d=void 0!==u&&u,p=e.modifiers,h=e.open,f=e.placement,m=void 0===f?"bottom":f,g=e.popperOptions,v=void 0===g?hg:g,y=e.popperRef,b=e.style,w=e.transition,x=void 0!==w&&w,S=l(e,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition"]),E=r.useRef(null),T=Up(E,t),P=r.useRef(null),C=Up(P,y),k=r.useRef(C);pg((function(){k.current=C}),[C]),r.useImperativeHandle(y,(function(){return P.current}),[]);var O=r.useState(!0),_=O[0],R=O[1],A=function(e,t){if("ltr"===(t&&t.direction||"ltr"))return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(m,pe()),D=r.useState(A),I=D[0],M=D[1];r.useEffect((function(){P.current&&P.current.update()}));var L=r.useCallback((function(){if(E.current&&n&&h){P.current&&(P.current.destroy(),k.current(null));var e=function(e){M(e.placement)},t=(dg(n),new ug(dg(n),E.current,c({placement:A},v,{modifiers:c({},s?{}:{preventOverflow:{boundariesElement:"window"}},p,v.modifiers),onCreate:zp(e,v.onCreate),onUpdate:zp(e,v.onUpdate)})));k.current(t)}}),[n,s,p,h,A,v]),j=r.useCallback((function(e){Hp(T,e),L()}),[T,L]),N=function(){P.current&&(P.current.destroy(),k.current(null))};if(r.useEffect((function(){return function(){N()}}),[]),r.useEffect((function(){h||x||N()}),[h,x]),!d&&!h&&(!x||_))return null;var F={placement:I};return x&&(F.TransitionProps={in:h,onEnter:function(){R(!1)},onExited:function(){R(!0),N()}}),r.createElement(Wp,{disablePortal:s,container:o},r.createElement("div",c({ref:j,role:"tooltip"},S,{style:c({position:"fixed",top:0,left:0,display:h||!d||x?null:"none"},b)}),"function"==typeof i?i(F):i))}));const mg=fg;var gg={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},vg=r.forwardRef((function(e,t){var n=e.align,i=void 0===n?"inherit":n,o=e.classes,a=e.className,s=e.color,u=void 0===s?"initial":s,d=e.component,p=e.display,h=void 0===p?"initial":p,f=e.gutterBottom,m=void 0!==f&&f,g=e.noWrap,v=void 0!==g&&g,y=e.paragraph,b=void 0!==y&&y,w=e.variant,x=void 0===w?"body1":w,S=e.variantMapping,E=void 0===S?gg:S,T=l(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),P=d||(b?"p":E[x]||gg[x])||"span";return r.createElement(P,c({className:Ic(o.root,a,"inherit"!==x&&o[x],"initial"!==u&&o["color".concat(Lc(u))],v&&o.noWrap,m&&o.gutterBottom,b&&o.paragraph,"inherit"!==i&&o["align".concat(Lc(i))],"initial"!==h&&o["display".concat(Lc(h))]),ref:t},T))}));const yg=Np((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(vg);var bg={entering:{opacity:1},entered:{opacity:1}},wg={enter:oe.enteringScreen,exit:oe.leavingScreen},xg=r.forwardRef((function(e,t){var n=e.children,i=e.disableStrictModeCompat,o=void 0!==i&&i,a=e.in,s=e.onEnter,u=e.onEntered,d=e.onEntering,p=e.onExit,h=e.onExited,f=e.onExiting,m=e.style,g=e.TransitionComponent,v=void 0===g?mh:g,y=e.timeout,b=void 0===y?wg:y,w=l(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),x=be(),S=x.unstable_strictMode&&!o,E=r.useRef(null),T=Up(n.ref,t),P=Up(S?E:void 0,T),C=function(e){return function(t,n){if(e){var r=q(S?[E.current,t]:[t,n],2),i=r[0],o=r[1];void 0===o?e(i):e(i,o)}}},k=C(d),O=C((function(e,t){gh(e);var n=vh({style:m,timeout:b},{mode:"enter"});e.style.webkitTransition=x.transitions.create("opacity",n),e.style.transition=x.transitions.create("opacity",n),s&&s(e,t)})),_=C(u),R=C(f),A=C((function(e){var t=vh({style:m,timeout:b},{mode:"exit"});e.style.webkitTransition=x.transitions.create("opacity",t),e.style.transition=x.transitions.create("opacity",t),p&&p(e)})),D=C(h);return r.createElement(v,c({appear:!0,in:a,nodeRef:S?E:void 0,onEnter:O,onEntered:_,onEntering:k,onExit:A,onExited:D,onExiting:R,timeout:b},w),(function(e,t){return r.cloneElement(n,c({style:c({opacity:0,visibility:"exited"!==e||a?void 0:"hidden"},bg[e],m,n.props.style),ref:P},t))}))}));const Sg=xg;var Eg=r.forwardRef((function(e,t){var n=e.children,i=e.classes,o=e.className,a=e.disableTypography,s=void 0!==a&&a,u=e.inset,d=void 0!==u&&u,p=e.primary,h=e.primaryTypographyProps,f=e.secondary,m=e.secondaryTypographyProps,g=l(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),v=r.useContext(Rh).dense,y=null!=p?p:n;null==y||y.type===yg||s||(y=r.createElement(yg,c({variant:v?"body2":"body1",className:i.primary,component:"span",display:"block"},h),y));var b=f;return null==b||b.type===yg||s||(b=r.createElement(yg,c({variant:"body2",className:i.secondary,color:"textSecondary",display:"block"},m),b)),r.createElement("div",c({className:Ic(i.root,o,v&&i.dense,d&&i.inset,y&&b&&i.multiline),ref:t},g),y,b)}));const Tg=Np({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(Eg);const Pg=function(e){return a().createElement(mg,{anchorEl:e.anchorEl,open:e.open,style:e.marginStyle},a().createElement(Sg,{in:e.open},a().createElement(Eh,{className:"helpContainer"},a().createElement("div",{onClick:e.onClose,className:"closeX"},a().createElement("span",{className:"fa fa-window-close"})),a().createElement("div",null,a().createElement(yg,{variant:"h6",component:"h2"},"Toolbar Buttons"),a().createElement(Dh,null,a().createElement(Qf,null,a().createElement("span",{className:"fa fa-lock"}),a().createElement(Tg,{primary:"Toggle Sync Views"})),a().createElement(Qf,null,a().createElement("span",{className:"fa fa-book"}),a().createElement(Tg,{primary:"Toggle Book Mode"})),a().createElement(Qf,null,a().createElement("span",{className:"fa fa-code"}),a().createElement(Tg,{primary:"Toggle XML Mode"})),a().createElement(Qf,null,a().createElement("span",{className:"horizontal-buttons"},a().createElement(_c,null),a().createElement(Rc,null)),a().createElement(Tg,{primary:"Go Forward / Back"})),a().createElement(Qf,null,a().createElement("span",{className:"fa fa-hand-point-right"}),a().createElement(Tg,{primary:"Jump to folio"})),a().createElement("div",{className:"readingGuide"},a().createElement(yg,{variant:"h6",component:"h2"},"Reading Guide"),a().createElement("table",null,a().createElement("thead",null,a().createElement("tr",null,a().createElement("th",null,a().createElement(yg,{variant:"overline",component:"span"},"Syntax")),a().createElement("th",null,a().createElement(yg,{variant:"overline",component:"span"},"Meaning")))),a().createElement("tbody",null,a().createElement("tr",null,a().createElement("td",null,a().createElement("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH4AAAAUCAYAAAE8S7kiAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFYcAABXWARG5gq8AAAjbSURBVFhH7VkLUFXXFX0FBayaUhirzSTqxPysE2zScUJNzIgitRotAbGQGDRpsBGjVT4CSlAkShQBLaig0vhJTBs1piJRRENBPvKRB7wPj+c0yKeIn1gbK4rCW9373Ps+IBDQR6zRNbPfvfudc++5++6zz91rHwXuEh1u0ExyUzplGCrlEwmXSJT0U117GPqCZFSq1R1v0DOoVCqT3L0Je3xsgVZ69OaLpLaQfCML4wqJjkQjjDtvAMq+boROXwy1RgsD6eYnuHZePukIlXyUoNfrTY/PuGsTegLLQS2FIR5AvAYGvwqG0ZqWWnFown/FEbggHwmN6fIJw2hle68zrpMU6ppQmuItBq3O3wRNVUH7B7hX+F4Gt3zlltJucAf/z8VRMehRzHAaicWDR2Kh0zPwHbMckSHP4JUnJ4n28NB3MM73LxjzrJfQBwz7HUbPXYAJb8TDbfQyRD7nh+eGKjCWZOEwbzh6hGN+fCYmr9yPV94/hH42gfCwce98cKc/fom0cEcMX3ocX8WHmwb3fylWtPPgAZlN8AyaKfSgkL/DxzUUEbHZmLMyWfz39OtrsPjxVTiycKgYfG9uibA2+mAxJn9w5HbLjeDBewMevDtYvmpLuacTzproKqy7EobJeFPIG0Ghb5wG1gJPl75C3xpP69+QTWpxmrXRG9euVuKp7TVCV32ShDpaDzk2GBwfvC4aY8QIs/FnMVKhgMLVX9YZSsSuLRJniR5v4bJBI2IIOIcnua8s2bQMczwxOKZ4LeW44vWUYys9+jFTX4ViLrSFfxZxpq3eh34W92mlb5XJ+J2vmRsU9gPpHwOC6TyDP3cMMt7OK1S07/qn9NeF0u1CX1XQJvSsBF8ohryAhB2LuLVL42eNojFeDkCYxxzxNZWgwuLfeIv77dBcpeFLZeMJZQni/7FBnwi1O+NVWh18h/xE9P+8sEx8WNh49nZe4nTxv9vaLHH9Dybm7wQPjf8hoLKy8rZFrTthPDS+rbUOscVCN+FiVjRo2bEeag7jtZQKWbE++tT4wnUvYcmJm6g/Fo20r4nllGxFUF4b/pWTiPBTQPlHMci7RQRJvx9un11AQaI/Ei1tZeO367DmzTegJ7VkxWyEF/1baiPsmeOK6BMN0G6egS3qm9jo/jTymqihaT8iP6MrWvOxOq0MKIrB7I05QMH7UMxJJS55HJuO1aMsxQe7sk9juaMDTpVrkeQ5AIVKLWba26BEqYJuXxDSSsuhyd6A2EzpwXpsfP722dLJt3V4dEk2UsKcJZ346jyX3VB3MD53wwqUSF9ACRaeTw/zEp+caAvjt3iuwWU+MSgRtvofSHCbiwZSM7wmiL5CZseT0RH4m4ZoZ0sWPi1spB63EPOFCkoy/uN8LZwHyX1JNp9UYrrdZChVGoQMsDffJ3AXj9QL45O9cIOONy+qMHLbWRyOn4VWbrjRgMd++XGPjPdOO4Ol68KEeiU3DCE5ZuNTvAJAE4oGzkDg1irET5SMP7XWFYXnuEGCga7ryvjdJysxeMoKqDRqaXqrtbLxaiRMt0VZRRfT3vRWSBwTKnD9UgYcnANEJ0bBVk9E/FYB5+HPyv+0YB71HTzqV5J6vUFcOykkGW5/bejC85WoOxol+kXt3QqvZflyI7DNbynGT3gCiinBQl8vG8+YMtZJXKMmm7szfld2Mc4UpcKO+ip+HUEvocpkvJrO7frZiPtUVPZytTd6vq9g8vwd4oH+1N0JHmjjH2Q8dPz/Gbgs0dvlqzdiRDvH8wevHau3EPuBj2AjV2UNzSID4DKHVZNfa4I+qlw56Mtkuq9wpqYep7f6iMoEf7hNGYuVxIjbHM+1rI6pngltN3D5SJg8GX6Mn/5sMzRykwnXziN/x+twXH0IGX+SJg1nRcbSj4QWUQLiDInbOUsyloIovxMkgethnC4yOGXkuhinjUAjcr/YiwXzFmGpF10/wh3+xzrslnR0/LfliHt3ovzcLK7wjyqCObm0hBJbZsUjNTgOfv4vSv0p6xKlJcaNAqyPOYANoePx8lPUNnUVDpw1UIr/JWaMH2Ua4/cbMlHPNSaCITsUoz9Mx0frn8cLj0vtb+/UovHEKriMGCRd84edqLrSirO1DR0cX4XqmnREDXPCQPneijeTkFNCJEWjRXVuAqa/moB1ixzgYMv32YbicjURmRDY97c1PU/gLqUps2P0MOLtMPCRRJRzp9bviHh2PGWCXHc3ZoPMBXgDgPkAb/4wJ+DNAMELGMQNeGOA+QFvCjFH6NrxEmfg2mC71NkS3xHxzCl4s8GSV5ihEpkm7wOYsk3iGrwhwXyDN6OYc3Bt0Zh658W8iNUpe6GzeCGGnAj8YmUajnAnImJccxQpOaPlKywZ4YP1B8/I9ctbogbJKTrXITlNZ8czTynd4oVBC5KRWaiERk3Rr66CvnATXrUPRGpumSjOcvrONUpO4XkTLH6aLd7bSTo5WkS6WoOcOA/86L3daG2jSUroXcQzeuJ4Yr7GCrcAMWCudDML5mo3M2FjxVvCJVH5ZlbM1W+rOT5VS8o5HI30wc9pAj/vF4aSZg7a7hxPEU/Mmivogl0ziGFzJZ1ZNlfTmWmbHX8O+yePwbLln0Ivb3B2BPOw9o7PEkVn5mTSotC545mdp69whkNAHDmeIpwdb7l0E2HlwrTZ8RpRnQ/qb4PAtGKUGx1vIUZY3/HNF1GwbjxsHYeDiDvhKuoyE+E9dAGOCStbRP2H9x65BsQb+lwH4n3I8EKpvfZoLN4d6oKoUta/gTJ1Pp5wcsG0w71zPFcO0JSB4KD58E2TJ2LNIYROdYbCxa9dGcUMHfb4jYPDuHcop5G2pJVJ0/BW+Cpk1rN2WhBty4hH00G4j/HE28lF9KGSkBflAt8PdqLiP6Tkh9+R47kmVV17GJFOAzAxeC9OnlZRROtRnDQTDlNW4sCpCugK2kc8TwbdvmD0t5mE1RllqBBEPhdxU23gHnscbYZOIt4q6GSpv7/QyVL/PeKeZPVWwUPH3xXuX8c/xH0A4H+sQgIhfdYH4gAAAABJRU5ErkJggg==",alt:"howtouse-ups"})),a().createElement("td",null,a().createElement(yg,null,"Text is under the paper strip"))),a().createElement("tr",null,a().createElement("td",null,a().createElement("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIYAAAASCAYAAAHpiZZSAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFa8AABWvAQS7x0sAAAmkSURBVFhH7Zl5VFT3Fccfi2DkgFI1RpOcY416rKaWWmuNaeyC5DTEDZQcjaiNUGtEmugIYhVZVKIYDYoS3FCjBxeqYpEEK3HDKqKEzShEIEAwLEHWAQYG59vfve8NDDAKuFT/4HPOzPstb/m9++6725PwBOCTbDSXIL0dygMxd8qhOnKH26GObpCkwVi33gUeqt+KtoT6gnOArkrMalGTvhvanAPySR6XJ3OSg7lNYpMGW0v5fPlHJqCYGulbePleUz5C8KZ1WDNFQvqeQNy9Esn72fT7G+43qrn9/7kdEnQ7bmxioRvjPwErlFYLvPrK75WecXghQQFrkdPQBCshFmvLqehvLaGyked5ISQaJ88vMP7nEu7RoBAXLSTh45lwD7rBYiMtINGFLfESOxRB6vsrfCNESBqhKbkO1OfTkYwkWQBNGrwwJ5I1hMf4/xnz8EVkhSuN1gTEFyFXabfluk5pGBCnAQaG3lJ67RGLSORGw32gpxA9UAfPqDwe0y+CHonf6NnctlMt40Xk3T7G44Vo4HFDaHyc42lc0gIj9xbwIpz7LeK5j/kawHHxbM2CknH4R2URdBAhOYo3mbZKnxeRfxh+X5/lriS93rwIkoS8XwXP6SkRv1HK8fIi8iH1G4X+i+N47DN7CTHiEDrWbP11/SKePc/FIp4XFGGQavhxy8R5D1B2EqvPVIpeDUwnbwUyQxBVUC3UJBSHsgzsmFCbmDuVuOw9BBcL66FLXI0l+9OBK6uxM0nY4cRAbE/W4NdClcjEkDqRmSkUhy5UqfgUjstcxH81RttMFNs6/E6ywXei5aZ6i6bZ/JCqfbtfhShxyqLEMPheATL2eeDNqLsoPL8Zy/+rY9tI7wCq8ppVkKkrhdWCGEBTAct50VALJ0bvBVl/eje0OfvgcrSUd20WRuAl2Vi+ZzodSA5GZq3c7zljJ29l6uEcmqC0BSyMauwZPhdl1G+8iLURGTj6xhDcqeM9GHqvDIVRce8i5q67pswSFWx/CbLBBNlhgrwysdl3Hm/1kF2md5BsMxmDZmEIz603Cq3RYo2ZFTQ32wrjAL+nRDthPG/E+X2KH5R2Z2goScHLYdlKr2t02wwDuoVhwGMJY/C8MKXVMQ5uFBBmQOUjjFmnycP8P21S2g+jDv6DlnDrbLgchDwKLIwN5ia4IILP5E/Mkd2gw/s9RBohwvSYBb2QWqNDH4vVHHz077UKhpZFFoYOvT2ExxGMHvBHkK+xcw3g/vj5vig9PRl7swyFEYvbu2bguHity79eDJ+EGiSteg/uUblI3eSGNxccgubGRsyO/Uk4s1T8ZuopcZwa3q878Dn9544R//cwwnq42GrhYTtMbDUtwgiZ0Sr2uv75dNSKbdqu6cI33sd0c1lY8Wvo1nWYJplyn2BhrDdxFrsRyfCPlxOOrbbWHBWlVzXiK4+XuC2arRg8t0UzfvmyyNckOzRoryEgXETeCsXH/9JKGF5rzuPvkwbx+eg3TXUaid7TcV5EYWWXfRGWKnYrT4LjthuoTQnFtOgSqLMim/eXpCEoFa541siVfP4t3gPFf2OzMPLjtiDOwJPVFJ4Qx1jgNEUKuoZ2wnAymcl9goURZCKhiQLo0mOI+E4LC5f9NIya6DlIrSR/JfPlwj64K8uKkYWRje1H5SDbZ8QsIf1SrAg4yX2irTBUq+Kx0N4LlLrqubT84cIQwQQmfGLoiks6LQw9tcWnsDkDnRCGqQnMzMwgTY3gwdTNNvwU8hKDEXKjArfD5Ce55FjrXESvGeNH0vw47Bg7DCnCh989+Q7v/6HQkLITbYTBNqMMY/kpTwQ9sAcJo+U1AZLCFvE57TeL8XbCAHa5SliRoGv3mtSXJ/Nx1n3duV95xgeSeU8kHCYhPEwznjty4Tn5hNLuHHt9eiutrsPC6EamWxjdGOUZKkYuDtkNxQCyo+N9EZtDlvTRIIdFuSDZacoHyVZTTkj2mvJCstkPqkI9LjW39sH7zxIsRzthe5oy+MjUcb7pP8gTZ0WoU52xFwuEfGyHLcc5Iw7yaWKgGIki9JqBSLEwlx7mMKUHJhwtFUWbuReN+dYvoAfN8W8SQlOqoFH8UF3cIrxka6nMTUTw5VLUGvFR2gte+MUrVsp+Ej7YncylssTAMXitt/7cEuy8onCTq60y5LCpACvPOyPweA470dIuKEZmpDscXlHOMcQZK2L0M6W4sHwdtrr6Yr2XK4bT/KvvwDM2Cem7lmISX3Mg/uC6D9/q70k4fqq2kPOniouMGtlRAXDi/cXvtQl4N/quMleEbyI+x18Hi/VtmCDP9x6KsYFXxZwOpdfC8YFy3ItD7XCICp61eRwsUIWmfU1TRltTiJP/UK4nWaFP/x3izgUixKRPEBRZUdGCoMIFRVhUvKBrar8/CKeZX+CgPx1rCpO1tJY2ikHBBhU1mgMOEY5SpSciUwOtkQdM4SlVflKrxWRmCCcwVA6jJKZDssI5YjNa/icaL3I4S5UiCmmpWkRhrWHFSE+HFkOEvBVF5+G2MhhLT9BOeooR77EKG9yPiCC6gXMCqjBR9EdUXfHDnGWT4HZGkaqIBKnixNEgYaAYXCgrOIdPtyyG/ZGWLwBCnZG4IwTubxxBocgh6GMLRYtUlSKoMkVRI1WnKIyWLcYSuUpFVHWgGHWlnHxRKY8SsFZ0RjFyDnDUqa9u6WljMZxBX5TkhI1I5o9l/vF1YiwVITa9YC600iH8NlsC9SlXWTEMchciM/xVDLAhDXwLGy8VG7UabRUjP3IcRvYVx4xZiZPZdIsJWEmKsf8W6kTiR98GKPnjr1tt6EgxKDHMS4vArA+XQhX9oApYBacEhopBqQGVIDk9IBTFmBKehcrMMHy21gGbkpQ5gVqYfpVqNByi6NrGKOFSZZcUg9Hgp4zj8Ld1x+l2T78FTWUqtjmQ3Huhd7/tbDXqnoRibDAzgeS0H/laJZcPEnnbmnio6SbSgmFp4oevhBKwc8nYhr5WppAmbUO62ojFUMfCrY8Ttp3/ETTdjmbFqBadAuwb8SJ8tl7CDyyQAkRNHIGfSSPxUeRNLo9QsZ1KJFxwJ4qOwX6UN/75rxLkxE3FmIe6klguxmfvdcEY13lYm6Sky+Xn4PmuF2asuIp64d+vdFIxjFkM2ZWocfvAcrgN/j2CUnhArPMqdga8Dzt/+jhWiZSnbTGa1Cj+ty/Mem1hxWgs/xKrJQvMPkX33ARN5m44Smaw2NgFxWjnSrrpgFyu21NO3ZXafZfoSDGeEt2K8Zg82azEEA3K0p6LrKSbbvQA/wNGF2xMO2U8SgAAAABJRU5ErkJggg==",alt:"howtouse-curly"})),a().createElement("td",null,a().createElement(yg,null,"Expanded version implied by abbreviation marks"))),a().createElement("tr",null,a().createElement("td",null,a().createElement("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIcAAAAQCAYAAAFLg1xnAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFYcAABURAZUCwyYAAAk6SURBVFhH7ZkLUBXnFceXhwg1UkWrrVWrdpqk1alNxmgntrY0RpumEbVANYCIQUTLqFGBiqAEQQHRgWhMMdRHCQkQRYxRY0Q0xQdgfBFFBSI+UBRFEJCLl8v995yz914v8ijqdcZO+c3c3e/b3bv77dmz5/ufswosgJzEI+OOdID7QFUxtkRNwfnkINny7qoQWVd8/hdUpDtL23XNHhy5eQ/1OqBUq1dP8qTQSfSohgb56yehuiBJ3VpbBFzJosZdBPimYMwCH6ApH1OX/xOvhH0hh4RllMM2PJv+TSfR6w+jy9tpUBR1UKZ1j36oOJ1B/b7SB11o2Itu6m3KBYCoaYG0LARKtsI1ZBc2J01DfuY0Ocf1NGe5aMSo51FSrZqA+dC7D6oagF6ODmikEbA5rK2UliaZGv2NofXk8ECMGAfSFhZ5NpaArKhAW7wR9s95QXN7F370wVnEOavji1k7D5ekBbjTcb9dmYftN4Fx8cdlWyX9Qudlmx6nk9IfQWPGouQesLO8Xrap+xql3fDFTNOxijIed7b+FW5TPoWeHpHysbs1wmhn0aZJsJ+2XQ7S0C/cyQ8bLgKDFmbLNmZExJFmAwl6811alkjbSOLpOoSuzjEN5NVhP6YlvRtEw56ZtDyH+O5dpC8DsZ4s7eaPRk9e9FRQLdIeMpCy5ImwsbWTDRbjRh5GRh41dCwHv41s7aHdFKQVsnM8IGTYQIyMUN/ojsBPpFSrPi0jYhB2E3PYXWqghW231YYtwKXPQnFeWnWY3Ntf4ha7EEdRczfavTIYZdwQg+RJ2GG34tBjdC3mbm4UZu2rQmHqbBzRNmLljGTZfuNLX+y4CjX+ERyN2e04FrLrcWRmg6iRoQzBsfvkOJXGZlGCXZKjN7tlWMY17JjugBoK/Iz10r0Gg+jFTTmmMmYG0cHKNpourKUXy5bCMrDB1Z53Y9uSrkDNcfRZdx73ynMw4B8luHW6dYNUnNqC0CPAyY/84Rx/AhWHE/DnHbdwYeMCTEj61nCUyqrZo/HGnDRpv/ObqTRJAFl+r+O49lEN0gS32Axa69oxCD2mswlYd6oGKFiNxML6tg3SFhzdFMfeht6zhSVemdZo1yD/byjQN8n8E2O5SV9YH+5haFmWFxYtxZn416AMX2DYYqAhB3Z0H1drDf0OYOO62dBSUZbTCRQrG9yit+dNbis22H6bd+mwiPvdnOTA+tvHxGg/SyLRhwZE9XCX/gsjPpH9Rq58tZq294VXsD/1dAj65R9le+Ti6bIWavIx1lcNgim+0XRtYO6fBtD/BonQuLrLB7PHjce0hAIs2TwLL9F1JoSrMYaNcSLyZZyooI42F460b8SSz2Vf1vz+KOWgZ6B39Bb8wEGRGCacWStjTjyragExxvVUpETYQAk/RAK16RpW5Mk+lUYNunhuQ+XuZTCFvcYaOPR6X5rX9idgHwW6xT1/Iv3MVW4GaUFoLmHwyBRpqp7RhjEIjwVjZR0dNg9HA8NY5grBMfNRnzUdcd9QwCNeWRgg6xWjvcD3b26M5JcH4oqZTHnYGD3d1so6oWdXenz1mPRRgfRPxdijlgYtxihPQ3KpegcmY+gaDkKxo1lEr4GdZwYKkybB5HGa23CcqUr9ysLt+LItY9w6jWFhOdJM2/AeLds2Rm6EBw4e3YuA7Cok+/wNFwzbmdt7vDtkDOFKujzti2SE9oxxn2aWpTt5vgeqt05p3xgNByPAYaM2KwTdfTKhrT0Lzx210NVdh1NCIWInfk/+EOniSMum1o1BRHgMo2Ulfmo9RPoek4fTsgG/6zJU+iZqTtFN9EIxt79LgVsIC7Y7CPSMQO1XHTOG0TMOBA5BUVX7xqijObS73QRSUoCDrYuMuYUxZNkG1RdUUfSscTj8Vw88w4yHjfGotGMMNYD67Sbh84xxLM7ZIrPJw3TqjE7aRJyD4yinKs1m2WcVygd55n4aSfLThsMdp1ethbyWNEoY5LTrSULhk9CKczRBW7IJE627INaQgzdqipHoYgV770zJbXny5fyWJ2BGU3USH7p2g88uyherj8lkzPkuwzkvT8qc9/K5K7/diOmKIwYv/pp6NKF/txPBLn0xdLOx1GWOBpf3rIR/3+FYKklDpeTGPHk7x5+kvk6KBqxopHDAXMkSZWNeQHhADfKivBA41hdZxuruuU/gt3IJ5ufQdHHpU/gEBMA/1aB97uzHrHGL4BGRC86Eqw764g8DR8Iv/oxJiVXs88Dofv0wNfoQbvCGgliMGTwDwR9f4MIxbqY5iyjgvJuFwQPnKBOBwDm4Kh8vY9Mvfoi/v38I16Xw0L5zNGTNQx/S2HPSLqKGE/Dz6+Dk8BbW5N0hOUNQvs6CgnN2FhWct7Ow4Nyd5QTn7ywwOIdHeTrcbaww8V9X0WRM5ol2IocejfXZCKV5i6WeYmuP7jMypVLNMpULiC2mM5KsXMVm2cqFRZX7Il+5yMgSlitFrNykOMJUFYuC4yKJuYoTSNpyTd4ob4XaIpG5XKB8dOcgavIQ4RmI1/2/JiOWIt0vGkvm5qAO17Bj/lsYYLxfs98Q92XIogfK+QIXXozKkOECDCtEKcIwTfmiFKUYw/vT23IOsnBuJH79/PfV63h+gKPl5rXQ/+Ice2aKulQLOMw5UZn8VYBlNxdeWXrztwojLMH5iwHL8ObOkSZFHlahZr7RmnPoSMssh/WUVClNC5TIcYmQkzn2Q07ouFTYvJZFUHLHZUNO8NS4wZDZKdHjEiIne4/kHJQEcnmRE0EpMTKmaYUH+xjOQdw9Ggnv0Nfg7OeKxKi52C//rcK/F7pg0eRAHOIyXCtw/mRJ53gY3YEFGDQlBplFPAD9YzrHNUlQufTJSaqx/Mlwsspl0CdwDurrGnAg1PDm2HRFN69UXD4QDiu7t5EpHqOTKqGUP/hn54g+c3ZL6GW4FMLfRmRfj36GkgijlZJqh51D0EjJhL+rKMqLGDUiFEFrfTHapDluInfdLPxc9g/H5AlxWJYchzfW5Bv2t8ZdnFzhjZeeexXvfGYcm0pVbhg8RxnGTr/fz14FrqYyFneOsm0YM7y/6VqK13rk3TBGj8eNHGWoMxryzFr5tKeef7yUdfgzH9Nh53hsGu+hfO97cPDebnKMTtrmf1KQdtJJS4D/ACf1pRCRRDX9AAAAAElFTkSuQmCC",alt:"howtouse-square"})),a().createElement("td",null,a().createElement(yg,null,"Editorial interventions and corrections"))),a().createElement("tr",null,a().createElement("td",null,a().createElement("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADUAAAAbCAYAAAGrR/egAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFxEAABYlAXDOav8AAAW+SURBVEhL3ZcJTJRHFIDX1tZ6NI02adPEVu2pYlsvWqFVY0mlVQubNrZqxC5WkVMBVxQUrSKiGGMFigIaDFFA8cSjWkWEpkKVAOsBTZQiKsgh4LHicn6d/f8FdqELiNKoX7I78978M2/e/DPvf6OgDcw0aqHG0Bjs7cGHmzLZt3itkKr1KonODCvTfuMKSyu2navE871xKK3flxr0dH5YE+aKERXi8eGrJbG5Y+EpGkQR+prRWAXHkZT/QdNTP9jFw/0iSnR12M+YTcjxEhSfqLAZPYVJfb8wPNVMx6dqRMc7vdADXnxeqna80/SpYGsnVZs6KUbqFQ0UP5Bl/TqkyFUhmK5KU6cK/V9NCfcTv5TkfOql0sHWFq/jN6R6I3Kn+jNS0fOV16HkD+ZOnkHdzb8knYurI7lSrZmO+2REpzq1zz3o9pKh3kzXGIueK9bDHdwOGBQyrYw1vhczu/aRaGUsO8SRsBMaxh0tFRZr6W+1TjKsVDuSuP8QM5aphNSAt72ChF2XSA0aS/j2WDY5jSfisk4awxytjDnNnyiVRZlxFGmPcLi0hkOzXyHrlqRm/syvhK0CekzTH9oKLOzDJH2mlzWHC6WqWUyMmV86o5YWB8CUthe/azaIGf43Y11jKDUIdpcZBJnHa+j672JEMWTvXtCrj1y/ekdqevwe1QhP+nQXI/cUcc+gEzx+Q39Gi6WrEuE4FU40R90Whtrepo9CK49C/cfiuf6CQdLguiNPlK3Pk/cgF6nsKC0MVeFnY0viuhmyeHEzJ69rKUyYh3doJOFrVCzNquKWZi+W6hjKuM3sZYHs3Z+Ire/Pch8zmBoqOsrXHkcpSd/JnnJIdFFQXguv2unTJEF9Dt9ZxXErPZroAll11k2F7RR7ek32lBVmMDFUcMARtyT9B7iSiaPicFN4iUXTMjM0UWqvzQ5jsF82aVFu3BVyqro/ycVSE4tdl8sVM5gYCv7Gi8uGek7EByhcDkv1kDkuzFrgzrf26yV518J++JwqpPScM46qeQQGTcfZW56MOYwMGV54m8Gz87TYDF3Hs2fokam/DUmroHtvWJfR5it+sp2qFsdgdzCoxC89R5wGEUqfE/H6mDhfmoOw5HvYKPLgCnFHMuLJdqpeTLZcxIXz2bAnVCRoItnWf+mGOEJCAqRdgmsina01fWtP/varyofNwonu/cBGhKi7JeA3UtyCXoaVp8RdVkTlFjwdZ6pa3MJLb0o3cZk6cUMVss4obzCifaeq8jgW5sGYKSoiW16qxHcwZc3nLNqXS/F9g6od6nQV5MaOIkrsqLquCeftO1WcvJYAtTU2fhFEuASQ1TQRsVoVB3BVjGZDShmVQpS0GX6op1swZPBQhip9CDxhSC11ZeT/tpoh7w6ij+ItBo+JJqNaHiznVyX244fz8QgLhlqsIPLQTf3oJsnLw9COUwWc8HHFZbQPSeXlaGJXYPnpQcSuFrOvJm+rBQqvQ+RrhXVtKg4WSpQbTiLilEzxPgJcp/HOrCT0L1JXepZEzx74psnNQsPVlJ2kiaSlib/9Ubo7o4q/YlA8PG069SB9JbPVdkyIEYdVUF+WRUqYkhF7RUSqzSR0wEcEpFSgT3PO+PZl7JoYTt+Q97m0yHUXiVcHMGFMPNfEVs2LW8WAbv6clp4QR+VCNM4/LhQ7IZiN638hJHwjnpPeYLjKmzCNaZh+GNpwSktG4AJWTfdhjziTjWgLM4i1HsbqLct52yKcrAdy9LkSZsWwz4LYkd04GQ3bPaZiabuIbZVCLE4jLnAYfaOLpNaGhjsc+UnBwMiLwpJM+Rl/HN4ciMOCnZyvNig7gXmn7uVyMOYYUQf+EWm0EfU6dFeSWbTED//UG9Qan/byZLZu8MPZeQ5znbawK0naqDIiQBSkRKH28UWd1HgHuYtm5VKWuLvjNMeJ+GwN6duTOXc8B0PW2inaDRRPI8+gU/AvCRLk8OxchHwAAAAASUVORK5CYII=",alt:"howtouse-asterisk"})),a().createElement("td",null,a().createElement(yg,null,"Editorial Comments"))))))),a().createElement(yg,null,"See ",a().createElement("a",{href:"#/content/how-to-use"},"How to Use")," for more information.")))))};var Cg=i(7259);function kg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Og(r.key),r)}}function Og(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function _g(e,t){return _g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_g(e,t)}function Rg(e){var t=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(e){return!1}}();return function(){var n,r=Ag(e);if(t){var i=Ag(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function Ag(e){return Ag=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ag(e)}var Dg=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","Z"],Ig=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_g(e,t)}(o,e);var t,n,r,i=Rg(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"renderAlphaLinks",value:function(){for(var e=[],t=0;t<Dg.length;t++){var n=Dg[t],r="alpha-".concat(t);e.push(a().createElement("span",{key:"link-".concat(r)},a().createElement(Cg.rU,{to:r,offset:-120,containerId:"glossaryViewInner",smooth:"true"},n)," "))}return a().createElement("div",{style:{display:"inline"}},a().createElement("input",{id:"glossary-filter",className:"searchBox",placeholder:"Filter by Entry",onChange:this.props.onFilterChange,value:this.props.filterTerm}),a().createElement("div",{className:"alphaNav"},a().createElement("span",{style:{color:"black"}},"Go to: "),e))}},{key:"render",value:function(){return a().createElement("div",{className:"glossaryNav"},this.renderAlphaLinks())}}])&&kg(t.prototype,n),r&&kg(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(r.Component);const Mg=function(e){return we(be().breakpoints.up(e))};function Lg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lg(Object(n),!0).forEach((function(t){Ng(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ng(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Bg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bg(e,t)}(e,t)||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 Bg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var zg={anchorEl:null};const Hg=lt((function(e){return{document:e.document,glossary:!!e.glossary.URL}}))((function(e){var t,n=Fg((0,r.useState)(jg({},zg)),2),i=n[0],o=n[1],s=Fg((0,r.useState)(!1),2),l=s[0],c=s[1],u=Fg((0,r.useState)(!1),2),d=u[0],p=u[1],h=(0,r.useRef)(null),f=(0,r.useRef)(null),m=function(t){void 0!==t.target.value&&0!==t.target.value&&e.documentViewActions.changeTranscriptionType(e.side,t.target.value)},g=function(t){e.documentViewActions.changeTranscriptionType(e.side,"g")},v=function(e){c(!l)},y=function(e){p(!d)},b=function(t){e.documentView.bookMode||(e.documentViewActions.changeCurrentFolio(e.documentView.left.iiifShortID,"left",e.documentView.left.transcriptionType),e.documentViewActions.changeCurrentFolio(e.documentView.left.nextFolioShortID,"right",e.documentView.left.transcriptionType)),e.documentViewActions.setBookMode(e.documentView.left.iiifShortID,!e.documentView.bookMode)},w=function(t){e.documentViewActions.setXMLMode(e.side,!e.documentView[e.side].isXMLMode)},x=function(t){var n=e.documentViewActions,r=e.documentView,i=e.side;if(void 0!==t.currentTarget.dataset.id&&0!==t.currentTarget.dataset.id.length){var o=t.currentTarget.dataset.id;n.changeCurrentFolio(o,i,r[i].transcriptionType)}},S=e.side,E=e.document,T=e.documentView,P=e.documentViewActions,C=e.onFilterChange;Mg("md");if(!T)return a().createElement("div",null,"Unknown Transcription Type");T[S].width;var k="f"===T[S].transcriptionType?{color:"white"}:{color:"black"},O="f"===T[S].transcriptionType?"dark":"light",_="glossary"===T[S].transcriptionType?{visibility:"hidden"}:{visibility:"visible"},R={display:"flex"},A=T.linkedMode?"fa fa-lock":"fa fa-lock-open";T.bookMode||(A+=" active");var D="f"===T[S].transcriptionType,I=T.bookMode?"fa fa-book active":"fa fa-book",M=T[S].isXMLMode?"fa fa-code active":"fa fa-code",L=null===(t=E.folioIndex[T[S].iiifShortID])||void 0===t?void 0:t.name,j=D?{color:"white"}:{color:"black"},N="left"===S?{marginRight:"55px"}:{marginRight:"15px"};return a().createElement(a().Fragment,null,a().createElement("div",{className:"navigationComponent"},a().createElement("div",{id:"navigation-row",className:"navigationRow"},"glossary"!==T[S].transcriptionType?a().createElement("div",{id:"tool-bar-buttons",className:"breadcrumbs",style:_},a().createElement("div",{style:{display:"flex",alignItems:"baseline",gap:"4px"}},a().createElement("span",{className:"fas fa-th",style:{cursor:"g"!==T[S].transcriptionType?"pointer":"default",padding:"0 15px"},title:"g"!==T[S].transcriptionType&&"Return to Grid View",onClick:"g"!==T[S].transcriptionType&&g}),a().createElement("span",{title:"Toggle coordination of views",onClick:function(t){e.documentView.bookMode?b():(!1===e.documentView.linkedMode&&("left"===e.side?e.documentViewActions.changeCurrentFolio(e.documentView.left.iiifShortID,"right",e.documentView.right.transcriptionType):e.documentViewActions.changeCurrentFolio(e.documentView.right.iiifShortID,"left",e.documentView.left.transcriptionType)),e.documentViewActions.setLinkedMode(!e.documentView.linkedMode))},className:A}),a().createElement("span",{title:"Toggle book mode",onClick:b,className:I}),a().createElement("span",{title:"Toggle XML mode",onClick:w,style:{paddingRight:"15px"},className:D?"invisible":M}),a().createElement("span",{title:"Go back",onClick:x,"data-id":T[S].previousFolioShortID,className:T[S].hasPrevious?"arrow":"arrow disabled"},a().createElement(_c,null)),a().createElement("span",{title:"Go forward",onClick:x,"data-id":T[S].nextFolioShortID,className:T[S].hasNext?"arrow":"arrow disabled"},a().createElement(Rc,null)))," ",a().createElement("div",{title:"".concat(e.documentName||E.documentName,"/").concat(L),style:{display:"flex",overflowX:"hidden",justifyContent:"flex-end"}},a().createElement("span",null,e.documentName||E.documentName),a().createElement("span",null," / "),a().createElement("div",{onClick:function(e){o({anchorEl:e.currentTarget})},className:"folioName",style:{flexShrink:"0",minWidth:"40px"}},L,a().createElement("span",{style:j,className:"fa fa-hand-point-right"}))),a().createElement(rm,{side:S,anchorEl:i.anchorEl,submitHandler:P.jumpToFolio,blurHandler:function(e){o({anchorEl:null})}})):a().createElement(Ig,{onFilterChange:C,value:e.value}),a().createElement("div",{id:"doc-type-help",style:R,ref:h},a().createElement(kf,{className:O,style:jg(jg({},k),{},{marginRight:15,fontSize:"max(16px, 1rem)"}),value:T[S].transcriptionType,id:"doc-type",onClick:m},Object.keys(e.document.folios.find((function(t){return t.id==e.documentView[e.side].iiifShortID})).annotationURLs).map((function(t){return a().createElement(em,{value:t,key:t},e.document.variorum?e.document.transcriptionTypes[e.document.folios.find((function(t){return t.id==e.documentView[e.side].iiifShortID})).doc_id][t]:e.document.transcriptionTypes[t])})),a().createElement(em,{value:"f",key:"f"},om.transcriptionTypeLabels.f),e.glossary&&a().createElement(em,{value:"glossary",key:"glossary"},om.transcriptionTypeLabels.glossary)),a().createElement("span",{title:"Toggle folio help",onClick:v,className:"helpIcon"},a().createElement("i",{className:"fas fa-question-circle"})),a().createElement(Pg,{marginStyle:N,anchorEl:h.current,open:l,onClose:v})))),a().createElement("div",{className:"navigationComponentNarrow"},a().createElement("div",{id:"navigation-row",className:"navigationRowNarrow"},"glossary"!==T[S].transcriptionType?a().createElement("div",{id:"tool-bar-buttons",className:"breadcrumbsNarrow",style:_},a().createElement("span",{className:"fas fa-th",style:{cursor:"g"!==T[S].transcriptionType?"pointer":"default",padding:"0 15px"},title:"g"!==T[S].transcriptionType&&"Return to Grid View",onClick:"g"!==T[S].transcriptionType&&g})," ",a().createElement("span",{title:"Toggle XML mode",onClick:w,className:D?"invisible":M}),D&&a().createElement(a().Fragment,null,a().createElement("span",{title:"Go back",onClick:x,"data-id":T[S].previousFolioShortID,className:T[S].hasPrevious?"arrow":"arrow disabled"}," ",a().createElement(_c,null)," "),a().createElement("span",{title:"Go forward",onClick:x,"data-id":T[S].nextFolioShortID,className:T[S].hasNext?"arrow":"arrow disabled"}," ",a().createElement(Rc,null)))):a().createElement(Ig,{onFilterChange:C,value:e.value}),a().createElement("div",{id:"doc-type-help",style:R,ref:f},a().createElement(kf,{className:O,style:jg(jg({},k),{},{marginRight:15,fontSize:"max(16px, 1rem)"}),value:T[S].transcriptionType,id:"doc-type",onClick:m},Object.keys(e.document.folios.find((function(t){return t.id==e.documentView[e.side].iiifShortID})).annotationURLs).map((function(t){return a().createElement(em,{value:t,key:t,title:t},e.document.variorum?e.document.transcriptionTypes[e.document.folios.find((function(t){return t.id==e.documentView[e.side].iiifShortID})).doc_id][t]:e.document.transcriptionTypes[t])})),a().createElement(em,{value:"f",key:"f"},om.transcriptionTypeLabels.f),e.glossary&&a().createElement(em,{value:"glossary",key:"glossary"},om.transcriptionTypeLabels.glossary)),a().createElement("span",{title:"Toggle folio help",onClick:y,className:"helpIcon"},a().createElement("i",{className:"fas fa-question-circle"})),a().createElement(Pg,{marginStyle:N,anchorEl:f.current,open:d,onClose:y})))))}));const Ug=function(e){var t="os-zoom-in ".concat(e.side),n="os-zoom-out ".concat(e.side),r=e.documentView.bookMode?null:e.onZoomGrid;return a().createElement("ul",{className:"ImageZoomControl"},a().createElement("li",null,a().createElement("i",{title:"Zoom In",id:t,onClick:e.onZoomIn,className:"zoom-in fas fa-plus-circle fa-2x"})),a().createElement("li",null,a().createElement("i",{title:"Fixed Zoom 1",onClick:e.onZoomFixed_1,className:"zoom-3 fas fa-circle fa-2x"})),a().createElement("li",null,a().createElement("i",{title:"Fixed Zoom 2",onClick:e.onZoomFixed_2,className:"zoom-2 fas fa-circle fa-lg"})),a().createElement("li",null,a().createElement("i",{title:"Fixed Zoom 3",onClick:e.onZoomFixed_3,className:"zoom-1 fas fa-circle"})),a().createElement("li",null,a().createElement("i",{title:"Zoom Out",id:n,onClick:e.onZoomOut,className:"zoom-out fas fa-minus-circle fa-2x"})),a().createElement("li",{className:e.documentView.bookMode?"disabled":""},a().createElement("i",{title:"Return to grid mode (not available in book mode)",onClick:r,className:"zoom-grid fas fa-th fa-2x"})))};function Vg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Wg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wg(e,t)}(e,t)||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 Wg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gg(e){var t=e.delay,n=void 0===t?0:t,i=e.color,o=void 0===i?"dark":i,s=Vg((0,r.useState)(0===n),2),l=s[0],c=s[1];return(0,r.useEffect)((function(){if(n>0){var e=setTimeout((function(){c(!0)}),n);return function(){return clearTimeout(e)}}}),[]),l?a().createElement("div",{className:"big-ring-spinner ".concat(o)},a().createElement("div",null),a().createElement("div",null),a().createElement("div",null),a().createElement("div",null)):a().createElement("div",null)}function qg(){qg=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,a=Object.create(o.prototype),s=new R(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",h="suspendedYield",f="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(A([])));S&&S!==n&&r.call(S,a)&&(w=S);var E=b.prototype=v.prototype=Object.create(w);function T(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=p;return function(o,a){if(i===f)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=k(s,r);if(l){if(l===g)continue;return l}}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=f;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?m:h,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function k(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=d(i,t.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[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=b,i(E,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,l,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},T(P.prototype),c(P.prototype,s,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},T(E),c(E,l,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=A,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!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 l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){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(e,t){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"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function Xg(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function Zg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Yg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yg(e,t)}(e,t)||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 Yg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const Kg=function(e){var t=e.side,n=e.initViewer,i=e.tileSource,o=Zg((0,r.useState)(!0),2),s=o[0],l=o[1],c=(0,r.useRef)(null);return(0,r.useEffect)((function(){var e;!function(){(e=e||function(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Xg(o,r,i,a,s,"next",e)}function s(e){Xg(o,r,i,a,s,"throw",e)}a(void 0)}))}}(qg().mark((function e(){return qg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!c.current){e.next=3;break}return e.next=3,n(c.current,i).then((function(){return l(!1)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}()}),[]),(0,r.useMemo)((function(){return a().createElement("div",{id:"image-view-seadragon-".concat(t),ref:c},s&&a().createElement(Gg,{color:"light",delay:1e3}))}),[s])};var Jg=i(3379),Qg=i.n(Jg),$g=i(7795),ev=i.n($g),tv=i(569),nv=i.n(tv),rv=i(3565),iv=i.n(rv),ov=i(9216),av=i.n(ov),sv=i(4589),lv=i.n(sv),cv=i(8879),uv={};uv.styleTagTransform=lv(),uv.setAttributes=iv(),uv.insert=nv().bind(null,"head"),uv.domAPI=ev(),uv.insertStyleElement=av();Qg()(cv.Z,uv);cv.Z&&cv.Z.locals&&cv.Z.locals;function dv(){dv=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,a=Object.create(o.prototype),s=new R(r||[]);return i(a,"_invoke",{value:C(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",h="suspendedYield",f="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(A([])));S&&S!==n&&r.call(S,a)&&(w=S);var E=b.prototype=v.prototype=Object.create(w);function T(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=p;return function(o,a){if(i===f)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=k(s,r);if(l){if(l===g)continue;return l}}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=f;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?m:h,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function k(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=d(i,t.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[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=b,i(E,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,l,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},T(P.prototype),c(P.prototype,s,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new P(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},T(E),c(E,l,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=A,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!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 l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){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(e,t){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"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function pv(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function hv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return fv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fv(e,t)}(e,t)||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 fv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const mv=lt((function(e){return{document:e.document}}))((function(e){var t,n=hv((0,r.useState)(null),2),i=n[0],o=n[1],s=hv((0,r.useState)(null),2),l=s[0],c=s[1],u=Mn(),d=jn(),p=hv(cr(),1)[0],h=hv((0,r.useState)(!1),2),f=h[0],m=h[1];(0,r.useEffect)((function(){l&&p.get("zone")&&setTimeout((function(){return l.selectAnnotation(p.get("zone"))}),50)}),[l]);(0,r.useEffect)((function(){l&&(l.off("selectAnnotation"),l.off("cancelSelected"),l.on("selectAnnotation",(function(e){p.set("zone",e.id),d("".concat(u.pathname,"?").concat(or(p.toString())))})),l.on("cancelSelected",(function(){d(u.pathname)})))}),[u.pathname,l]);(0,r.useEffect)((function(){return function(){i&&i.destroy()}}),[]);var g=e.document.folioIndex[e.folioID].tileSource;return(0,r.useEffect)((function(){var t=e.document.folioIndex[e.folioID];t.loading&&m(!0),t.tileSource&&i&&(i.open(t.tileSource),t.annotations&&l&&l.setAnnotations(t.annotations)),t.loading||m(!1)}),[l,i,e.folioID,e.document.folioIndex]),a().createElement("div",null,g?a().createElement("div",{className:"image-view imageViewComponent ".concat(e.side),style:{position:"relative"}},a().createElement(Hg,{side:e.side,documentView:e.documentView,documentViewActions:e.documentViewActions,documentName:e.document.variorum&&e.document.folioIndex[e.folioID].doc_id}),a().createElement(Ug,{side:e.side,documentView:e.documentView,onZoomFixed_1:function(e){i.viewport.zoomTo(i.viewport.getMaxZoom())},onZoomFixed_2:function(e){i.viewport.zoomTo(i.viewport.getMaxZoom()/2)},onZoomFixed_3:function(e){i.viewport.fitVertically()},onZoomGrid:function(t){e.documentViewActions.changeTranscriptionType(e.side,"g")},onZoomIn:function(e){console.log(i.viewport.fitVertically()),i.viewport.zoomBy(2)},onZoomOut:function(e){i.viewport.zoomBy(.5)},viewer:i}),a().createElement(Kg,{key:e.folioID,side:e.side,tileSource:g,initViewer:function(e,n){return(t=t||function(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){pv(o,r,i,a,s,"next",e)}function s(e){pv(o,r,i,a,s,"throw",e)}a(void 0)}))}}(dv().mark((function e(t,n){var r,i;return dv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t?(r=Rl()({element:t,showNavigationControl:!1,zoomPerClick:2,gestureSettingsMouse:{clickToZoom:!1}}),o(r),(i=xc(r,{})).disableEditor=!0,i.readOnly=!0,c(i),r.addTiledImage({tileSource:n})):(o(null),c(null));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)},loading:f})):a().createElement(Gg,{color:"dark",delay:300}))}));var gv=i(5922),vv=i.n(gv);function yv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yv(Object(n),!0).forEach((function(t){wv(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wv(e,t,n){return(t=Sv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Sv(r.key),r)}}function Sv(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function Ev(e,t){return Ev=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ev(e,t)}function Tv(e){var t=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(e){return!1}}();return function(){var n,r=Cv(e);if(t){var i=Cv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Pv(e)}(this,n)}}function Pv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cv(e){return Cv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Cv(e)}var kv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ev(e,t)}(o,e);var t,n,r,i=Tv(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).onJumpToChange=function(e){var t=e.target.value;n.setState(bv(bv({},n.state),{},{jumpToBuffer:t}))},n.onJumpTo=function(e){var t=n.state.jumpToBuffer,r=n.props,i=r.side,o=r.document,a=r.documentViewActions;if(e.preventDefault(),o.folioByName[t]){var s=o.folioByName[t];s&&a.changeCurrentFolio(s.id,i)}n.setState(bv(bv({},n.state),{},{jumpToBuffer:""}))},n.onSelectDoc=function(e){if(e.target.value&&0!=e.target.value){e.target.value&&"none"!==e.target.value?n.setState(bv(bv({},n.state),{},{currentDoc:e.target.value})):n.setState(bv(bv({},n.state),{},{currentDoc:null}));var t=n.props.documentView[n.props.side].iiifShortID,r=n.generateThumbs(t,"none"!==e.target.value?n.props.document.folios.filter((function(t){return t.doc_id===e.target.value})):n.props.document.folios),i=r.length>n.loadIncrement?n.loadIncrement:r.length,o=r.slice(0,i);n.setState({thumbs:r,visibleThumbs:o})}},n.onClickThumb=function(e,t){n.props.documentViewActions.changeCurrentFolio(e,n.props.side,"f")},n.moreThumbs=function(){var e=n.state.thumbs,t=n.state.visibleThumbs,r=t.length+n.loadIncrement;t=e.length>=r?e.slice(0,r):e,n.setState({visibleThumbs:t})},n.generateThumbs=n.generateThumbs.bind(Pv(n)),n.loadIncrement=10,n.state={jumpToBuffer:"",thumbs:"",visibleThumbs:[],currentDoc:e.selectedDoc||null},n}return t=o,n=[{key:"componentDidUpdate",value:function(e){var t=this,n=this.props.documentView[this.props.side].iiifShortID,r=this.props.documentView[this.props.side].iiifShortID;if(n!==r){var i=this.generateThumbs(r,this.state.currentDoc?this.props.document.folios.filter((function(e){return e.doc_id===t.state.currentDoc})):this.props.document.folios),o=i.length>this.loadIncrement?this.loadIncrement:i.length,a=i.slice(0,o);this.setState({thumbs:i,visibleThumbs:a})}}},{key:"renderToolbar",value:function(){return a().createElement("div",{className:"imageGridToolbar"},a().createElement("span",{className:"fas fa-th",style:{paddingLeft:"15px"}}),this.props.document.variorum?this.renderDocSelect():a().createElement("div",{className:"doc-select",style:{marginTop:"5px"}},this.props.document.documentName),a().createElement("div",{className:"jump-to"},a().createElement("form",{onSubmit:this.onJumpTo},a().createElement("span",null,"Jump to: "),a().createElement("input",{id:"jump-to-input",placeholder:"Page Name (e.g. '3r')",onChange:this.onJumpToChange,value:this.state.jumpToBuffer}),a().createElement("button",{id:"jump-to-button",onClick:this.onJumpTo},a().createElement("span",{style:{color:"black"},className:"fa fa-hand-point-right"})))))}},{key:"renderDocSelect",value:function(){var e=this;return a().createElement("div",{className:"doc-select"},a().createElement(kf,{id:"doc-filter",className:"dark",style:{color:"white",fontSize:"max(16px, 1rem)"},value:this.state.currentDoc||Object.keys(this.props.document.derivativeNames)[0],onClick:this.onSelectDoc},Object.keys(this.props.document.derivativeNames).map((function(t){return a().createElement(em,{value:t,key:t},e.props.document.derivativeNames[t])}))))}},{key:"componentDidMount",value:function(){var e=this,t=this.props.documentView[this.props.side].iiifShortID,n=this.generateThumbs(t,this.props.document.variorum&&this.state.currentDoc?this.props.document.folios.filter((function(t){return t.doc_id===e.state.currentDoc})):this.props.document.folios);console.log(n),console.log(this.props.document.folios);var r=n.length>this.loadIncrement?this.loadIncrement:n.length,i=n.slice(0,r);this.setState({thumbs:n,visibleThumbs:i})}},{key:"generateThumbs",value:function(e,t){var n=this,r=t.map((function(e,t){return a().createElement("li",{key:"thumb-".concat(t),className:"thumbnail"},a().createElement("figure",null,a().createElement("a",{id:e.id,onClick:n.onClickThumb.bind(n,e.id)},a().createElement("img",{src:e.image_thumbnail_url,alt:e.name,style:{maxWidth:"130px",maxHeight:"130px"},onError:function(t){var n=t.currentTarget;n.onerror=null,e.image_zoom_url&&n.src!=="".concat(e.image_zoom_url.slice(0,-9),"full/full/0/default.jpg")&&(n.src="".concat(e.image_zoom_url.slice(0,-9),"full/full/0/default.jpg"))}}))),a().createElement("figcaption",{className:"thumbnail-caption"},e.name))}));return r}},{key:"hasMore",value:function(){return this.state.visibleThumbs.length!==this.state.thumbs.length}},{key:"render",value:function(){var e="imageGridComponent";e="".concat(e," ").concat(this.props.side);var t=this.state.visibleThumbs;return-1===t.constructor.toString().indexOf("Array")&&(t=[]),a().createElement("div",{className:e},this.renderToolbar(),a().createElement(vv(),{element:"ul",loadMore:this.moreThumbs,hasMore:this.hasMore(),useWindow:!1},t))}}],n&&xv(t.prototype,n),r&&xv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(a().Component);const Ov=lt((function(e){return{document:e.document}}))(kv);function _v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Rv(r.key),r)}}function Rv(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function Av(e,t){return Av=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Av(e,t)}function Dv(e){var t=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(e){return!1}}();return function(){var n,r=Mv(e);if(t){var i=Mv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Iv(e)}(this,n)}}function Iv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mv(e){return Mv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Mv(e)}var Lv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Av(e,t)}(o,e);var t,n,r,i=Dv(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).changeCurrentFolio=function(e){var t=n.props,r=t.side,i=t.documentView,o=t.documentViewActions,a=e.currentTarget.dataset;if(void 0!==a.id&&0!==a.id.length){var s=a.id;o.changeCurrentFolio(s,r,i[r].transcriptionType)}},n.changeCurrentFolio=n.changeCurrentFolio.bind(Iv(n)),n}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.side,n=e.document,r=e.documentView,i=e.bottom,o=void 0!==i&&i;if("-1"===r[t].iiifShortID)return null;var s=n.folioIndex[r[t].iiifShortID].name;return a().createElement("div",{className:o?"paginationComponent bottom":"paginationComponent"},a().createElement("div",{className:"paginationControl"},a().createElement("span",{title:"Go back",onClick:this.changeCurrentFolio,"data-id":r[t].previousFolioShortID,className:r[t].hasPrevious?"arrow":"arrow disabled"},a().createElement(_c,null)),a().createElement("span",{className:"folioName"},s),a().createElement("span",{title:"Go forward",onClick:this.changeCurrentFolio,"data-id":r[t].nextFolioShortID,className:r[t].hasNext?"arrow":"arrow disabled"}," ",a().createElement(Rc,null))))}}])&&_v(t.prototype,n),r&&_v(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(a().Component);const jv=lt((function(e){return{document:e.document}}))(Lv);var Nv=i(2281);Nv.domToReact,Nv.htmlToDOM,Nv.attributesToProps,Nv.Comment,Nv.Element,Nv.ProcessingInstruction,Nv.Text;const Fv=Nv;function Bv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zv(r.key),r)}}function zv(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function Hv(e,t){return Hv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Hv(e,t)}function Uv(e){var t=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(e){return!1}}();return function(){var n,r=Vv(e);if(t){var i=Vv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function Vv(e){return Vv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vv(e)}var Wv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hv(e,t)}(o,e);var t,n,r,i=Uv(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.apply(this,arguments)}return t=o,n=[{key:"render",value:function(){var e=this.props,t=e.html,n=e.htmlToReactParserOptionsSide;return Fv(t,n)}}],n&&Bv(t.prototype,n),r&&Bv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(a().Component);const Gv=Wv;function qv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Xv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xv(e,t)}(e,t)||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 Xv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const Zv=function(e){var t=qv((0,r.useState)(null),2),n=t[0],i=t[1],o=qv((0,r.useState)(!1),2),s=o[0],l=o[1],c=function(e){l(!1)};return a().createElement("div",{style:{display:"inline"}},a().createElement("span",{onClick:function(e){return function(e){i(e.currentTarget),l(!0)}(e)},style:{fontStyle:"bold",fontSize:"18pt",color:"red"}},"*"),function(){var t=Fv(e.text)||"ERROR: Could not find comment for id: ".concat(e.commentID,".");return a().createElement(mg,{id:e.commentID,open:s,anchorEl:n},a().createElement(Sg,{in:s},a().createElement(Eh,{className:"editor-comment-content"},a().createElement("div",{onClick:c,style:{float:"right",padding:5,fontStyle:"bold"}},a().createElement("span",{className:"fa fa-window-close"})),a().createElement(yg,{style:{maxWidth:200,padding:"25px 15px 15px 15px"}},t))))}())};function Yv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Kv(r.key),r)}}function Kv(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function Jv(e,t){return Jv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Jv(e,t)}function Qv(e){var t=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(e){return!1}}();return function(){var n,r=$v(e);if(t){var i=$v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function $v(e){return $v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$v(e)}var ey=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jv(e,t)}(o,e);var t,n,r,i=Qv(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={error:null,errorInfo:null},t}return t=o,r=[{key:"getDerivedStateFromError",value:function(e){return{error:!0}}}],(n=[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,errorInfo:t})}},{key:"render",value:function(){return this.state.errorInfo?a().createElement("div",{style:{height:"350px",overflowY:"scroll"}},a().createElement("h2",null,"Something went wrong."),a().createElement("details",{style:{whiteSpace:"pre-wrap"}},"There has been an error rendering a comment",a().createElement("br",null),this.state.error&&this.state.error.toString(),a().createElement("br",null),this.state.errorInfo.componentStack)):this.props.children}}])&&Yv(t.prototype,n),r&&Yv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(r.Component);const ty=function(e){var t=e.side,n=e.documentView,r=e.documentViewActions;return a().createElement("div",{style:{position:"relative"},className:"watermarkContainer"},"-1"!==n.left.iiifShortID&&"-1"!==n.right.iiifShortID?a().createElement(Hg,{side:t,documentView:n,documentViewActions:r}):null,a().createElement("div",{className:"transcriptContent"},a().createElement(jv,{side:t,className:"pagination_upper",documentView:n,documentViewActions:r}),a().createElement("div",{className:"watermark"},a().createElement("div",{className:"third"!==t?"watermark_contents":"third_pane_blank"}))))};function ny(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ry(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ry(e,t)}(e,t)||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 ry(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var iy=function(e,t){if(e&&t.attribs["data-facs"]){var n=t.attribs["data-facs"].split(" ");return function(e,t,n){return n.includes(e)&&(t.attribs.classname?t.attribs.classname+=" selected-zone":t.attribs.classname="selected-zone"),t}(e,t,n)}return t};const oy=lt((function(e){return{annotations:e.annotations,document:e.document}}))((function(e){var t=ny(cr(),1)[0],n=e.side,r=e.folioID,i=e.transcriptionType,o=e.document,s=e.documentView,l=e.documentViewActions;if("-1"===r)return console.log("no folio"),a().createElement(ty,{documentView:s,documentViewActions:l,side:n});var c=o.folioIndex[r];if(c&&!c.loading&&!c.transcription)return a().createElement(ty,{documentView:s,documentViewActions:l,side:n});var u=c&&c.transcription&&c.transcription[i];if(c&&!c.loading&&!u)return console.log("no transcription data"),a().createElement(ty,{documentView:s,documentViewActions:l,side:n});var d,p,h=(d=t.get("zone"),p={replace:function(e){switch(e.name){case"tei-line":return console.log(e.attribs["data-facs"]),iy(d,e);case"tei-surface":case"div":return iy(d,e);case"tei-note":var t,n=(null===(t=e.children[0])||void 0===t?void 0:t.data)||"",r=e.attribs.n||e.attribs.id;return r?a().createElement(Zv,{commentID:r,text:n}):e;case"tei-figure":var i,o,s=e.children.find((function(e){return"tei-graphic"===e.name})),l=null==s||null===(i=s.attribs)||void 0===i?void 0:i.url;if(!l)return e;var c=e.children.find((function(e){return"tei-figdesc"===e.name})),u=null==c||null===(o=c.children[0])||void 0===o?void 0:o.data;return a().createElement("figure",{className:"inline-figure"},a().createElement("img",{src:l,alt:u||"",className:"inline-image"}),u?a().createElement("figcaption",null,u):null);default:return e}}},p),f=u&&u.html,m=u&&u.layout;return!c||c.loading||f?c&&c.loading?a().createElement("div",null,a().createElement(Hg,{side:n,documentView:s,documentViewActions:l,documentName:o.variorum&&c.doc_id}),a().createElement(jv,{side:n,documentView:s,documentViewActions:l}),a().createElement("div",{className:"transcriptionViewComponent"},a().createElement("div",{className:"transcriptContent"},a().createElement(ey,null,a().createElement(Gg,{delay:3e3,color:"dark"})))),a().createElement(jv,{side:n,documentView:s,documentViewActions:l,bottom:!0})):a().createElement("div",{style:{position:"relative",overflow:"auto"}},a().createElement(Hg,{side:n,documentView:s,documentViewActions:l,documentName:o.variorum&&c.doc_id}),a().createElement(jv,{side:n,documentView:s,documentViewActions:l}),a().createElement("div",{className:"transcriptionViewComponent"},a().createElement("div",{className:"transcriptContent"},a().createElement(ey,null,a().createElement("div",{className:"surface grid-mode",style:{gridTemplateAreas:m}},a().createElement(Gv,{html:f,htmlToReactParserOptionsSide:h}))))),a().createElement(jv,{side:n,documentView:s,documentViewActions:l,bottom:!0})):(console.log("no html"),a().createElement(ty,{documentView:s,documentViewActions:l,side:n}))}));function ay(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sy(r.key),r)}}function sy(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function ly(e,t){return ly=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ly(e,t)}function cy(e){var t=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(e){return!1}}();return function(){var n,r=uy(e);if(t){var i=uy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function uy(e){return uy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},uy(e)}var dy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ly(e,t)}(o,e);var t,n,r,i=cy(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props,t=e.side,n=e.document,r=e.documentView,i=e.documentViewActions,o="xmlViewComponent ".concat(t),s="xmlViewComponent_".concat(t),l=r[t].iiifShortID;if("-1"===l)return a().createElement("div",{className:"watermark"},a().createElement("div",{className:"watermark_contents"}));var c=n.folioIndex[l];if(!c.transcription)return a().createElement(ty,{documentView:r,documentViewActions:i,side:t});var u=r[t].transcriptionType,d=c.transcription[u].xml;return a().createElement("div",{id:s,className:o,style:{position:"relative",overflow:"auto"}},a().createElement(Hg,{side:t,documentView:r,documentViewActions:i,documentName:n.variorum&&c.doc_id}),a().createElement(jv,{side:t,className:"pagination_upper",documentView:r,documentViewActions:i}),a().createElement("div",{className:"xmlContentInner"},a().createElement("pre",null,d)))}}])&&ay(t.prototype,n),r&&ay(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(r.Component);const py=lt((function(e){return{document:e.document}}))(dy);var hy=i(5798);function fy(e){return e&&"object"==typeof e?"position"in e||"type"in e?gy(e.position):"start"in e||"end"in e?gy(e):"line"in e||"column"in e?my(e):"":""}function my(e){return vy(e&&e.line)+":"+vy(e&&e.column)}function gy(e){return my(e&&e.start)+"-"+my(e&&e.end)}function vy(e){return e&&"number"==typeof e?e:1}function yy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,by(r.key),r)}}function by(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function wy(e){var t=Ey();return function(){var n,r=Py(e);if(t){var i=Py(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function xy(e){var t="function"==typeof Map?new Map:void 0;return xy=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Sy(e,arguments,Py(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ty(n,e)},xy(e)}function Sy(e,t,n){return Sy=Ey()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Ty(i,n.prototype),i},Sy.apply(null,arguments)}function Ey(){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(e){return!1}}function Ty(e,t){return Ty=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ty(e,t)}function Py(e){return Py=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Py(e)}var Cy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ty(e,t)}(o,e);var t,n,r,i=wy(o);function o(e,t,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var a=[null,null],s={start:{line:null,column:null},end:{line:null,column:null}};if(r=i.call(this),"string"==typeof t&&(n=t,t=void 0),"string"==typeof n){var l=n.indexOf(":");-1===l?a[1]=n:(a[0]=n.slice(0,l),a[1]=n.slice(l+1))}return t&&("type"in t||"position"in t?t.position&&(s=t.position):"start"in t||"end"in t?s=t:("line"in t||"column"in t)&&(s.start=t)),r.name=fy(t)||"1:1",r.message="object"==typeof e?e.message:e,r.stack="","object"==typeof e&&e.stack&&(r.stack=e.stack),r.reason=r.message,r.fatal,r.line=s.start.line,r.column=s.start.column,r.position=s,r.source=a[0],r.ruleId=a[1],r.file,r.actual,r.expected,r.url,r.note,r}return t=o,n&&yy(t.prototype,n),r&&yy(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}(xy(Error));Cy.prototype.file="",Cy.prototype.name="",Cy.prototype.reason="",Cy.prototype.message="",Cy.prototype.stack="",Cy.prototype.fatal=null,Cy.prototype.column=null,Cy.prototype.line=null,Cy.prototype.source=null,Cy.prototype.ruleId=null,Cy.prototype.position=null;var ky={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Oy(e);var n,r=0,i=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.charCodeAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1);return i<0?"":e.slice(r,i)}if(t===e)return"";var a=-1,s=t.length-1;for(;o--;)if(47===e.charCodeAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1),s>-1&&(e.charCodeAt(o)===t.charCodeAt(s--)?s<0&&(i=o):(s=-1,i=a));r===i?i=a:i<0&&(i=e.length);return e.slice(r,i)},dirname:function(e){if(Oy(e),0===e.length)return".";var t,n=-1,r=e.length;for(;--r;)if(47===e.charCodeAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.charCodeAt(0)?"/":".":1===n&&47===e.charCodeAt(0)?"//":e.slice(0,n)},extname:function(e){Oy(e);var t,n=e.length,r=-1,i=0,o=-1,a=0;for(;n--;){var s=e.charCodeAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?o<0?o=n:1!==a&&(a=1):o>-1&&(a=-1);else if(t){i=n+1;break}}if(o<0||r<0||0===a||1===a&&o===r-1&&o===i+1)return"";return e.slice(o,r)},join:function(){for(var e,t=-1,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(;++t<r.length;)Oy(r[t]),r[t]&&(e=void 0===e?r[t]:e+"/"+r[t]);return void 0===e?".":function(e){Oy(e);var t=47===e.charCodeAt(0),n=function(e,t){var n,r,i="",o=0,a=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.charCodeAt(l);else{if(47===n)break;n=47}if(47===n){if(a===l-1||1===s);else if(a!==l-1&&2===s){if(i.length<2||2!==o||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){if((r=i.lastIndexOf("/"))!==i.length-1){r<0?(i="",o=0):o=(i=i.slice(0,r)).length-1-i.lastIndexOf("/"),a=l,s=0;continue}}else if(i.length>0){i="",o=0,a=l,s=0;continue}t&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+e.slice(a+1,l):i=e.slice(a+1,l),o=l-a-1;a=l,s=0}else 46===n&&s>-1?s++:s=-1}return i}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.charCodeAt(e.length-1)&&(n+="/");return t?"/"+n:n}(e)},sep:"/"};function Oy(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var _y={cwd:function(){return"/"}};function Ry(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}function Ay(e){if("string"==typeof e)e=new URL(e);else if(!Ry(e)){var t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){var n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return function(e){if(""!==e.hostname){var t=new TypeError('File URL host must be "localhost" or empty on darwin');throw t.code="ERR_INVALID_FILE_URL_HOST",t}var n=e.pathname,r=-1;for(;++r<n.length;)if(37===n.charCodeAt(r)&&50===n.charCodeAt(r+1)){var i=n.charCodeAt(r+2);if(70===i||102===i){var o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(n)}(e)}function Dy(e){return function(e){if(Array.isArray(e))return Iy(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Iy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Iy(e,t)}(e)||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 Iy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function My(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ly(r.key),r)}}function Ly(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var jy=["history","path","basename","stem","extname","dirname"],Ny=function(){function e(t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=t?"string"==typeof t||function(e){return hy(e)}(t)?{value:t}:Ry(t)?{path:t}:t:{},this.data={},this.messages=[],this.history=[],this.cwd=_y.cwd(),this.value,this.stored,this.result,this.map;for(var r,i=-1;++i<jy.length;){var o=jy[i];o in n&&void 0!==n[o]&&null!==n[o]&&(this[o]="history"===o?Dy(n[o]):n[o])}for(r in n)jy.includes(r)||(this[r]=n[r])}var t,n,r;return t=e,n=[{key:"path",get:function(){return this.history[this.history.length-1]},set:function(e){Ry(e)&&(e=Ay(e)),By(e,"path"),this.path!==e&&this.history.push(e)}},{key:"dirname",get:function(){return"string"==typeof this.path?ky.dirname(this.path):void 0},set:function(e){zy(this.basename,"dirname"),this.path=ky.join(e||"",this.basename)}},{key:"basename",get:function(){return"string"==typeof this.path?ky.basename(this.path):void 0},set:function(e){By(e,"basename"),Fy(e,"basename"),this.path=ky.join(this.dirname||"",e)}},{key:"extname",get:function(){return"string"==typeof this.path?ky.extname(this.path):void 0},set:function(e){if(Fy(e,"extname"),zy(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ky.join(this.dirname,this.stem+(e||""))}},{key:"stem",get:function(){return"string"==typeof this.path?ky.basename(this.path,this.extname):void 0},set:function(e){By(e,"stem"),Fy(e,"stem"),this.path=ky.join(this.dirname||"",e+(this.extname||""))}},{key:"toString",value:function(e){return(this.value||"").toString(e||void 0)}},{key:"message",value:function(e,t,n){var r=new Cy(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}},{key:"info",value:function(e,t,n){var r=this.message(e,t,n);return r.fatal=null,r}},{key:"fail",value:function(e,t,n){var r=this.message(e,t,n);throw r.fatal=!0,r}}],n&&My(t.prototype,n),r&&My(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Fy(e,t){if(e&&e.includes(ky.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ky.sep+"`")}function By(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function zy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Hy(e){if(e)throw e}var Uy=i(2312);function Vy(e){if("object"!=typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Wy(e){return function(e){if(Array.isArray(e))return Gy(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Gy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gy(e,t)}(e)||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 Gy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qy(){var e=[],t={run:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=-1,o=n.pop();if("function"!=typeof o)throw new TypeError("Expected function as last argument, not "+o);(function t(r){var a=e[++i],s=-1;if(r)o(r);else{for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u<l;u++)c[u-1]=arguments[u];for(;++s<n.length;)null!==c[s]&&void 0!==c[s]||(c[s]=n[s]);n=c,a?function(e,t){var n;return r;function r(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];var s,l=e.length>r.length;l&&r.push(i);try{s=e.apply(this,r)}catch(e){if(l&&n)throw e;return i(e)}l||(s&&s.then&&"function"==typeof s.then?s.then(o,i):s instanceof Error?i(s):o(s))}function i(e){if(!n){n=!0;for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];t.apply(void 0,[e].concat(i))}}function o(e){i(null,e)}}(a,t).apply(void 0,c):o.apply(void 0,[null].concat(c))}}).apply(void 0,[null].concat(Wy(n)))},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}function Xy(e){return function(e){if(Array.isArray(e))return e}(e)||Ky(e)||Yy(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 Zy(e){return function(e){if(Array.isArray(e))return Jy(e)}(e)||Ky(e)||Yy(e)||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 Yy(e,t){if(e){if("string"==typeof e)return Jy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jy(e,t):void 0}}function Ky(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Jy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Qy=function e(){var t,n=qy(),r=[],i={},o=-1;return a.data=function(e,n){if("string"==typeof e)return 2===arguments.length?(rb("data",t),i[e]=n,a):$y.call(i,e)&&i[e]||null;if(e)return rb("data",t),i=e,a;return i},a.Parser=void 0,a.Compiler=void 0,a.freeze=function(){if(t)return a;for(;++o<r.length;){var e=Xy(r[o]),i=e[0],s=e.slice(1);if(!1!==s[0]){!0===s[0]&&(s[0]=void 0);var l=i.call.apply(i,[a].concat(Zy(s)));"function"==typeof l&&n.use(l)}}return t=!0,o=Number.POSITIVE_INFINITY,a},a.attachers=r,a.use=function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];var l;if(rb("use",t),null==e);else if("function"==typeof e)p.apply(void 0,[e].concat(o));else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?d(e):u(e)}l&&(i.settings=Object.assign(i.settings||{},l));return a;function c(e){if("function"==typeof e)p(e);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){var t=Xy(e),n=t[0],r=t.slice(1);p.apply(void 0,[n].concat(Zy(r)))}else u(e)}}function u(e){d(e.plugins),e.settings&&(l=Object.assign(l||{},e.settings))}function d(e){var t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){c(e[t])}}}function p(e,t){for(var n,i=-1;++i<r.length;)if(r[i][0]===e){n=r[i];break}n?(Vy(n[1])&&Vy(t)&&(t=Uy(!0,n[1],t)),n[1]=t):r.push(Array.prototype.slice.call(arguments))}},a.parse=function(e){a.freeze();var t=ab(e),n=a.Parser;if(tb("parse",n),eb(n,"parse"))return new n(String(t),t).parse();return n(String(t),t)},a.stringify=function(e,t){a.freeze();var n=ab(t),r=a.Compiler;if(nb("stringify",r),ib(e),eb(r,"compile"))return new r(e,n).compile();return r(e,n)},a.run=function(e,t,r){ib(e),a.freeze(),r||"function"!=typeof t||(r=t,t=void 0);if(!r)return new Promise(i);function i(i,o){function a(t,n,a){n=n||e,t?o(t):i?i(n):r(null,n,a)}n.run(e,ab(t),a)}i(null,r)},a.runSync=function(e,t){var n,r;return a.run(e,t,i),ob("runSync","run",r),n;function i(e,t){Hy(e),n=t,r=!0}},a.process=function(e,t){if(a.freeze(),tb("process",a.Parser),nb("process",a.Compiler),!t)return new Promise(n);function n(n,r){var i=ab(e);function o(e,i){e||!i?r(e):n?n(i):t(null,i)}a.run(a.parse(i),i,(function(e,t,n){if(!e&&t&&n){var r=a.stringify(t,n);null==r||("string"==typeof(i=r)||hy(i)?n.value=r:n.result=r),o(e,n)}else o(e);var i}))}n(null,t)},a.processSync=function(e){var t;a.freeze(),tb("processSync",a.Parser),nb("processSync",a.Compiler);var n=ab(e);return a.process(n,r),ob("processSync","process",t),n;function r(e){t=!0,Hy(e)}},a;function a(){for(var t=e(),n=-1;++n<r.length;)t.use.apply(t,Zy(r[n]));return t.data(Uy(!0,{},i)),t}}().freeze(),$y={}.hasOwnProperty;function eb(e,t){return"function"==typeof e&&e.prototype&&(function(e){var t;for(t in e)if($y.call(e,t))return!0;return!1}(e.prototype)||t in e.prototype)}function tb(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Parser`")}function nb(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Compiler`")}function rb(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ib(e){if(!Vy(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function ob(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ab(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Ny(e)}var sb={};function lb(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return cb(e.children,t,n)}return Array.isArray(e)?cb(e,t,n):""}function cb(e,t,n){for(var r=[],i=-1;++i<e.length;)r[i]=lb(e[i],t,n);return r.join("")}function ub(e){return function(e){if(Array.isArray(e))return db(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return db(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return db(e,t)}(e)||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 db(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pb(e,t,n,r){var i,o=e.length,a=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)(i=Array.from(r)).unshift(t,n),e.splice.apply(e,ub(i));else for(n&&e.splice(t,n);a<r.length;)(i=r.slice(a,a+1e4)).unshift(t,0),e.splice.apply(e,ub(i)),a+=1e4,t+=1e4}function hb(e,t){return e.length>0?(pb(e,e.length,0,t),e):t}var fb={}.hasOwnProperty;function mb(e,t){var n;for(n in t){var r=(fb.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],o=void 0;if(i)for(o in i){fb.call(r,o)||(r[o]=[]);var a=i[o];gb(r[o],Array.isArray(a)?a:a?[a]:[])}}}function gb(e,t){for(var n=-1,r=[];++n<t.length;)("after"===t[n].add?e:r).push(t[n]);pb(e,0,0,r)}var vb=_b(/[A-Za-z]/),yb=_b(/[\dA-Za-z]/),bb=_b(/[#-'*+\--9=?A-Z^-~]/);function wb(e){return null!==e&&(e<32||127===e)}var xb=_b(/\d/),Sb=_b(/[\dA-Fa-f]/),Eb=_b(/[!-/:-@[-`{-~]/);function Tb(e){return null!==e&&e<-2}function Pb(e){return null!==e&&(e<0||32===e)}function Cb(e){return-2===e||-1===e||32===e}var kb=_b(/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/),Ob=_b(/\s/);function _b(e){return function(t){return null!==t&&e.test(String.fromCharCode(t))}}function Rb(e,t,n,r){var i=r?r-1:Number.POSITIVE_INFINITY,o=0;return function(r){if(Cb(r))return e.enter(n),a(r);return t(r)};function a(r){return Cb(r)&&o++<i?(e.consume(r),a):(e.exit(n),t(r))}}var Ab={tokenize:function(e){var t,n=e.attempt(this.parser.constructs.contentInitial,(function(t){if(null===t)return void e.consume(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Rb(e,n,"linePrefix")}),(function(t){return e.enter("paragraph"),r(t)}));return n;function r(n){var r=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=r),t=r,i(n)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Tb(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),i)}}};var Db={tokenize:function(e){var t,n,r,i=this,o=[],a=0;return s;function s(t){if(a<o.length){var n=o[a];return i.containerState=n[1],e.attempt(n[0].continuation,l,c)(t)}return c(t)}function l(e){if(a++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,t&&y();for(var n,r=i.events.length,o=r;o--;)if("exit"===i.events[o][0]&&"chunkFlow"===i.events[o][1].type){n=i.events[o][1].end;break}v(a);for(var l=r;l<i.events.length;)i.events[l][1].end=Object.assign({},n),l++;return pb(i.events,o+1,0,i.events.slice(r)),i.events.length=l,c(e)}return s(e)}function c(n){if(a===o.length){if(!t)return p(n);if(t.currentConstruct&&t.currentConstruct.concrete)return f(n);i.interrupt=Boolean(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return i.containerState={},e.check(Ib,u,d)(n)}function u(e){return t&&y(),v(a),p(e)}function d(e){return i.parser.lazy[i.now().line]=a!==o.length,r=i.now().offset,f(e)}function p(t){return i.containerState={},e.attempt(Ib,h,f)(t)}function h(e){return a++,o.push([i.currentConstruct,i.containerState]),p(e)}function f(r){return null===r?(t&&y(),v(0),void e.consume(r)):(t=t||i.parser.flow(i.now()),e.enter("chunkFlow",{contentType:"flow",previous:n,_tokenizer:t}),m(r))}function m(t){return null===t?(g(e.exit("chunkFlow"),!0),v(0),void e.consume(t)):Tb(t)?(e.consume(t),g(e.exit("chunkFlow")),a=0,i.interrupt=void 0,s):(e.consume(t),m)}function g(e,o){var s=i.sliceStream(e);if(o&&s.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(s),i.parser.lazy[e.start.line]){for(var l=t.events.length;l--;)if(t.events[l][1].start.offset<r&&(!t.events[l][1].end||t.events[l][1].end.offset>r))return;for(var c,u,d=i.events.length,p=d;p--;)if("exit"===i.events[p][0]&&"chunkFlow"===i.events[p][1].type){if(c){u=i.events[p][1].end;break}c=!0}for(v(a),l=d;l<i.events.length;)i.events[l][1].end=Object.assign({},u),l++;pb(i.events,p+1,0,i.events.slice(d)),i.events.length=l}}function v(t){for(var n=o.length;n-- >t;){var r=o[n];i.containerState=r[1],r[0].exit.call(i,e)}o.length=t}function y(){t.write([null]),n=void 0,t=void 0,i.containerState._closeFlow=void 0}}},Ib={tokenize:function(e,t,n){return Rb(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};var Mb={tokenize:function(e,t,n){return function(t){return Cb(t)?Rb(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Tb(e)?t(e):n(e)}},partial:!0};function Lb(e){for(var t,n,r,i,o,a,s,l={},c=-1;++c<e.length;){for(;c in l;)c=l[c];if(t=e[c],c&&"chunkFlow"===t[1].type&&"listItemPrefix"===e[c-1][1].type&&((r=0)<(a=t[1]._tokenizer.events).length&&"lineEndingBlank"===a[r][1].type&&(r+=2),r<a.length&&"content"===a[r][1].type))for(;++r<a.length&&"content"!==a[r][1].type;)"chunkText"===a[r][1].type&&(a[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(l,jb(e,c)),c=l[c],s=!0);else if(t[1]._container){for(r=c,n=void 0;r--&&("lineEnding"===(i=e[r])[1].type||"lineEndingBlank"===i[1].type);)"enter"===i[0]&&(n&&(e[n][1].type="lineEndingBlank"),i[1].type="lineEnding",n=r);n&&(t[1].end=Object.assign({},e[n][1].start),(o=e.slice(n,c)).unshift(t),pb(e,n,c-n+1,o))}}return!s}function jb(e,t){for(var n,r,i=e[t][1],o=e[t][2],a=t-1,s=[],l=i._tokenizer||o.parser[i.contentType](i.start),c=l.events,u=[],d={},p=-1,h=i,f=0,m=0,g=[m];h;){for(;e[++a][1]!==h;);s.push(a),h._tokenizer||(n=o.sliceStream(h),h.next||n.push(null),r&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(n),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),r=h,h=h.next}for(h=i;++p<c.length;)"exit"===c[p][0]&&"enter"===c[p-1][0]&&c[p][1].type===c[p-1][1].type&&c[p][1].start.line!==c[p][1].end.line&&(m=p+1,g.push(m),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):g.pop(),p=g.length;p--;){var v=c.slice(g[p],g[p+1]),y=s.pop();u.unshift([y,y+v.length-1]),pb(e,y,2,v)}for(p=-1;++p<u.length;)d[f+u[p][0]]=f+u[p][1],f+=u[p][1]-u[p][0]-1;return d}var Nb={tokenize:function(e,t){var n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):Tb(t)?e.check(Fb,o,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}},resolve:function(e){return Lb(e),e}},Fb={tokenize:function(e,t,n){var r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Rb(e,i,"linePrefix")};function i(i){if(null===i||Tb(i))return n(i);var o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}},partial:!0};var Bb={tokenize:function(e){var t=this,n=e.attempt(Mb,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,r,Rb(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Nb,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};var zb={resolveAll:Wb()},Hb=Vb("string"),Ub=Vb("text");function Vb(e){return{tokenize:function(t){var n=this,r=this.parser.constructs[e],i=t.attempt(r,o,a);return o;function o(e){return l(e)?i(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;var t=r[e],i=-1;if(t)for(;++i<t.length;){var o=t[i];if(!o.previous||o.previous.call(n,n.previous))return!0}return!1}},resolveAll:Wb("text"===e?Gb:void 0)}}function Wb(e){return function(t,n){var r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function Gb(e,t){for(var n=0;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){for(var r=e[n-1][1],i=t.sliceStream(r),o=i.length,a=-1,s=0,l=void 0;o--;){var c=i[o];if("string"==typeof c){for(a=c.length;32===c.charCodeAt(a-1);)s++,a--;if(a)break;a=-1}else if(-2===c)l=!0,s++;else if(-1!==c){o++;break}}if(s){var u={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},u.start),r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}function qb(e,t,n){for(var r=[],i=-1;++i<e.length;){var o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}function Xb(e){return function(e){if(Array.isArray(e))return Zb(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Zb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zb(e,t)}(e)||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 Zb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yb(e,t,n){var r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),i={},o=[],a=[],s=[],l={consume:function(e){Tb(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,y()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e,!0},enter:function(e,t){var n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){var t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},attempt:g((function(e,t){v(e,t.from)})),check:g(m),interrupt:g(m,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:d,sliceSerialize:function(e,t){return function(e,t){var n,r=-1,i=[];for(;++r<e.length;){var o=e[r],a=void 0;if("string"==typeof o)a=o;else switch(o){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&n)continue;a=" ";break;default:a=String.fromCharCode(o)}n=-2===o,i.push(a)}return i.join("")}(d(e),t)},now:p,defineSkip:function(e){i[e.line]=e.column,y()},write:function(e){if(a=hb(a,e),h(),null!==a[a.length-1])return[];return v(t,0),c.events=qb(o,c.events,c),c.events}},u=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function d(e){return function(e,t){var n,r=t.start._index,i=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;if(r===o)n=[e[r].slice(i,a)];else{if(n=e.slice(r,o),i>-1){var s=n[0];"string"==typeof s?n[0]=s.slice(i):n.shift()}a>0&&n.push(e[o].slice(0,a))}return n}(a,e)}function p(){var e=r;return{line:e.line,column:e.column,offset:e.offset,_index:e._index,_bufferIndex:e._bufferIndex}}function h(){for(var e;r._index<a.length;){var t=a[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)f(t.charCodeAt(r._bufferIndex));else f(t)}}function f(e){void 0,e,u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,i,o){var a,u,d,h;return Array.isArray(n)?f(n):"tokenize"in n?f([n]):function(e){return t;function t(t){var n=null!==t&&e[t],r=null!==t&&e.null;return f([].concat(Xb(Array.isArray(n)?n:n?[n]:[]),Xb(Array.isArray(r)?r:r?[r]:[])))(t)}}(n);function f(e){return a=e,u=0,0===e.length?o:m(e[u])}function m(e){return function(n){h=function(){var e=p(),t=c.previous,n=c.currentConstruct,i=c.events.length,o=Array.from(s);return{restore:a,from:i};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=i,s=o,y()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return v(n);return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,v)(n)}}function g(t){return!0,e(d,h),i}function v(e){return!0,h.restore(),++u<a.length?m(a[u]):o}}}function v(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&pb(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}var Kb={name:"thematicBreak",tokenize:function(e,t,n){var r,i=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,o(e)}(t)};function o(o){return o===r?(e.enter("thematicBreakSequence"),a(o)):i>=3&&(null===o||Tb(o))?(e.exit("thematicBreak"),t(o)):n(o)}function a(t){return t===r?(e.consume(t),i++,a):(e.exit("thematicBreakSequence"),Cb(t)?Rb(e,o,"whitespace")(t):o(t))}}};var Jb={name:"list",tokenize:function(e,t,n){var r=this,i=r.events[r.events.length-1],o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,a=0;return function(t){var i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:xb(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(Kb,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return xb(t)&&++a<10?(e.consume(t),s):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(Mb,r.interrupt?n:c,e.attempt(Qb,d,u))}function c(e){return r.containerState.initialBlankLine=!0,o++,d(e)}function u(t){return Cb(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}},continuation:{tokenize:function(e,t,n){var r=this;return r.containerState._closeFlow=void 0,e.check(Mb,i,o);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Rb(e,t,"listItemIndent",r.containerState.size+1)(n)}function o(n){return r.containerState.furtherBlankLines||!Cb(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt($b,t,a)(n))}function a(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Rb(e,e.attempt(Jb,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},Qb={tokenize:function(e,t,n){var r=this;return Rb(e,(function(e){var i=r.events[r.events.length-1];return!Cb(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},$b={tokenize:function(e,t,n){var r=this;return Rb(e,(function(e){var i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)},partial:!0};var ew={name:"blockQuote",tokenize:function(e,t,n){var r=this;return function(t){if(62===t){var o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return Cb(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){var r=this;return function(t){if(Cb(t))return Rb(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return i(t)};function i(r){return e.attempt(ew,t,n)(r)}}},exit:function(e){e.exit("blockQuote")}};function tw(e,t,n,r,i,o,a,s,l){var c=l||Number.POSITIVE_INFINITY,u=0;return function(t){if(60===t)return e.enter(r),e.enter(i),e.enter(o),e.consume(t),e.exit(o),d;if(null===t||32===t||41===t||wb(t))return n(t);return e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),f(t)};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||Tb(t)?n(t):(e.consume(t),92===t?h:p)}function h(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function f(i){return u||null!==i&&41!==i&&!Pb(i)?u<c&&40===i?(e.consume(i),u++,f):41===i?(e.consume(i),u--,f):null===i||32===i||40===i||wb(i)?n(i):(e.consume(i),92===i?m:f):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(i))}function m(t){return 40===t||41===t||92===t?(e.consume(t),f):f(t)}}function nw(e,t,n,r,i,o){var a,s=this,l=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(o),c};function c(d){return l>999||null===d||91===d||93===d&&!a||94===d&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):93===d?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):Tb(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||Tb(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),a||(a=!Cb(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function rw(e,t,n,r,i,o){var a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(i),e.consume(t),e.exit(i),a=40===t?41:t,s;return n(t)};function s(n){return n===a?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(o),l(n))}function l(t){return t===a?(e.exit(o),s(a)):null===t?n(t):Tb(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Rb(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||Tb(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function iw(e,t){var n;return function r(i){if(Tb(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r;if(Cb(i))return Rb(e,r,n?"linePrefix":"lineSuffix")(i);return t(i)}}function ow(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var aw={name:"definition",tokenize:function(e,t,n){var r,i=this;return function(t){return e.enter("definition"),function(t){return nw.call(i,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return r=ow(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return Pb(t)?iw(e,s)(t):s(t)}function s(t){return tw(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(sw,c,c)(t)}function c(t){return Cb(t)?Rb(e,u,"whitespace")(t):u(t)}function u(o){return null===o||Tb(o)?(e.exit("definition"),i.parser.defined.push(r),t(o)):n(o)}}},sw={tokenize:function(e,t,n){return function(t){return Pb(t)?iw(e,r)(t):n(t)};function r(t){return rw(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return Cb(t)?Rb(e,o,"whitespace")(t):o(t)}function o(e){return null===e||Tb(e)?t(e):n(e)}},partial:!0};var lw={name:"codeIndented",tokenize:function(e,t,n){var r=this;return function(t){return e.enter("codeIndented"),Rb(e,i,"linePrefix",5)(t)};function i(e){var t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?s(t):Tb(t)?e.attempt(cw,o,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||Tb(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}},cw={tokenize:function(e,t,n){var r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Tb(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):Rb(e,o,"linePrefix",5)(t)}function o(e){var o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):Tb(e)?i(e):n(e)}},partial:!0};var uw={name:"headingAtx",tokenize:function(e,t,n){var r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&r++<6?(e.consume(t),i):null===t||Pb(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||Tb(n)?(e.exit("atxHeading"),t(n)):Cb(n)?Rb(e,o,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),o(t))}function s(t){return null===t||35===t||Pb(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),s)}},resolve:function(e,t){var n,r,i=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);i-2>o&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4);i>o&&pb(e,o,i-o+1,[["enter",n={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},t],["enter",r={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},t],["exit",r,t],["exit",n,t]]);return e}};var dw={name:"setextUnderline",tokenize:function(e,t,n){var r,i=this;return function(t){var a,s=i.events.length;for(;s--;)if("lineEnding"!==i.events[s][1].type&&"linePrefix"!==i.events[s][1].type&&"content"!==i.events[s][1].type){a="paragraph"===i.events[s][1].type;break}if(!i.parser.lazy[i.now().line]&&(i.interrupt||a))return e.enter("setextHeadingLine"),r=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return n(t)};function o(t){return t===r?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),Cb(t)?Rb(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||Tb(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}},resolveTo:function(e,t){var n,r,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),i||"definition"!==e[o][1].type||(i=o);var a={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",a,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[i][1].end)):e[n][1]=a;return e.push(["exit",a,t]),e}};var pw=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],hw=["pre","script","style","textarea"],fw={name:"htmlFlow",tokenize:function(e,t,n){var r,i,o,a,s,l=this;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(a){return 33===a?(e.consume(a),u):47===a?(e.consume(a),i=!0,h):63===a?(e.consume(a),r=3,l.interrupt?t:M):vb(a)?(e.consume(a),o=String.fromCharCode(a),f):n(a)}function u(i){return 45===i?(e.consume(i),r=2,d):91===i?(e.consume(i),r=5,a=0,p):vb(i)?(e.consume(i),r=4,l.interrupt?t:M):n(i)}function d(r){return 45===r?(e.consume(r),l.interrupt?t:M):n(r)}function p(r){var i="CDATA[";return r===i.charCodeAt(a++)?(e.consume(r),6===a?l.interrupt?t:C:p):n(r)}function h(t){return vb(t)?(e.consume(t),o=String.fromCharCode(t),f):n(t)}function f(a){if(null===a||47===a||62===a||Pb(a)){var s=47===a,c=o.toLowerCase();return s||i||!hw.includes(c)?pw.includes(o.toLowerCase())?(r=6,s?(e.consume(a),m):l.interrupt?t(a):C(a)):(r=7,l.interrupt&&!l.parser.lazy[l.now().line]?n(a):i?g(a):v(a)):(r=1,l.interrupt?t(a):C(a))}return 45===a||yb(a)?(e.consume(a),o+=String.fromCharCode(a),f):n(a)}function m(r){return 62===r?(e.consume(r),l.interrupt?t:C):n(r)}function g(t){return Cb(t)?(e.consume(t),g):T(t)}function v(t){return 47===t?(e.consume(t),T):58===t||95===t||vb(t)?(e.consume(t),y):Cb(t)?(e.consume(t),v):T(t)}function y(t){return 45===t||46===t||58===t||95===t||yb(t)?(e.consume(t),y):b(t)}function b(t){return 61===t?(e.consume(t),w):Cb(t)?(e.consume(t),b):v(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),s=t,x):Cb(t)?(e.consume(t),w):S(t)}function x(t){return t===s?(e.consume(t),s=null,E):null===t||Tb(t)?n(t):(e.consume(t),x)}function S(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Pb(t)?b(t):(e.consume(t),S)}function E(e){return 47===e||62===e||Cb(e)?v(e):n(e)}function T(t){return 62===t?(e.consume(t),P):n(t)}function P(t){return null===t||Tb(t)?C(t):Cb(t)?(e.consume(t),P):n(t)}function C(t){return 45===t&&2===r?(e.consume(t),R):60===t&&1===r?(e.consume(t),A):62===t&&4===r?(e.consume(t),L):63===t&&3===r?(e.consume(t),M):93===t&&5===r?(e.consume(t),I):!Tb(t)||6!==r&&7!==r?null===t||Tb(t)?(e.exit("htmlFlowData"),k(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(mw,j,k)(t))}function k(t){return e.check(gw,O,j)(t)}function O(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),_}function _(t){return null===t||Tb(t)?k(t):(e.enter("htmlFlowData"),C(t))}function R(t){return 45===t?(e.consume(t),M):C(t)}function A(t){return 47===t?(e.consume(t),o="",D):C(t)}function D(t){if(62===t){var n=o.toLowerCase();return hw.includes(n)?(e.consume(t),L):C(t)}return vb(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),D):C(t)}function I(t){return 93===t?(e.consume(t),M):C(t)}function M(t){return 62===t?(e.consume(t),L):45===t&&2===r?(e.consume(t),M):C(t)}function L(t){return null===t||Tb(t)?(e.exit("htmlFlowData"),j(t)):(e.consume(t),L)}function j(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){var t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},mw={tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Mb,t,n)}},partial:!0},gw={tokenize:function(e,t,n){var r=this;return function(t){if(Tb(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i;return n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0};var vw={tokenize:function(e,t,n){var r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},yw={name:"codeFenced",tokenize:function(e,t,n){var r,i=this,o={tokenize:function(e,t,n){var o=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),Cb(t)?Rb(e,c,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===r?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===r?(o++,e.consume(t),u):o>=s?(e.exit("codeFencedFenceSequence"),Cb(t)?Rb(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||Tb(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0},a=0,s=0;return function(t){return function(t){var n=i.events[i.events.length-1];return a=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,r=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===r?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),Cb(t)?Rb(e,c,"whitespace")(t):c(t))}function c(n){return null===n||Tb(n)?(e.exit("codeFencedFence"),i.interrupt?t(n):e.check(vw,h,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||Tb(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):Cb(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Rb(e,d,"whitespace")(t)):96===t&&t===r?n(t):(e.consume(t),u)}function d(t){return null===t||Tb(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||Tb(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===r?n(t):(e.consume(t),p)}function h(t){return e.attempt(o,y,f)(t)}function f(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&Cb(t)?Rb(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||Tb(t)?e.check(vw,h,y)(t):(e.enter("codeFlowValue"),v(t))}function v(t){return null===t||Tb(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),v)}function y(n){return e.exit("codeFenced"),t(n)}},concrete:!0};var bw=document.createElement("i");function ww(e){var t="&"+e+";";bw.innerHTML=t;var n=bw.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}var xw={name:"characterReference",tokenize:function(e,t,n){var r,i,o=this,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),r=31,i=yb,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=Sb,c):(e.enter("characterReferenceValue"),r=7,i=xb,c(t))}function c(s){if(59===s&&a){var l=e.exit("characterReferenceValue");return i!==yb||ww(o.sliceSerialize(l))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return i(s)&&a++<r?(e.consume(s),c):n(s)}}};var Sw={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Eb(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};var Ew={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Rb(e,t,"linePrefix")}}};var Tw={name:"labelEnd",tokenize:function(e,t,n){var r,i,o=this,a=o.events.length;for(;a--;)if(("labelImage"===o.events[a][1].type||"labelLink"===o.events[a][1].type)&&!o.events[a][1]._balanced){r=o.events[a][1];break}return function(t){if(!r)return n(t);if(r._inactive)return u(t);return i=o.parser.defined.includes(ow(o.sliceSerialize({start:r.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(Pw,c,i?c:u)(t):91===t?e.attempt(Cw,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(kw,c,u)(t)}function c(e){return t(e)}function u(e){return r._balanced=!0,n(e)}},resolveTo:function(e,t){var n,r,i,o,a=e.length,s=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(i=a);var l={type:"labelLink"===e[r][1].type?"link":"image",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[r][1].start),end:Object.assign({},e[i][1].end)},u={type:"labelText",start:Object.assign({},e[r+s+2][1].end),end:Object.assign({},e[i-2][1].start)};return o=hb(o=[["enter",l,t],["enter",c,t]],e.slice(r+1,r+s+3)),o=hb(o,[["enter",u,t]]),o=hb(o,qb(t.parser.constructs.insideSpan.null,e.slice(r+s+4,i-3),t)),o=hb(o,[["exit",u,t],e[i-2],e[i-1],["exit",c,t]]),o=hb(o,e.slice(i+1)),o=hb(o,[["exit",l,t]]),pb(e,r,e.length,o),e},resolveAll:function(e){var t=-1;for(;++t<e.length;){var n=e[t][1];"labelImage"!==n.type&&"labelLink"!==n.type&&"labelEnd"!==n.type||(e.splice(t+1,"labelImage"===n.type?4:2),n.type="data",t++)}return e}},Pw={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Pb(t)?iw(e,i)(t):i(t)}function i(t){return 41===t?c(t):tw(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return Pb(t)?iw(e,s)(t):c(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?rw(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return Pb(t)?iw(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Cw={tokenize:function(e,t,n){var r=this;return function(t){return nw.call(r,e,i,o,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(ow(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},kw={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};var Ow={name:"labelStartImage",tokenize:function(e,t,n){var r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:Tw.resolveAll};function _w(e){return null===e||Pb(e)||Ob(e)?1:kb(e)?2:void 0}var Rw={name:"attention",tokenize:function(e,t){var n,r=this.parser.constructs.attentionMarkers.null,i=this.previous,o=_w(i);return function(t){return n=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===n)return e.consume(s),a;var l=e.exit("attentionSequence"),c=_w(s),u=!c||2===c&&o||r.includes(s),d=!o||2===o&&c||r.includes(i);return l._open=Boolean(42===n?u:u&&(o||!d)),l._close=Boolean(42===n?d:d&&(c||!u)),t(s)}},resolveAll:function(e,t){var n,r,i,o,a,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;var d=Object.assign({},e[n][1].end),p=Object.assign({},e[u][1].start);Aw(d,-s),Aw(p,s),o={type:s>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[n][1].end)},a={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[u][1].start),end:p},i={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[u][1].start)},r={type:s>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},a.end)},e[n][1].end=Object.assign({},o.start),e[u][1].start=Object.assign({},a.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=hb(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=hb(l,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",i,t]]),l=hb(l,qb(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=hb(l,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=hb(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,pb(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e}};function Aw(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Dw={name:"autolink",tokenize:function(e,t,n){var r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return vb(t)?(e.consume(t),o):l(t)}function o(e){return 43===e||45===e||46===e||yb(e)?(r=1,a(e)):l(e)}function a(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||yb(t))&&r++<32?(e.consume(t),a):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||wb(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):bb(t)?(e.consume(t),l):n(t)}function c(e){return yb(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||yb(t))&&r++<63){var i=45===t?d:u;return e.consume(t),i}return n(t)}}};var Iw={name:"htmlText",tokenize:function(e,t,n){var r,i,o,a=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),w):63===t?(e.consume(t),y):vb(t)?(e.consume(t),E):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,h):vb(t)?(e.consume(t),v):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):Tb(t)?(o=u,D(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?A(e):45===e?d(e):u(e)}function h(t){var r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?f:h):n(t)}function f(t){return null===t?n(t):93===t?(e.consume(t),m):Tb(t)?(o=f,D(t)):(e.consume(t),f)}function m(t){return 93===t?(e.consume(t),g):f(t)}function g(t){return 62===t?A(t):93===t?(e.consume(t),g):f(t)}function v(t){return null===t||62===t?A(t):Tb(t)?(o=v,D(t)):(e.consume(t),v)}function y(t){return null===t?n(t):63===t?(e.consume(t),b):Tb(t)?(o=y,D(t)):(e.consume(t),y)}function b(e){return 62===e?A(e):y(e)}function w(t){return vb(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||yb(t)?(e.consume(t),x):S(t)}function S(t){return Tb(t)?(o=S,D(t)):Cb(t)?(e.consume(t),S):A(t)}function E(t){return 45===t||yb(t)?(e.consume(t),E):47===t||62===t||Pb(t)?T(t):n(t)}function T(t){return 47===t?(e.consume(t),A):58===t||95===t||vb(t)?(e.consume(t),P):Tb(t)?(o=T,D(t)):Cb(t)?(e.consume(t),T):A(t)}function P(t){return 45===t||46===t||58===t||95===t||yb(t)?(e.consume(t),P):C(t)}function C(t){return 61===t?(e.consume(t),k):Tb(t)?(o=C,D(t)):Cb(t)?(e.consume(t),C):T(t)}function k(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,O):Tb(t)?(o=k,D(t)):Cb(t)?(e.consume(t),k):(e.consume(t),_)}function O(t){return t===r?(e.consume(t),r=void 0,R):null===t?n(t):Tb(t)?(o=O,D(t)):(e.consume(t),O)}function _(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Pb(t)?T(t):(e.consume(t),_)}function R(e){return 47===e||62===e||Pb(e)?T(e):n(e)}function A(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function D(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I}function I(t){return Cb(t)?Rb(e,M,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):M(t)}function M(t){return e.enter("htmlTextData"),o(t)}}};var Mw={name:"labelStartLink",tokenize:function(e,t,n){var r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:Tw.resolveAll};var Lw={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Tb(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};var jw,Nw,Fw,Bw,zw,Hw={name:"codeText",tokenize:function(e,t,n){var r,i,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),o++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(i=e.enter("codeTextSequence"),r=0,c(t)):Tb(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||Tb(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",l(n))}},resolve:function(e){var t,n,r=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}t=i-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};function Uw(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vw=(Uw(jw={},42,Jb),Uw(jw,43,Jb),Uw(jw,45,Jb),Uw(jw,48,Jb),Uw(jw,49,Jb),Uw(jw,50,Jb),Uw(jw,51,Jb),Uw(jw,52,Jb),Uw(jw,53,Jb),Uw(jw,54,Jb),Uw(jw,55,Jb),Uw(jw,56,Jb),Uw(jw,57,Jb),Uw(jw,62,ew),jw),Ww=Uw({},91,aw),Gw=(Uw(Nw={},-2,lw),Uw(Nw,-1,lw),Uw(Nw,32,lw),Nw),qw=(Uw(Fw={},35,uw),Uw(Fw,42,Kb),Uw(Fw,45,[dw,Kb]),Uw(Fw,60,fw),Uw(Fw,61,dw),Uw(Fw,95,Kb),Uw(Fw,96,yw),Uw(Fw,126,yw),Fw),Xw=(Uw(Bw={},38,xw),Uw(Bw,92,Sw),Bw),Zw=(Uw(zw={},-5,Ew),Uw(zw,-4,Ew),Uw(zw,-3,Ew),Uw(zw,33,Ow),Uw(zw,38,xw),Uw(zw,42,Rw),Uw(zw,60,[Dw,Iw]),Uw(zw,91,Mw),Uw(zw,92,[Lw,Sw]),Uw(zw,93,Tw),Uw(zw,95,Rw),Uw(zw,96,Hw),zw),Yw={null:[Rw,zb]},Kw={null:[42,95]},Jw={null:[]};function Qw(e){return function(e){if(Array.isArray(e))return $w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return $w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $w(e,t)}(e)||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 $w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ex(e){var n=function(e){for(var t={},n=-1;++n<e.length;)mb(t,e[n]);return t}([t].concat(Qw((e||{}).extensions||[]))),r={defined:[],lazy:{},constructs:n,content:i(Ab),document:i(Db),flow:i(Bb),string:i(Hb),text:i(Ub)};return r;function i(e){return function(t){return Yb(r,e,t)}}}var tx=/[\0\t\n\r]/g;function nx(e,t){var n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535==(65535&n)||65534==(65535&n)||n>1114111?"�":String.fromCharCode(n)}var rx=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ix(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){var r=n.charCodeAt(1),i=120===r||88===r;return nx(n.slice(i?2:1),i?16:10)}return ww(n)||e}function ox(e){return function(e){if(Array.isArray(e))return ax(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ax(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ax(e,t)}(e)||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 ax(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var sx={}.hasOwnProperty,lx=function(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){var t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ne),autolinkProtocol:k,autolinkEmail:k,atxHeading:s(Q),blockQuote:s(X),characterEscape:k,characterReference:k,codeFenced:s(Z),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(Z,l),codeText:s(Y,l),codeTextData:k,data:k,codeFlowValue:k,definition:s(K),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(J),hardBreakEscape:s($),hardBreakTrailing:s($),htmlFlow:s(ee,l),htmlFlowData:k,htmlText:s(ee,l),htmlTextData:k,image:s(te),label:l,link:s(ne),listItem:s(ie),listItemValue:f,listOrdered:s(re,h),listUnordered:s(re),paragraph:s(oe),reference:H,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(Q),strong:s(ae),thematicBreak:s(le)},exit:{atxHeading:u(),atxHeadingSequence:E,autolink:u(),autolinkEmail:q,autolinkProtocol:G,blockQuote:u(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:W,codeFenced:u(y),codeFencedFence:v,codeFencedFenceInfo:m,codeFencedFenceMeta:g,codeFlowValue:O,codeIndented:u(b),codeText:u(I),codeTextData:O,data:O,definition:u(),definitionDestinationString:S,definitionLabelString:w,definitionTitleString:x,emphasis:u(),hardBreakEscape:u(R),hardBreakTrailing:u(R),htmlFlow:u(A),htmlFlowData:O,htmlText:u(D),htmlTextData:O,image:u(L),label:N,labelText:j,lineEnding:_,link:u(M),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:U,resourceDestinationString:F,resourceTitleString:B,resource:z,setextHeading:u(C),setextHeadingLineSequence:P,setextHeadingText:T,strong:u(),thematicBreak:u()}};ux(t,(e||{}).mdastExtensions||[]);var n={};return r;function r(e){for(var n={type:"root",children:[]},r={stack:[n],tokenStack:[],config:t,enter:c,exit:d,buffer:l,resume:p,setData:o,getData:a},s=[],u=-1;++u<e.length;){if("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)if("enter"===e[u][0])s.push(u);else u=i(e,s.pop(),u)}for(u=-1;++u<e.length;){var h=t[e[u][0]];sx.call(h,e[u][1].type)&&h[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},r),e[u][1])}if(r.tokenStack.length>0){var f=r.tokenStack[r.tokenStack.length-1];(f[1]||px).call(r,void 0,f[0])}for(n.position={start:cx(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:cx(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)n=t.transforms[u](n)||n;return n}function i(e,t,n){for(var r,i,o,a,s=t-1,l=-1,c=!1;++s<=n;){var u=e[s];if("listUnordered"===u[1].type||"listOrdered"===u[1].type||"blockQuote"===u[1].type?("enter"===u[0]?l++:l--,a=void 0):"lineEndingBlank"===u[1].type?"enter"===u[0]&&(!r||a||l||o||(o=s),a=void 0):"linePrefix"===u[1].type||"listItemValue"===u[1].type||"listItemMarker"===u[1].type||"listItemPrefix"===u[1].type||"listItemPrefixWhitespace"===u[1].type||(a=void 0),!l&&"enter"===u[0]&&"listItemPrefix"===u[1].type||-1===l&&"exit"===u[0]&&("listUnordered"===u[1].type||"listOrdered"===u[1].type)){if(r){var d=s;for(i=void 0;d--;){var p=e[d];if("lineEnding"===p[1].type||"lineEndingBlank"===p[1].type){if("exit"===p[0])continue;i&&(e[i][1].type="lineEndingBlank",c=!0),p[1].type="lineEnding",i=d}else if("linePrefix"!==p[1].type&&"blockQuotePrefix"!==p[1].type&&"blockQuotePrefixWhitespace"!==p[1].type&&"blockQuoteMarker"!==p[1].type&&"listItemIndent"!==p[1].type)break}o&&(!i||o<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:u[1].end),e.splice(i||s,0,["exit",r,u[2]]),s++,n++}"listItemPrefix"===u[1].type&&(r={type:"listItem",_spread:!1,start:Object.assign({},u[1].start),end:void 0},e.splice(s,0,["enter",r,u[2]]),s++,n++,o=void 0,a=!0)}}return e[t][1]._spread=c,n}function o(e,t){n[e]=t}function a(e){return n[e]}function s(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(e,t,n){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:cx(t.start)},e}function u(e){return t;function t(t){e&&e.call(this,t),d.call(this,t)}}function d(e,t){var n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+fy({start:e.start,end:e.end})+"): it’s not open");return r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||px).call(this,e,r[0])),n.position.end=cx(e.end),n}function p(){return function(e,t){var n=t||sb;return lb(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}(this.stack.pop())}function h(){o("expectingFirstListItemValue",!0)}function f(e){a("expectingFirstListItemValue")&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),o("expectingFirstListItemValue"))}function m(){var e=this.resume();this.stack[this.stack.length-1].lang=e}function g(){var e=this.resume();this.stack[this.stack.length-1].meta=e}function v(){a("flowCodeInside")||(this.buffer(),o("flowCodeInside",!0))}function y(){var e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),o("flowCodeInside")}function b(){var e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function w(e){var t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ow(this.sliceSerialize(e)).toLowerCase()}function x(){var e=this.resume();this.stack[this.stack.length-1].title=e}function S(){var e=this.resume();this.stack[this.stack.length-1].url=e}function E(e){var t=this.stack[this.stack.length-1];if(!t.depth){var n=this.sliceSerialize(e).length;t.depth=n}}function T(){o("setextHeadingSlurpLineEnding",!0)}function P(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2}function C(){o("setextHeadingSlurpLineEnding")}function k(e){var t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];n&&"text"===n.type||((n=se()).position={start:cx(e.start)},t.children.push(n)),this.stack.push(n)}function O(e){var t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=cx(e.end)}function _(e){var n=this.stack[this.stack.length-1];if(a("atHardBreak"))return n.children[n.children.length-1].position.end=cx(e.end),void o("atHardBreak");!a("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(n.type)&&(k.call(this,e),O.call(this,e))}function R(){o("atHardBreak",!0)}function A(){var e=this.resume();this.stack[this.stack.length-1].value=e}function D(){var e=this.resume();this.stack[this.stack.length-1].value=e}function I(){var e=this.resume();this.stack[this.stack.length-1].value=e}function M(){var e=this.stack[this.stack.length-1];if(a("inReference")){var t=a("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;o("referenceType")}function L(){var e=this.stack[this.stack.length-1];if(a("inReference")){var t=a("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;o("referenceType")}function j(e){var t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(rx,ix)}(t),n.identifier=ow(t).toLowerCase()}function N(){var e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(o("inReference",!0),"link"===n.type){var r=e.children;n.children=r}else n.alt=t}function F(){var e=this.resume();this.stack[this.stack.length-1].url=e}function B(){var e=this.resume();this.stack[this.stack.length-1].title=e}function z(){o("inReference")}function H(){o("referenceType","collapsed")}function U(e){var t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ow(this.sliceSerialize(e)).toLowerCase(),o("referenceType","full")}function V(e){o("characterReferenceType",e.type)}function W(e){var t,n=this.sliceSerialize(e),r=a("characterReferenceType");r?(t=nx(n,"characterReferenceMarkerNumeric"===r?10:16),o("characterReferenceType")):t=ww(n);var i=this.stack.pop();i.value+=t,i.position.end=cx(e.end)}function G(e){O.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function q(e){O.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function X(){return{type:"blockquote",children:[]}}function Z(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function K(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function J(){return{type:"emphasis",children:[]}}function Q(){return{type:"heading",depth:void 0,children:[]}}function $(){return{type:"break"}}function ee(){return{type:"html",value:""}}function te(){return{type:"image",title:null,url:"",alt:null}}function ne(){return{type:"link",title:null,url:"",children:[]}}function re(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function ie(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ae(){return{type:"strong",children:[]}}function se(){return{type:"text",value:""}}function le(){return{type:"thematicBreak"}}}(n)(function(e){for(;!Lb(e););return e}(ex(n).document().write(function(){var e,t=1,n="",r=!0;return function(i,o,a){var s,l,c,u,d,p=[];for(i=n+i.toString(o),c=0,n="",r&&(65279===i.charCodeAt(0)&&c++,r=void 0);c<i.length;){if(tx.lastIndex=c,u=(s=tx.exec(i))&&void 0!==s.index?s.index:i.length,d=i.charCodeAt(u),!s){n=i.slice(c);break}if(10===d&&c===u&&e)p.push(-3),e=void 0;else switch(e&&(p.push(-5),e=void 0),c<u&&(p.push(i.slice(c,u)),t+=u-c),d){case 0:p.push(65533),t++;break;case 9:for(l=4*Math.ceil(t/4),p.push(-2);t++<l;)p.push(-1);break;case 10:p.push(-4),t=1;break;default:e=!0,t=1}c=u+1}return a&&(e&&p.push(-5),n&&p.push(n),p.push(null)),p}}()(e,t,!0))))};function cx(e){return{line:e.line,column:e.column,offset:e.offset}}function ux(e,t){for(var n=-1;++n<t.length;){var r=t[n];Array.isArray(r)?ux(e,r):dx(e,r)}}function dx(e,t){var n;for(n in t)if(sx.call(t,n))if("canContainEols"===n){var r,i=t[n];if(i)(r=e[n]).push.apply(r,ox(i))}else if("transforms"===n){var o,a=t[n];if(a)(o=e[n]).push.apply(o,ox(a))}else if("enter"===n||"exit"===n){var s=t[n];s&&Object.assign(e[n],s)}}function px(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+fy({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+fy({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+fy({start:t.start,end:t.end})+") is still open")}function hx(e){var t=this;Object.assign(this,{Parser:function(n){var r=t.data("settings");return lx(n,Object.assign({},r,e,{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}})}function fx(e){for(var t=[],n=-1,r=0,i=0;++n<e.length;){var o=e.charCodeAt(n),a="";if(37===o&&yb(e.charCodeAt(n+1))&&yb(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){var s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function mx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mx(Object(n),!0).forEach((function(t){vx(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vx(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yx=function(e){if(null==e)return xx;if("string"==typeof e)return function(e){return wx(t);function t(t){return t&&t.type===e}}(e);if("object"==typeof e)return Array.isArray(e)?bx(e):function(e){return wx(t);function t(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}(e);if("function"==typeof e)return wx(e);throw new Error("Expected function, string, or object as test")};function bx(e){for(var t=[],n=-1;++n<e.length;)t[n]=yx(e[n]);return wx((function(){for(var e=-1,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(;++e<t.length;){var o;if((o=t[e]).call.apply(o,[this].concat(r)))return!0}return!1}))}function wx(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Boolean(t&&"object"==typeof t&&"type"in t&&Boolean(e.call.apply(e,[this,t].concat(r))))}}function xx(){return!0}var Sx=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null);var i=yx(t),o=r?-1:1;!function e(a,s,l){var c=a&&"object"==typeof a?a:{};if("string"==typeof c.type){var u="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(d,"name",{value:"node ("+a.type+(u?"<"+u+">":"")+")"})}return d;function d(){var c,u,d,p=[];if((!t||i(a,s,l[l.length-1]||null))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[true,e];return[e]}(n(a,l)),false===p[0]))return p;if(a.children&&"skip"!==p[0])for(u=(r?a.children.length:-1)+o,d=l.concat(a);u>-1&&u<a.children.length;){if(false===(c=e(a.children[u],u,d)())[0])return c;u="number"==typeof c[1]?c[1]:u+o}return p}}(e,void 0,[])()};var Ex=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),Sx(e,t,(function(e,t){var r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)}),r)},Tx=Cx("start"),Px=Cx("end");function Cx(e){return function(t){var n=t&&t.position&&t.position[e]||{};return{line:n.line||null,column:n.column||null,offset:n.offset>-1?n.offset:null}}}var kx={}.hasOwnProperty;function Ox(e){return String(e||"").toUpperCase()}function _x(e,t){var n,r=String(t.identifier).toUpperCase(),i=fx(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);-1===o?(e.footnoteOrder.push(r),e.footnoteCounts[r]=1,n=e.footnoteOrder.length):(e.footnoteCounts[r]++,n=o+1);var a=e.footnoteCounts[r],s={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+i,id:e.clobberPrefix+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,s);var l={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,l),e.applyData(t,l)}function Rx(e,t){var n=t.referenceType,r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return{type:"text",value:"!["+t.alt+r};var i=e.all(t),o=i[0];o&&"text"===o.type?o.value="["+o.value:i.unshift({type:"text",value:"["});var a=i[i.length-1];return a&&"text"===a.type?a.value+=r:i.push({type:"text",value:r}),i}function Ax(e){return function(e){if(Array.isArray(e))return Dx(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Dx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dx(e,t)}(e)||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 Dx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ix(e){var t=e.spread;return null==t?e.children.length>1:t}var Mx=9,Lx=32;function jx(e){for(var t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,o=[];r;)o.push(Nx(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Nx(t.slice(i),i>0,!1)),o.join("")}function Nx(e,t,n){var r=0,i=e.length;if(t)for(var o=e.codePointAt(r);o===Mx||o===Lx;)r++,o=e.codePointAt(r);if(n)for(var a=e.codePointAt(i-1);a===Mx||a===Lx;)i--,a=e.codePointAt(i-1);return i>r?e.slice(r,i):""}var Fx={blockquote:function(e,t){var n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){var n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){var n=t.value?t.value+"\n":"",r=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,i={};r&&(i.className=["language-"+r]);var o={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o={type:"element",tagName:"pre",properties:{},children:[o=e.applyData(t,o)]},e.patch(t,o),o},delete:function(e,t){var n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){var n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:_x,footnote:function(e,t){for(var n=e.footnoteById,r=1;r in n;)r++;var i=String(r);return n[i]={type:"footnoteDefinition",identifier:i,children:[{type:"paragraph",children:t.children}],position:t.position},_x(e,{type:"footnoteReference",identifier:i,position:t.position})},heading:function(e,t){var n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.dangerous){var n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null},imageReference:function(e,t){var n=e.definition(t.identifier);if(!n)return Rx(e,t);var r={src:fx(n.url||""),alt:t.alt};null!==n.title&&void 0!==n.title&&(r.title=n.title);var i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){var n={src:fx(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);var r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){var n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);var r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){var n=e.definition(t.identifier);if(!n)return Rx(e,t);var r={href:fx(n.url||"")};null!==n.title&&void 0!==n.title&&(r.title=n.title);var i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){var n={href:fx(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);var r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){var r=e.all(t),i=n?function(e){var t=!1;if("list"===e.type){t=e.spread||!1;for(var n=e.children,r=-1;!t&&++r<n.length;)t=Ix(n[r])}return t}(n):Ix(t),o={},a=[];if("boolean"==typeof t.checked){var s,l=r[0];l&&"element"===l.type&&"p"===l.tagName?s=l:(s={type:"element",tagName:"p",properties:{},children:[]},r.unshift(s)),s.children.length>0&&s.children.unshift({type:"text",value:" "}),s.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}for(var c=-1;++c<r.length;){var u=r[c];(i||0!==c||"element"!==u.type||"p"!==u.tagName)&&a.push({type:"text",value:"\n"}),"element"!==u.type||"p"!==u.tagName||i?a.push(u):a.push.apply(a,Ax(u.children))}var d=r[r.length-1];d&&(i||"element"!==d.type||"p"!==d.tagName)&&a.push({type:"text",value:"\n"});var p={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,p),e.applyData(t,p)},list:function(e,t){var n={},r=e.all(t),i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){var o=r[i];if("element"===o.type&&"li"===o.tagName&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}var a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)},paragraph:function(e,t){var n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){var n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){var n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){var n=e.all(t),r=n.shift(),i=[];if(r){var o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){var a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Tx(t.children[1]),l=Px(t.children[t.children.length-1]);s.line&&l.line&&(a.position={start:s,end:l}),i.push(a)}var c={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,c),e.applyData(t,c)},tableCell:function(e,t){var n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){for(var r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,a=o?o.length:t.children.length,s=-1,l=[];++s<a;){var c=t.children[s],u={},d=o?o[s]:void 0;d&&(u.align=d);var p={type:"element",tagName:i,properties:u,children:[]};c&&(p.children=e.all(c),e.patch(c,p),p=e.applyData(t,p)),l.push(p)}var h={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,h),e.applyData(t,h)},text:function(e,t){var n={type:"text",value:jx(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){var n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Bx,yaml:Bx,definition:Bx,footnoteDefinition:Bx};function Bx(){return null}function zx(e){return function(e){if(Array.isArray(e))return Hx(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Hx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hx(e,t)}(e)||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 Hx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ux(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ux(Object(n),!0).forEach((function(t){Wx(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ux(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Wx(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Gx={}.hasOwnProperty;function qx(e,t){var n=t||{},r=n.allowDangerousHtml||!1,i={};return a.dangerous=r,a.clobberPrefix=void 0===n.clobberPrefix||null===n.clobberPrefix?"user-content-":n.clobberPrefix,a.footnoteLabel=n.footnoteLabel||"Footnotes",a.footnoteLabelTagName=n.footnoteLabelTagName||"h2",a.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},a.footnoteBackLabel=n.footnoteBackLabel||"Back to content",a.unknownHandler=n.unknownHandler,a.passThrough=n.passThrough,a.handlers=Vx(Vx({},Fx),n.handlers),a.definition=function(e){var t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return Ex(e,"definition",(function(e){var n=Ox(e.identifier);n&&!kx.call(t,n)&&(t[n]=e)})),function(e){var n=Ox(e);return n&&kx.call(t,n)?t[n]:null}}(e),a.footnoteById=i,a.footnoteOrder=[],a.footnoteCounts={},a.patch=Xx,a.applyData=Zx,a.one=function(e,t){return Yx(a,e,t)},a.all=function(e){return Kx(a,e)},a.wrap=Jx,a.augment=o,Ex(e,"footnoteDefinition",(function(e){var t=String(e.identifier).toUpperCase();Gx.call(i,t)||(i[t]=e)})),a;function o(e,t){if(e&&"data"in e&&e.data){var n=e.data;n.hName&&("element"!==t.type&&(t={type:"element",tagName:"",properties:{},children:[]}),t.tagName=n.hName),"element"===t.type&&n.hProperties&&(t.properties=Vx(Vx({},t.properties),n.hProperties)),"children"in t&&t.children&&n.hChildren&&(t.children=n.hChildren)}if(e){var r="type"in e?e:{position:e};(function(e){return!(e&&e.position&&e.position.start&&e.position.start.line&&e.position.start.column&&e.position.end&&e.position.end.line&&e.position.end.column)})(r)||(t.position={start:Tx(r),end:Px(r)})}return t}function a(e,t,n,r){return Array.isArray(n)&&(r=n,n={}),o(e,{type:"element",tagName:t,properties:n||{},children:r||[]})}}function Xx(e,t){e.position&&(t.position=function(e){return{start:Tx(e),end:Px(e)}}(e))}function Zx(e,t){var n=t;if(e&&e.data){var r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;"string"==typeof r&&("element"===n.type?n.tagName=r:n={type:"element",tagName:r,properties:{},children:[]}),"element"===n.type&&o&&(n.properties=Vx(Vx({},n.properties),o)),"children"in n&&n.children&&null!=i&&(n.children=i)}return n}function Yx(e,t,n){var r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return Gx.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?Vx(Vx({},t),{},{children:Kx(e,t)}):t:e.unknownHandler?e.unknownHandler(e,t,n):function(e,t){var n=t.data||{},r=!("value"in t)||Gx.call(n,"hProperties")||Gx.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:Kx(e,t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}(e,t)}function Kx(e,t){var n=[];if("children"in t)for(var r=t.children,i=-1;++i<r.length;){var o=Yx(e,r[i],t);if(o){if(i&&"break"===r[i-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=o.value.replace(/^\s+/,"")),!Array.isArray(o)&&"element"===o.type)){var a=o.children[0];a&&"text"===a.type&&(a.value=a.value.replace(/^\s+/,""))}Array.isArray(o)?n.push.apply(n,zx(o)):n.push(o)}}return n}function Jx(e,t){var n=[],r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Qx(e,t){var n=qx(e,t),r=n.one(e,null),i=function(e){for(var t=[],n=-1;++n<e.footnoteOrder.length;){var r=e.footnoteById[e.footnoteOrder[n]];if(r){for(var i=e.all(r),o=String(r.identifier).toUpperCase(),a=fx(o.toLowerCase()),s=0,l=[];++s<=e.footnoteCounts[o];){var c={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fnref-"+a+(s>1?"-"+s:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};s>1&&c.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(s)}]}),l.length>0&&l.push({type:"text",value:" "}),l.push(c)}var u=i[i.length-1];if(u&&"element"===u.type&&"p"===u.tagName){var d,p=u.children[u.children.length-1];p&&"text"===p.type?p.value+=" ":u.children.push({type:"text",value:" "}),(d=u.children).push.apply(d,l)}else i.push.apply(i,l);var h={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+a},children:e.wrap(i,!0)};e.patch(r,h),t.push(h)}}if(0!==t.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:gx(gx({},JSON.parse(JSON.stringify(e.footnoteLabelProperties))),{},{id:"footnote-label"}),children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:"\n"}]}}(n);return i&&r.children.push({type:"text",value:"\n"},i),Array.isArray(r)?{type:"root",children:r}:r}const $x=function(e,t){return e&&"run"in e?function(e,t){return function(n,r,i){e.run(Qx(n,t),r,(function(e){i(e)}))}}(e,t):function(e){return function(t){return Qx(t,e)}}(e||t)};var eS=i(7833);function tS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rS(r.key),r)}}function nS(e,t,n){return t&&tS(e.prototype,t),n&&tS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function rS(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var iS=nS((function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.property=t,this.normal=n,r&&(this.space=r)}));function oS(e,t){for(var n={},r={},i=-1;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new iS(n,r,t)}function aS(e){return e.toLowerCase()}function sS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cS(r.key),r)}}function lS(e,t,n){return t&&sS(e.prototype,t),n&&sS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function cS(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}iS.prototype.property={},iS.prototype.normal={},iS.prototype.space=null;var uS=lS((function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.property=t,this.attribute=n}));uS.prototype.space=null,uS.prototype.boolean=!1,uS.prototype.booleanish=!1,uS.prototype.overloadedBoolean=!1,uS.prototype.number=!1,uS.prototype.commaSeparated=!1,uS.prototype.spaceSeparated=!1,uS.prototype.commaOrSpaceSeparated=!1,uS.prototype.mustUseProperty=!1,uS.prototype.defined=!1;var dS=0,pS=bS(),hS=bS(),fS=bS(),mS=bS(),gS=bS(),vS=bS(),yS=bS();function bS(){return Math.pow(2,++dS)}function wS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xS(r.key),r)}}function xS(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function SS(e,t){return SS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},SS(e,t)}function ES(e){var t=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(e){return!1}}();return function(){var n,r=PS(e);if(t){var i=PS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return TS(e)}(this,n)}}function TS(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PS(e){return PS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},PS(e)}var CS=Object.keys(n),kS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&SS(e,t)}(a,e);var t,r,i,o=ES(a);function a(e,t,r,i){var s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);var l=-1;if(OS(TS(s=o.call(this,e,t)),"space",i),"number"==typeof r)for(;++l<CS.length;){var c=CS[l];OS(TS(s),CS[l],(r&n[c])===n[c])}return s}return t=a,r&&wS(t.prototype,r),i&&wS(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(uS);function OS(e,t,n){n&&(e[t]=n)}kS.prototype.defined=!0;var _S={}.hasOwnProperty;function RS(e){var t,n={},r={};for(t in e.properties)if(_S.call(e.properties,t)){var i=e.properties[t],o=new kS(t,e.transform(e.attributes||{},t),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(t)&&(o.mustUseProperty=!0),n[t]=o,r[aS(t)]=t,r[aS(o.attribute)]=t}return new iS(n,r,e.space)}var AS=RS({space:"xlink",transform:function(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),DS=RS({space:"xml",transform:function(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function IS(e,t){return t in e?e[t]:t}function MS(e,t){return IS(e,t.toLowerCase())}var LS=RS({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:MS,properties:{xmlns:null,xmlnsXLink:null}}),jS=RS({transform:function(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:hS,ariaAutoComplete:null,ariaBusy:hS,ariaChecked:hS,ariaColCount:mS,ariaColIndex:mS,ariaColSpan:mS,ariaControls:gS,ariaCurrent:null,ariaDescribedBy:gS,ariaDetails:null,ariaDisabled:hS,ariaDropEffect:gS,ariaErrorMessage:null,ariaExpanded:hS,ariaFlowTo:gS,ariaGrabbed:hS,ariaHasPopup:null,ariaHidden:hS,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:gS,ariaLevel:mS,ariaLive:null,ariaModal:hS,ariaMultiLine:hS,ariaMultiSelectable:hS,ariaOrientation:null,ariaOwns:gS,ariaPlaceholder:null,ariaPosInSet:mS,ariaPressed:hS,ariaReadOnly:hS,ariaRelevant:null,ariaRequired:hS,ariaRoleDescription:gS,ariaRowCount:mS,ariaRowIndex:mS,ariaRowSpan:mS,ariaSelected:hS,ariaSetSize:mS,ariaSort:null,ariaValueMax:mS,ariaValueMin:mS,ariaValueNow:mS,ariaValueText:null,role:null}}),NS=RS({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:MS,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:vS,acceptCharset:gS,accessKey:gS,action:null,allow:null,allowFullScreen:pS,allowPaymentRequest:pS,allowUserMedia:pS,alt:null,as:null,async:pS,autoCapitalize:null,autoComplete:gS,autoFocus:pS,autoPlay:pS,blocking:gS,capture:null,charSet:null,checked:pS,cite:null,className:gS,cols:mS,colSpan:null,content:null,contentEditable:hS,controls:pS,controlsList:gS,coords:mS|vS,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pS,defer:pS,dir:null,dirName:null,disabled:pS,download:fS,draggable:hS,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pS,formTarget:null,headers:gS,height:mS,hidden:pS,high:mS,href:null,hrefLang:null,htmlFor:gS,httpEquiv:gS,id:null,imageSizes:null,imageSrcSet:null,inert:pS,inputMode:null,integrity:null,is:null,isMap:pS,itemId:null,itemProp:gS,itemRef:gS,itemScope:pS,itemType:gS,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pS,low:mS,manifest:null,max:null,maxLength:mS,media:null,method:null,min:null,minLength:mS,multiple:pS,muted:pS,name:null,nonce:null,noModule:pS,noValidate:pS,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:pS,optimum:mS,pattern:null,ping:gS,placeholder:null,playsInline:pS,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pS,referrerPolicy:null,rel:gS,required:pS,reversed:pS,rows:mS,rowSpan:mS,sandbox:gS,scope:null,scoped:pS,seamless:pS,selected:pS,shadowRootClonable:pS,shadowRootDelegatesFocus:pS,shadowRootMode:null,shape:null,size:mS,sizes:null,slot:null,span:mS,spellCheck:hS,src:null,srcDoc:null,srcLang:null,srcSet:null,start:mS,step:null,style:null,tabIndex:mS,target:null,title:null,translate:null,type:null,typeMustMatch:pS,useMap:null,value:hS,width:mS,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:gS,axis:null,background:null,bgColor:null,border:mS,borderColor:null,bottomMargin:mS,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pS,declare:pS,event:null,face:null,frame:null,frameBorder:null,hSpace:mS,leftMargin:mS,link:null,longDesc:null,lowSrc:null,marginHeight:mS,marginWidth:mS,noResize:pS,noHref:pS,noShade:pS,noWrap:pS,object:null,profile:null,prompt:null,rev:null,rightMargin:mS,rules:null,scheme:null,scrolling:hS,standby:null,summary:null,text:null,topMargin:mS,valueType:null,version:null,vAlign:null,vLink:null,vSpace:mS,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pS,disableRemotePlayback:pS,prefix:null,property:null,results:mS,security:null,unselectable:null}}),FS=RS({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:IS,properties:{about:yS,accentHeight:mS,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:mS,amplitude:mS,arabicForm:null,ascent:mS,attributeName:null,attributeType:null,azimuth:mS,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:mS,by:null,calcMode:null,capHeight:mS,className:gS,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:mS,diffuseConstant:mS,direction:null,display:null,dur:null,divisor:mS,dominantBaseline:null,download:pS,dx:null,dy:null,edgeMode:null,editable:null,elevation:mS,enableBackground:null,end:null,event:null,exponent:mS,externalResourcesRequired:null,fill:null,fillOpacity:mS,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:vS,g2:vS,glyphName:vS,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:mS,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:mS,horizOriginX:mS,horizOriginY:mS,id:null,ideographic:mS,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:mS,k:mS,k1:mS,k2:mS,k3:mS,k4:mS,kernelMatrix:yS,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:mS,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:mS,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:mS,overlineThickness:mS,paintOrder:null,panose1:null,path:null,pathLength:mS,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:gS,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:mS,pointsAtY:mS,pointsAtZ:mS,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:yS,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:yS,rev:yS,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:yS,requiredFeatures:yS,requiredFonts:yS,requiredFormats:yS,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:mS,specularExponent:mS,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:mS,strikethroughThickness:mS,string:null,stroke:null,strokeDashArray:yS,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:mS,strokeOpacity:mS,strokeWidth:null,style:null,surfaceScale:mS,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:yS,tabIndex:mS,tableValues:null,target:null,targetX:mS,targetY:mS,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:yS,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:mS,underlineThickness:mS,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:mS,values:null,vAlphabetic:mS,vMathematical:mS,vectorEffect:null,vHanging:mS,vIdeographic:mS,version:null,vertAdvY:mS,vertOriginX:mS,vertOriginY:mS,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:mS,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),BS=oS([DS,AS,LS,jS,NS],"html"),zS=oS([DS,AS,LS,jS,FS],"svg"),HS=function(e){if(null==e)return VS;if("string"==typeof e)return function(e){return US(t);function t(t){return t&&t.type===e}}(e);if("object"==typeof e)return Array.isArray(e)?function(e){var t=[],n=-1;for(;++n<e.length;)t[n]=HS(e[n]);return US(r);function r(){for(var e=-1,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(;++e<t.length;){var o;if((o=t[e]).call.apply(o,[this].concat(r)))return!0}return!1}}(e):function(e){return US(t);function t(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}(e);if("function"==typeof e)return US(e);throw new Error("Expected function, string, or object as test")};function US(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Boolean(t&&"object"==typeof t&&"type"in t&&Boolean(e.call.apply(e,[this,t].concat(r))))}}function VS(){return!0}var WS=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null);var i=HS(t),o=r?-1:1;!function e(a,s,l){var c=a&&"object"==typeof a?a:{};if("string"==typeof c.type){var u="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(d,"name",{value:"node ("+a.type+(u?"<"+u+">":"")+")"})}return d;function d(){var c,u,d,p=[];if((!t||i(a,s,l[l.length-1]||null))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[true,e];return[e]}(n(a,l)),false===p[0]))return p;if(a.children&&"skip"!==p[0])for(u=(r?a.children.length:-1)+o,d=l.concat(a);u>-1&&u<a.children.length;){if(false===(c=e(a.children[u],u,d)())[0])return c;u="number"==typeof c[1]?c[1]:u+o}return p}}(e,void 0,[])()};var GS=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),WS(e,t,(function(e,t){var r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)}),r)};function qS(e){return function(e){if(Array.isArray(e))return XS(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return XS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XS(e,t)}(e)||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 XS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ZS(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return function(t){GS(t,"element",(function(t,n,r){var i,o=r;if(e.allowedElements?i=!e.allowedElements.includes(t.tagName):e.disallowedElements&&(i=e.disallowedElements.includes(t.tagName)),!i&&e.allowElement&&"number"==typeof n&&(i=!e.allowElement(t,n,o)),i&&"number"==typeof n){var a;if(e.unwrapDisallowed&&t.children)(a=o.children).splice.apply(a,[n,1].concat(qS(t.children)));else o.children.splice(n,1);return n}}))}}var YS=i(2169);var KS=/^data[-\w.:]+$/i,JS=/-[a-z]/g,QS=/[A-Z]/g;function $S(e){return"-"+e.toLowerCase()}function eE(e){return e.charAt(1).toUpperCase()}var tE={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};function nE(e){return function(e){if(Array.isArray(e))return rE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return rE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rE(e,t)}(e)||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 rE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const iE=i(5696);var oE=["http","https","mailto","tel"];function aE(e){var t=(e||"").trim(),n=t.charAt(0);if("#"===n||"/"===n)return t;var r=t.indexOf(":");if(-1===r)return t;for(var i=-1;++i<oE.length;){var o=oE[i];if(r===o.length&&t.slice(0,o.length).toLowerCase()===o)return t}return-1!==(i=t.indexOf("?"))&&r>i||-1!==(i=t.indexOf("#"))&&r>i?t:"javascript:void(0)"}var sE={}.hasOwnProperty,lE=new Set(["table","thead","tbody","tfoot","tr"]);function cE(e,t){for(var n,r,i,o=[],a=-1;++a<t.children.length;)"element"===(n=t.children[a]).type?o.push(uE(e,n,a,t)):"text"===n.type?"element"===t.type&&lE.has(t.tagName)&&(i=void 0,"string"==typeof(i=(r=n)&&"object"==typeof r&&"text"===r.type?r.value||"":r)&&""===i.replace(/[ \t\n\f\r]/g,""))||o.push(n.value):"raw"!==n.type||e.options.skipHtml||o.push(n.value);return o}function uE(e,t,n,i){var o,a=e.options,s=void 0===a.transformLinkUri?aE:a.transformLinkUri,l=e.schema,c=t.tagName,u={},d=l;if("html"===l.space&&"svg"===c&&(d=zS,e.schema=d),t.properties)for(o in t.properties)sE.call(t.properties,o)&&pE(u,o,t.properties[o],e);"ol"!==c&&"ul"!==c||e.listDepth++;var p=cE(e,t);"ol"!==c&&"ul"!==c||e.listDepth--,e.schema=l;var h,f=t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},m=a.components&&sE.call(a.components,c)?a.components[c]:c,g="string"==typeof m||m===r.Fragment;if(!YS.isValidElementType(m))throw new TypeError("Component for name `".concat(c,"` not defined or is not renderable"));if(u.key=n,"a"===c&&a.linkTarget&&(u.target="function"==typeof a.linkTarget?a.linkTarget(String(u.href||""),t.children,"string"==typeof u.title?u.title:null):a.linkTarget),"a"===c&&s&&(u.href=s(String(u.href||""),t.children,"string"==typeof u.title?u.title:null)),g||"code"!==c||"element"!==i.type||"pre"===i.tagName||(u.inline=!0),g||"h1"!==c&&"h2"!==c&&"h3"!==c&&"h4"!==c&&"h5"!==c&&"h6"!==c||(u.level=Number.parseInt(c.charAt(1),10)),"img"===c&&a.transformImageUri&&(u.src=a.transformImageUri(String(u.src||""),String(u.alt||""),"string"==typeof u.title?u.title:null)),!g&&"li"===c&&"element"===i.type){var v=function(e){var t=-1;for(;++t<e.children.length;){var n=e.children[t];if("element"===n.type&&"input"===n.tagName)return n}return null}(t);u.checked=v&&v.properties?Boolean(v.properties.checked):null,u.index=dE(i,t),u.ordered="ol"===i.tagName}return g||"ol"!==c&&"ul"!==c||(u.ordered="ol"===c,u.depth=e.listDepth),"td"!==c&&"th"!==c||(u.align&&(u.style||(u.style={}),u.style.textAlign=u.align,delete u.align),g||(u.isHeader="th"===c)),g||"tr"!==c||"element"!==i.type||(u.isHeader=Boolean("thead"===i.tagName)),a.sourcePos&&(u["data-sourcepos"]=[(h=f).start.line,":",h.start.column,"-",h.end.line,":",h.end.column].map(String).join("")),!g&&a.rawSourcePos&&(u.sourcePosition=t.position),!g&&a.includeElementIndex&&(u.index=dE(i,t),u.siblingCount=dE(i)),g||(u.node=t),p.length>0?r.createElement(m,u,p):r.createElement(m,u)}function dE(e,t){for(var n=-1,r=0;++n<e.children.length&&e.children[n]!==t;)"element"===e.children[n].type&&r++;return r}function pE(e,t,n,r){var i=function(e,t){var n=aS(t),r=t,i=uS;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&KS.test(t)){if("-"===t.charAt(4)){var o=t.slice(5).replace(JS,eE);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{var a=t.slice(4);if(!JS.test(a)){var s=a.replace(QS,$S);"-"!==s.charAt(0)&&(s="-"+s),t="data"+s}}i=kS}return new i(r,t)}(r.schema,t),o=n;null!=o&&o==o&&(Array.isArray(o)&&(o=i.commaSeparated?function(e,t){var n=t||{};return(""===e[e.length-1]?[].concat(nE(e),[""]):e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}(o):function(e){return e.join(" ").trim()}(o)),"style"===i.property&&"string"==typeof o&&(o=function(e){var t={};try{iE(e,n)}catch(e){}return t;function n(e,n){var r="-ms-"===e.slice(0,4)?"ms-".concat(e.slice(4)):e;t[r.replace(/-([a-z])/g,hE)]=n}}(o)),i.space&&i.property?e[sE.call(tE,i.property)?tE[i.property]:i.property]=o:i.attribute&&(e[i.attribute]=o))}function hE(e,t){return t.toUpperCase()}function fE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fE(Object(n),!0).forEach((function(t){gE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gE(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vE={}.hasOwnProperty,yE={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function bE(e){for(var t in yE)if(vE.call(yE,t)&&vE.call(e,t)){var n=yE[t];console.warn("[react-markdown] Warning: please ".concat(n.to?"use `".concat(n.to,"` instead of"):"remove"," `").concat(t,"` (see <").concat("https://github.com/remarkjs/react-markdown/blob/main/changelog.md","#").concat(n.id,"> for more info)")),delete yE[t]}var i=Qy().use(hx).use(e.remarkPlugins||[]).use($x,mE(mE({},e.remarkRehypeOptions),{},{allowDangerousHtml:!0})).use(e.rehypePlugins||[]).use(ZS,e),o=new Ny;"string"==typeof e.children?o.value=e.children:void 0!==e.children&&null!==e.children&&console.warn("[react-markdown] Warning: please pass a string as `children` (not: `".concat(e.children,"`)"));var a=i.runSync(i.parse(o),o);if("root"!==a.type)throw new TypeError("Expected a `root` node");var s=r.createElement(r.Fragment,{},cE({options:e,schema:BS,listDepth:0},a));return e.className&&(s=r.createElement("div",{className:e.className},s)),s}function wE(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return xE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xE(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function xE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function SE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function EE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SE(Object(n),!0).forEach((function(t){TE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function TE(e,t,n){return(t=CE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,CE(r.key),r)}}function CE(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function kE(e,t){return kE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kE(e,t)}function OE(e){var t=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(e){return!1}}();return function(){var n,r=_E(e);if(t){var i=_E(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function _E(e){return _E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_E(e)}bE.propTypes={children:eS.string,className:eS.string,allowElement:eS.func,allowedElements:eS.arrayOf(eS.string),disallowedElements:eS.arrayOf(eS.string),unwrapDisallowed:eS.bool,remarkPlugins:eS.arrayOf(eS.oneOfType([eS.object,eS.func,eS.arrayOf(eS.oneOfType([eS.bool,eS.string,eS.object,eS.func,eS.arrayOf(eS.any)]))])),rehypePlugins:eS.arrayOf(eS.oneOfType([eS.object,eS.func,eS.arrayOf(eS.oneOfType([eS.bool,eS.string,eS.object,eS.func,eS.arrayOf(eS.any)]))])),sourcePos:eS.bool,rawSourcePos:eS.bool,skipHtml:eS.bool,includeElementIndex:eS.bool,transformLinkUri:eS.oneOfType([eS.func,eS.bool]),linkTarget:eS.oneOfType([eS.func,eS.string]),transformImageUri:eS.func,components:eS.object};var RE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kE(e,t)}(o,e);var t,n,r,i=OE(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this)).onFilterChange=function(t){var n=t.target.value;e.setState(EE(EE({},e.state),{},{filterTerm:n}))},e.state={filterTerm:""},e}return t=o,(n=[{key:"renderGlossary",value:function(){for(var e=this.props.glossary.glossary,t=this.state.filterTerm.toLowerCase(),n=function(e,t,n){var r,i=wE(e.split(n));try{for(i.s();!(r=i.n()).done;)if(r.value.startsWith(t))return!0}catch(e){i.e(e)}finally{i.f()}return!1},r=[],i=0,o=0,s=Object.values(e.entries);o<s.length;o++){var l=s[o];if(0===t.length&&l.headWord[0]===Dg[i]){var c="alpha-".concat(i);r.push(a().createElement(yg,{variant:"h4",key:"gloss-heading-".concat(Dg[i]),id:c},"—",Dg[i]," ","—")),i++}var u=l.headWord.toLowerCase(),d=l.alternateSpellings.toLowerCase(),p=l.modernSpelling.toLowerCase();if(0===t.length||0!==t.length&&n(u,t," ")||0!==t.length&&n(p,t," ")||0!==t.length&&n(d,t,", ")){var h=AE(l),f=h[h.length-1].endsWith("."),m=l.alternateSpellings?", ".concat(l.alternateSpellings):"",g=l.meanings[0].partOfSpeech,v=g?"".concat(g,":"):"",y=g?",":":",b=l.modernSpelling?" (mod. ".concat(l.modernSpelling,")"):"",w=f?"":",",x=l.seeAlso?"".concat(w," see also <span>→</span>").concat(l.seeAlso," "):"",S=l.synonym?", syn. <span>→</span>".concat(l.synonym):"",E=l.antonym?", ant. <span>→</span>".concat(l.antonym):"";r.push(a().createElement(yg,{gutterBottom:!0,key:"gloss-".concat(l.headWord)},a().createElement("u",null,l.headWord),m,b,y," ",v," ",h.map((function(e){return Fv(e)})),Fv(x),Fv(S),Fv(E)))}}return r}},{key:"render",value:function(){return this.props.glossary.loaded?a().createElement("div",{id:"glossaryView",style:{position:"relative",overflow:"auto"}},a().createElement(Hg,{side:this.props.side,onFilterChange:this.onFilterChange,value:this.state.filterTerm,documentView:this.props.documentView,documentViewActions:this.props.documentViewActions}),a().createElement("div",{id:"glossaryViewInner"},a().createElement("div",{id:"glossaryContent"},a().createElement(yg,{variant:"h2",className:"title"},"Glossary"),this.props.glossary.glossary.title&&a().createElement("div",{className:"subtitle MuiTypography-root MuiTypography-body1"},a().createElement(bE,null,this.props.glossary.glossary.title)),a().createElement("div",{className:"cite-instructions"},this.props.glossary.glossary.citation&&a().createElement(a().Fragment,null,a().createElement(yg,{className:"cite-header"},"How to Cite"),a().createElement("div",{className:"MuiTypography-root MuiTypography-body1"},a().createElement(bE,null,this.props.glossary.glossary.citation)))),this.renderGlossary()))):null}}])&&PE(t.prototype,n),r&&PE(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(r.Component);function AE(e){for(var t=[],n=0;n<e.meanings.length;n++){var r=e.meanings[n],i=r.references?" [".concat(r.references,"]"):"",o=e.meanings.length>1?"".concat(n+1,". "):"",a=n<e.meanings.length-1?" ":"";t.push("".concat(o).concat(r.meaning).concat(i).concat(a))}return t}const DE=lt((function(e){return{glossary:e.glossary}}))(RE);function IE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ME(r.key),r)}}function ME(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function LE(e,t){return LE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},LE(e,t)}function jE(e){var t=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(e){return!1}}();return function(){var n,r=NE(e);if(t){var i=NE(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function NE(e){return NE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},NE(e)}var FE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&LE(e,t)}(o,e);var t,n,r,i=jE(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){return a().createElement("div",{className:"single-pane-view"},this.props.singlePane)}}])&&IE(t.prototype,n),r&&IE(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(r.Component);const BE=lt((function(e){return{document:e.document}}))(FE);function zE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function HE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zE(Object(n),!0).forEach((function(t){UE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function UE(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return WE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WE(e,t)}(e,t)||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 WE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var GE={isXMLMode:!1,width:0};const qE=Se()(lt((function(e){return{document:e.document,glossary:e.glossary}}))((function(e){var t,n,i=VE((0,r.useState)(!e.document.variorum),2),o=i[0],s=i[1],l=VE((0,r.useState)(!1),2),c=l[0],u=l[1],d=VE((0,r.useState)(GE),2),p=d[0],f=d[1],m=VE((0,r.useState)(GE),2),g=m[0],v=m[1],y=VE((0,r.useState)(GE),2),b=y[0],w=y[1],x=VE((0,r.useState)(e.containerWidth<960),2),S=x[0],E=x[1],T=(t=r.useContext(An).matches,(n=t[t.length-1])?n.params:{}),P=jn(),C=Mn();(0,r.useEffect)((function(){yc(e,"RouteListenerSaga.userNavigatation",C)}),[e.config]),(0,r.useEffect)((function(){E(e.containerWidth<960)}),[e.containerWidth]);var k=function(e){P(e+C.search)},O=function(){var t=T.folioID,n=T.transcriptionType,r=T.folioID2,i=T.transcriptionType2,o=T.folioID3,a=T.transcriptionType3,s=e.document,l=s.variorum?Object.keys(s.transcriptionTypes[Object.keys(s.transcriptionTypes)[0]])[0]:Object.keys(s.transcriptionTypes)[0];if(!t)return{left:{folioID:"-1",transcriptionType:"g"},right:{folioID:"-1",transcriptionType:s.variorum?"g":l},third:{folioID:"-1",transcriptionType:"g"}};var c,u,d,p,h,f=Object.keys(s.folioIndex).includes(t),m=f?t:"-1";if(r){var g=Object.keys(s.folioIndex).includes(r);if(c=f?n:"g",u=g?r:"-1",d=g?i||l:"g",o){var v=Object.keys(s.folioIndex).includes(o);p=v?o:"-1",h=v?a||l:"g"}else p="-1",h="g"}else c="f",u=f?t:"-1",d=f?n||l:"g",p="-1",h="g";return{left:{folioID:m,transcriptionType:c},right:{folioID:u,transcriptionType:d},third:{folioID:p,transcriptionType:h}}};(0,r.useEffect)((function(){yc(e,"DiplomaticActions.setFixedFrameMode",!0)}),[]);var _=function(t){var n=e.document,r=n.folioIndex[t],i=r.name,o=r.pageNumber,a=n.variorum?n.folios.filter((function(e){return e.doc_id===r.doc_id})):n.folios;return!i.endsWith("v")&&i.endsWith("r")?[a[o-1].id,a[o].id]:[a[o].id,a[o+1].id]},R=function(e,t,n,r,i,o){k(e?t?n?r?i?o?"/ec/".concat(e,"/").concat(t,"/").concat(n,"/").concat(r,"/").concat(i,"/").concat(o):"/ec/".concat(e,"/").concat(t,"/").concat(n,"/").concat(r,"/").concat(i,"/f"):"/ec/".concat(e,"/").concat(t,"/").concat(n,"/").concat(r):"/ec/".concat(e,"/").concat(t,"/").concat(n,"/tc"):"/ec/".concat(e,"/").concat(t):"/ec/".concat(e):"/ec")},A=function(e,t,n){var r=O();if(c){var i=VE(_(e),2),a=i[0],s=i[1];a&&R(a,"f",s,"f")}else if(o)if("left"===t){var l=r.right;R(e,n,e,l.transcriptionType)}else if("right"===t){var u=r.left;R(e,u.transcriptionType,e,n)}else R(r.left.folioID,r.left.transcriptionType,r.right.folioID,r.right.transcriptionType,e,n);else if("left"===t){var d=r.right,p=r.third;R(e,n,d.folioID,d.transcriptionType,p.folioID,p.transcriptionType)}else if("right"===t){var h=r.left,f=r.third;R(h.folioID,h.transcriptionType,e,n,f.folioID,f.transcriptionType)}else R(r.left.folioID,r.left.transcriptionType,r.right.folioID,r.right.transcriptionType,e,n)},D=function(t){var n=e.document,r=O()[t];if("-1"===r.folioID)return HE(HE({},"left"===t?p:"right"===t?g:b),{},{iiifShortID:r.folioID,transcriptionType:r.transcriptionType});var i=r.folioID,o=n.variorum?n.folios.filter((function(e){return e.doc_id===n.folioIndex[i].doc_id})):n.folios,a=o.length,s="",l="",u=!1,d=!1;if(c){var h=VE(_(i),1)[0],f=n.folioIndex[h].pageNumber;f>-1&&(s=(d=f<a-2)?o[f+2].id:"",l=(u=f>1&&a>1)?o[f-2].id:"")}else{var m=n.folioIndex[i].pageNumber;m>-1&&(s=(d=m<a-1)?o[m+1].id:"",l=(u=m>0&&a>1)?o[m-1].id:"")}return HE(HE({},"left"===t?p:"right"===t?g:b),{},{iiifShortID:i,transcriptionType:r.transcriptionType,hasPrevious:u,hasNext:d,previousFolioShortID:l,nextFolioShortID:s,documentID:n.variorum?n.folioIndex[i].doc_id:n.documentName})},I={setXMLMode:function(e,t){"left"===e?f(HE(HE({},p),{},{isXMLMode:t})):"right"===e?v(HE(HE({},g),{},{isXMLMode:t})):w(HE(HE({},b),{},{isXMLMode:t}))},setLinkedMode:s,setBookMode:function(e,t){if(u(t),t){var n=VE(_(e),2),r=n[0],i=n[1];R(r,"f",i,"f")}},changeTranscriptionType:function(e,t){var n=O();if("left"===e){var r=n.left.folioID,i=n.right;R(r,t,i.folioID,i.transcriptionType,n.third.folioID,n.third.transcriptionType)}else if("right"===e){var o=n.right.folioID,a=n.left;R(a.folioID,a.transcriptionType,o,t,n.third.folioID,n.third.transcriptionType)}else{var s=n.third.folioID;R(n.left.folioID,n.left.transcriptionType,n.right.folioID,n.right.transcriptionType,s,t)}},changeCurrentFolio:A,jumpToFolio:function(t,n){var r=e.document;if(r.folioByName[t]){var i,o=null===(i=r.folioByName[t])||void 0===i?void 0:i.id;A(o,n,O()[n].transcriptionType)}}},M=function(t,n){var r=function(e){var t=O()[e].transcriptionType,n="left"===e?p.isXMLMode:"right"===e?g.isXMLMode:b.isXMLMode;return"g"===t?"ImageGridView":"f"===t?"ImageView":"glossary"===t?"GlossaryView":n?"XMLView":"TranscriptionView"}(t),i=L(t),o=n[t].iiifShortID,s=n[t].documentID,l=n[t].transcriptionType;return"ImageView"===r?a().createElement(mv,{key:i,folioID:o,documentView:n,documentViewActions:I,side:t}):"TranscriptionView"===r?a().createElement(oy,{key:i,documentView:n,documentViewActions:I,side:t,folioID:o,transcriptionType:l}):"XMLView"===r?a().createElement(py,{key:i,folioID:o,transcriptionType:l,documentView:n,documentViewActions:I,side:t}):"ImageGridView"===r?a().createElement(Ov,{key:i,documentView:n,documentViewActions:I,side:t,selectedDoc:s||e.document.variorum&&Object.keys(e.document.derivativeNames)["left"===t?0:"right"===t?1:Object.keys(e.document.derivativeNames).length>2?2:1]}):"GlossaryView"===r?a().createElement(DE,{key:i,documentView:n,documentViewActions:I,side:t}):a().createElement("div",null,"ERROR: Unrecognized viewType.")},L=function(e){var t="left"===e?p:"right"===e?g:b;return"ImageGridView"===t.viewType?"".concat(e,"-").concat(t.viewType):void 0!==t.folio?"".concat(e,"-").concat(t.viewType,"-").concat(t.folio.id):"".concat(e,"-").concat(t.viewType)};if(!e.document.loaded)return null;var j={linkedMode:o,bookMode:c,left:D("left"),right:D("right"),third:D("third")};HE({},D("right"));return function(e,t){return arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?h.indexOf(e)<h.indexOf(t):h.indexOf(e)<=h.indexOf(t)}("md",e.width)&&!S?a().createElement("div",{style:{height:"100%"}},a().createElement(wr,{leftPane:M("left",j),rightPane:M("right",j),thirdPane:M("third",j),onWidth:function(e,t,n){f(HE(HE({},p),{},{width:e})),v(HE(HE({},g),{},{width:t})),w(HE(HE({},b),{},{width:n}))},threePanel:e.document.threePanel})):a().createElement("div",{style:{height:"100%"}},a().createElement(BE,{singlePane:M("-1"===D("left").iiifShortID?"left":"right",j)}))})));const XE=lt((function(e){return{}}))((function(e){var t=(0,r.useRef)(!1),n=Mn(),i=function(){yc(e,"RouteListenerSaga.userNavigatation",n)};return(0,r.useEffect)((function(){t.current||(i(),t.current=!0)}),[]),(0,r.useEffect)((function(){i()}),[n]),null}));function ZE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return YE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YE(e,t)}(e,t)||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 YE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const KE=Se()(lt((function(e){return{diplomatic:e.diplomatic,documentView:e.documentView}}))((function(e){var t=ZE((0,r.useState)(0),2),n=t[0],i=t[1],o=ZE((0,r.useState)("min(100%, 100dvh"),2),s=o[0],l=o[1],u=(0,r.useRef)(null);(0,r.useEffect)((function(){var e=function(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,r=n.history;function i(){var e=n.location,t=e.pathname,i=e.search,o=e.hash,a=r.state||{};return[a.idx,Te({pathname:t,search:i,hash:o,state:a.usr||null,key:a.key||"default"})]}var o=null;n.addEventListener(Ce,(function(){if(o)p.call(o),o=null;else{var e=Ee.Pop,t=i(),n=t[0],r=t[1];if(p.length){if(null!=n){var a=l-n;a&&(o={action:e,location:r,retry:function(){y(-1*a)}},y(a))}}else v(e)}}));var a=Ee.Pop,s=i(),l=s[0],u=s[1],d=Oe(),p=Oe();function h(e){return"string"==typeof e?e:Re(e)}function f(e,t){return void 0===t&&(t=null),Te(c({pathname:u.pathname,hash:"",search:""},"string"==typeof e?Ae(e):e,{state:t,key:_e()}))}function m(e,t){return[{usr:e.state,key:e.key,idx:t},h(e)]}function g(e,t,n){return!p.length||(p.call({action:e,location:t,retry:n}),!1)}function v(e){a=e;var t=i();l=t[0],u=t[1],d.call({action:a,location:u})}function y(e){r.go(e)}null==l&&(l=0,r.replaceState(c({},r.state,{idx:l}),""));var b={get action(){return a},get location(){return u},createHref:h,push:function e(t,i){var o=Ee.Push,a=f(t,i);if(g(o,a,(function(){e(t,i)}))){var s=m(a,l+1),c=s[0],u=s[1];try{r.pushState(c,"",u)}catch(e){n.location.assign(u)}v(o)}},replace:function e(t,n){var i=Ee.Replace,o=f(t,n);if(g(i,o,(function(){e(t,n)}))){var a=m(o,l),s=a[0],c=a[1];r.replaceState(s,"",c),v(i)}},go:y,back:function(){y(-1)},forward:function(){y(1)},listen:function(e){return d.push(e)},block:function(e){var t=p.push(e);return 1===p.length&&n.addEventListener(Pe,ke),function(){t(),p.length||n.removeEventListener(Pe,ke)}}};return b}();e.listen((function(){window.scrollTo(0,0)}))}),[]),(0,r.useEffect)((function(){u.current&&(i(u.current.offsetWidth),0==u.current.clientHeight&&l("100dvh"))}),[u]);var d=e.diplomatic.fixedFrameMode?"editioncrafter":"editioncrafter sticky";return a().createElement(ct,{store:e.store},a().createElement(ar,null,a().createElement("div",{id:"diplomatic",className:d,ref:u,style:{height:s}},a().createElement(XE,null),a().createElement("div",{id:"content",style:{height:"100%"}},a().createElement(Qn,null,a().createElement(Kn,{path:"/ec/:folioID/:transcriptionType/:folioID2/:transcriptionType2/:folioID3/:transcriptionType3",element:a().createElement(qE,Object.assign({},e,{containerWidth:n})),exact:!0}),a().createElement(Kn,{path:"/ec/:folioID/:transcriptionType/:folioID2/:transcriptionType2",element:a().createElement(qE,Object.assign({},e,{containerWidth:n})),exact:!0}),a().createElement(Kn,{path:"/ec/:folioID/:transcriptionType",element:a().createElement(qE,Object.assign({},e,{containerWidth:n})),exact:!0}),a().createElement(Kn,{path:"/ec/:folioID",element:a().createElement(qE,Object.assign({},e,{containerWidth:n})),exact:!0}),a().createElement(Kn,{path:"/ec",element:a().createElement(qE,Object.assign({},e,{containerWidth:n})),exact:!0}),a().createElement(Kn,{path:"/",element:a().createElement(Yn,{to:"/ec"}),exact:!0}))))))})));const JE=function(e){var t=ue({palette:{primary:{main:"#792421"},secondary:{main:"#EBE3DD"}}});return a().createElement(fe,{theme:t},a().createElement(KE,{config:e,store:vc(e)}))}})(),o=o.default})()));
|