@cu-mkp/editioncrafter 1.0.4-beta.4 → 1.0.4-beta.6
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/dist/editioncrafter.js +1 -0
- package/package.json +3 -2
- package/dist/editioncrafter.umd.cjs +0 -330
- package/dist/style.css +0 -1
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
(function(Te,zn){typeof exports=="object"&&typeof module<"u"?module.exports=zn(require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["react","react-dom"],zn):(Te=typeof globalThis<"u"?globalThis:Te||self,Te.EditionCrafter=zn(Te.React,Te.ReactDOM))})(this,function(Te,zn){"use strict";var r7=Object.defineProperty;var i7=(Te,zn,Zi)=>zn in Te?r7(Te,zn,{enumerable:!0,configurable:!0,writable:!0,value:Zi}):Te[zn]=Zi;var wr=(Te,zn,Zi)=>i7(Te,typeof zn!="symbol"?zn+"":zn,Zi);function Zi(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const G=Zi(Te),Kr=Zi(zn);var Gn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function OP(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var t=function r(){return this instanceof r?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};t.prototype=n.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),t}var Cc={exports:{}},Oo={},Pc,ug;function Rc(){if(ug)return Pc;ug=1;/*
|
|
2
|
-
object-assign
|
|
3
|
-
(c) Sindre Sorhus
|
|
4
|
-
@license MIT
|
|
5
|
-
*/var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function r(l){if(l==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(l)}function o(){try{if(!Object.assign)return!1;var l=new String("abc");if(l[5]="de",Object.getOwnPropertyNames(l)[0]==="5")return!1;for(var d={},h=0;h<10;h++)d["_"+String.fromCharCode(h)]=h;var f=Object.getOwnPropertyNames(d).map(function(g){return d[g]});if(f.join("")!=="0123456789")return!1;var m={};return"abcdefghijklmnopqrst".split("").forEach(function(g){m[g]=g}),Object.keys(Object.assign({},m)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Pc=o()?Object.assign:function(l,d){for(var h,f=r(l),m,g=1;g<arguments.length;g++){h=Object(arguments[g]);for(var w in h)n.call(h,w)&&(f[w]=h[w]);if(e){m=e(h);for(var x=0;x<m.length;x++)t.call(h,m[x])&&(f[m[x]]=h[m[x]])}}return f},Pc}var cg;function kP(){if(cg)return Oo;cg=1;/** @license React v17.0.2
|
|
6
|
-
* react-jsx-runtime.production.min.js
|
|
7
|
-
*
|
|
8
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
|
-
*
|
|
10
|
-
* This source code is licensed under the MIT license found in the
|
|
11
|
-
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/Rc();var e=Te,n=60103;if(Oo.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var t=Symbol.for;n=t("react.element"),Oo.Fragment=t("react.fragment")}var r=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function d(h,f,m){var g,w={},x=null,T=null;m!==void 0&&(x=""+m),f.key!==void 0&&(x=""+f.key),f.ref!==void 0&&(T=f.ref);for(g in f)o.call(f,g)&&!l.hasOwnProperty(g)&&(w[g]=f[g]);if(h&&h.defaultProps)for(g in f=h.defaultProps,f)w[g]===void 0&&(w[g]=f[g]);return{$$typeof:n,type:h,key:x,ref:T,props:w,_owner:r.current}}return Oo.jsx=d,Oo.jsxs=d,Oo}var Oc={},hg;function AP(){return hg||(hg=1,function(e){/** @license React v17.0.2
|
|
13
|
-
* react-jsx-runtime.development.js
|
|
14
|
-
*
|
|
15
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
16
|
-
*
|
|
17
|
-
* This source code is licensed under the MIT license found in the
|
|
18
|
-
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/process.env.NODE_ENV!=="production"&&function(){var n=Te,t=Rc(),r=60103,o=60106;e.Fragment=60107;var l=60108,d=60114,h=60109,f=60110,m=60112,g=60113,w=60120,x=60115,T=60116,P=60121,C=60122,_=60117,k=60129,V=60131;if(typeof Symbol=="function"&&Symbol.for){var j=Symbol.for;r=j("react.element"),o=j("react.portal"),e.Fragment=j("react.fragment"),l=j("react.strict_mode"),d=j("react.profiler"),h=j("react.provider"),f=j("react.context"),m=j("react.forward_ref"),g=j("react.suspense"),w=j("react.suspense_list"),x=j("react.memo"),T=j("react.lazy"),P=j("react.block"),C=j("react.server.block"),_=j("react.fundamental"),j("react.scope"),j("react.opaque.id"),k=j("react.debug_trace_mode"),j("react.offscreen"),V=j("react.legacy_hidden")}var Z=typeof Symbol=="function"&&Symbol.iterator,B="@@iterator";function Y(ue){if(ue===null||typeof ue!="object")return null;var et=Z&&ue[Z]||ue[B];return typeof et=="function"?et:null}var ie=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function ae(ue){{for(var et=arguments.length,vt=new Array(et>1?et-1:0),Dt=1;Dt<et;Dt++)vt[Dt-1]=arguments[Dt];le("error",ue,vt)}}function le(ue,et,vt){{var Dt=ie.ReactDebugCurrentFrame,pn=Dt.getStackAddendum();pn!==""&&(et+="%s",vt=vt.concat([pn]));var mn=vt.map(function(qt){return""+qt});mn.unshift("Warning: "+et),Function.prototype.apply.call(console[ue],console,mn)}}var _e=!1;function fe(ue){return!!(typeof ue=="string"||typeof ue=="function"||ue===e.Fragment||ue===d||ue===k||ue===l||ue===g||ue===w||ue===V||_e||typeof ue=="object"&&ue!==null&&(ue.$$typeof===T||ue.$$typeof===x||ue.$$typeof===h||ue.$$typeof===f||ue.$$typeof===m||ue.$$typeof===_||ue.$$typeof===P||ue[0]===C))}function de(ue,et,vt){var Dt=et.displayName||et.name||"";return ue.displayName||(Dt!==""?vt+"("+Dt+")":vt)}function ve(ue){return ue.displayName||"Context"}function Ae(ue){if(ue==null)return null;if(typeof ue.tag=="number"&&ae("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof ue=="function")return ue.displayName||ue.name||null;if(typeof ue=="string")return ue;switch(ue){case e.Fragment:return"Fragment";case o:return"Portal";case d:return"Profiler";case l:return"StrictMode";case g:return"Suspense";case w:return"SuspenseList"}if(typeof ue=="object")switch(ue.$$typeof){case f:var et=ue;return ve(et)+".Consumer";case h:var vt=ue;return ve(vt._context)+".Provider";case m:return de(ue,ue.render,"ForwardRef");case x:return Ae(ue.type);case P:return Ae(ue._render);case T:{var Dt=ue,pn=Dt._payload,mn=Dt._init;try{return Ae(mn(pn))}catch{return null}}}return null}var ke=0,me,be,Ee,Oe,F,we,Ne;function X(){}X.__reactDisabledLog=!0;function Be(){{if(ke===0){me=console.log,be=console.info,Ee=console.warn,Oe=console.error,F=console.group,we=console.groupCollapsed,Ne=console.groupEnd;var ue={configurable:!0,enumerable:!0,value:X,writable:!0};Object.defineProperties(console,{info:ue,log:ue,warn:ue,error:ue,group:ue,groupCollapsed:ue,groupEnd:ue})}ke++}}function Je(){{if(ke--,ke===0){var ue={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:t({},ue,{value:me}),info:t({},ue,{value:be}),warn:t({},ue,{value:Ee}),error:t({},ue,{value:Oe}),group:t({},ue,{value:F}),groupCollapsed:t({},ue,{value:we}),groupEnd:t({},ue,{value:Ne})})}ke<0&&ae("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var He=ie.ReactCurrentDispatcher,Ze;function Qe(ue,et,vt){{if(Ze===void 0)try{throw Error()}catch(pn){var Dt=pn.stack.trim().match(/\n( *(at )?)/);Ze=Dt&&Dt[1]||""}return`
|
|
20
|
-
`+Ze+ue}}var it=!1,Ke;{var Le=typeof WeakMap=="function"?WeakMap:Map;Ke=new Le}function pe(ue,et){if(!ue||it)return"";{var vt=Ke.get(ue);if(vt!==void 0)return vt}var Dt;it=!0;var pn=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var mn;mn=He.current,He.current=null,Be();try{if(et){var qt=function(){throw Error()};if(Object.defineProperty(qt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(qt,[])}catch(Xr){Dt=Xr}Reflect.construct(ue,[],qt)}else{try{qt.call()}catch(Xr){Dt=Xr}ue.call(qt.prototype)}}else{try{throw Error()}catch(Xr){Dt=Xr}ue()}}catch(Xr){if(Xr&&Dt&&typeof Xr.stack=="string"){for(var Wt=Xr.stack.split(`
|
|
21
|
-
`),er=Dt.stack.split(`
|
|
22
|
-
`),On=Wt.length-1,Dn=er.length-1;On>=1&&Dn>=0&&Wt[On]!==er[Dn];)Dn--;for(;On>=1&&Dn>=0;On--,Dn--)if(Wt[On]!==er[Dn]){if(On!==1||Dn!==1)do if(On--,Dn--,Dn<0||Wt[On]!==er[Dn]){var Hr=`
|
|
23
|
-
`+Wt[On].replace(" at new "," at ");return typeof ue=="function"&&Ke.set(ue,Hr),Hr}while(On>=1&&Dn>=0);break}}}finally{it=!1,He.current=mn,Je(),Error.prepareStackTrace=pn}var ji=ue?ue.displayName||ue.name:"",mu=ji?Qe(ji):"";return typeof ue=="function"&&Ke.set(ue,mu),mu}function mt(ue,et,vt){return pe(ue,!1)}function Ce(ue){var et=ue.prototype;return!!(et&&et.isReactComponent)}function Pt(ue,et,vt){if(ue==null)return"";if(typeof ue=="function")return pe(ue,Ce(ue));if(typeof ue=="string")return Qe(ue);switch(ue){case g:return Qe("Suspense");case w:return Qe("SuspenseList")}if(typeof ue=="object")switch(ue.$$typeof){case m:return mt(ue.render);case x:return Pt(ue.type,et,vt);case P:return mt(ue._render);case T:{var Dt=ue,pn=Dt._payload,mn=Dt._init;try{return Pt(mn(pn),et,vt)}catch{}}}return""}var wt={},D=ie.ReactDebugCurrentFrame;function K(ue){if(ue){var et=ue._owner,vt=Pt(ue.type,ue._source,et?et.type:null);D.setExtraStackFrame(vt)}else D.setExtraStackFrame(null)}function xe(ue,et,vt,Dt,pn){{var mn=Function.call.bind(Object.prototype.hasOwnProperty);for(var qt in ue)if(mn(ue,qt)){var Wt=void 0;try{if(typeof ue[qt]!="function"){var er=Error((Dt||"React class")+": "+vt+" type `"+qt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof ue[qt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw er.name="Invariant Violation",er}Wt=ue[qt](et,qt,Dt,vt,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(On){Wt=On}Wt&&!(Wt instanceof Error)&&(K(pn),ae("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Dt||"React class",vt,qt,typeof Wt),K(null)),Wt instanceof Error&&!(Wt.message in wt)&&(wt[Wt.message]=!0,K(pn),ae("Failed %s type: %s",vt,Wt.message),K(null))}}}var ze=ie.ReactCurrentOwner,Ve=Object.prototype.hasOwnProperty,ut={key:!0,ref:!0,__self:!0,__source:!0},Ye,gt,Ct;Ct={};function St(ue){if(Ve.call(ue,"ref")){var et=Object.getOwnPropertyDescriptor(ue,"ref").get;if(et&&et.isReactWarning)return!1}return ue.ref!==void 0}function ge(ue){if(Ve.call(ue,"key")){var et=Object.getOwnPropertyDescriptor(ue,"key").get;if(et&&et.isReactWarning)return!1}return ue.key!==void 0}function Ie(ue,et){if(typeof ue.ref=="string"&&ze.current&&et&&ze.current.stateNode!==et){var vt=Ae(ze.current.type);Ct[vt]||(ae('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Ae(ze.current.type),ue.ref),Ct[vt]=!0)}}function M(ue,et){{var vt=function(){Ye||(Ye=!0,ae("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",et))};vt.isReactWarning=!0,Object.defineProperty(ue,"key",{get:vt,configurable:!0})}}function L(ue,et){{var vt=function(){gt||(gt=!0,ae("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",et))};vt.isReactWarning=!0,Object.defineProperty(ue,"ref",{get:vt,configurable:!0})}}var q=function(ue,et,vt,Dt,pn,mn,qt){var Wt={$$typeof:r,type:ue,key:et,ref:vt,props:qt,_owner:mn};return Wt._store={},Object.defineProperty(Wt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Wt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Dt}),Object.defineProperty(Wt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:pn}),Object.freeze&&(Object.freeze(Wt.props),Object.freeze(Wt)),Wt};function J(ue,et,vt,Dt,pn){{var mn,qt={},Wt=null,er=null;vt!==void 0&&(Wt=""+vt),ge(et)&&(Wt=""+et.key),St(et)&&(er=et.ref,Ie(et,pn));for(mn in et)Ve.call(et,mn)&&!ut.hasOwnProperty(mn)&&(qt[mn]=et[mn]);if(ue&&ue.defaultProps){var On=ue.defaultProps;for(mn in On)qt[mn]===void 0&&(qt[mn]=On[mn])}if(Wt||er){var Dn=typeof ue=="function"?ue.displayName||ue.name||"Unknown":ue;Wt&&M(qt,Dn),er&&L(qt,Dn)}return q(ue,Wt,er,pn,Dt,ze.current,qt)}}var ye=ie.ReactCurrentOwner,Re=ie.ReactDebugCurrentFrame;function ot(ue){if(ue){var et=ue._owner,vt=Pt(ue.type,ue._source,et?et.type:null);Re.setExtraStackFrame(vt)}else Re.setExtraStackFrame(null)}var bt;bt=!1;function je(ue){return typeof ue=="object"&&ue!==null&&ue.$$typeof===r}function fn(){{if(ye.current){var ue=Ae(ye.current.type);if(ue)return`
|
|
24
|
-
|
|
25
|
-
Check the render method of \``+ue+"`."}return""}}function Vt(ue){return""}var fr={};function yi(ue){{var et=fn();if(!et){var vt=typeof ue=="string"?ue:ue.displayName||ue.name;vt&&(et=`
|
|
26
|
-
|
|
27
|
-
Check the top-level render call using <`+vt+">.")}return et}}function vo(ue,et){{if(!ue._store||ue._store.validated||ue.key!=null)return;ue._store.validated=!0;var vt=yi(et);if(fr[vt])return;fr[vt]=!0;var Dt="";ue&&ue._owner&&ue._owner!==ye.current&&(Dt=" It was passed a child from "+Ae(ue._owner.type)+"."),ot(ue),ae('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',vt,Dt),ot(null)}}function wi(ue,et){{if(typeof ue!="object")return;if(Array.isArray(ue))for(var vt=0;vt<ue.length;vt++){var Dt=ue[vt];je(Dt)&&vo(Dt,et)}else if(je(ue))ue._store&&(ue._store.validated=!0);else if(ue){var pn=Y(ue);if(typeof pn=="function"&&pn!==ue.entries)for(var mn=pn.call(ue),qt;!(qt=mn.next()).done;)je(qt.value)&&vo(qt.value,et)}}}function uu(ue){{var et=ue.type;if(et==null||typeof et=="string")return;var vt;if(typeof et=="function")vt=et.propTypes;else if(typeof et=="object"&&(et.$$typeof===m||et.$$typeof===x))vt=et.propTypes;else return;if(vt){var Dt=Ae(et);xe(vt,ue.props,"prop",Dt,ue)}else if(et.PropTypes!==void 0&&!bt){bt=!0;var pn=Ae(et);ae("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",pn||"Unknown")}typeof et.getDefaultProps=="function"&&!et.getDefaultProps.isReactClassApproved&&ae("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function cu(ue){{for(var et=Object.keys(ue.props),vt=0;vt<et.length;vt++){var Dt=et[vt];if(Dt!=="children"&&Dt!=="key"){ot(ue),ae("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Dt),ot(null);break}}ue.ref!==null&&(ot(ue),ae("Invalid attribute `ref` supplied to `React.Fragment`."),ot(null))}}function hu(ue,et,vt,Dt,pn,mn){{var qt=fe(ue);if(!qt){var Wt="";(ue===void 0||typeof ue=="object"&&ue!==null&&Object.keys(ue).length===0)&&(Wt+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var er=Vt();er?Wt+=er:Wt+=fn();var On;ue===null?On="null":Array.isArray(ue)?On="array":ue!==void 0&&ue.$$typeof===r?(On="<"+(Ae(ue.type)||"Unknown")+" />",Wt=" Did you accidentally export a JSX literal instead of a component?"):On=typeof ue,ae("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",On,Wt)}var Dn=J(ue,et,vt,pn,mn);if(Dn==null)return Dn;if(qt){var Hr=et.children;if(Hr!==void 0)if(Dt)if(Array.isArray(Hr)){for(var ji=0;ji<Hr.length;ji++)wi(Hr[ji],ue);Object.freeze&&Object.freeze(Hr)}else ae("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else wi(Hr,ue)}return ue===e.Fragment?cu(Dn):uu(Dn),Dn}}function du(ue,et,vt){return hu(ue,et,vt,!0)}function yo(ue,et,vt){return hu(ue,et,vt,!1)}var fu=yo,pu=du;e.jsx=fu,e.jsxs=pu}()}(Oc)),Oc}process.env.NODE_ENV==="production"?Cc.exports=kP():Cc.exports=AP();var te=Cc.exports;function di(e,n){return process.env.NODE_ENV==="production"?function(){return null}:function(){return e.apply(void 0,arguments)||n.apply(void 0,arguments)}}function Me(){return Me=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Me.apply(this,arguments)}function fi(e){"@babel/helpers - typeof";return fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fi(e)}function kc(e){return e&&fi(e)==="object"&&e.constructor===Object}function ko(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},r=t.clone?Me({},e):e;return kc(e)&&kc(n)&&Object.keys(n).forEach(function(o){o!=="__proto__"&&(kc(n[o])&&o in e?r[o]=ko(e[o],n[o],t):r[o]=n[o])}),r}var Ac={exports:{}},Ws={exports:{}},on={},dg;function DP(){if(dg)return on;dg=1;/** @license React v16.13.1
|
|
28
|
-
* react-is.production.min.js
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the MIT license found in the
|
|
33
|
-
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,l=e?Symbol.for("react.profiler"):60114,d=e?Symbol.for("react.provider"):60109,h=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,m=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,w=e?Symbol.for("react.suspense"):60113,x=e?Symbol.for("react.suspense_list"):60120,T=e?Symbol.for("react.memo"):60115,P=e?Symbol.for("react.lazy"):60116,C=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,k=e?Symbol.for("react.responder"):60118,V=e?Symbol.for("react.scope"):60119;function j(B){if(typeof B=="object"&&B!==null){var Y=B.$$typeof;switch(Y){case n:switch(B=B.type,B){case f:case m:case r:case l:case o:case w:return B;default:switch(B=B&&B.$$typeof,B){case h:case g:case P:case T:case d:return B;default:return Y}}case t:return Y}}}function Z(B){return j(B)===m}return on.AsyncMode=f,on.ConcurrentMode=m,on.ContextConsumer=h,on.ContextProvider=d,on.Element=n,on.ForwardRef=g,on.Fragment=r,on.Lazy=P,on.Memo=T,on.Portal=t,on.Profiler=l,on.StrictMode=o,on.Suspense=w,on.isAsyncMode=function(B){return Z(B)||j(B)===f},on.isConcurrentMode=Z,on.isContextConsumer=function(B){return j(B)===h},on.isContextProvider=function(B){return j(B)===d},on.isElement=function(B){return typeof B=="object"&&B!==null&&B.$$typeof===n},on.isForwardRef=function(B){return j(B)===g},on.isFragment=function(B){return j(B)===r},on.isLazy=function(B){return j(B)===P},on.isMemo=function(B){return j(B)===T},on.isPortal=function(B){return j(B)===t},on.isProfiler=function(B){return j(B)===l},on.isStrictMode=function(B){return j(B)===o},on.isSuspense=function(B){return j(B)===w},on.isValidElementType=function(B){return typeof B=="string"||typeof B=="function"||B===r||B===m||B===l||B===o||B===w||B===x||typeof B=="object"&&B!==null&&(B.$$typeof===P||B.$$typeof===T||B.$$typeof===d||B.$$typeof===h||B.$$typeof===g||B.$$typeof===_||B.$$typeof===k||B.$$typeof===V||B.$$typeof===C)},on.typeOf=j,on}var an={},fg;function IP(){if(fg)return an;fg=1;/** @license React v16.13.1
|
|
35
|
-
* react-is.development.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/return process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,l=e?Symbol.for("react.profiler"):60114,d=e?Symbol.for("react.provider"):60109,h=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,m=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,w=e?Symbol.for("react.suspense"):60113,x=e?Symbol.for("react.suspense_list"):60120,T=e?Symbol.for("react.memo"):60115,P=e?Symbol.for("react.lazy"):60116,C=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,k=e?Symbol.for("react.responder"):60118,V=e?Symbol.for("react.scope"):60119;function j(pe){return typeof pe=="string"||typeof pe=="function"||pe===r||pe===m||pe===l||pe===o||pe===w||pe===x||typeof pe=="object"&&pe!==null&&(pe.$$typeof===P||pe.$$typeof===T||pe.$$typeof===d||pe.$$typeof===h||pe.$$typeof===g||pe.$$typeof===_||pe.$$typeof===k||pe.$$typeof===V||pe.$$typeof===C)}function Z(pe){if(typeof pe=="object"&&pe!==null){var mt=pe.$$typeof;switch(mt){case n:var Ce=pe.type;switch(Ce){case f:case m:case r:case l:case o:case w:return Ce;default:var Pt=Ce&&Ce.$$typeof;switch(Pt){case h:case g:case P:case T:case d:return Pt;default:return mt}}case t:return mt}}}var B=f,Y=m,ie=h,ae=d,le=n,_e=g,fe=r,de=P,ve=T,Ae=t,ke=l,me=o,be=w,Ee=!1;function Oe(pe){return Ee||(Ee=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),F(pe)||Z(pe)===f}function F(pe){return Z(pe)===m}function we(pe){return Z(pe)===h}function Ne(pe){return Z(pe)===d}function X(pe){return typeof pe=="object"&&pe!==null&&pe.$$typeof===n}function Be(pe){return Z(pe)===g}function Je(pe){return Z(pe)===r}function He(pe){return Z(pe)===P}function Ze(pe){return Z(pe)===T}function Qe(pe){return Z(pe)===t}function it(pe){return Z(pe)===l}function Ke(pe){return Z(pe)===o}function Le(pe){return Z(pe)===w}an.AsyncMode=B,an.ConcurrentMode=Y,an.ContextConsumer=ie,an.ContextProvider=ae,an.Element=le,an.ForwardRef=_e,an.Fragment=fe,an.Lazy=de,an.Memo=ve,an.Portal=Ae,an.Profiler=ke,an.StrictMode=me,an.Suspense=be,an.isAsyncMode=Oe,an.isConcurrentMode=F,an.isContextConsumer=we,an.isContextProvider=Ne,an.isElement=X,an.isForwardRef=Be,an.isFragment=Je,an.isLazy=He,an.isMemo=Ze,an.isPortal=Qe,an.isProfiler=it,an.isStrictMode=Ke,an.isSuspense=Le,an.isValidElementType=j,an.typeOf=Z}(),an}var pg;function mg(){return pg||(pg=1,process.env.NODE_ENV==="production"?Ws.exports=DP():Ws.exports=IP()),Ws.exports}var Dc,gg;function Ic(){if(gg)return Dc;gg=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Dc=e,Dc}var Mc,vg;function yg(){return vg||(vg=1,Mc=Function.call.bind(Object.prototype.hasOwnProperty)),Mc}var Nc,wg;function MP(){if(wg)return Nc;wg=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var n=Ic(),t={},r=yg();e=function(l){var d="Warning: "+l;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}}}function o(l,d,h,f,m){if(process.env.NODE_ENV!=="production"){for(var g in l)if(r(l,g)){var w;try{if(typeof l[g]!="function"){var x=Error((f||"React class")+": "+h+" type `"+g+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[g]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw x.name="Invariant Violation",x}w=l[g](d,g,f,h,null,n)}catch(P){w=P}if(w&&!(w instanceof Error)&&e((f||"React class")+": type specification of "+h+" `"+g+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof w+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),w instanceof Error&&!(w.message in t)){t[w.message]=!0;var T=m?m():"";e("Failed "+h+" type: "+w.message+(T??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},Nc=o,Nc}var Lc,bg;function NP(){if(bg)return Lc;bg=1;var e=mg(),n=Rc(),t=Ic(),r=yg(),o=MP(),l=function(){};process.env.NODE_ENV!=="production"&&(l=function(h){var f="Warning: "+h;typeof console<"u"&&console.error(f);try{throw new Error(f)}catch{}});function d(){return null}return Lc=function(h,f){var m=typeof Symbol=="function"&&Symbol.iterator,g="@@iterator";function w(F){var we=F&&(m&&F[m]||F[g]);if(typeof we=="function")return we}var x="<<anonymous>>",T={array:k("array"),bigint:k("bigint"),bool:k("boolean"),func:k("function"),number:k("number"),object:k("object"),string:k("string"),symbol:k("symbol"),any:V(),arrayOf:j,element:Z(),elementType:B(),instanceOf:Y,node:_e(),objectOf:ae,oneOf:ie,oneOfType:le,shape:de,exact:ve};function P(F,we){return F===we?F!==0||1/F===1/we:F!==F&&we!==we}function C(F,we){this.message=F,this.data=we&&typeof we=="object"?we:{},this.stack=""}C.prototype=Error.prototype;function _(F){if(process.env.NODE_ENV!=="production")var we={},Ne=0;function X(Je,He,Ze,Qe,it,Ke,Le){if(Qe=Qe||x,Ke=Ke||Ze,Le!==t){if(f){var pe=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 pe.name="Invariant Violation",pe}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var mt=Qe+":"+Ze;!we[mt]&&Ne<3&&(l("You are manually calling a React.PropTypes validation function for the `"+Ke+"` prop on `"+Qe+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),we[mt]=!0,Ne++)}}return He[Ze]==null?Je?He[Ze]===null?new C("The "+it+" `"+Ke+"` is marked as required "+("in `"+Qe+"`, but its value is `null`.")):new C("The "+it+" `"+Ke+"` is marked as required in "+("`"+Qe+"`, but its value is `undefined`.")):null:F(He,Ze,Qe,it,Ke)}var Be=X.bind(null,!1);return Be.isRequired=X.bind(null,!0),Be}function k(F){function we(Ne,X,Be,Je,He,Ze){var Qe=Ne[X],it=me(Qe);if(it!==F){var Ke=be(Qe);return new C("Invalid "+Je+" `"+He+"` of type "+("`"+Ke+"` supplied to `"+Be+"`, expected ")+("`"+F+"`."),{expectedType:F})}return null}return _(we)}function V(){return _(d)}function j(F){function we(Ne,X,Be,Je,He){if(typeof F!="function")return new C("Property `"+He+"` of component `"+Be+"` has invalid PropType notation inside arrayOf.");var Ze=Ne[X];if(!Array.isArray(Ze)){var Qe=me(Ze);return new C("Invalid "+Je+" `"+He+"` of type "+("`"+Qe+"` supplied to `"+Be+"`, expected an array."))}for(var it=0;it<Ze.length;it++){var Ke=F(Ze,it,Be,Je,He+"["+it+"]",t);if(Ke instanceof Error)return Ke}return null}return _(we)}function Z(){function F(we,Ne,X,Be,Je){var He=we[Ne];if(!h(He)){var Ze=me(He);return new C("Invalid "+Be+" `"+Je+"` of type "+("`"+Ze+"` supplied to `"+X+"`, expected a single ReactElement."))}return null}return _(F)}function B(){function F(we,Ne,X,Be,Je){var He=we[Ne];if(!e.isValidElementType(He)){var Ze=me(He);return new C("Invalid "+Be+" `"+Je+"` of type "+("`"+Ze+"` supplied to `"+X+"`, expected a single ReactElement type."))}return null}return _(F)}function Y(F){function we(Ne,X,Be,Je,He){if(!(Ne[X]instanceof F)){var Ze=F.name||x,Qe=Oe(Ne[X]);return new C("Invalid "+Je+" `"+He+"` of type "+("`"+Qe+"` supplied to `"+Be+"`, expected ")+("instance of `"+Ze+"`."))}return null}return _(we)}function ie(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&(arguments.length>1?l("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):l("Invalid argument supplied to oneOf, expected an array.")),d;function we(Ne,X,Be,Je,He){for(var Ze=Ne[X],Qe=0;Qe<F.length;Qe++)if(P(Ze,F[Qe]))return null;var it=JSON.stringify(F,function(Le,pe){var mt=be(pe);return mt==="symbol"?String(pe):pe});return new C("Invalid "+Je+" `"+He+"` of value `"+String(Ze)+"` "+("supplied to `"+Be+"`, expected one of "+it+"."))}return _(we)}function ae(F){function we(Ne,X,Be,Je,He){if(typeof F!="function")return new C("Property `"+He+"` of component `"+Be+"` has invalid PropType notation inside objectOf.");var Ze=Ne[X],Qe=me(Ze);if(Qe!=="object")return new C("Invalid "+Je+" `"+He+"` of type "+("`"+Qe+"` supplied to `"+Be+"`, expected an object."));for(var it in Ze)if(r(Ze,it)){var Ke=F(Ze,it,Be,Je,He+"."+it,t);if(Ke instanceof Error)return Ke}return null}return _(we)}function le(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&l("Invalid argument supplied to oneOfType, expected an instance of array."),d;for(var we=0;we<F.length;we++){var Ne=F[we];if(typeof Ne!="function")return l("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Ee(Ne)+" at index "+we+"."),d}function X(Be,Je,He,Ze,Qe){for(var it=[],Ke=0;Ke<F.length;Ke++){var Le=F[Ke],pe=Le(Be,Je,He,Ze,Qe,t);if(pe==null)return null;pe.data&&r(pe.data,"expectedType")&&it.push(pe.data.expectedType)}var mt=it.length>0?", expected one of type ["+it.join(", ")+"]":"";return new C("Invalid "+Ze+" `"+Qe+"` supplied to "+("`"+He+"`"+mt+"."))}return _(X)}function _e(){function F(we,Ne,X,Be,Je){return Ae(we[Ne])?null:new C("Invalid "+Be+" `"+Je+"` supplied to "+("`"+X+"`, expected a ReactNode."))}return _(F)}function fe(F,we,Ne,X,Be){return new C((F||"React class")+": "+we+" type `"+Ne+"."+X+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Be+"`.")}function de(F){function we(Ne,X,Be,Je,He){var Ze=Ne[X],Qe=me(Ze);if(Qe!=="object")return new C("Invalid "+Je+" `"+He+"` of type `"+Qe+"` "+("supplied to `"+Be+"`, expected `object`."));for(var it in F){var Ke=F[it];if(typeof Ke!="function")return fe(Be,Je,He,it,be(Ke));var Le=Ke(Ze,it,Be,Je,He+"."+it,t);if(Le)return Le}return null}return _(we)}function ve(F){function we(Ne,X,Be,Je,He){var Ze=Ne[X],Qe=me(Ze);if(Qe!=="object")return new C("Invalid "+Je+" `"+He+"` of type `"+Qe+"` "+("supplied to `"+Be+"`, expected `object`."));var it=n({},Ne[X],F);for(var Ke in it){var Le=F[Ke];if(r(F,Ke)&&typeof Le!="function")return fe(Be,Je,He,Ke,be(Le));if(!Le)return new C("Invalid "+Je+" `"+He+"` key `"+Ke+"` supplied to `"+Be+"`.\nBad object: "+JSON.stringify(Ne[X],null," ")+`
|
|
42
|
-
Valid keys: `+JSON.stringify(Object.keys(F),null," "));var pe=Le(Ze,Ke,Be,Je,He+"."+Ke,t);if(pe)return pe}return null}return _(we)}function Ae(F){switch(typeof F){case"number":case"string":case"undefined":return!0;case"boolean":return!F;case"object":if(Array.isArray(F))return F.every(Ae);if(F===null||h(F))return!0;var we=w(F);if(we){var Ne=we.call(F),X;if(we!==F.entries){for(;!(X=Ne.next()).done;)if(!Ae(X.value))return!1}else for(;!(X=Ne.next()).done;){var Be=X.value;if(Be&&!Ae(Be[1]))return!1}}else return!1;return!0;default:return!1}}function ke(F,we){return F==="symbol"?!0:we?we["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&we instanceof Symbol:!1}function me(F){var we=typeof F;return Array.isArray(F)?"array":F instanceof RegExp?"object":ke(we,F)?"symbol":we}function be(F){if(typeof F>"u"||F===null)return""+F;var we=me(F);if(we==="object"){if(F instanceof Date)return"date";if(F instanceof RegExp)return"regexp"}return we}function Ee(F){var we=be(F);switch(we){case"array":case"object":return"an "+we;case"boolean":case"date":case"regexp":return"a "+we;default:return we}}function Oe(F){return!F.constructor||!F.constructor.name?x:F.constructor.name}return T.checkPropTypes=o,T.resetWarningCache=o.resetWarningCache,T.PropTypes=T,T},Lc}var Fc,Eg;function LP(){if(Eg)return Fc;Eg=1;var e=Ic();function n(){}function t(){}return t.resetWarningCache=n,Fc=function(){function r(d,h,f,m,g,w){if(w!==e){var x=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 x.name="Invariant Violation",x}}r.isRequired=r;function o(){return r}var l={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:t,resetWarningCache:n};return l.PropTypes=l,l},Fc}if(process.env.NODE_ENV!=="production"){var FP=mg(),BP=!0;Ac.exports=NP()(FP.isElement,BP)}else Ac.exports=LP()();var Ao=Ac.exports;const R=hi(Ao);function jP(e){var n=e.prototype,t=n===void 0?{}:n;return!!t.isReactComponent}function xg(e,n,t,r,o){var l=e[n],d=o||n;if(l==null)return null;var h,f=l.type;return typeof f=="function"&&!jP(f)&&(h="Did you accidentally use a plain function component for an element instead?"),h!==void 0?new Error("Invalid ".concat(r," `").concat(d,"` supplied to `").concat(t,"`. ")+"Expected an element that can hold a ref. ".concat(h," ")+"For more information see https://mui.com/r/caveat-with-refs-guide"):null}var Sg=di(R.element,xg);Sg.isRequired=di(R.element.isRequired,xg);function HP(e){var n=e.prototype,t=n===void 0?{}:n;return!!t.isReactComponent}function zP(e,n,t,r,o){var l=e[n],d=o||n;if(l==null)return null;var h;return typeof l=="function"&&!HP(l)&&(h="Did you accidentally provide a plain function component instead?"),h!==void 0?new Error("Invalid ".concat(r," `").concat(d,"` supplied to `").concat(t,"`. ")+"Expected an element type that can hold a ref. ".concat(h," ")+"For more information see https://mui.com/r/caveat-with-refs-guide"):null}const Tg=di(Ao.elementType,zP);function VP(e,n){if(fi(e)!=="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,n||"default");if(fi(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function _g(e){var n=VP(e,"string");return fi(n)==="symbol"?n:String(n)}function _i(e,n,t){return n=_g(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var UP="exact-prop: ";function Gs(e){return process.env.NODE_ENV==="production"?e:Me({},e,_i({},UP,function(n){var t=Object.keys(n).filter(function(r){return!e.hasOwnProperty(r)});return t.length>0?new Error("The following props are not supported: ".concat(t.map(function(r){return"`".concat(r,"`")}).join(", "),". Please remove them.")):null}))}function Do(e){for(var n="https://mui.com/production-error/?code="+e,t=1;t<arguments.length;t+=1)n+="&args[]="+encodeURIComponent(arguments[t]);return"Minified Material-UI error #"+e+"; visit "+n+" for the full message."}var Bc={exports:{}},En={},Cg;function WP(){if(Cg)return En;Cg=1;/** @license React v17.0.2
|
|
43
|
-
* react-is.production.min.js
|
|
44
|
-
*
|
|
45
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
46
|
-
*
|
|
47
|
-
* This source code is licensed under the MIT license found in the
|
|
48
|
-
* LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/var e=60103,n=60106,t=60107,r=60108,o=60114,l=60109,d=60110,h=60112,f=60113,m=60120,g=60115,w=60116,x=60121,T=60122,P=60117,C=60129,_=60131;if(typeof Symbol=="function"&&Symbol.for){var k=Symbol.for;e=k("react.element"),n=k("react.portal"),t=k("react.fragment"),r=k("react.strict_mode"),o=k("react.profiler"),l=k("react.provider"),d=k("react.context"),h=k("react.forward_ref"),f=k("react.suspense"),m=k("react.suspense_list"),g=k("react.memo"),w=k("react.lazy"),x=k("react.block"),T=k("react.server.block"),P=k("react.fundamental"),C=k("react.debug_trace_mode"),_=k("react.legacy_hidden")}function V(ve){if(typeof ve=="object"&&ve!==null){var Ae=ve.$$typeof;switch(Ae){case e:switch(ve=ve.type,ve){case t:case o:case r:case f:case m:return ve;default:switch(ve=ve&&ve.$$typeof,ve){case d:case h:case w:case g:case l:return ve;default:return Ae}}case n:return Ae}}}var j=l,Z=e,B=h,Y=t,ie=w,ae=g,le=n,_e=o,fe=r,de=f;return En.ContextConsumer=d,En.ContextProvider=j,En.Element=Z,En.ForwardRef=B,En.Fragment=Y,En.Lazy=ie,En.Memo=ae,En.Portal=le,En.Profiler=_e,En.StrictMode=fe,En.Suspense=de,En.isAsyncMode=function(){return!1},En.isConcurrentMode=function(){return!1},En.isContextConsumer=function(ve){return V(ve)===d},En.isContextProvider=function(ve){return V(ve)===l},En.isElement=function(ve){return typeof ve=="object"&&ve!==null&&ve.$$typeof===e},En.isForwardRef=function(ve){return V(ve)===h},En.isFragment=function(ve){return V(ve)===t},En.isLazy=function(ve){return V(ve)===w},En.isMemo=function(ve){return V(ve)===g},En.isPortal=function(ve){return V(ve)===n},En.isProfiler=function(ve){return V(ve)===o},En.isStrictMode=function(ve){return V(ve)===r},En.isSuspense=function(ve){return V(ve)===f},En.isValidElementType=function(ve){return typeof ve=="string"||typeof ve=="function"||ve===t||ve===o||ve===C||ve===r||ve===f||ve===m||ve===_||typeof ve=="object"&&ve!==null&&(ve.$$typeof===w||ve.$$typeof===g||ve.$$typeof===l||ve.$$typeof===d||ve.$$typeof===h||ve.$$typeof===P||ve.$$typeof===x||ve[0]===T)},En.typeOf=V,En}var xn={},Pg;function GP(){if(Pg)return xn;Pg=1;/** @license React v17.0.2
|
|
50
|
-
* react-is.development.js
|
|
51
|
-
*
|
|
52
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the MIT license found in the
|
|
55
|
-
* LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/return process.env.NODE_ENV!=="production"&&function(){var e=60103,n=60106,t=60107,r=60108,o=60114,l=60109,d=60110,h=60112,f=60113,m=60120,g=60115,w=60116,x=60121,T=60122,P=60117,C=60129,_=60131;if(typeof Symbol=="function"&&Symbol.for){var k=Symbol.for;e=k("react.element"),n=k("react.portal"),t=k("react.fragment"),r=k("react.strict_mode"),o=k("react.profiler"),l=k("react.provider"),d=k("react.context"),h=k("react.forward_ref"),f=k("react.suspense"),m=k("react.suspense_list"),g=k("react.memo"),w=k("react.lazy"),x=k("react.block"),T=k("react.server.block"),P=k("react.fundamental"),k("react.scope"),k("react.opaque.id"),C=k("react.debug_trace_mode"),k("react.offscreen"),_=k("react.legacy_hidden")}var V=!1;function j(Le){return!!(typeof Le=="string"||typeof Le=="function"||Le===t||Le===o||Le===C||Le===r||Le===f||Le===m||Le===_||V||typeof Le=="object"&&Le!==null&&(Le.$$typeof===w||Le.$$typeof===g||Le.$$typeof===l||Le.$$typeof===d||Le.$$typeof===h||Le.$$typeof===P||Le.$$typeof===x||Le[0]===T))}function Z(Le){if(typeof Le=="object"&&Le!==null){var pe=Le.$$typeof;switch(pe){case e:var mt=Le.type;switch(mt){case t:case o:case r:case f:case m:return mt;default:var Ce=mt&&mt.$$typeof;switch(Ce){case d:case h:case w:case g:case l:return Ce;default:return pe}}case n:return pe}}}var B=d,Y=l,ie=e,ae=h,le=t,_e=w,fe=g,de=n,ve=o,Ae=r,ke=f,me=!1,be=!1;function Ee(Le){return me||(me=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Oe(Le){return be||(be=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function F(Le){return Z(Le)===d}function we(Le){return Z(Le)===l}function Ne(Le){return typeof Le=="object"&&Le!==null&&Le.$$typeof===e}function X(Le){return Z(Le)===h}function Be(Le){return Z(Le)===t}function Je(Le){return Z(Le)===w}function He(Le){return Z(Le)===g}function Ze(Le){return Z(Le)===n}function Qe(Le){return Z(Le)===o}function it(Le){return Z(Le)===r}function Ke(Le){return Z(Le)===f}xn.ContextConsumer=B,xn.ContextProvider=Y,xn.Element=ie,xn.ForwardRef=ae,xn.Fragment=le,xn.Lazy=_e,xn.Memo=fe,xn.Portal=de,xn.Profiler=ve,xn.StrictMode=Ae,xn.Suspense=ke,xn.isAsyncMode=Ee,xn.isConcurrentMode=Oe,xn.isContextConsumer=F,xn.isContextProvider=we,xn.isElement=Ne,xn.isForwardRef=X,xn.isFragment=Be,xn.isLazy=Je,xn.isMemo=He,xn.isPortal=Ze,xn.isProfiler=Qe,xn.isStrictMode=it,xn.isSuspense=Ke,xn.isValidElementType=j,xn.typeOf=Z}(),xn}process.env.NODE_ENV==="production"?Bc.exports=WP():Bc.exports=GP();var ka=Bc.exports,qP=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function YP(e){var n="".concat(e).match(qP),t=n&&n[1];return t||""}function Rg(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return e.displayName||e.name||YP(e)||n}function Og(e,n,t){var r=Rg(n);return e.displayName||(r!==""?"".concat(t,"(").concat(r,")"):t)}function Io(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Rg(e,"Component");if(fi(e)==="object")switch(e.$$typeof){case ka.ForwardRef:return Og(e,e.render,"ForwardRef");case ka.Memo:return Og(e,e.type,"memo");default:return}}}function Ki(e,n,t,r,o){if(process.env.NODE_ENV==="production")return null;var l=e[n],d=o||n;return l==null?null:l&&l.nodeType!==1?new Error("Invalid ".concat(r," `").concat(d,"` supplied to `").concat(t,"`. ")+"Expected an HTMLElement."):null}var Jr=R.oneOfType([R.func,R.object]);function kg(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return process.env.NODE_ENV!=="production"&&(e<n||e>t)&&console.error("Material-UI: The value provided ".concat(e," is out of range [").concat(n,", ").concat(t,"].")),Math.min(Math.max(n,e),t)}function XP(e){e=e.substr(1);var n=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),t=e.match(n);return t&&t[0].length===1&&(t=t.map(function(r){return r+r})),t?"rgb".concat(t.length===4?"a":"","(").concat(t.map(function(r,o){return o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3}).join(", "),")"):""}function ZP(e){e=Mo(e);var n=e,t=n.values,r=t[0],o=t[1]/100,l=t[2]/100,d=o*Math.min(l,1-l),h=function(w){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:(w+r/30)%12;return l-d*Math.max(Math.min(x-3,9-x,1),-1)},f="rgb",m=[Math.round(h(0)*255),Math.round(h(8)*255),Math.round(h(4)*255)];return e.type==="hsla"&&(f+="a",m.push(t[3])),jc({type:f,values:m})}function Mo(e){if(e.type)return e;if(e.charAt(0)==="#")return Mo(XP(e));var n=e.indexOf("("),t=e.substring(0,n);if(["rgb","rgba","hsl","hsla"].indexOf(t)===-1)throw new Error(process.env.NODE_ENV!=="production"?"Material-UI: Unsupported `".concat(e,"` color.\nWe support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."):Do(3,e));var r=e.substring(n+1,e.length-1).split(",");return r=r.map(function(o){return parseFloat(o)}),{type:t,values:r}}function jc(e){var n=e.type,t=e.values;return n.indexOf("rgb")!==-1?t=t.map(function(r,o){return o<3?parseInt(r,10):r}):n.indexOf("hsl")!==-1&&(t[1]="".concat(t[1],"%"),t[2]="".concat(t[2],"%")),"".concat(n,"(").concat(t.join(", "),")")}function Ag(e,n){var t=Dg(e),r=Dg(n);return(Math.max(t,r)+.05)/(Math.min(t,r)+.05)}function Dg(e){e=Mo(e);var n=e.type==="hsl"?Mo(ZP(e)).values:e.values;return n=n.map(function(t){return t/=255,t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}),Number((.2126*n[0]+.7152*n[1]+.0722*n[2]).toFixed(3))}function KP(e,n){if(e=Mo(e),n=kg(n),e.type.indexOf("hsl")!==-1)e.values[2]*=1-n;else if(e.type.indexOf("rgb")!==-1)for(var t=0;t<3;t+=1)e.values[t]*=1-n;return jc(e)}function JP(e,n){if(e=Mo(e),n=kg(n),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*n;else if(e.type.indexOf("rgb")!==-1)for(var t=0;t<3;t+=1)e.values[t]+=(255-e.values[t])*n;return jc(e)}function Ji(e,n){if(e==null)return{};var t={},r=Object.keys(e),o,l;for(l=0;l<r.length;l++)o=r[l],!(n.indexOf(o)>=0)&&(t[o]=e[o]);return t}function zt(e,n){if(e==null)return{};var t=Ji(e,n),r,o;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)r=l[o],!(n.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}var Dr=["xs","sm","md","lg","xl"];function QP(e){var n=e.values,t=n===void 0?{xs:0,sm:600,md:960,lg:1280,xl:1920}:n,r=e.unit,o=r===void 0?"px":r,l=e.step,d=l===void 0?5:l,h=zt(e,["values","unit","step"]);function f(P){var C=typeof t[P]=="number"?t[P]:P;return"@media (min-width:".concat(C).concat(o,")")}function m(P){var C=Dr.indexOf(P)+1,_=t[Dr[C]];if(C===Dr.length)return f("xs");var k=typeof _=="number"&&C>0?_:P;return"@media (max-width:".concat(k-d/100).concat(o,")")}function g(P,C){var _=Dr.indexOf(C);return _===Dr.length-1?f(P):"@media (min-width:".concat(typeof t[P]=="number"?t[P]:P).concat(o,") and ")+"(max-width:".concat((_!==-1&&typeof t[Dr[_+1]]=="number"?t[Dr[_+1]]:C)-d/100).concat(o,")")}function w(P){return g(P,P)}var x=!1;function T(P){return process.env.NODE_ENV!=="production"&&(x||(x=!0,console.warn(["Material-UI: The `theme.breakpoints.width` utility is deprecated because it's redundant.","Use the `theme.breakpoints.values` instead."].join(`
|
|
57
|
-
`)))),t[P]}return Me({keys:Dr,values:t,up:f,down:m,between:g,only:w,width:T},h)}function $P(e,n,t){var r;return Me({gutters:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:",`
|
|
58
|
-
paddingLeft: theme.spacing(2),
|
|
59
|
-
paddingRight: theme.spacing(2),
|
|
60
|
-
[theme.breakpoints.up('sm')]: {
|
|
61
|
-
paddingLeft: theme.spacing(3),
|
|
62
|
-
paddingRight: theme.spacing(3),
|
|
63
|
-
},
|
|
64
|
-
`].join(`
|
|
65
|
-
`)),Me({paddingLeft:n(2),paddingRight:n(2)},l,_i({},e.up("sm"),Me({paddingLeft:n(3),paddingRight:n(3)},l[e.up("sm")])))},toolbar:(r={minHeight:56},_i(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),_i(r,e.up("sm"),{minHeight:64}),r)},t)}var qs={black:"#000",white:"#fff"},Hc={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"},zc={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"},Vc={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"},Uc={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"},Wc={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"},Gc={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"},qc={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"},Ig={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:qs.white,default:Hc[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}},Yc={text:{primary:qs.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:Hc[800],default:"#303030"},action:{active:qs.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 Mg(e,n,t,r){var o=r.light||r,l=r.dark||r*1.5;e[n]||(e.hasOwnProperty(t)?e[n]=e[t]:n==="light"?e.light=JP(e.main,o):n==="dark"&&(e.dark=KP(e.main,l)))}function e1(e){var n=e.primary,t=n===void 0?{light:zc[300],main:zc[500],dark:zc[700]}:n,r=e.secondary,o=r===void 0?{light:Vc.A200,main:Vc.A400,dark:Vc.A700}:r,l=e.error,d=l===void 0?{light:Uc[300],main:Uc[500],dark:Uc[700]}:l,h=e.warning,f=h===void 0?{light:Wc[300],main:Wc[500],dark:Wc[700]}:h,m=e.info,g=m===void 0?{light:Gc[300],main:Gc[500],dark:Gc[700]}:m,w=e.success,x=w===void 0?{light:qc[300],main:qc[500],dark:qc[700]}:w,T=e.type,P=T===void 0?"light":T,C=e.contrastThreshold,_=C===void 0?3:C,k=e.tonalOffset,V=k===void 0?.2:k,j=zt(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function Z(ae){var le=Ag(ae,Yc.text.primary)>=_?Yc.text.primary:Ig.text.primary;if(process.env.NODE_ENV!=="production"){var _e=Ag(ae,le);_e<3&&console.error(["Material-UI: The contrast ratio of ".concat(_e,":1 for ").concat(le," on ").concat(ae),"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
66
|
-
`))}return le}var B=function(le){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:500,fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:300,de=arguments.length>3&&arguments[3]!==void 0?arguments[3]:700;if(le=Me({},le),!le.main&&le[_e]&&(le.main=le[_e]),!le.main)throw new Error(process.env.NODE_ENV!=="production"?"Material-UI: The color provided to augmentColor(color) is invalid.\nThe color object needs to have a `main` property or a `".concat(_e,"` property."):Do(4,_e));if(typeof le.main!="string")throw new Error(process.env.NODE_ENV!=="production"?"Material-UI: The color provided to augmentColor(color) is invalid.\n`color.main` should be a string, but `".concat(JSON.stringify(le.main),`\` was provided instead.
|
|
67
|
-
|
|
68
|
-
Did you intend to use one of the following approaches?
|
|
69
|
-
|
|
70
|
-
import { green } from "@material-ui/core/colors";
|
|
71
|
-
|
|
72
|
-
const theme1 = createTheme({ palette: {
|
|
73
|
-
primary: green,
|
|
74
|
-
} });
|
|
75
|
-
|
|
76
|
-
const theme2 = createTheme({ palette: {
|
|
77
|
-
primary: { main: green[500] },
|
|
78
|
-
} });`):Do(5,JSON.stringify(le.main)));return Mg(le,"light",fe,V),Mg(le,"dark",de,V),le.contrastText||(le.contrastText=Z(le.main)),le},Y={dark:Yc,light:Ig};process.env.NODE_ENV!=="production"&&(Y[P]||console.error("Material-UI: The palette type `".concat(P,"` is not supported.")));var ie=ko(Me({common:qs,type:P,primary:B(t),secondary:B(o,"A400","A200","A700"),error:B(d),warning:B(f),info:B(g),success:B(x),grey:Hc,contrastThreshold:_,getContrastText:Z,augmentColor:B,tonalOffset:V},Y[P]),j);return ie}function Ng(e){return Math.round(e*1e5)/1e5}var Lg=!1;function t1(e){return process.env.NODE_ENV!=="production"&&(Lg||(console.warn(["Material-UI: The `theme.typography.round` helper is deprecated.","Head to https://mui.com/r/migration-v4/#theme for a migration path."].join(`
|
|
79
|
-
`)),Lg=!0)),Ng(e)}var Fg={textTransform:"uppercase"},Bg='"Roboto", "Helvetica", "Arial", sans-serif';function n1(e,n){var t=typeof n=="function"?n(e):n,r=t.fontFamily,o=r===void 0?Bg:r,l=t.fontSize,d=l===void 0?14:l,h=t.fontWeightLight,f=h===void 0?300:h,m=t.fontWeightRegular,g=m===void 0?400:m,w=t.fontWeightMedium,x=w===void 0?500:w,T=t.fontWeightBold,P=T===void 0?700:T,C=t.htmlFontSize,_=C===void 0?16:C,k=t.allVariants,V=t.pxToRem,j=zt(t,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);process.env.NODE_ENV!=="production"&&(typeof d!="number"&&console.error("Material-UI: `fontSize` is required to be a number."),typeof _!="number"&&console.error("Material-UI: `htmlFontSize` is required to be a number."));var Z=d/14,B=V||function(ae){return"".concat(ae/_*Z,"rem")},Y=function(le,_e,fe,de,ve){return Me({fontFamily:o,fontWeight:le,fontSize:B(_e),lineHeight:fe},o===Bg?{letterSpacing:"".concat(Ng(de/_e),"em")}:{},ve,k)},ie={h1:Y(f,96,1.167,-1.5),h2:Y(f,60,1.2,-.5),h3:Y(g,48,1.167,0),h4:Y(g,34,1.235,.25),h5:Y(g,24,1.334,0),h6:Y(x,20,1.6,.15),subtitle1:Y(g,16,1.75,.15),subtitle2:Y(x,14,1.57,.1),body1:Y(g,16,1.5,.15),body2:Y(g,14,1.43,.15),button:Y(x,14,1.75,.4,Fg),caption:Y(g,12,1.66,.4),overline:Y(g,12,2.66,1,Fg)};return ko(Me({htmlFontSize:_,pxToRem:B,round:t1,fontFamily:o,fontSize:d,fontWeightLight:f,fontWeightRegular:g,fontWeightMedium:x,fontWeightBold:P},ie),j,{clone:!1})}var r1=.2,i1=.14,o1=.12;function Pn(){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(r1,")"),"".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(i1,")"),"".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(o1,")")].join(",")}var a1=["none",Pn(0,2,1,-1,0,1,1,0,0,1,3,0),Pn(0,3,1,-2,0,2,2,0,0,1,5,0),Pn(0,3,3,-2,0,3,4,0,0,1,8,0),Pn(0,2,4,-1,0,4,5,0,0,1,10,0),Pn(0,3,5,-1,0,5,8,0,0,1,14,0),Pn(0,3,5,-1,0,6,10,0,0,1,18,0),Pn(0,4,5,-2,0,7,10,1,0,2,16,1),Pn(0,5,5,-3,0,8,10,1,0,3,14,2),Pn(0,5,6,-3,0,9,12,1,0,3,16,2),Pn(0,6,6,-3,0,10,14,1,0,4,18,3),Pn(0,6,7,-4,0,11,15,1,0,4,20,3),Pn(0,7,8,-4,0,12,17,2,0,5,22,4),Pn(0,7,8,-4,0,13,19,2,0,5,24,4),Pn(0,7,9,-4,0,14,21,2,0,5,26,4),Pn(0,8,9,-5,0,15,22,2,0,6,28,5),Pn(0,8,10,-5,0,16,24,2,0,6,30,5),Pn(0,8,11,-5,0,17,26,2,0,6,32,5),Pn(0,9,11,-5,0,18,28,2,0,7,34,6),Pn(0,9,12,-6,0,19,29,2,0,7,36,6),Pn(0,10,13,-6,0,20,31,3,0,8,38,7),Pn(0,10,13,-6,0,21,33,3,0,8,40,7),Pn(0,10,14,-6,0,22,35,3,0,8,42,7),Pn(0,11,14,-7,0,23,36,3,0,9,44,8),Pn(0,11,15,-7,0,24,38,3,0,9,46,8)],s1={borderRadius:4},l1=process.env.NODE_ENV!=="production"?R.oneOfType([R.number,R.string,R.object,R.array]):{};function Xc(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function u1(e){if(Array.isArray(e))return Xc(e)}function c1(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jg(e,n){if(e){if(typeof e=="string")return Xc(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Xc(e,n)}}function h1(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
80
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zc(e){return u1(e)||c1(e)||jg(e)||h1()}function d1(e){if(Array.isArray(e))return e}function f1(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r,o,l,d,h=[],f=!0,m=!1;try{if(l=(t=t.call(e)).next,n!==0)for(;!(f=(r=l.call(t)).done)&&(h.push(r.value),h.length!==n);f=!0);}catch(g){m=!0,o=g}finally{try{if(!f&&t.return!=null&&(d=t.return(),Object(d)!==d))return}finally{if(m)throw o}}return h}}function p1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
81
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kc(e,n){return d1(e)||f1(e,n)||jg(e,n)||p1()}var m1=["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 g1(e){var n=e.spacing||8;return typeof n=="number"?function(t){return process.env.NODE_ENV!=="production"&&typeof t!="number"&&console.error("Material-UI: Expected spacing argument to be a number, got ".concat(t,".")),n*t}:Array.isArray(n)?function(t){return process.env.NODE_ENV!=="production"&&t>n.length-1&&console.error(["Material-UI: The value provided (".concat(t,") overflows."),"The supported values are: ".concat(JSON.stringify(n),"."),"".concat(t," > ").concat(n.length-1,", you need to add the missing values.")].join(`
|
|
82
|
-
`)),n[t]}:typeof n=="function"?n:(process.env.NODE_ENV!=="production"&&console.error(["Material-UI: The `theme.spacing` value (".concat(n,") is invalid."),"It should be a number, an array or a function."].join(`
|
|
83
|
-
`)),function(){})}process.env.NODE_ENV!=="production"&&m1.reduce(function(e,n){return e[n]=l1,e},{});var Hg;function v1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:8;if(e.mui)return e;var n=g1({spacing:e}),t=function(){for(var o=arguments.length,l=new Array(o),d=0;d<o;d++)l[d]=arguments[d];return process.env.NODE_ENV!=="production"&&(l.length<=4||console.error("Material-UI: Too many arguments provided, expected between 0 and 4, got ".concat(l.length))),l.length===0?n(1):l.length===1?n(l[0]):l.map(function(h){if(typeof h=="string")return h;var f=n(h);return typeof f=="number"?"".concat(f,"px"):f}).join(" ")};return Object.defineProperty(t,"unit",{get:function(){return process.env.NODE_ENV!=="production"&&((!Hg||process.env.NODE_ENV==="test")&&console.error(["Material-UI: theme.spacing.unit usage has been deprecated.","It will be removed in v5.","You can replace `theme.spacing.unit * y` with `theme.spacing(y)`.","","You can use the `https://github.com/mui-org/material-ui/tree/master/packages/material-ui-codemod/README.md#theme-spacing-api` migration helper to make the process smoother."].join(`
|
|
84
|
-
`)),Hg=!0),e}}),t.mui=!0,t}var zg={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)"},Ys={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Vg(e){return"".concat(Math.round(e),"ms")}const y1={easing:zg,duration:Ys,create:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["all"],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.duration,o=r===void 0?Ys.standard:r,l=t.easing,d=l===void 0?zg.easeInOut:l,h=t.delay,f=h===void 0?0:h,m=zt(t,["duration","easing","delay"]);if(process.env.NODE_ENV!=="production"){var g=function(T){return typeof T=="string"},w=function(T){return!isNaN(parseFloat(T))};!g(n)&&!Array.isArray(n)&&console.error('Material-UI: Argument "props" must be a string or Array.'),!w(o)&&!g(o)&&console.error('Material-UI: Argument "duration" must be a number or a string but found '.concat(o,".")),g(d)||console.error('Material-UI: Argument "easing" must be a string.'),!w(f)&&!g(f)&&console.error('Material-UI: Argument "delay" must be a number or a string.'),Object.keys(m).length!==0&&console.error("Material-UI: Unrecognized argument(s) [".concat(Object.keys(m).join(","),"]."))}return(Array.isArray(n)?n:[n]).map(function(x){return"".concat(x," ").concat(typeof o=="string"?o:Vg(o)," ").concat(d," ").concat(typeof f=="string"?f:Vg(f))}).join(",")},getAutoHeightDuration:function(n){if(!n)return 0;var t=n/36;return Math.round((4+15*Math.pow(t,.25)+t/5)*10)}};var Ug={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Wg(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.breakpoints,t=n===void 0?{}:n,r=e.mixins,o=r===void 0?{}:r,l=e.palette,d=l===void 0?{}:l,h=e.spacing,f=e.typography,m=f===void 0?{}:f,g=zt(e,["breakpoints","mixins","palette","spacing","typography"]),w=e1(d),x=QP(t),T=v1(h),P=ko({breakpoints:x,direction:"ltr",mixins:$P(x,T,o),overrides:{},palette:w,props:{},shadows:a1,typography:n1(w,m),spacing:T,shape:s1,transitions:y1,zIndex:Ug},g),C=arguments.length,_=new Array(C>1?C-1:0),k=1;k<C;k++)_[k-1]=arguments[k];if(P=_.reduce(function(Z,B){return ko(Z,B)},P),process.env.NODE_ENV!=="production"){var V=["checked","disabled","error","focused","focusVisible","required","expanded","selected"],j=function Z(B,Y){var ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,ae;for(ae in B){var le=B[ae];ie===1?ae.indexOf("Mui")===0&&le&&Z(le,ae,ie+1):V.indexOf(ae)!==-1&&Object.keys(le).length>0&&(process.env.NODE_ENV!=="production"&&console.error(["Material-UI: The `".concat(Y,"` component increases ")+"the CSS specificity of the `".concat(ae,"` internal state."),"You can not override it like this: ",JSON.stringify(B,null,2),"","Instead, you need to use the $ruleName syntax:",JSON.stringify({root:_i({},"&$".concat(ae),le)},null,2),"","https://mui.com/r/pseudo-classes-guide"].join(`
|
|
85
|
-
`)),B[ae]={})}};j(P.overrides)}return P}var w1=typeof Symbol=="function"&&Symbol.for;const Gg=w1?Symbol.for("mui.nested"):"__THEME_NESTED__";var b1=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function E1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.disableGlobal,t=n===void 0?!1:n,r=e.productionPrefix,o=r===void 0?"jss":r,l=e.seed,d=l===void 0?"":l,h=d===""?"":"".concat(d,"-"),f=0,m=function(){return f+=1,process.env.NODE_ENV!=="production"&&f>=1e10&&console.warn(["Material-UI: You might have a memory leak.","The ruleCounter is not supposed to grow that much."].join("")),f};return function(g,w){var x=w.options.name;if(x&&x.indexOf("Mui")===0&&!w.options.link&&!t){if(b1.indexOf(g.key)!==-1)return"Mui-".concat(g.key);var T="".concat(h).concat(x,"-").concat(g.key);return!w.options.theme[Gg]||d!==""?T:"".concat(T,"-").concat(m())}if(process.env.NODE_ENV==="production")return"".concat(h).concat(o).concat(m());var P="".concat(g.key,"-").concat(m());return w.options.classNamePrefix?"".concat(h).concat(w.options.classNamePrefix,"-").concat(P):"".concat(h).concat(P)}}function Xs(e){var n=e.theme,t=e.name,r=e.props;if(!n||!n.props||!n.props[t])return r;var o=n.props[t],l;for(l in o)r[l]===void 0&&(r[l]=o[l]);return r}var x1=process.env.NODE_ENV==="production";function Ir(e,n){if(!x1){var t="Warning: "+n;typeof console<"u"&&console.warn(t);try{throw Error(t)}catch{}}}var qg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Aa=(typeof window>"u"?"undefined":qg(window))==="object"&&(typeof document>"u"?"undefined":qg(document))==="object"&&document.nodeType===9;function S1(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_g(r.key),r)}}function Jc(e,n,t){return n&&S1(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qc(e,n){return Qc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Qc(e,n)}function Zs(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,Qc(e,n)}function $c(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var T1={}.constructor;function eh(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(eh);if(e.constructor!==T1)return e;var n={};for(var t in e)n[t]=eh(e[t]);return n}function th(e,n,t){e===void 0&&(e="unnamed");var r=t.jss,o=eh(n),l=r.plugins.onCreateRule(e,o,t);return l||(e[0]==="@"&&process.env.NODE_ENV!=="production"&&Ir(!1,"[JSS] Unknown rule "+e),null)}var Yg=function(n,t){for(var r="",o=0;o<n.length&&n[o]!=="!important";o++)r&&(r+=t),r+=n[o];return r},Qi=function(n){if(!Array.isArray(n))return n;var t="";if(Array.isArray(n[0]))for(var r=0;r<n.length&&n[r]!=="!important";r++)t&&(t+=", "),t+=Yg(n[r]," ");else t=Yg(n,", ");return n[n.length-1]==="!important"&&(t+=" !important"),t};function No(e){return e&&e.format===!1?{linebreak:"",space:""}:{linebreak:`
|
|
86
|
-
`,space:" "}}function Da(e,n){for(var t="",r=0;r<n;r++)t+=" ";return t+e}function Ia(e,n,t){t===void 0&&(t={});var r="";if(!n)return r;var o=t,l=o.indent,d=l===void 0?0:l,h=n.fallbacks;t.format===!1&&(d=-1/0);var f=No(t),m=f.linebreak,g=f.space;if(e&&d++,h)if(Array.isArray(h))for(var w=0;w<h.length;w++){var x=h[w];for(var T in x){var P=x[T];P!=null&&(r&&(r+=m),r+=Da(T+":"+g+Qi(P)+";",d))}}else for(var C in h){var _=h[C];_!=null&&(r&&(r+=m),r+=Da(C+":"+g+Qi(_)+";",d))}for(var k in n){var V=n[k];V!=null&&k!=="fallbacks"&&(r&&(r+=m),r+=Da(k+":"+g+Qi(V)+";",d))}return!r&&!t.allowEmpty||!e?r:(d--,r&&(r=""+m+r+m),Da(""+e+g+"{"+r,d)+Da("}",d))}var _1=/([[\].#*$><+~=|^:(),"'`\s])/g,Xg=typeof CSS<"u"&&CSS.escape,nh=function(e){return Xg?Xg(e):e.replace(_1,"\\$1")},Zg=function(){function e(t,r,o){this.type="style",this.isProcessed=!1;var l=o.sheet,d=o.Renderer;this.key=t,this.options=o,this.style=r,l?this.renderer=l.renderer:d&&(this.renderer=new d)}var n=e.prototype;return n.prop=function(r,o,l){if(o===void 0)return this.style[r];var d=l?l.force:!1;if(!d&&this.style[r]===o)return this;var h=o;(!l||l.process!==!1)&&(h=this.options.jss.plugins.onChangeValue(o,r,this));var f=h==null||h===!1,m=r in this.style;if(f&&!m&&!d)return this;var g=f&&m;if(g?delete this.style[r]:this.style[r]=h,this.renderable&&this.renderer)return g?this.renderer.removeProperty(this.renderable,r):this.renderer.setProperty(this.renderable,r,h),this;var w=this.options.sheet;return w&&w.attached&&process.env.NODE_ENV!=="production"&&Ir(!1,'[JSS] Rule is not linked. Missing sheet option "link: true".'),this},e}(),rh=function(e){Zs(n,e);function n(r,o,l){var d;d=e.call(this,r,o,l)||this;var h=l.selector,f=l.scoped,m=l.sheet,g=l.generateId;return h?d.selectorText=h:f!==!1&&(d.id=g($c($c(d)),m),d.selectorText="."+nh(d.id)),d}var t=n.prototype;return t.applyTo=function(o){var l=this.renderer;if(l){var d=this.toJSON();for(var h in d)l.setProperty(o,h,d[h])}return this},t.toJSON=function(){var o={};for(var l in this.style){var d=this.style[l];typeof d!="object"?o[l]=d:Array.isArray(d)&&(o[l]=Qi(d))}return o},t.toString=function(o){var l=this.options.sheet,d=l?l.options.link:!1,h=d?Me({},o,{allowEmpty:!0}):o;return Ia(this.selectorText,this.style,h)},Jc(n,[{key:"selector",set:function(o){if(o!==this.selectorText){this.selectorText=o;var l=this.renderer,d=this.renderable;if(!(!d||!l)){var h=l.setSelector(d,o);h||l.replaceRule(d,this)}}},get:function(){return this.selectorText}}]),n}(Zg),C1={onCreateRule:function(n,t,r){return n[0]==="@"||r.parent&&r.parent.type==="keyframes"?null:new rh(n,t,r)}},ih={indent:1,children:!0},P1=/@([\w-]+)/,R1=function(){function e(t,r,o){this.type="conditional",this.isProcessed=!1,this.key=t;var l=t.match(P1);this.at=l?l[1]:"unknown",this.query=o.name||"@"+this.at,this.options=o,this.rules=new Ks(Me({},o,{parent:this}));for(var d in r)this.rules.add(d,r[d]);this.rules.process()}var n=e.prototype;return n.getRule=function(r){return this.rules.get(r)},n.indexOf=function(r){return this.rules.indexOf(r)},n.addRule=function(r,o,l){var d=this.rules.add(r,o,l);return d?(this.options.jss.plugins.onProcessRule(d),d):null},n.replaceRule=function(r,o,l){var d=this.rules.replace(r,o,l);return d&&this.options.jss.plugins.onProcessRule(d),d},n.toString=function(r){r===void 0&&(r=ih);var o=No(r),l=o.linebreak;if(r.indent==null&&(r.indent=ih.indent),r.children==null&&(r.children=ih.children),r.children===!1)return this.query+" {}";var d=this.rules.toString(r);return d?this.query+" {"+l+d+l+"}":""},e}(),O1=/@container|@media|@supports\s+/,k1={onCreateRule:function(n,t,r){return O1.test(n)?new R1(n,t,r):null}},oh={indent:1,children:!0},A1=/@keyframes\s+([\w-]+)/,ah=function(){function e(t,r,o){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var l=t.match(A1);l&&l[1]?this.name=l[1]:(this.name="noname",process.env.NODE_ENV!=="production"&&Ir(!1,"[JSS] Bad keyframes name "+t)),this.key=this.type+"-"+this.name,this.options=o;var d=o.scoped,h=o.sheet,f=o.generateId;this.id=d===!1?this.name:nh(f(this,h)),this.rules=new Ks(Me({},o,{parent:this}));for(var m in r)this.rules.add(m,r[m],Me({},o,{parent:this}));this.rules.process()}var n=e.prototype;return n.toString=function(r){r===void 0&&(r=oh);var o=No(r),l=o.linebreak;if(r.indent==null&&(r.indent=oh.indent),r.children==null&&(r.children=oh.children),r.children===!1)return this.at+" "+this.id+" {}";var d=this.rules.toString(r);return d&&(d=""+l+d+l),this.at+" "+this.id+" {"+d+"}"},e}(),D1=/@keyframes\s+/,I1=/\$([\w-]+)/g,sh=function(n,t){return typeof n=="string"?n.replace(I1,function(r,o){return o in t?t[o]:(process.env.NODE_ENV!=="production"&&Ir(!1,'[JSS] Referenced keyframes rule "'+o+'" is not defined.'),r)}):n},Kg=function(n,t,r){var o=n[t],l=sh(o,r);l!==o&&(n[t]=l)},M1={onCreateRule:function(n,t,r){return typeof n=="string"&&D1.test(n)?new ah(n,t,r):null},onProcessStyle:function(n,t,r){return t.type!=="style"||!r||("animation-name"in n&&Kg(n,"animation-name",r.keyframes),"animation"in n&&Kg(n,"animation",r.keyframes)),n},onChangeValue:function(n,t,r){var o=r.options.sheet;if(!o)return n;switch(t){case"animation":return sh(n,o.keyframes);case"animation-name":return sh(n,o.keyframes);default:return n}}},N1=function(e){Zs(n,e);function n(){return e.apply(this,arguments)||this}var t=n.prototype;return t.toString=function(o){var l=this.options.sheet,d=l?l.options.link:!1,h=d?Me({},o,{allowEmpty:!0}):o;return Ia(this.key,this.style,h)},n}(Zg),L1={onCreateRule:function(n,t,r){return r.parent&&r.parent.type==="keyframes"?new N1(n,t,r):null}},F1=function(){function e(t,r,o){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=t,this.style=r,this.options=o}var n=e.prototype;return n.toString=function(r){var o=No(r),l=o.linebreak;if(Array.isArray(this.style)){for(var d="",h=0;h<this.style.length;h++)d+=Ia(this.at,this.style[h]),this.style[h+1]&&(d+=l);return d}return Ia(this.at,this.style,r)},e}(),B1=/@font-face/,j1={onCreateRule:function(n,t,r){return B1.test(n)?new F1(n,t,r):null}},H1=function(){function e(t,r,o){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=t,this.style=r,this.options=o}var n=e.prototype;return n.toString=function(r){return Ia(this.key,this.style,r)},e}(),z1={onCreateRule:function(n,t,r){return n==="@viewport"||n==="@-ms-viewport"?new H1(n,t,r):null}},V1=function(){function e(t,r,o){this.type="simple",this.isProcessed=!1,this.key=t,this.value=r,this.options=o}var n=e.prototype;return n.toString=function(r){if(Array.isArray(this.value)){for(var o="",l=0;l<this.value.length;l++)o+=this.key+" "+this.value[l]+";",this.value[l+1]&&(o+=`
|
|
87
|
-
`);return o}return this.key+" "+this.value+";"},e}(),U1={"@charset":!0,"@import":!0,"@namespace":!0},W1={onCreateRule:function(n,t,r){return n in U1?new V1(n,t,r):null}},Jg=[C1,k1,M1,L1,j1,z1,W1],G1={process:!0},Qg={force:!0,process:!0},Ks=function(){function e(t){this.map={},this.raw={},this.index=[],this.counter=0,this.options=t,this.classes=t.classes,this.keyframes=t.keyframes}var n=e.prototype;return n.add=function(r,o,l){var d=this.options,h=d.parent,f=d.sheet,m=d.jss,g=d.Renderer,w=d.generateId,x=d.scoped,T=Me({classes:this.classes,parent:h,sheet:f,jss:m,Renderer:g,generateId:w,scoped:x,name:r,keyframes:this.keyframes,selector:void 0},l),P=r;r in this.raw&&(P=r+"-d"+this.counter++),this.raw[P]=o,P in this.classes&&(T.selector="."+nh(this.classes[P]));var C=th(P,o,T);if(!C)return null;this.register(C);var _=T.index===void 0?this.index.length:T.index;return this.index.splice(_,0,C),C},n.replace=function(r,o,l){var d=this.get(r),h=this.index.indexOf(d);d&&this.remove(d);var f=l;return h!==-1&&(f=Me({},l,{index:h})),this.add(r,o,f)},n.get=function(r){return this.map[r]},n.remove=function(r){this.unregister(r),delete this.raw[r.key],this.index.splice(this.index.indexOf(r),1)},n.indexOf=function(r){return this.index.indexOf(r)},n.process=function(){var r=this.options.jss.plugins;this.index.slice(0).forEach(r.onProcessRule,r)},n.register=function(r){this.map[r.key]=r,r instanceof rh?(this.map[r.selector]=r,r.id&&(this.classes[r.key]=r.id)):r instanceof ah&&this.keyframes&&(this.keyframes[r.name]=r.id)},n.unregister=function(r){delete this.map[r.key],r instanceof rh?(delete this.map[r.selector],delete this.classes[r.key]):r instanceof ah&&delete this.keyframes[r.name]},n.update=function(){var r,o,l;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(r=arguments.length<=0?void 0:arguments[0],o=arguments.length<=1?void 0:arguments[1],l=arguments.length<=2?void 0:arguments[2]):(o=arguments.length<=0?void 0:arguments[0],l=arguments.length<=1?void 0:arguments[1],r=null),r)this.updateOne(this.get(r),o,l);else for(var d=0;d<this.index.length;d++)this.updateOne(this.index[d],o,l)},n.updateOne=function(r,o,l){l===void 0&&(l=G1);var d=this.options,h=d.jss.plugins,f=d.sheet;if(r.rules instanceof e){r.rules.update(o,l);return}var m=r.style;if(h.onUpdate(o,r,f,l),l.process&&m&&m!==r.style){h.onProcessStyle(r.style,r,f);for(var g in r.style){var w=r.style[g],x=m[g];w!==x&&r.prop(g,w,Qg)}for(var T in m){var P=r.style[T],C=m[T];P==null&&P!==C&&r.prop(T,null,Qg)}}},n.toString=function(r){for(var o="",l=this.options.sheet,d=l?l.options.link:!1,h=No(r),f=h.linebreak,m=0;m<this.index.length;m++){var g=this.index[m],w=g.toString(r);!w&&!d||(o&&(o+=f),o+=w)}return o},e}(),$g=function(){function e(t,r){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Me({},r,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),r.Renderer&&(this.renderer=new r.Renderer(this)),this.rules=new Ks(this.options);for(var o in t)this.rules.add(o,t[o]);this.rules.process()}var n=e.prototype;return n.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},n.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},n.addRule=function(r,o,l){var d=this.queue;this.attached&&!d&&(this.queue=[]);var h=this.rules.add(r,o,l);return h?(this.options.jss.plugins.onProcessRule(h),this.attached?(this.deployed&&(d?d.push(h):(this.insertRule(h),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),h):(this.deployed=!1,h)):null},n.replaceRule=function(r,o,l){var d=this.rules.get(r);if(!d)return this.addRule(r,o,l);var h=this.rules.replace(r,o,l);return h&&this.options.jss.plugins.onProcessRule(h),this.attached?(this.deployed&&this.renderer&&(h?d.renderable&&this.renderer.replaceRule(d.renderable,h):this.renderer.deleteRule(d)),h):(this.deployed=!1,h)},n.insertRule=function(r){this.renderer&&this.renderer.insertRule(r)},n.addRules=function(r,o){var l=[];for(var d in r){var h=this.addRule(d,r[d],o);h&&l.push(h)}return l},n.getRule=function(r){return this.rules.get(r)},n.deleteRule=function(r){var o=typeof r=="object"?r:this.rules.get(r);return!o||this.attached&&!o.renderable?!1:(this.rules.remove(o),this.attached&&o.renderable&&this.renderer?this.renderer.deleteRule(o.renderable):!0)},n.indexOf=function(r){return this.rules.indexOf(r)},n.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},n.update=function(){var r;return(r=this.rules).update.apply(r,arguments),this},n.updateOne=function(r,o,l){return this.rules.updateOne(r,o,l),this},n.toString=function(r){return this.rules.toString(r)},e}(),q1=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var n=e.prototype;return n.onCreateRule=function(r,o,l){for(var d=0;d<this.registry.onCreateRule.length;d++){var h=this.registry.onCreateRule[d](r,o,l);if(h)return h}return null},n.onProcessRule=function(r){if(!r.isProcessed){for(var o=r.options.sheet,l=0;l<this.registry.onProcessRule.length;l++)this.registry.onProcessRule[l](r,o);r.style&&this.onProcessStyle(r.style,r,o),r.isProcessed=!0}},n.onProcessStyle=function(r,o,l){for(var d=0;d<this.registry.onProcessStyle.length;d++)o.style=this.registry.onProcessStyle[d](o.style,o,l)},n.onProcessSheet=function(r){for(var o=0;o<this.registry.onProcessSheet.length;o++)this.registry.onProcessSheet[o](r)},n.onUpdate=function(r,o,l,d){for(var h=0;h<this.registry.onUpdate.length;h++)this.registry.onUpdate[h](r,o,l,d)},n.onChangeValue=function(r,o,l){for(var d=r,h=0;h<this.registry.onChangeValue.length;h++)d=this.registry.onChangeValue[h](d,o,l);return d},n.use=function(r,o){o===void 0&&(o={queue:"external"});var l=this.plugins[o.queue];l.indexOf(r)===-1&&(l.push(r),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(d,h){for(var f in h)f in d?d[f].push(h[f]):process.env.NODE_ENV!=="production"&&Ir(!1,'[JSS] Unknown hook "'+f+'".');return d},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),Y1=function(){function e(){this.registry=[]}var n=e.prototype;return n.add=function(r){var o=this.registry,l=r.options.index;if(o.indexOf(r)===-1){if(o.length===0||l>=this.index){o.push(r);return}for(var d=0;d<o.length;d++)if(o[d].options.index>l){o.splice(d,0,r);return}}},n.reset=function(){this.registry=[]},n.remove=function(r){var o=this.registry.indexOf(r);this.registry.splice(o,1)},n.toString=function(r){for(var o=r===void 0?{}:r,l=o.attached,d=Ji(o,["attached"]),h=No(d),f=h.linebreak,m="",g=0;g<this.registry.length;g++){var w=this.registry[g];l!=null&&w.attached!==l||(m&&(m+=f),m+=w.toString(d))}return m},Jc(e,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),e}(),Ma=new Y1,lh=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),uh="2f1acc6c3a606b082e5eef5e54414ffb";lh[uh]==null&&(lh[uh]=0);var ev=lh[uh]++,X1=1e10,tv=function(n){n===void 0&&(n={});var t=0,r=function(l,d){t+=1,t>X1&&process.env.NODE_ENV!=="production"&&Ir(!1,"[JSS] You might have a memory leak. Rule counter is at "+t+".");var h="",f="";return d&&(d.options.classNamePrefix&&(f=d.options.classNamePrefix),d.options.jss.id!=null&&(h=String(d.options.jss.id))),n.minify?""+(f||"c")+ev+h+t:f+l.key+"-"+ev+(h?"-"+h:"")+"-"+t};return r},nv=function(n){var t;return function(){return t||(t=n()),t}},Z1=function(n,t){try{return n.attributeStyleMap?n.attributeStyleMap.get(t):n.style.getPropertyValue(t)}catch{return""}},K1=function(n,t,r){try{var o=r;if(Array.isArray(r)&&(o=Qi(r)),n.attributeStyleMap)n.attributeStyleMap.set(t,o);else{var l=o?o.indexOf("!important"):-1,d=l>-1?o.substr(0,l-1):o;n.style.setProperty(t,d,l>-1?"important":"")}}catch{return!1}return!0},J1=function(n,t){try{n.attributeStyleMap?n.attributeStyleMap.delete(t):n.style.removeProperty(t)}catch(r){process.env.NODE_ENV!=="production"&&Ir(!1,'[JSS] DOMException "'+r.message+'" was thrown. Tried to remove property "'+t+'".')}},Q1=function(n,t){return n.selectorText=t,n.selectorText===t},rv=nv(function(){return document.querySelector("head")});function $1(e,n){for(var t=0;t<e.length;t++){var r=e[t];if(r.attached&&r.options.index>n.index&&r.options.insertionPoint===n.insertionPoint)return r}return null}function eR(e,n){for(var t=e.length-1;t>=0;t--){var r=e[t];if(r.attached&&r.options.insertionPoint===n.insertionPoint)return r}return null}function tR(e){for(var n=rv(),t=0;t<n.childNodes.length;t++){var r=n.childNodes[t];if(r.nodeType===8&&r.nodeValue.trim()===e)return r}return null}function nR(e){var n=Ma.registry;if(n.length>0){var t=$1(n,e);if(t&&t.renderer)return{parent:t.renderer.element.parentNode,node:t.renderer.element};if(t=eR(n,e),t&&t.renderer)return{parent:t.renderer.element.parentNode,node:t.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&typeof r=="string"){var o=tR(r);if(o)return{parent:o.parentNode,node:o.nextSibling};process.env.NODE_ENV!=="production"&&Ir(!1,'[JSS] Insertion point "'+r+'" not found.')}return!1}function rR(e,n){var t=n.insertionPoint,r=nR(n);if(r!==!1&&r.parent){r.parent.insertBefore(e,r.node);return}if(t&&typeof t.nodeType=="number"){var o=t,l=o.parentNode;l?l.insertBefore(e,o.nextSibling):process.env.NODE_ENV!=="production"&&Ir(!1,"[JSS] Insertion point is not in the DOM.");return}rv().appendChild(e)}var iR=nv(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),iv=function(n,t,r){try{"insertRule"in n?n.insertRule(t,r):"appendRule"in n&&n.appendRule(t)}catch(o){return process.env.NODE_ENV!=="production"&&Ir(!1,"[JSS] "+o.message),!1}return n.cssRules[r]},ov=function(n,t){var r=n.cssRules.length;return t===void 0||t>r?r:t},oR=function(){var n=document.createElement("style");return n.textContent=`
|
|
88
|
-
`,n},aR=function(){function e(t){this.getPropertyValue=Z1,this.setProperty=K1,this.removeProperty=J1,this.setSelector=Q1,this.hasInsertedRules=!1,this.cssRules=[],t&&Ma.add(t),this.sheet=t;var r=this.sheet?this.sheet.options:{},o=r.media,l=r.meta,d=r.element;this.element=d||oR(),this.element.setAttribute("data-jss",""),o&&this.element.setAttribute("media",o),l&&this.element.setAttribute("data-meta",l);var h=iR();h&&this.element.setAttribute("nonce",h)}var n=e.prototype;return n.attach=function(){if(!(this.element.parentNode||!this.sheet)){rR(this.element,this.sheet.options);var r=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&r&&(this.hasInsertedRules=!1,this.deploy())}},n.detach=function(){if(this.sheet){var r=this.element.parentNode;r&&r.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=`
|
|
89
|
-
`)}},n.deploy=function(){var r=this.sheet;if(r){if(r.options.link){this.insertRules(r.rules);return}this.element.textContent=`
|
|
90
|
-
`+r.toString()+`
|
|
91
|
-
`}},n.insertRules=function(r,o){for(var l=0;l<r.index.length;l++)this.insertRule(r.index[l],l,o)},n.insertRule=function(r,o,l){if(l===void 0&&(l=this.element.sheet),r.rules){var d=r,h=l;if(r.type==="conditional"||r.type==="keyframes"){var f=ov(l,o);if(h=iv(l,d.toString({children:!1}),f),h===!1)return!1;this.refCssRule(r,f,h)}return this.insertRules(d.rules,h),h}var m=r.toString();if(!m)return!1;var g=ov(l,o),w=iv(l,m,g);return w===!1?!1:(this.hasInsertedRules=!0,this.refCssRule(r,g,w),w)},n.refCssRule=function(r,o,l){r.renderable=l,r.options.parent instanceof $g&&this.cssRules.splice(o,0,l)},n.deleteRule=function(r){var o=this.element.sheet,l=this.indexOf(r);return l===-1?!1:(o.deleteRule(l),this.cssRules.splice(l,1),!0)},n.indexOf=function(r){return this.cssRules.indexOf(r)},n.replaceRule=function(r,o){var l=this.indexOf(r);return l===-1?!1:(this.element.sheet.deleteRule(l),this.cssRules.splice(l,1),this.insertRule(o,l))},n.getRules=function(){return this.element.sheet.cssRules},e}(),sR=0,lR=function(){function e(t){this.id=sR++,this.version="10.10.0",this.plugins=new q1,this.options={id:{minify:!1},createGenerateId:tv,Renderer:Aa?aR:null,plugins:[]},this.generateId=tv({minify:!1});for(var r=0;r<Jg.length;r++)this.plugins.use(Jg[r],{queue:"internal"});this.setup(t)}var n=e.prototype;return n.setup=function(r){return r===void 0&&(r={}),r.createGenerateId&&(this.options.createGenerateId=r.createGenerateId),r.id&&(this.options.id=Me({},this.options.id,r.id)),(r.createGenerateId||r.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),r.insertionPoint!=null&&(this.options.insertionPoint=r.insertionPoint),"Renderer"in r&&(this.options.Renderer=r.Renderer),r.plugins&&this.use.apply(this,r.plugins),this},n.createStyleSheet=function(r,o){o===void 0&&(o={});var l=o,d=l.index;typeof d!="number"&&(d=Ma.index===0?0:Ma.index+1);var h=new $g(r,Me({},o,{jss:this,generateId:o.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:d}));return this.plugins.onProcessSheet(h),h},n.removeStyleSheet=function(r){return r.detach(),Ma.remove(r),this},n.createRule=function(r,o,l){if(o===void 0&&(o={}),l===void 0&&(l={}),typeof r=="object")return this.createRule(void 0,r,o);var d=Me({},l,{name:r,jss:this,Renderer:this.options.Renderer});d.generateId||(d.generateId=this.generateId),d.classes||(d.classes={}),d.keyframes||(d.keyframes={});var h=th(r,o,d);return h&&this.plugins.onProcessRule(h),h},n.use=function(){for(var r=this,o=arguments.length,l=new Array(o),d=0;d<o;d++)l[d]=arguments[d];return l.forEach(function(h){r.plugins.use(h)}),this},e}(),ch=function(n){return new lR(n)},hh=typeof CSS=="object"&&CSS!=null&&"number"in CSS;function av(e){var n=null;for(var t in e){var r=e[t],o=typeof r;if(o==="function")n||(n={}),n[t]=r;else if(o==="object"&&r!==null&&!Array.isArray(r)){var l=av(r);l&&(n||(n={}),n[t]=l)}}return n}/**
|
|
92
|
-
* A better abstraction over CSS.
|
|
93
|
-
*
|
|
94
|
-
* @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
|
|
95
|
-
* @website https://github.com/cssinjs/jss
|
|
96
|
-
* @license MIT
|
|
97
|
-
*/ch();var sv=Date.now(),dh="fnValues"+sv,fh="fnStyle"+ ++sv,uR=function(){return{onCreateRule:function(t,r,o){if(typeof r!="function")return null;var l=th(t,{},o);return l[fh]=r,l},onProcessStyle:function(t,r){if(dh in r||fh in r)return t;var o={};for(var l in t){var d=t[l];typeof d=="function"&&(delete t[l],o[l]=d)}return r[dh]=o,t},onUpdate:function(t,r,o,l){var d=r,h=d[fh];if(h&&(d.style=h(t)||{},process.env.NODE_ENV==="development")){for(var f in d.style)if(typeof d.style[f]=="function"){process.env.NODE_ENV!=="production"&&Ir(!1,"[JSS] Function values inside function rules are not supported.");break}}var m=d[dh];if(m)for(var g in m)d.prop(g,m[g](t),l)}}},Ci="@global",ph="@global ",cR=function(){function e(t,r,o){this.type="global",this.at=Ci,this.isProcessed=!1,this.key=t,this.options=o,this.rules=new Ks(Me({},o,{parent:this}));for(var l in r)this.rules.add(l,r[l]);this.rules.process()}var n=e.prototype;return n.getRule=function(r){return this.rules.get(r)},n.addRule=function(r,o,l){var d=this.rules.add(r,o,l);return d&&this.options.jss.plugins.onProcessRule(d),d},n.replaceRule=function(r,o,l){var d=this.rules.replace(r,o,l);return d&&this.options.jss.plugins.onProcessRule(d),d},n.indexOf=function(r){return this.rules.indexOf(r)},n.toString=function(r){return this.rules.toString(r)},e}(),hR=function(){function e(t,r,o){this.type="global",this.at=Ci,this.isProcessed=!1,this.key=t,this.options=o;var l=t.substr(ph.length);this.rule=o.jss.createRule(l,r,Me({},o,{parent:this}))}var n=e.prototype;return n.toString=function(r){return this.rule?this.rule.toString(r):""},e}(),dR=/\s*,\s*/g;function lv(e,n){for(var t=e.split(dR),r="",o=0;o<t.length;o++)r+=n+" "+t[o].trim(),t[o+1]&&(r+=", ");return r}function fR(e,n){var t=e.options,r=e.style,o=r?r[Ci]:null;if(o){for(var l in o)n.addRule(l,o[l],Me({},t,{selector:lv(l,e.selector)}));delete r[Ci]}}function pR(e,n){var t=e.options,r=e.style;for(var o in r)if(!(o[0]!=="@"||o.substr(0,Ci.length)!==Ci)){var l=lv(o.substr(Ci.length),e.selector);n.addRule(l,r[o],Me({},t,{selector:l})),delete r[o]}}function mR(){function e(t,r,o){if(!t)return null;if(t===Ci)return new cR(t,r,o);if(t[0]==="@"&&t.substr(0,ph.length)===ph)return new hR(t,r,o);var l=o.parent;return l&&(l.type==="global"||l.options.parent&&l.options.parent.type==="global")&&(o.scoped=!1),!o.selector&&o.scoped===!1&&(o.selector=t),null}function n(t,r){t.type!=="style"||!r||(fR(t,r),pR(t,r))}return{onCreateRule:e,onProcessRule:n}}var uv=/\s*,\s*/g,gR=/&/g,vR=/\$([\w-]+)/g;function yR(){function e(o,l){return function(d,h){var f=o.getRule(h)||l&&l.getRule(h);return f?f.selector:(process.env.NODE_ENV!=="production"&&Ir(!1,'[JSS] Could not find the referenced rule "'+h+'" in "'+(o.options.meta||o.toString())+'".'),h)}}function n(o,l){for(var d=l.split(uv),h=o.split(uv),f="",m=0;m<d.length;m++)for(var g=d[m],w=0;w<h.length;w++){var x=h[w];f&&(f+=", "),f+=x.indexOf("&")!==-1?x.replace(gR,g):g+" "+x}return f}function t(o,l,d){if(d)return Me({},d,{index:d.index+1});var h=o.options.nestingLevel;h=h===void 0?1:h+1;var f=Me({},o.options,{nestingLevel:h,index:l.indexOf(o)+1});return delete f.name,f}function r(o,l,d){if(l.type!=="style")return o;var h=l,f=h.options.parent,m,g;for(var w in o){var x=w.indexOf("&")!==-1,T=w[0]==="@";if(!(!x&&!T)){if(m=t(h,f,m),x){var P=n(w,h.selector);g||(g=e(f,d)),P=P.replace(vR,g);var C=h.key+"-"+w;"replaceRule"in f?f.replaceRule(C,o[w],Me({},m,{selector:P})):f.addRule(C,o[w],Me({},m,{selector:P}))}else T&&f.addRule(w,{},m).addRule(h.key,o[w],{selector:h.selector});delete o[w]}}return o}return{onProcessStyle:r}}var wR=/[A-Z]/g,bR=/^ms-/,mh={};function ER(e){return"-"+e.toLowerCase()}function cv(e){if(mh.hasOwnProperty(e))return mh[e];var n=e.replace(wR,ER);return mh[e]=bR.test(n)?"-"+n:n}function Js(e){var n={};for(var t in e){var r=t.indexOf("--")===0?t:cv(t);n[r]=e[t]}return e.fallbacks&&(Array.isArray(e.fallbacks)?n.fallbacks=e.fallbacks.map(Js):n.fallbacks=Js(e.fallbacks)),n}function xR(){function e(t){if(Array.isArray(t)){for(var r=0;r<t.length;r++)t[r]=Js(t[r]);return t}return Js(t)}function n(t,r,o){if(r.indexOf("--")===0)return t;var l=cv(r);return r===l?t:(o.prop(l,t),null)}return{onProcessStyle:e,onChangeValue:n}}var We=hh&&CSS?CSS.px:"px",Qs=hh&&CSS?CSS.ms:"ms",Lo=hh&&CSS?CSS.percent:"%",SR={"animation-delay":Qs,"animation-duration":Qs,"background-position":We,"background-position-x":We,"background-position-y":We,"background-size":We,border:We,"border-bottom":We,"border-bottom-left-radius":We,"border-bottom-right-radius":We,"border-bottom-width":We,"border-left":We,"border-left-width":We,"border-radius":We,"border-right":We,"border-right-width":We,"border-top":We,"border-top-left-radius":We,"border-top-right-radius":We,"border-top-width":We,"border-width":We,"border-block":We,"border-block-end":We,"border-block-end-width":We,"border-block-start":We,"border-block-start-width":We,"border-block-width":We,"border-inline":We,"border-inline-end":We,"border-inline-end-width":We,"border-inline-start":We,"border-inline-start-width":We,"border-inline-width":We,"border-start-start-radius":We,"border-start-end-radius":We,"border-end-start-radius":We,"border-end-end-radius":We,margin:We,"margin-bottom":We,"margin-left":We,"margin-right":We,"margin-top":We,"margin-block":We,"margin-block-end":We,"margin-block-start":We,"margin-inline":We,"margin-inline-end":We,"margin-inline-start":We,padding:We,"padding-bottom":We,"padding-left":We,"padding-right":We,"padding-top":We,"padding-block":We,"padding-block-end":We,"padding-block-start":We,"padding-inline":We,"padding-inline-end":We,"padding-inline-start":We,"mask-position-x":We,"mask-position-y":We,"mask-size":We,height:We,width:We,"min-height":We,"max-height":We,"min-width":We,"max-width":We,bottom:We,left:We,top:We,right:We,inset:We,"inset-block":We,"inset-block-end":We,"inset-block-start":We,"inset-inline":We,"inset-inline-end":We,"inset-inline-start":We,"box-shadow":We,"text-shadow":We,"column-gap":We,"column-rule":We,"column-rule-width":We,"column-width":We,"font-size":We,"font-size-delta":We,"letter-spacing":We,"text-decoration-thickness":We,"text-indent":We,"text-stroke":We,"text-stroke-width":We,"word-spacing":We,motion:We,"motion-offset":We,outline:We,"outline-offset":We,"outline-width":We,perspective:We,"perspective-origin-x":Lo,"perspective-origin-y":Lo,"transform-origin":Lo,"transform-origin-x":Lo,"transform-origin-y":Lo,"transform-origin-z":Lo,"transition-delay":Qs,"transition-duration":Qs,"vertical-align":We,"flex-basis":We,"shape-margin":We,size:We,gap:We,grid:We,"grid-gap":We,"row-gap":We,"grid-row-gap":We,"grid-column-gap":We,"grid-template-rows":We,"grid-template-columns":We,"grid-auto-rows":We,"grid-auto-columns":We,"box-shadow-x":We,"box-shadow-y":We,"box-shadow-blur":We,"box-shadow-spread":We,"font-line-height":We,"text-shadow-x":We,"text-shadow-y":We,"text-shadow-blur":We};function hv(e){var n=/(-[a-z])/g,t=function(d){return d[1].toUpperCase()},r={};for(var o in e)r[o]=e[o],r[o.replace(n,t)]=e[o];return r}var TR=hv(SR);function Na(e,n,t){if(n==null)return n;if(Array.isArray(n))for(var r=0;r<n.length;r++)n[r]=Na(e,n[r],t);else if(typeof n=="object")if(e==="fallbacks")for(var o in n)n[o]=Na(o,n[o],t);else for(var l in n)n[l]=Na(e+"-"+l,n[l],t);else if(typeof n=="number"&&isNaN(n)===!1){var d=t[e]||TR[e];return d&&!(n===0&&d===We)?typeof d=="function"?d(n).toString():""+n+d:n.toString()}return n}function _R(e){e===void 0&&(e={});var n=hv(e);function t(o,l){if(l.type!=="style")return o;for(var d in o)o[d]=Na(d,o[d],n);return o}function r(o,l){return Na(l,o,n)}return{onProcessStyle:t,onChangeValue:r}}var La="",gh="",dv="",fv="",CR=Aa&&"ontouchstart"in document.documentElement;if(Aa){var vh={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},PR=document.createElement("p"),yh=PR.style,RR="Transform";for(var wh in vh)if(wh+RR in yh){La=wh,gh=vh[wh];break}La==="Webkit"&&"msHyphens"in yh&&(La="ms",gh=vh.ms,fv="edge"),La==="Webkit"&&"-apple-trailing-word"in yh&&(dv="apple")}var Ft={js:La,css:gh,vendor:dv,browser:fv,isTouch:CR};function OR(e){return e[1]==="-"||Ft.js==="ms"?e:"@"+Ft.css+"keyframes"+e.substr(10)}var kR={noPrefill:["appearance"],supportedProperty:function(n){return n!=="appearance"?!1:Ft.js==="ms"?"-webkit-"+n:Ft.css+n}},AR={noPrefill:["color-adjust"],supportedProperty:function(n){return n!=="color-adjust"?!1:Ft.js==="Webkit"?Ft.css+"print-"+n:n}},DR=/[-\s]+(.)?/g;function IR(e,n){return n?n.toUpperCase():""}function bh(e){return e.replace(DR,IR)}function Pi(e){return bh("-"+e)}var MR={noPrefill:["mask"],supportedProperty:function(n,t){if(!/^mask/.test(n))return!1;if(Ft.js==="Webkit"){var r="mask-image";if(bh(r)in t)return n;if(Ft.js+Pi(r)in t)return Ft.css+n}return n}},NR={noPrefill:["text-orientation"],supportedProperty:function(n){return n!=="text-orientation"?!1:Ft.vendor==="apple"&&!Ft.isTouch?Ft.css+n:n}},LR={noPrefill:["transform"],supportedProperty:function(n,t,r){return n!=="transform"?!1:r.transform?n:Ft.css+n}},FR={noPrefill:["transition"],supportedProperty:function(n,t,r){return n!=="transition"?!1:r.transition?n:Ft.css+n}},BR={noPrefill:["writing-mode"],supportedProperty:function(n){return n!=="writing-mode"?!1:Ft.js==="Webkit"||Ft.js==="ms"&&Ft.browser!=="edge"?Ft.css+n:n}},jR={noPrefill:["user-select"],supportedProperty:function(n){return n!=="user-select"?!1:Ft.js==="Moz"||Ft.js==="ms"||Ft.vendor==="apple"?Ft.css+n:n}},HR={supportedProperty:function(n,t){if(!/^break-/.test(n))return!1;if(Ft.js==="Webkit"){var r="WebkitColumn"+Pi(n);return r in t?Ft.css+"column-"+n:!1}if(Ft.js==="Moz"){var o="page"+Pi(n);return o in t?"page-"+n:!1}return!1}},zR={supportedProperty:function(n,t){if(!/^(border|margin|padding)-inline/.test(n))return!1;if(Ft.js==="Moz")return n;var r=n.replace("-inline","");return Ft.js+Pi(r)in t?Ft.css+r:!1}},VR={supportedProperty:function(n,t){return bh(n)in t?n:!1}},UR={supportedProperty:function(n,t){var r=Pi(n);return n[0]==="-"||n[0]==="-"&&n[1]==="-"?n:Ft.js+r in t?Ft.css+n:Ft.js!=="Webkit"&&"Webkit"+r in t?"-webkit-"+n:!1}},WR={supportedProperty:function(n){return n.substring(0,11)!=="scroll-snap"?!1:Ft.js==="ms"?""+Ft.css+n:n}},GR={supportedProperty:function(n){return n!=="overscroll-behavior"?!1:Ft.js==="ms"?Ft.css+"scroll-chaining":n}},qR={"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"},YR={supportedProperty:function(n,t){var r=qR[n];return r&&Ft.js+Pi(r)in t?Ft.css+r:!1}},pv={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"},XR=Object.keys(pv),ZR=function(n){return Ft.css+n},KR={supportedProperty:function(n,t,r){var o=r.multiple;if(XR.indexOf(n)>-1){var l=pv[n];if(!Array.isArray(l))return Ft.js+Pi(l)in t?Ft.css+l:!1;if(!o)return!1;for(var d=0;d<l.length;d++)if(!(Ft.js+Pi(l[0])in t))return!1;return l.map(ZR)}return!1}},mv=[kR,AR,MR,NR,LR,FR,BR,jR,HR,zR,VR,UR,WR,GR,YR,KR],gv=mv.filter(function(e){return e.supportedProperty}).map(function(e){return e.supportedProperty}),JR=mv.filter(function(e){return e.noPrefill}).reduce(function(e,n){return e.push.apply(e,Zc(n.noPrefill)),e},[]),Fa,$i={};if(Aa){Fa=document.createElement("p");var Eh=window.getComputedStyle(document.documentElement,"");for(var xh in Eh)isNaN(xh)||($i[Eh[xh]]=Eh[xh]);JR.forEach(function(e){return delete $i[e]})}function Sh(e,n){if(n===void 0&&(n={}),!Fa)return e;if(process.env.NODE_ENV!=="benchmark"&&$i[e]!=null)return $i[e];(e==="transition"||e==="transform")&&(n[e]=e in Fa.style);for(var t=0;t<gv.length&&($i[e]=gv[t](e,Fa.style,n),!$i[e]);t++);try{Fa.style[e]=""}catch{return!1}return $i[e]}var Fo={},QR={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},$R=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g,Ri;function eO(e,n,t){if(n==="var")return"var";if(n==="all")return"all";if(t==="all")return", all";var r=n?Sh(n):", "+Sh(t);return r||n||t}Aa&&(Ri=document.createElement("p"));function vv(e,n){var t=n;if(!Ri||e==="content")return n;if(typeof t!="string"||!isNaN(parseInt(t,10)))return t;var r=e+t;if(process.env.NODE_ENV!=="benchmark"&&Fo[r]!=null)return Fo[r];try{Ri.style[e]=t}catch{return Fo[r]=!1,!1}if(QR[e])t=t.replace($R,eO);else if(Ri.style[e]===""&&(t=Ft.css+t,t==="-ms-flex"&&(Ri.style[e]="-ms-flexbox"),Ri.style[e]=t,Ri.style[e]===""))return Fo[r]=!1,!1;return Ri.style[e]="",Fo[r]=t,Fo[r]}function tO(){function e(o){if(o.type==="keyframes"){var l=o;l.at=OR(l.at)}}function n(o){for(var l in o){var d=o[l];if(l==="fallbacks"&&Array.isArray(d)){o[l]=d.map(n);continue}var h=!1,f=Sh(l);f&&f!==l&&(h=!0);var m=!1,g=vv(f,Qi(d));g&&g!==d&&(m=!0),(h||m)&&(h&&delete o[l],o[f||l]=g||d)}return o}function t(o,l){return l.type!=="style"?o:n(o)}function r(o,l){return vv(l,Qi(o))||o}return{onProcessRule:e,onProcessStyle:t,onChangeValue:r}}function nO(){var e=function(t,r){return t.length===r.length?t>r?1:-1:t.length-r.length};return{onProcessStyle:function(t,r){if(r.type!=="style")return t;for(var o={},l=Object.keys(t).sort(e),d=0;d<l.length;d++)o[l[d]]=t[l[d]];return o}}}function yv(){return{plugins:[uR(),mR(),yR(),xR(),_R(),typeof window>"u"?null:tO(),nO()]}}function Th(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.baseClasses,t=e.newClasses,r=e.Component;if(!t)return n;var o=Me({},n);return process.env.NODE_ENV!=="production"&&typeof t=="string"?(console.error(["Material-UI: The value `".concat(t,"` ")+"provided to the classes prop of ".concat(Io(r)," is incorrect."),"You might want to use the className prop instead."].join(`
|
|
98
|
-
`)),n):(Object.keys(t).forEach(function(l){process.env.NODE_ENV!=="production"&&(!n[l]&&t[l]&&console.error(["Material-UI: The key `".concat(l,"` ")+"provided to the classes prop is not implemented in ".concat(Io(r),"."),"You can only override one of the following: ".concat(Object.keys(n).join(","),".")].join(`
|
|
99
|
-
`)),t[l]&&typeof t[l]!="string"&&console.error(["Material-UI: The key `".concat(l,"` ")+"provided to the classes prop is not valid for ".concat(Io(r),"."),"You need to provide a non empty string instead of: ".concat(t[l],".")].join(`
|
|
100
|
-
`))),t[l]&&(o[l]="".concat(n[l]," ").concat(t[l]))}),o)}var Bo={set:function(n,t,r,o){var l=n.get(t);l||(l=new Map,n.set(t,l)),l.set(r,o)},get:function(n,t,r){var o=n.get(t);return o?o.get(r):void 0},delete:function(n,t,r){var o=n.get(t);o.delete(r)}},_h=Te.createContext(null);process.env.NODE_ENV!=="production"&&(_h.displayName="ThemeContext");function eo(){var e=Te.useContext(_h);return process.env.NODE_ENV!=="production"&&Te.useDebugValue(e),e}var rO=ch(yv()),iO=E1(),oO=new Map,aO={disableGeneration:!1,generateClassName:iO,jss:rO,sheetsCache:null,sheetsManager:oO,sheetsRegistry:null},$s=Te.createContext(aO);process.env.NODE_ENV!=="production"&&($s.displayName="StylesContext");var el;function Ch(e){var n=e.children,t=e.injectFirst,r=t===void 0?!1:t,o=e.disableGeneration,l=o===void 0?!1:o,d=zt(e,["children","injectFirst","disableGeneration"]),h=Te.useContext($s),f=Me({},h,{disableGeneration:l},d);if(process.env.NODE_ENV!=="production"&&typeof window>"u"&&!f.sheetsManager&&console.error("Material-UI: You need to use the ServerStyleSheets API when rendering on the server."),process.env.NODE_ENV!=="production"&&f.jss.options.insertionPoint&&r&&console.error("Material-UI: You cannot use a custom insertionPoint and <StylesContext injectFirst> at the same time."),process.env.NODE_ENV!=="production"&&r&&d.jss&&console.error("Material-UI: You cannot use the jss and injectFirst props at the same time."),!f.jss.options.insertionPoint&&r&&typeof window<"u"){if(!el){var m=document.head;el=document.createComment("mui-inject-first"),m.insertBefore(el,m.firstChild)}f.jss=ch({plugins:yv().plugins,insertionPoint:el})}return Te.createElement($s.Provider,{value:f},n)}process.env.NODE_ENV!=="production"&&(Ch.propTypes={children:R.node.isRequired,disableGeneration:R.bool,generateClassName:R.func,injectFirst:R.bool,jss:R.object,serverGenerateClassName:R.func,sheetsCache:R.object,sheetsManager:R.object,sheetsRegistry:R.object}),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&(Ch.propTypes=Gs(Ch.propTypes));var Ph=-1e9;function sO(){return Ph+=1,process.env.NODE_ENV!=="production"&&Ph>=0&&console.warn(["Material-UI: You might have a memory leak.","The indexCounter is not supposed to grow that much."].join(`
|
|
101
|
-
`)),Ph}var wv={};function lO(e){var n=typeof e=="function";return process.env.NODE_ENV!=="production"&&fi(e)!=="object"&&!n&&console.error(["Material-UI: The `styles` argument provided is invalid.","You need to provide a function generating the styles or a styles object."].join(`
|
|
102
|
-
`)),{create:function(r,o){var l;try{l=n?e(r):e}catch(f){throw process.env.NODE_ENV!=="production"&&n===!0&&r===wv&&console.error(["Material-UI: The `styles` argument provided is invalid.","You are providing a function without a theme in the context.","One of the parent elements needs to use a ThemeProvider."].join(`
|
|
103
|
-
`)),f}if(!o||!r.overrides||!r.overrides[o])return l;var d=r.overrides[o],h=Me({},l);return Object.keys(d).forEach(function(f){process.env.NODE_ENV!=="production"&&(h[f]||console.warn(["Material-UI: You are trying to override a style that does not exist.","Fix the `".concat(f,"` key of `theme.overrides.").concat(o,"`.")].join(`
|
|
104
|
-
`))),h[f]=ko(h[f],d[f])}),h},options:{}}}function uO(e,n,t){var r=e.state,o=e.stylesOptions;if(o.disableGeneration)return n||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var l=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,l=!0),n!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=n,l=!0),l&&(r.cacheClasses.value=Th({baseClasses:r.cacheClasses.lastJSS,newClasses:n,Component:t})),r.cacheClasses.value}function cO(e,n){var t=e.state,r=e.theme,o=e.stylesOptions,l=e.stylesCreator,d=e.name;if(!o.disableGeneration){var h=Bo.get(o.sheetsManager,l,r);h||(h={refs:0,staticSheet:null,dynamicStyles:null},Bo.set(o.sheetsManager,l,r,h));var f=Me({},l.options,o,{theme:r,flip:typeof o.flip=="boolean"?o.flip:r.direction==="rtl"});f.generateId=f.serverGenerateClassName||f.generateClassName;var m=o.sheetsRegistry;if(h.refs===0){var g;o.sheetsCache&&(g=Bo.get(o.sheetsCache,l,r));var w=l.create(r,d);g||(g=o.jss.createStyleSheet(w,Me({link:!1},f)),g.attach(),o.sheetsCache&&Bo.set(o.sheetsCache,l,r,g)),m&&m.add(g),h.staticSheet=g,h.dynamicStyles=av(w)}if(h.dynamicStyles){var x=o.jss.createStyleSheet(h.dynamicStyles,Me({link:!0},f));x.update(n),x.attach(),t.dynamicSheet=x,t.classes=Th({baseClasses:h.staticSheet.classes,newClasses:x.classes}),m&&m.add(x)}else t.classes=h.staticSheet.classes;h.refs+=1}}function hO(e,n){var t=e.state;t.dynamicSheet&&t.dynamicSheet.update(n)}function dO(e){var n=e.state,t=e.theme,r=e.stylesOptions,o=e.stylesCreator;if(!r.disableGeneration){var l=Bo.get(r.sheetsManager,o,t);l.refs-=1;var d=r.sheetsRegistry;l.refs===0&&(Bo.delete(r.sheetsManager,o,t),r.jss.removeStyleSheet(l.staticSheet),d&&d.remove(l.staticSheet)),n.dynamicSheet&&(r.jss.removeStyleSheet(n.dynamicSheet),d&&d.remove(n.dynamicSheet))}}function fO(e,n){var t=Te.useRef([]),r,o=Te.useMemo(function(){return{}},n);t.current!==o&&(t.current=o,r=e()),Te.useEffect(function(){return function(){r&&r()}},[o])}function pO(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=n.name,r=n.classNamePrefix,o=n.Component,l=n.defaultTheme,d=l===void 0?wv:l,h=zt(n,["name","classNamePrefix","Component","defaultTheme"]),f=lO(e),m=t||r||"makeStyles";f.options={index:sO(),name:t,meta:m,classNamePrefix:m};var g=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=eo()||d,P=Me({},Te.useContext($s),h),C=Te.useRef(),_=Te.useRef();fO(function(){var V={name:t,state:{},stylesCreator:f,stylesOptions:P,theme:T};return cO(V,x),_.current=!1,C.current=V,function(){dO(V)}},[T,f]),Te.useEffect(function(){_.current&&hO(C.current,x),_.current=!0});var k=uO(C.current,x.classes,o);return process.env.NODE_ENV!=="production"&&Te.useDebugValue(k),k};return g}function mO(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function bv(e){var n,t,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(n=0;n<e.length;n++)e[n]&&(t=bv(e[n]))&&(r&&(r+=" "),r+=t);else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Sn(){for(var e,n,t=0,r="";t<arguments.length;)(e=arguments[t++])&&(n=bv(e))&&(r&&(r+=" "),r+=n);return r}var Rh={exports:{}},sn={},Ev;function gO(){if(Ev)return sn;Ev=1;/** @license React v16.13.1
|
|
105
|
-
* react-is.production.min.js
|
|
106
|
-
*
|
|
107
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the MIT license found in the
|
|
110
|
-
* LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,l=e?Symbol.for("react.profiler"):60114,d=e?Symbol.for("react.provider"):60109,h=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,m=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,w=e?Symbol.for("react.suspense"):60113,x=e?Symbol.for("react.suspense_list"):60120,T=e?Symbol.for("react.memo"):60115,P=e?Symbol.for("react.lazy"):60116,C=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,k=e?Symbol.for("react.responder"):60118,V=e?Symbol.for("react.scope"):60119;function j(B){if(typeof B=="object"&&B!==null){var Y=B.$$typeof;switch(Y){case n:switch(B=B.type,B){case f:case m:case r:case l:case o:case w:return B;default:switch(B=B&&B.$$typeof,B){case h:case g:case P:case T:case d:return B;default:return Y}}case t:return Y}}}function Z(B){return j(B)===m}return sn.AsyncMode=f,sn.ConcurrentMode=m,sn.ContextConsumer=h,sn.ContextProvider=d,sn.Element=n,sn.ForwardRef=g,sn.Fragment=r,sn.Lazy=P,sn.Memo=T,sn.Portal=t,sn.Profiler=l,sn.StrictMode=o,sn.Suspense=w,sn.isAsyncMode=function(B){return Z(B)||j(B)===f},sn.isConcurrentMode=Z,sn.isContextConsumer=function(B){return j(B)===h},sn.isContextProvider=function(B){return j(B)===d},sn.isElement=function(B){return typeof B=="object"&&B!==null&&B.$$typeof===n},sn.isForwardRef=function(B){return j(B)===g},sn.isFragment=function(B){return j(B)===r},sn.isLazy=function(B){return j(B)===P},sn.isMemo=function(B){return j(B)===T},sn.isPortal=function(B){return j(B)===t},sn.isProfiler=function(B){return j(B)===l},sn.isStrictMode=function(B){return j(B)===o},sn.isSuspense=function(B){return j(B)===w},sn.isValidElementType=function(B){return typeof B=="string"||typeof B=="function"||B===r||B===m||B===l||B===o||B===w||B===x||typeof B=="object"&&B!==null&&(B.$$typeof===P||B.$$typeof===T||B.$$typeof===d||B.$$typeof===h||B.$$typeof===g||B.$$typeof===_||B.$$typeof===k||B.$$typeof===V||B.$$typeof===C)},sn.typeOf=j,sn}var ln={},xv;function vO(){if(xv)return ln;xv=1;/** @license React v16.13.1
|
|
112
|
-
* react-is.development.js
|
|
113
|
-
*
|
|
114
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
115
|
-
*
|
|
116
|
-
* This source code is licensed under the MIT license found in the
|
|
117
|
-
* LICENSE file in the root directory of this source tree.
|
|
118
|
-
*/return process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,l=e?Symbol.for("react.profiler"):60114,d=e?Symbol.for("react.provider"):60109,h=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,m=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,w=e?Symbol.for("react.suspense"):60113,x=e?Symbol.for("react.suspense_list"):60120,T=e?Symbol.for("react.memo"):60115,P=e?Symbol.for("react.lazy"):60116,C=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,k=e?Symbol.for("react.responder"):60118,V=e?Symbol.for("react.scope"):60119;function j(pe){return typeof pe=="string"||typeof pe=="function"||pe===r||pe===m||pe===l||pe===o||pe===w||pe===x||typeof pe=="object"&&pe!==null&&(pe.$$typeof===P||pe.$$typeof===T||pe.$$typeof===d||pe.$$typeof===h||pe.$$typeof===g||pe.$$typeof===_||pe.$$typeof===k||pe.$$typeof===V||pe.$$typeof===C)}function Z(pe){if(typeof pe=="object"&&pe!==null){var mt=pe.$$typeof;switch(mt){case n:var Ce=pe.type;switch(Ce){case f:case m:case r:case l:case o:case w:return Ce;default:var Pt=Ce&&Ce.$$typeof;switch(Pt){case h:case g:case P:case T:case d:return Pt;default:return mt}}case t:return mt}}}var B=f,Y=m,ie=h,ae=d,le=n,_e=g,fe=r,de=P,ve=T,Ae=t,ke=l,me=o,be=w,Ee=!1;function Oe(pe){return Ee||(Ee=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),F(pe)||Z(pe)===f}function F(pe){return Z(pe)===m}function we(pe){return Z(pe)===h}function Ne(pe){return Z(pe)===d}function X(pe){return typeof pe=="object"&&pe!==null&&pe.$$typeof===n}function Be(pe){return Z(pe)===g}function Je(pe){return Z(pe)===r}function He(pe){return Z(pe)===P}function Ze(pe){return Z(pe)===T}function Qe(pe){return Z(pe)===t}function it(pe){return Z(pe)===l}function Ke(pe){return Z(pe)===o}function Le(pe){return Z(pe)===w}ln.AsyncMode=B,ln.ConcurrentMode=Y,ln.ContextConsumer=ie,ln.ContextProvider=ae,ln.Element=le,ln.ForwardRef=_e,ln.Fragment=fe,ln.Lazy=de,ln.Memo=ve,ln.Portal=Ae,ln.Profiler=ke,ln.StrictMode=me,ln.Suspense=be,ln.isAsyncMode=Oe,ln.isConcurrentMode=F,ln.isContextConsumer=we,ln.isContextProvider=Ne,ln.isElement=X,ln.isForwardRef=Be,ln.isFragment=Je,ln.isLazy=He,ln.isMemo=Ze,ln.isPortal=Qe,ln.isProfiler=it,ln.isStrictMode=Ke,ln.isSuspense=Le,ln.isValidElementType=j,ln.typeOf=Z}(),ln}process.env.NODE_ENV==="production"?Rh.exports=gO():Rh.exports=vO();var yO=Rh.exports,Oh=yO,wO={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},bO={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},EO={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Sv={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},kh={};kh[Oh.ForwardRef]=EO,kh[Oh.Memo]=Sv;function Tv(e){return Oh.isMemo(e)?Sv:kh[e.$$typeof]||wO}var xO=Object.defineProperty,SO=Object.getOwnPropertyNames,_v=Object.getOwnPropertySymbols,TO=Object.getOwnPropertyDescriptor,_O=Object.getPrototypeOf,Cv=Object.prototype;function Pv(e,n,t){if(typeof n!="string"){if(Cv){var r=_O(n);r&&r!==Cv&&Pv(e,r,t)}var o=SO(n);_v&&(o=o.concat(_v(n)));for(var l=Tv(e),d=Tv(n),h=0;h<o.length;++h){var f=o[h];if(!bO[f]&&!(t&&t[f])&&!(d&&d[f])&&!(l&&l[f])){var m=TO(n,f);try{xO(e,f,m)}catch{}}}}return e}var CO=Pv;const tl=hi(CO);function PO(e,n){if(typeof n=="function"){var t=n(e);return process.env.NODE_ENV!=="production"&&(t||console.error(["Material-UI: You should return an object from your theme function, i.e.","<ThemeProvider theme={() => ({})} />"].join(`
|
|
119
|
-
`))),t}return Me({},e,n)}function nl(e){var n=e.children,t=e.theme,r=eo();process.env.NODE_ENV!=="production"&&r===null&&typeof t=="function"&&console.error(["Material-UI: You are providing a theme function prop to the ThemeProvider component:","<ThemeProvider theme={outerTheme => outerTheme} />","","However, no outer theme is present.","Make sure a theme is already injected higher in the React tree or provide a theme object."].join(`
|
|
120
|
-
`));var o=Te.useMemo(function(){var l=r===null?t:PO(r,t);return l!=null&&(l[Gg]=r!==null),l},[t,r]);return Te.createElement(_h.Provider,{value:o},n)}process.env.NODE_ENV!=="production"&&(nl.propTypes={children:R.node.isRequired,theme:R.oneOfType([R.object,R.func]).isRequired}),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&(nl.propTypes=Gs(nl.propTypes));var RO=function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function(r){var o=t.defaultTheme,l=t.withTheme,d=l===void 0?!1:l,h=t.name,f=zt(t,["defaultTheme","withTheme","name"]);if(process.env.NODE_ENV!=="production"&&r===void 0)throw new Error(["You are calling withStyles(styles)(Component) with an undefined component.","You may have forgotten to import it."].join(`
|
|
121
|
-
`));var m=h;if(process.env.NODE_ENV!=="production"&&!h){var g=Io(r);g!==void 0&&(m=g)}var w=pO(n,Me({defaultTheme:o,Component:r,name:h||r.displayName,classNamePrefix:m},f)),x=Te.forwardRef(function(P,C){P.classes;var _=P.innerRef,k=zt(P,["classes","innerRef"]),V=w(Me({},r.defaultProps,P)),j,Z=k;return(typeof h=="string"||d)&&(j=eo()||o,h&&(Z=Xs({theme:j,name:h,props:k})),d&&!Z.theme&&(Z.theme=j)),Te.createElement(r,Me({ref:_||C,classes:V},Z))});return process.env.NODE_ENV!=="production"&&(x.propTypes={classes:R.object,innerRef:di(R.oneOfType([R.func,R.object]),function(T){return T.innerRef==null,null})}),process.env.NODE_ENV!=="production"&&(x.displayName="WithStyles(".concat(Io(r),")")),tl(x,r),process.env.NODE_ENV!=="production"&&(x.Naked=r,x.options=t,x.useStyles=w),x}},Rv=Wg();function jo(){var e=eo()||Rv;return process.env.NODE_ENV!=="production"&&Te.useDebugValue(e),e}function qn(e,n){return RO(e,Me({defaultTheme:Rv},n))}function Ov(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=eo(),r=Xs({theme:t,name:"MuiUseMediaQuery",props:{}});process.env.NODE_ENV!=="production"&&typeof e=="function"&&t===null&&console.error(["Material-UI: The `query` argument provided is invalid.","You are providing a function without a theme in the context.","One of the parent elements needs to use a ThemeProvider."].join(`
|
|
122
|
-
`));var o=typeof e=="function"?e(t):e;o=o.replace(/^@media( ?)/m,"");var l=typeof window<"u"&&typeof window.matchMedia<"u",d=Me({},r,n),h=d.defaultMatches,f=h===void 0?!1:h,m=d.matchMedia,g=m===void 0?l?window.matchMedia:null:m,w=d.noSsr,x=w===void 0?!1:w,T=d.ssrMatchMedia,P=T===void 0?null:T,C=G.useState(function(){return x&&l?g(o).matches:P?P(o).matches:f}),_=C[0],k=C[1];return G.useEffect(function(){var V=!0;if(l){var j=g(o),Z=function(){V&&k(j.matches)};return Z(),j.addListener(Z),function(){V=!1,j.removeListener(Z)}}},[o,g,l]),process.env.NODE_ENV!=="production"&&G.useDebugValue({query:o,match:_}),_}var OO=function(n,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return r?Dr.indexOf(n)<=Dr.indexOf(t):Dr.indexOf(n)<Dr.indexOf(t)},kO=typeof window>"u"?G.useEffect:G.useLayoutEffect,kv=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return function(t){var r=n.withTheme,o=r===void 0?!1:r,l=n.noSSR,d=l===void 0?!1:l,h=n.initialWidth;function f(m){var g=jo(),w=m.theme||g,x=Xs({theme:w,name:"MuiWithWidth",props:Me({},m)}),T=x.initialWidth,P=x.width,C=zt(x,["initialWidth","width"]),_=G.useState(!1),k=_[0],V=_[1];kO(function(){V(!0)},[]);var j=w.breakpoints.keys.slice().reverse(),Z=j.reduce(function(Y,ie){var ae=Ov(w.breakpoints.up(ie));return!Y&&ae?ie:Y},null),B=Me({width:P||(k||d?Z:void 0)||T||h},o?{theme:w}:{},C);return B.width===void 0?null:G.createElement(t,B)}return process.env.NODE_ENV!=="production"&&(f.propTypes={initialWidth:R.oneOf(["xs","sm","md","lg","xl"]),theme:R.object,width:R.oneOf(["xs","sm","md","lg","xl"])}),process.env.NODE_ENV!=="production"&&(f.displayName="WithWidth(".concat(Io(t),")")),tl(f,t),f}},Ho;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ho||(Ho={}));var Av=process.env.NODE_ENV!=="production"?function(e){return Object.freeze(e)}:function(e){return e};function AO(e,n){{typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}var Dv="beforeunload",DO="popstate";function IO(e){e===void 0&&(e={});var n=e,t=n.window,r=t===void 0?document.defaultView:t,o=r.history;function l(){var ie=r.location,ae=ie.pathname,le=ie.search,_e=ie.hash,fe=o.state||{};return[fe.idx,Av({pathname:ae,search:le,hash:_e,state:fe.usr||null,key:fe.key||"default"})]}var d=null;function h(){if(d)T.call(d),d=null;else{var ie=Ho.Pop,ae=l(),le=ae[0],_e=ae[1];if(T.length)if(le!=null){var fe=g-le;fe&&(d={action:ie,location:_e,retry:function(){B(fe*-1)}},B(fe))}else process.env.NODE_ENV!=="production"&&AO(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation.");else V(ie)}}r.addEventListener(DO,h);var f=Ho.Pop,m=l(),g=m[0],w=m[1],x=Mv(),T=Mv();g==null&&(g=0,o.replaceState(Me({},o.state,{idx:g}),""));function P(ie){return typeof ie=="string"?ie:NO(ie)}function C(ie,ae){return ae===void 0&&(ae=null),Av(Me({pathname:w.pathname,hash:"",search:""},typeof ie=="string"?LO(ie):ie,{state:ae,key:MO()}))}function _(ie,ae){return[{usr:ie.state,key:ie.key,idx:ae},P(ie)]}function k(ie,ae,le){return!T.length||(T.call({action:ie,location:ae,retry:le}),!1)}function V(ie){f=ie;var ae=l();g=ae[0],w=ae[1],x.call({action:f,location:w})}function j(ie,ae){var le=Ho.Push,_e=C(ie,ae);function fe(){j(ie,ae)}if(k(le,_e,fe)){var de=_(_e,g+1),ve=de[0],Ae=de[1];try{o.pushState(ve,"",Ae)}catch{r.location.assign(Ae)}V(le)}}function Z(ie,ae){var le=Ho.Replace,_e=C(ie,ae);function fe(){Z(ie,ae)}if(k(le,_e,fe)){var de=_(_e,g),ve=de[0],Ae=de[1];o.replaceState(ve,"",Ae),V(le)}}function B(ie){o.go(ie)}var Y={get action(){return f},get location(){return w},createHref:P,push:j,replace:Z,go:B,back:function(){B(-1)},forward:function(){B(1)},listen:function(ae){return x.push(ae)},block:function(ae){var le=T.push(ae);return T.length===1&&r.addEventListener(Dv,Iv),function(){le(),T.length||r.removeEventListener(Dv,Iv)}}};return Y}function Iv(e){e.preventDefault(),e.returnValue=""}function Mv(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter(function(r){return r!==t})}},call:function(t){e.forEach(function(r){return r&&r(t)})}}}function MO(){return Math.random().toString(36).substr(2,8)}function NO(e){var n=e.pathname,t=n===void 0?"/":n,r=e.search,o=r===void 0?"":r,l=e.hash,d=l===void 0?"":l;return o&&o!=="?"&&(t+=o.charAt(0)==="?"?o:"?"+o),d&&d!=="#"&&(t+=d.charAt(0)==="#"?d:"#"+d),t}function LO(e){var n={};if(e){var t=e.indexOf("#");t>=0&&(n.hash=e.substr(t),e=e.substr(0,t));var r=e.indexOf("?");r>=0&&(n.search=e.substr(r),e=e.substr(0,r)),e&&(n.pathname=e)}return n}var Ah={exports:{}},Dh={},Nv;function FO(){if(Nv)return Dh;Nv=1;/**
|
|
123
|
-
* @license React
|
|
124
|
-
* use-sync-external-store-shim.production.min.js
|
|
125
|
-
*
|
|
126
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
127
|
-
*
|
|
128
|
-
* This source code is licensed under the MIT license found in the
|
|
129
|
-
* LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/var e=Te;function n(w,x){return w===x&&(w!==0||1/w===1/x)||w!==w&&x!==x}var t=typeof Object.is=="function"?Object.is:n,r=e.useState,o=e.useEffect,l=e.useLayoutEffect,d=e.useDebugValue;function h(w,x){var T=x(),P=r({inst:{value:T,getSnapshot:x}}),C=P[0].inst,_=P[1];return l(function(){C.value=T,C.getSnapshot=x,f(C)&&_({inst:C})},[w,T,x]),o(function(){return f(C)&&_({inst:C}),w(function(){f(C)&&_({inst:C})})},[w]),d(T),T}function f(w){var x=w.getSnapshot;w=w.value;try{var T=x();return!t(w,T)}catch{return!0}}function m(w,x){return x()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return Dh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,Dh}var Ih={},Lv;function BO(){if(Lv)return Ih;Lv=1;/**
|
|
131
|
-
* @license React
|
|
132
|
-
* use-sync-external-store-shim.development.js
|
|
133
|
-
*
|
|
134
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
135
|
-
*
|
|
136
|
-
* This source code is licensed under the MIT license found in the
|
|
137
|
-
* LICENSE file in the root directory of this source tree.
|
|
138
|
-
*/return process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=Te,n=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function t(j){{for(var Z=arguments.length,B=new Array(Z>1?Z-1:0),Y=1;Y<Z;Y++)B[Y-1]=arguments[Y];r("error",j,B)}}function r(j,Z,B){{var Y=n.ReactDebugCurrentFrame,ie=Y.getStackAddendum();ie!==""&&(Z+="%s",B=B.concat([ie]));var ae=B.map(function(le){return String(le)});ae.unshift("Warning: "+Z),Function.prototype.apply.call(console[j],console,ae)}}function o(j,Z){return j===Z&&(j!==0||1/j===1/Z)||j!==j&&Z!==Z}var l=typeof Object.is=="function"?Object.is:o,d=e.useState,h=e.useEffect,f=e.useLayoutEffect,m=e.useDebugValue,g=!1,w=!1;function x(j,Z,B){g||e.startTransition!==void 0&&(g=!0,t("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var Y=Z();if(!w){var ie=Z();l(Y,ie)||(t("The result of getSnapshot should be cached to avoid an infinite loop"),w=!0)}var ae=d({inst:{value:Y,getSnapshot:Z}}),le=ae[0].inst,_e=ae[1];return f(function(){le.value=Y,le.getSnapshot=Z,T(le)&&_e({inst:le})},[j,Y,Z]),h(function(){T(le)&&_e({inst:le});var fe=function(){T(le)&&_e({inst:le})};return j(fe)},[j]),m(Y),Y}function T(j){var Z=j.getSnapshot,B=j.value;try{var Y=Z();return!l(B,Y)}catch{return!0}}function P(j,Z,B){return Z()}var C=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_=!C,k=_?P:x,V=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:k;Ih.useSyncExternalStore=V,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}(),Ih}process.env.NODE_ENV==="production"?Ah.exports=FO():Ah.exports=BO();var Mh=Ah.exports,Nh={},Fv;function jO(){if(Fv)return Nh;Fv=1;/**
|
|
139
|
-
* @license React
|
|
140
|
-
* use-sync-external-store-shim/with-selector.production.min.js
|
|
141
|
-
*
|
|
142
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the MIT license found in the
|
|
145
|
-
* LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/var e=Te,n=Mh;function t(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var r=typeof Object.is=="function"?Object.is:t,o=n.useSyncExternalStore,l=e.useRef,d=e.useEffect,h=e.useMemo,f=e.useDebugValue;return Nh.useSyncExternalStoreWithSelector=function(m,g,w,x,T){var P=l(null);if(P.current===null){var C={hasValue:!1,value:null};P.current=C}else C=P.current;P=h(function(){function k(Y){if(!V){if(V=!0,j=Y,Y=x(Y),T!==void 0&&C.hasValue){var ie=C.value;if(T(ie,Y))return Z=ie}return Z=Y}if(ie=Z,r(j,Y))return ie;var ae=x(Y);return T!==void 0&&T(ie,ae)?ie:(j=Y,Z=ae)}var V=!1,j,Z,B=w===void 0?null:w;return[function(){return k(g())},B===null?void 0:function(){return k(B())}]},[g,w,x,T]);var _=o(m,P[0],P[1]);return d(function(){C.hasValue=!0,C.value=_},[_]),f(_),_},Nh}var Lh={},Bv;function HO(){if(Bv)return Lh;Bv=1;/**
|
|
147
|
-
* @license React
|
|
148
|
-
* use-sync-external-store-shim/with-selector.development.js
|
|
149
|
-
*
|
|
150
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
151
|
-
*
|
|
152
|
-
* This source code is licensed under the MIT license found in the
|
|
153
|
-
* LICENSE file in the root directory of this source tree.
|
|
154
|
-
*/return process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=Te,n=Mh;function t(g,w){return g===w&&(g!==0||1/g===1/w)||g!==g&&w!==w}var r=typeof Object.is=="function"?Object.is:t,o=n.useSyncExternalStore,l=e.useRef,d=e.useEffect,h=e.useMemo,f=e.useDebugValue;function m(g,w,x,T,P){var C=l(null),_;C.current===null?(_={hasValue:!1,value:null},C.current=_):_=C.current;var k=h(function(){var B=!1,Y,ie,ae=function(de){if(!B){B=!0,Y=de;var ve=T(de);if(P!==void 0&&_.hasValue){var Ae=_.value;if(P(Ae,ve))return ie=Ae,Ae}return ie=ve,ve}var ke=Y,me=ie;if(r(ke,de))return me;var be=T(de);return P!==void 0&&P(me,be)?me:(Y=de,ie=be,be)},le=x===void 0?null:x,_e=function(){return ae(w())},fe=le===null?void 0:function(){return ae(le())};return[_e,fe]},[w,x,T,P]),V=k[0],j=k[1],Z=o(g,V,j);return d(function(){_.hasValue=!0,_.value=Z},[Z]),f(Z),Z}Lh.useSyncExternalStoreWithSelector=m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}(),Lh}process.env.NODE_ENV==="production"?jO():HO();function zO(e){e()}let jv=zO;const VO=e=>jv=e,UO=()=>jv,Fh=Te.createContext(null);process.env.NODE_ENV!=="production"&&(Fh.displayName="ReactRedux");const WO=()=>{throw new Error("uSES not initialized!")};var Bh={exports:{}},un={},Hv;function GO(){if(Hv)return un;Hv=1;/**
|
|
155
|
-
* @license React
|
|
156
|
-
* react-is.production.min.js
|
|
157
|
-
*
|
|
158
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
159
|
-
*
|
|
160
|
-
* This source code is licensed under the MIT license found in the
|
|
161
|
-
* LICENSE file in the root directory of this source tree.
|
|
162
|
-
*/var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),d=Symbol.for("react.context"),h=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),P;P=Symbol.for("react.module.reference");function C(_){if(typeof _=="object"&&_!==null){var k=_.$$typeof;switch(k){case e:switch(_=_.type,_){case t:case o:case r:case m:case g:return _;default:switch(_=_&&_.$$typeof,_){case h:case d:case f:case x:case w:case l:return _;default:return k}}case n:return k}}}return un.ContextConsumer=d,un.ContextProvider=l,un.Element=e,un.ForwardRef=f,un.Fragment=t,un.Lazy=x,un.Memo=w,un.Portal=n,un.Profiler=o,un.StrictMode=r,un.Suspense=m,un.SuspenseList=g,un.isAsyncMode=function(){return!1},un.isConcurrentMode=function(){return!1},un.isContextConsumer=function(_){return C(_)===d},un.isContextProvider=function(_){return C(_)===l},un.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===e},un.isForwardRef=function(_){return C(_)===f},un.isFragment=function(_){return C(_)===t},un.isLazy=function(_){return C(_)===x},un.isMemo=function(_){return C(_)===w},un.isPortal=function(_){return C(_)===n},un.isProfiler=function(_){return C(_)===o},un.isStrictMode=function(_){return C(_)===r},un.isSuspense=function(_){return C(_)===m},un.isSuspenseList=function(_){return C(_)===g},un.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===t||_===o||_===r||_===m||_===g||_===T||typeof _=="object"&&_!==null&&(_.$$typeof===x||_.$$typeof===w||_.$$typeof===l||_.$$typeof===d||_.$$typeof===f||_.$$typeof===P||_.getModuleId!==void 0)},un.typeOf=C,un}var cn={},zv;function qO(){if(zv)return cn;zv=1;/**
|
|
163
|
-
* @license React
|
|
164
|
-
* react-is.development.js
|
|
165
|
-
*
|
|
166
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
167
|
-
*
|
|
168
|
-
* This source code is licensed under the MIT license found in the
|
|
169
|
-
* LICENSE file in the root directory of this source tree.
|
|
170
|
-
*/return process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),d=Symbol.for("react.context"),h=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),P=!1,C=!1,_=!1,k=!1,V=!1,j;j=Symbol.for("react.module.reference");function Z(Ce){return!!(typeof Ce=="string"||typeof Ce=="function"||Ce===t||Ce===o||V||Ce===r||Ce===m||Ce===g||k||Ce===T||P||C||_||typeof Ce=="object"&&Ce!==null&&(Ce.$$typeof===x||Ce.$$typeof===w||Ce.$$typeof===l||Ce.$$typeof===d||Ce.$$typeof===f||Ce.$$typeof===j||Ce.getModuleId!==void 0))}function B(Ce){if(typeof Ce=="object"&&Ce!==null){var Pt=Ce.$$typeof;switch(Pt){case e:var wt=Ce.type;switch(wt){case t:case o:case r:case m:case g:return wt;default:var D=wt&&wt.$$typeof;switch(D){case h:case d:case f:case x:case w:case l:return D;default:return Pt}}case n:return Pt}}}var Y=d,ie=l,ae=e,le=f,_e=t,fe=x,de=w,ve=n,Ae=o,ke=r,me=m,be=g,Ee=!1,Oe=!1;function F(Ce){return Ee||(Ee=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function we(Ce){return Oe||(Oe=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Ne(Ce){return B(Ce)===d}function X(Ce){return B(Ce)===l}function Be(Ce){return typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===e}function Je(Ce){return B(Ce)===f}function He(Ce){return B(Ce)===t}function Ze(Ce){return B(Ce)===x}function Qe(Ce){return B(Ce)===w}function it(Ce){return B(Ce)===n}function Ke(Ce){return B(Ce)===o}function Le(Ce){return B(Ce)===r}function pe(Ce){return B(Ce)===m}function mt(Ce){return B(Ce)===g}cn.ContextConsumer=Y,cn.ContextProvider=ie,cn.Element=ae,cn.ForwardRef=le,cn.Fragment=_e,cn.Lazy=fe,cn.Memo=de,cn.Portal=ve,cn.Profiler=Ae,cn.StrictMode=ke,cn.Suspense=me,cn.SuspenseList=be,cn.isAsyncMode=F,cn.isConcurrentMode=we,cn.isContextConsumer=Ne,cn.isContextProvider=X,cn.isElement=Be,cn.isForwardRef=Je,cn.isFragment=He,cn.isLazy=Ze,cn.isMemo=Qe,cn.isPortal=it,cn.isProfiler=Ke,cn.isStrictMode=Le,cn.isSuspense=pe,cn.isSuspenseList=mt,cn.isValidElementType=Z,cn.typeOf=B}(),cn}process.env.NODE_ENV==="production"?Bh.exports=GO():Bh.exports=qO();var Vv=Bh.exports;function jh(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function Hh(e,n){if(e)(n==="mapStateToProps"||n==="mapDispatchToProps")&&(Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||jh(`The selector for ${n} of connect did not specify a value for dependsOnOwnProps.`));else throw new Error(`Unexpected value for ${n} in connect.`)}function YO(e,n,t){Hh(e,"mapStateToProps"),Hh(n,"mapDispatchToProps"),Hh(t,"mergeProps")}const XO=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function ZO(e,n,t,r,{areStatesEqual:o,areOwnPropsEqual:l,areStatePropsEqual:d}){let h=!1,f,m,g,w,x;function T(V,j){return f=V,m=j,g=e(f,m),w=n(r,m),x=t(g,w,m),h=!0,x}function P(){return g=e(f,m),n.dependsOnOwnProps&&(w=n(r,m)),x=t(g,w,m),x}function C(){return e.dependsOnOwnProps&&(g=e(f,m)),n.dependsOnOwnProps&&(w=n(r,m)),x=t(g,w,m),x}function _(){const V=e(f,m),j=!d(V,g);return g=V,j&&(x=t(g,w,m)),x}function k(V,j){const Z=!l(j,m),B=!o(V,f,j,m);return f=V,m=j,Z&&B?P():Z?C():B?_():x}return function(j,Z){return h?k(j,Z):T(j,Z)}}function KO(e,n){let{initMapStateToProps:t,initMapDispatchToProps:r,initMergeProps:o}=n,l=Ji(n,XO);const d=t(e,l),h=r(e,l),f=o(e,l);return process.env.NODE_ENV!=="production"&&YO(d,h,f),ZO(d,h,f,e,l)}function JO(e){if(typeof e!="object"||e===null)return!1;let n=Object.getPrototypeOf(e);if(n===null)return!0;let t=n;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return n===t}function QO(e,n,t){JO(e)||jh(`${t}() in ${n} must return a plain object. Instead received ${e}.`)}function Uv(e){return function(t){const r=e(t);function o(){return r}return o.dependsOnOwnProps=!1,o}}function Wv(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function $O(e,n){return function(r,{displayName:o}){const l=function(h,f){return l.dependsOnOwnProps?l.mapToProps(h,f):l.mapToProps(h,void 0)};return l.dependsOnOwnProps=!0,l.mapToProps=function(h,f){l.mapToProps=e,l.dependsOnOwnProps=Wv(e);let m=l(h,f);return typeof m=="function"&&(l.mapToProps=m,l.dependsOnOwnProps=Wv(m),m=l(h,f)),process.env.NODE_ENV!=="production"&&QO(m,o,n),m},l}}function ek(e,n){return(t,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${n} argument when connecting component ${r.wrappedComponentName}.`)}}function tk(e){return Uv(n=>({dispatch:n}))}function nk(e){return e?typeof e=="function"?$O(e,"mapStateToProps"):ek(e,"mapStateToProps"):Uv(()=>({}))}function rk(e,n,t){return Me({},t,e,n)}function ik(e){return()=>rk}function ok(){const e=UO();let n=null,t=null;return{clear(){n=null,t=null},notify(){e(()=>{let r=n;for(;r;)r.callback(),r=r.next})},get(){let r=[],o=n;for(;o;)r.push(o),o=o.next;return r},subscribe(r){let o=!0,l=t={callback:r,next:null,prev:t};return l.prev?l.prev.next=l:n=l,function(){!o||n===null||(o=!1,l.next?l.next.prev=l.prev:t=l.prev,l.prev?l.prev.next=l.next:n=l.next)}}}}const Gv={notify(){},get:()=>[]};function qv(e,n){let t,r=Gv;function o(w){return f(),r.subscribe(w)}function l(){r.notify()}function d(){g.onStateChange&&g.onStateChange()}function h(){return!!t}function f(){t||(t=n?n.addNestedSub(d):e.subscribe(d),r=ok())}function m(){t&&(t(),t=void 0,r.clear(),r=Gv)}const g={addNestedSub:o,notifyNestedSubs:l,handleChangeWrapper:d,isSubscribed:h,trySubscribe:f,tryUnsubscribe:m,getListeners:()=>r};return g}const rl=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Te.useLayoutEffect:Te.useEffect;function Yv(e,n){return e===n?e!==0||n!==0||1/e===1/n:e!==e&&n!==n}function zh(e,n){if(Yv(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;const t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;for(let o=0;o<t.length;o++)if(!Object.prototype.hasOwnProperty.call(n,t[o])||!Yv(e[t[o]],n[t[o]]))return!1;return!0}const ak=["reactReduxForwardedRef"];let Xv=WO;const sk=e=>{Xv=e},lk=[null,null],uk=e=>{try{return JSON.stringify(e)}catch{return String(e)}};function ck(e,n,t){rl(()=>e(...n),t)}function hk(e,n,t,r,o,l){e.current=r,t.current=!1,o.current&&(o.current=null,l())}function dk(e,n,t,r,o,l,d,h,f,m,g){if(!e)return()=>{};let w=!1,x=null;const T=()=>{if(w||!h.current)return;const C=n.getState();let _,k;try{_=r(C,o.current)}catch(V){k=V,x=V}k||(x=null),_===l.current?d.current||m():(l.current=_,f.current=_,d.current=!0,g())};return t.onStateChange=T,t.trySubscribe(),T(),()=>{if(w=!0,t.tryUnsubscribe(),t.onStateChange=null,x)throw x}}function fk(e,n){return e===n}let Zv=!1;function Mr(e,n,t,{pure:r,areStatesEqual:o=fk,areOwnPropsEqual:l=zh,areStatePropsEqual:d=zh,areMergedPropsEqual:h=zh,forwardRef:f=!1,context:m=Fh}={}){process.env.NODE_ENV!=="production"&&r!==void 0&&!Zv&&(Zv=!0,jh('The `pure` option has been removed. `connect` is now always a "pure/memoized" component'));const g=m,w=nk(e),x=tk(),T=ik(),P=!!e;return _=>{if(process.env.NODE_ENV!=="production"&&!Vv.isValidElementType(_))throw new Error(`You must pass a component to the function returned by connect. Instead received ${uk(_)}`);const k=_.displayName||_.name||"Component",V=`Connect(${k})`,j={shouldHandleStateChanges:P,displayName:V,wrappedComponentName:k,WrappedComponent:_,initMapStateToProps:w,initMapDispatchToProps:x,initMergeProps:T,areStatesEqual:o,areStatePropsEqual:d,areOwnPropsEqual:l,areMergedPropsEqual:h};function Z(ie){const[ae,le,_e]=Te.useMemo(()=>{const{reactReduxForwardedRef:pe}=ie,mt=Ji(ie,ak);return[ie.context,pe,mt]},[ie]),fe=Te.useMemo(()=>ae&&ae.Consumer&&Vv.isContextConsumer(Te.createElement(ae.Consumer,null))?ae:g,[ae,g]),de=Te.useContext(fe),ve=!!ie.store&&!!ie.store.getState&&!!ie.store.dispatch,Ae=!!de&&!!de.store;if(process.env.NODE_ENV!=="production"&&!ve&&!Ae)throw new Error(`Could not find "store" in the context of "${V}". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to ${V} in connect options.`);const ke=ve?ie.store:de.store,me=Ae?de.getServerState:ke.getState,be=Te.useMemo(()=>KO(ke.dispatch,j),[ke]),[Ee,Oe]=Te.useMemo(()=>{if(!P)return lk;const pe=qv(ke,ve?void 0:de.subscription),mt=pe.notifyNestedSubs.bind(pe);return[pe,mt]},[ke,ve,de]),F=Te.useMemo(()=>ve?de:Me({},de,{subscription:Ee}),[ve,de,Ee]),we=Te.useRef(),Ne=Te.useRef(_e),X=Te.useRef(),Be=Te.useRef(!1);Te.useRef(!1);const Je=Te.useRef(!1),He=Te.useRef();rl(()=>(Je.current=!0,()=>{Je.current=!1}),[]);const Ze=Te.useMemo(()=>()=>X.current&&_e===Ne.current?X.current:be(ke.getState(),_e),[ke,_e]),Qe=Te.useMemo(()=>mt=>Ee?dk(P,ke,Ee,be,Ne,we,Be,Je,X,Oe,mt):()=>{},[Ee]);ck(hk,[Ne,we,Be,_e,X,Oe]);let it;try{it=Xv(Qe,Ze,me?()=>be(me(),_e):Ze)}catch(pe){throw He.current&&(pe.message+=`
|
|
171
|
-
The error may be correlated with this previous error:
|
|
172
|
-
${He.current.stack}
|
|
173
|
-
|
|
174
|
-
`),pe}rl(()=>{He.current=void 0,X.current=void 0,we.current=it});const Ke=Te.useMemo(()=>Te.createElement(_,Me({},it,{ref:le})),[le,_,it]);return Te.useMemo(()=>P?Te.createElement(fe.Provider,{value:F},Ke):Ke,[fe,Ke,F])}const Y=Te.memo(Z);if(Y.WrappedComponent=_,Y.displayName=Z.displayName=V,f){const ae=Te.forwardRef(function(_e,fe){return Te.createElement(Y,Me({},_e,{reactReduxForwardedRef:fe}))});return ae.displayName=V,ae.WrappedComponent=_,tl(ae,_)}return tl(Y,_)}}function pk({store:e,context:n,children:t,serverState:r}){const o=Te.useMemo(()=>{const h=qv(e);return{store:e,subscription:h,getServerState:r?()=>r:void 0}},[e,r]),l=Te.useMemo(()=>e.getState(),[e]);rl(()=>{const{subscription:h}=o;return h.onStateChange=h.notifyNestedSubs,h.trySubscribe(),l!==e.getState()&&h.notifyNestedSubs(),()=>{h.tryUnsubscribe(),h.onStateChange=void 0}},[o,l]);const d=n||Fh;return Te.createElement(d.Provider,{value:o},t)}sk(Mh.useSyncExternalStore),VO(zn.unstable_batchedUpdates);/**
|
|
175
|
-
* @remix-run/router v1.6.1
|
|
176
|
-
*
|
|
177
|
-
* Copyright (c) Remix Software Inc.
|
|
178
|
-
*
|
|
179
|
-
* This source code is licensed under the MIT license found in the
|
|
180
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
181
|
-
*
|
|
182
|
-
* @license MIT
|
|
183
|
-
*/function Ba(){return Ba=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Ba.apply(this,arguments)}var Oi;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Oi||(Oi={}));const Kv="popstate";function mk(e){e===void 0&&(e={});function n(o,l){let{pathname:d="/",search:h="",hash:f=""}=to(o.location.hash.substr(1));return Vh("",{pathname:d,search:h,hash:f},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function t(o,l){let d=o.document.querySelector("base"),h="";if(d&&d.getAttribute("href")){let f=o.location.href,m=f.indexOf("#");h=m===-1?f:f.slice(0,m)}return h+"#"+(typeof l=="string"?l:ja(l))}function r(o,l){br(o.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(l)+")")}return vk(n,t,r,e)}function Bt(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function br(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function gk(){return Math.random().toString(36).substr(2,8)}function Jv(e,n){return{usr:e.state,key:e.key,idx:n}}function Vh(e,n,t,r){return t===void 0&&(t=null),Ba({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof n=="string"?to(n):n,{state:t,key:n&&n.key||r||gk()})}function ja(e){let{pathname:n="/",search:t="",hash:r=""}=e;return t&&t!=="?"&&(n+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(n+=r.charAt(0)==="#"?r:"#"+r),n}function to(e){let n={};if(e){let t=e.indexOf("#");t>=0&&(n.hash=e.substr(t),e=e.substr(0,t));let r=e.indexOf("?");r>=0&&(n.search=e.substr(r),e=e.substr(0,r)),e&&(n.pathname=e)}return n}function vk(e,n,t,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:l=!1}=r,d=o.history,h=Oi.Pop,f=null,m=g();m==null&&(m=0,d.replaceState(Ba({},d.state,{idx:m}),""));function g(){return(d.state||{idx:null}).idx}function w(){h=Oi.Pop;let _=g(),k=_==null?null:_-m;m=_,f&&f({action:h,location:C.location,delta:k})}function x(_,k){h=Oi.Push;let V=Vh(C.location,_,k);t&&t(V,_),m=g()+1;let j=Jv(V,m),Z=C.createHref(V);try{d.pushState(j,"",Z)}catch{o.location.assign(Z)}l&&f&&f({action:h,location:C.location,delta:1})}function T(_,k){h=Oi.Replace;let V=Vh(C.location,_,k);t&&t(V,_),m=g();let j=Jv(V,m),Z=C.createHref(V);d.replaceState(j,"",Z),l&&f&&f({action:h,location:C.location,delta:0})}function P(_){let k=o.location.origin!=="null"?o.location.origin:o.location.href,V=typeof _=="string"?_:ja(_);return Bt(k,"No window.location.(origin|href) available to create URL for href: "+V),new URL(V,k)}let C={get action(){return h},get location(){return e(o,d)},listen(_){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(Kv,w),f=_,()=>{o.removeEventListener(Kv,w),f=null}},createHref(_){return n(o,_)},createURL:P,encodeLocation(_){let k=P(_);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:x,replace:T,go(_){return d.go(_)}};return C}var Qv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Qv||(Qv={}));function yk(e,n,t){t===void 0&&(t="/");let r=typeof n=="string"?to(n):n,o=Ha(r.pathname||"/",t);if(o==null)return null;let l=$v(e);wk(l);let d=null;for(let h=0;d==null&&h<l.length;++h)d=Rk(l[h],Ak(o));return d}function $v(e,n,t,r){n===void 0&&(n=[]),t===void 0&&(t=[]),r===void 0&&(r="");let o=(l,d,h)=>{let f={relativePath:h===void 0?l.path||"":h,caseSensitive:l.caseSensitive===!0,childrenIndex:d,route:l};f.relativePath.startsWith("/")&&(Bt(f.relativePath.startsWith(r),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(r.length));let m=pi([r,f.relativePath]),g=t.concat(f);l.children&&l.children.length>0&&(Bt(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),$v(l.children,n,g,m)),!(l.path==null&&!l.index)&&n.push({path:m,score:Ck(m,l.index),routesMeta:g})};return e.forEach((l,d)=>{var h;if(l.path===""||!((h=l.path)!=null&&h.includes("?")))o(l,d);else for(let f of ey(l.path))o(l,d,f)}),n}function ey(e){let n=e.split("/");if(n.length===0)return[];let[t,...r]=n,o=t.endsWith("?"),l=t.replace(/\?$/,"");if(r.length===0)return o?[l,""]:[l];let d=ey(r.join("/")),h=[];return h.push(...d.map(f=>f===""?l:[l,f].join("/"))),o&&h.push(...d),h.map(f=>e.startsWith("/")&&f===""?"/":f)}function wk(e){e.sort((n,t)=>n.score!==t.score?t.score-n.score:Pk(n.routesMeta.map(r=>r.childrenIndex),t.routesMeta.map(r=>r.childrenIndex)))}const bk=/^:\w+$/,Ek=3,xk=2,Sk=1,Tk=10,_k=-2,ty=e=>e==="*";function Ck(e,n){let t=e.split("/"),r=t.length;return t.some(ty)&&(r+=_k),n&&(r+=xk),t.filter(o=>!ty(o)).reduce((o,l)=>o+(bk.test(l)?Ek:l===""?Sk:Tk),r)}function Pk(e,n){return e.length===n.length&&e.slice(0,-1).every((r,o)=>r===n[o])?e[e.length-1]-n[n.length-1]:0}function Rk(e,n){let{routesMeta:t}=e,r={},o="/",l=[];for(let d=0;d<t.length;++d){let h=t[d],f=d===t.length-1,m=o==="/"?n:n.slice(o.length)||"/",g=Ok({path:h.relativePath,caseSensitive:h.caseSensitive,end:f},m);if(!g)return null;Object.assign(r,g.params);let w=h.route;l.push({params:r,pathname:pi([o,g.pathname]),pathnameBase:Nk(pi([o,g.pathnameBase])),route:w}),g.pathnameBase!=="/"&&(o=pi([o,g.pathnameBase]))}return l}function Ok(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[t,r]=kk(e.path,e.caseSensitive,e.end),o=n.match(t);if(!o)return null;let l=o[0],d=l.replace(/(.)\/+$/,"$1"),h=o.slice(1);return{params:r.reduce((m,g,w)=>{if(g==="*"){let x=h[w]||"";d=l.slice(0,l.length-x.length).replace(/(.)\/+$/,"$1")}return m[g]=Dk(h[w]||"",g),m},{}),pathname:l,pathnameBase:d,pattern:e}}function kk(e,n,t){n===void 0&&(n=!1),t===void 0&&(t=!0),br(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(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(d,h)=>(r.push(h),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,n?void 0:"i"),r]}function Ak(e){try{return decodeURI(e)}catch(n){return br(!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 ("+n+").")),e}}function Dk(e,n){try{return decodeURIComponent(e)}catch(t){return br(!1,'The value for the URL param "'+n+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+t+").")),e}}function Ha(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let t=n.endsWith("/")?n.length-1:n.length,r=e.charAt(t);return r&&r!=="/"?null:e.slice(t)||"/"}function Ik(e,n){n===void 0&&(n="/");let{pathname:t,search:r="",hash:o=""}=typeof e=="string"?to(e):e;return{pathname:t?t.startsWith("/")?t:Mk(t,n):n,search:Lk(r),hash:Fk(o)}}function Mk(e,n){let t=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?t.length>1&&t.pop():o!=="."&&t.push(o)}),t.length>1?t.join("/"):"/"}function Uh(e,n,t,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Wh(e){return e.filter((n,t)=>t===0||n.route.path&&n.route.path.length>0)}function Gh(e,n,t,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=to(e):(o=Ba({},e),Bt(!o.pathname||!o.pathname.includes("?"),Uh("?","pathname","search",o)),Bt(!o.pathname||!o.pathname.includes("#"),Uh("#","pathname","hash",o)),Bt(!o.search||!o.search.includes("#"),Uh("#","search","hash",o)));let l=e===""||o.pathname==="",d=l?"/":o.pathname,h;if(r||d==null)h=t;else{let w=n.length-1;if(d.startsWith("..")){let x=d.split("/");for(;x[0]==="..";)x.shift(),w-=1;o.pathname=x.join("/")}h=w>=0?n[w]:"/"}let f=Ik(o,h),m=d&&d!=="/"&&d.endsWith("/"),g=(l||d===".")&&t.endsWith("/");return!f.pathname.endsWith("/")&&(m||g)&&(f.pathname+="/"),f}const pi=e=>e.join("/").replace(/\/\/+/g,"/"),Nk=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Lk=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Fk=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Bk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const ny=["post","put","patch","delete"];new Set(ny);const jk=["get",...ny];new Set(jk);/**
|
|
184
|
-
* React Router v6.11.1
|
|
185
|
-
*
|
|
186
|
-
* Copyright (c) Remix Software Inc.
|
|
187
|
-
*
|
|
188
|
-
* This source code is licensed under the MIT license found in the
|
|
189
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
190
|
-
*
|
|
191
|
-
* @license MIT
|
|
192
|
-
*/function il(){return il=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},il.apply(this,arguments)}const ol=G.createContext(null);process.env.NODE_ENV!=="production"&&(ol.displayName="DataRouter");const qh=G.createContext(null);process.env.NODE_ENV!=="production"&&(qh.displayName="DataRouterState");const Hk=G.createContext(null);process.env.NODE_ENV!=="production"&&(Hk.displayName="Await");const Ur=G.createContext(null);process.env.NODE_ENV!=="production"&&(Ur.displayName="Navigation");const za=G.createContext(null);process.env.NODE_ENV!=="production"&&(za.displayName="Location");const Wr=G.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(Wr.displayName="Route");const Yh=G.createContext(null);process.env.NODE_ENV!=="production"&&(Yh.displayName="RouteError");function zk(e,n){let{relative:t}=n===void 0?{}:n;zo()||(process.env.NODE_ENV!=="production"?Bt(!1,"useHref() may be used only in the context of a <Router> component."):Bt(!1));let{basename:r,navigator:o}=G.useContext(Ur),{hash:l,pathname:d,search:h}=al(e,{relative:t}),f=d;return r!=="/"&&(f=d==="/"?r:pi([r,d])),o.createHref({pathname:f,search:h,hash:l})}function zo(){return G.useContext(za)!=null}function Gr(){return zo()||(process.env.NODE_ENV!=="production"?Bt(!1,"useLocation() may be used only in the context of a <Router> component."):Bt(!1)),G.useContext(za).location}const ry="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function iy(e){G.useContext(Ur).static||G.useLayoutEffect(e)}function Va(){let{isDataRoute:e}=G.useContext(Wr);return e?nA():Vk()}function Vk(){zo()||(process.env.NODE_ENV!=="production"?Bt(!1,"useNavigate() may be used only in the context of a <Router> component."):Bt(!1));let{basename:e,navigator:n}=G.useContext(Ur),{matches:t}=G.useContext(Wr),{pathname:r}=Gr(),o=JSON.stringify(Wh(t).map(h=>h.pathnameBase)),l=G.useRef(!1);return iy(()=>{l.current=!0}),G.useCallback(function(h,f){if(f===void 0&&(f={}),process.env.NODE_ENV!=="production"&&br(l.current,ry),!l.current)return;if(typeof h=="number"){n.go(h);return}let m=Gh(h,JSON.parse(o),r,f.relative==="path");e!=="/"&&(m.pathname=m.pathname==="/"?e:pi([e,m.pathname])),(f.replace?n.replace:n.push)(m,f.state,f)},[e,n,o,r])}function Uk(){let{matches:e}=G.useContext(Wr),n=e[e.length-1];return n?n.params:{}}function al(e,n){let{relative:t}=n===void 0?{}:n,{matches:r}=G.useContext(Wr),{pathname:o}=Gr(),l=JSON.stringify(Wh(r).map(d=>d.pathnameBase));return G.useMemo(()=>Gh(e,JSON.parse(l),o,t==="path"),[e,l,o,t])}function Wk(e,n){return Gk(e,n)}function Gk(e,n,t){zo()||(process.env.NODE_ENV!=="production"?Bt(!1,"useRoutes() may be used only in the context of a <Router> component."):Bt(!1));let{navigator:r}=G.useContext(Ur),{matches:o}=G.useContext(Wr),l=o[o.length-1],d=l?l.params:{},h=l?l.pathname:"/",f=l?l.pathnameBase:"/",m=l&&l.route;if(process.env.NODE_ENV!=="production"){let k=m&&m.path||"";rA(h,!m||k.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+h+'" (under <Route path="'+k+'">) but the ')+`parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
193
|
-
|
|
194
|
-
`+('Please change the parent <Route path="'+k+'"> to <Route ')+('path="'+(k==="/"?"*":k+"/*")+'">.'))}let g=Gr(),w;if(n){var x;let k=typeof n=="string"?to(n):n;f==="/"||(x=k.pathname)!=null&&x.startsWith(f)||(process.env.NODE_ENV!=="production"?Bt(!1,"When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, the location pathname must begin with the portion of the URL pathname that was "+('matched by all parent routes. The current pathname base is "'+f+'" ')+('but pathname "'+k.pathname+'" was given in the `location` prop.')):Bt(!1)),w=k}else w=g;let T=w.pathname||"/",P=f==="/"?T:T.slice(f.length)||"/",C=yk(e,{pathname:P});process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&br(m||C!=null,'No routes matched location "'+w.pathname+w.search+w.hash+'" '),process.env.NODE_ENV!=="production"&&br(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0,'Matched leaf route at location "'+w.pathname+w.search+w.hash+'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.'));let _=Kk(C&&C.map(k=>Object.assign({},k,{params:Object.assign({},d,k.params),pathname:pi([f,r.encodeLocation?r.encodeLocation(k.pathname).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?f:pi([f,r.encodeLocation?r.encodeLocation(k.pathnameBase).pathname:k.pathnameBase])})),o,t);return n&&_?G.createElement(za.Provider,{value:{location:il({pathname:"/",search:"",hash:"",state:null,key:"default"},w),navigationType:Oi.Pop}},_):_}function qk(){let e=tA(),n=Bk(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),t=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},l={padding:"2px 4px",backgroundColor:r},d=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",e),d=G.createElement(G.Fragment,null,G.createElement("p",null,"💿 Hey developer 👋"),G.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",G.createElement("code",{style:l},"ErrorBoundary")," or"," ",G.createElement("code",{style:l},"errorElement")," prop on your route."))),G.createElement(G.Fragment,null,G.createElement("h2",null,"Unexpected Application Error!"),G.createElement("h3",{style:{fontStyle:"italic"}},n),t?G.createElement("pre",{style:o},t):null,d)}const Yk=G.createElement(qk,null);class Xk extends G.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,t){return t.location!==n.location||t.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error||t.error,location:t.location,revalidation:n.revalidation||t.revalidation}}componentDidCatch(n,t){console.error("React Router caught the following error during render",n,t)}render(){return this.state.error?G.createElement(Wr.Provider,{value:this.props.routeContext},G.createElement(Yh.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Zk(e){let{routeContext:n,match:t,children:r}=e,o=G.useContext(ol);return o&&o.static&&o.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=t.route.id),G.createElement(Wr.Provider,{value:n},r)}function Kk(e,n,t){var r;if(n===void 0&&(n=[]),t===void 0&&(t=null),e==null){var o;if((o=t)!=null&&o.errors)e=t.matches;else return null}let l=e,d=(r=t)==null?void 0:r.errors;if(d!=null){let h=l.findIndex(f=>f.route.id&&(d==null?void 0:d[f.route.id]));h>=0||(process.env.NODE_ENV!=="production"?Bt(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(d).join(",")):Bt(!1)),l=l.slice(0,Math.min(l.length,h+1))}return l.reduceRight((h,f,m)=>{let g=f.route.id?d==null?void 0:d[f.route.id]:null,w=null;t&&(w=f.route.errorElement||Yk);let x=n.concat(l.slice(0,m+1)),T=()=>{let P;return g?P=w:f.route.Component?P=G.createElement(f.route.Component,null):f.route.element?P=f.route.element:P=h,G.createElement(Zk,{match:f,routeContext:{outlet:h,matches:x,isDataRoute:t!=null},children:P})};return t&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?G.createElement(Xk,{location:t.location,revalidation:t.revalidation,component:w,error:g,children:T(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):T()},null)}var Xh;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(Xh||(Xh={}));var Vo;(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"})(Vo||(Vo={}));function Zh(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Jk(e){let n=G.useContext(ol);return n||(process.env.NODE_ENV!=="production"?Bt(!1,Zh(e)):Bt(!1)),n}function Qk(e){let n=G.useContext(qh);return n||(process.env.NODE_ENV!=="production"?Bt(!1,Zh(e)):Bt(!1)),n}function $k(e){let n=G.useContext(Wr);return n||(process.env.NODE_ENV!=="production"?Bt(!1,Zh(e)):Bt(!1)),n}function Kh(e){let n=$k(e),t=n.matches[n.matches.length-1];return t.route.id||(process.env.NODE_ENV!=="production"?Bt(!1,e+' can only be used on routes that contain a unique "id"'):Bt(!1)),t.route.id}function eA(){return Kh(Vo.UseRouteId)}function tA(){var e;let n=G.useContext(Yh),t=Qk(Vo.UseRouteError),r=Kh(Vo.UseRouteError);return n||((e=t.errors)==null?void 0:e[r])}function nA(){let{router:e}=Jk(Xh.UseNavigateStable),n=Kh(Vo.UseNavigateStable),t=G.useRef(!1);return iy(()=>{t.current=!0}),G.useCallback(function(o,l){l===void 0&&(l={}),process.env.NODE_ENV!=="production"&&br(t.current,ry),t.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,il({fromRouteId:n},l)))},[e,n])}const oy={};function rA(e,n,t){!n&&!oy[e]&&(oy[e]=!0,process.env.NODE_ENV!=="production"&&br(!1,t))}function iA(e){let{to:n,replace:t,state:r,relative:o}=e;zo()||(process.env.NODE_ENV!=="production"?Bt(!1,"<Navigate> may be used only in the context of a <Router> component."):Bt(!1)),process.env.NODE_ENV!=="production"&&br(!G.useContext(Ur).static,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:l}=G.useContext(Wr),{pathname:d}=Gr(),h=Va(),f=Gh(n,Wh(l).map(g=>g.pathnameBase),d,o==="path"),m=JSON.stringify(f);return G.useEffect(()=>h(JSON.parse(m),{replace:t,state:r,relative:o}),[h,m,o,t,r]),null}function no(e){process.env.NODE_ENV!=="production"?Bt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>."):Bt(!1)}function oA(e){let{basename:n="/",children:t=null,location:r,navigationType:o=Oi.Pop,navigator:l,static:d=!1}=e;zo()&&(process.env.NODE_ENV!=="production"?Bt(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):Bt(!1));let h=n.replace(/^\/*/,"/"),f=G.useMemo(()=>({basename:h,navigator:l,static:d}),[h,l,d]);typeof r=="string"&&(r=to(r));let{pathname:m="/",search:g="",hash:w="",state:x=null,key:T="default"}=r,P=G.useMemo(()=>{let C=Ha(m,h);return C==null?null:{location:{pathname:C,search:g,hash:w,state:x,key:T},navigationType:o}},[h,m,g,w,x,T,o]);return process.env.NODE_ENV!=="production"&&br(P!=null,'<Router basename="'+h+'"> is not able to match the URL '+('"'+m+g+w+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),P==null?null:G.createElement(Ur.Provider,{value:f},G.createElement(za.Provider,{children:t,value:P}))}function aA(e){let{children:n,location:t}=e;return Wk(Jh(n),t)}var ay;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(ay||(ay={})),new Promise(()=>{});function Jh(e,n){n===void 0&&(n=[]);let t=[];return G.Children.forEach(e,(r,o)=>{if(!G.isValidElement(r))return;let l=[...n,o];if(r.type===G.Fragment){t.push.apply(t,Jh(r.props.children,l));return}r.type!==no&&(process.env.NODE_ENV!=="production"?Bt(!1,"["+(typeof r.type=="string"?r.type:r.type.name)+"] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>"):Bt(!1)),!r.props.index||!r.props.children||(process.env.NODE_ENV!=="production"?Bt(!1,"An index route cannot have child routes."):Bt(!1));let d={id:r.props.id||l.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(d.children=Jh(r.props.children,l)),t.push(d)}),t}/**
|
|
195
|
-
* React Router DOM v6.11.1
|
|
196
|
-
*
|
|
197
|
-
* Copyright (c) Remix Software Inc.
|
|
198
|
-
*
|
|
199
|
-
* This source code is licensed under the MIT license found in the
|
|
200
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
201
|
-
*
|
|
202
|
-
* @license MIT
|
|
203
|
-
*/function ki(){return ki=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},ki.apply(this,arguments)}function Qh(e,n){if(e==null)return{};var t={},r=Object.keys(e),o,l;for(l=0;l<r.length;l++)o=r[l],!(n.indexOf(o)>=0)&&(t[o]=e[o]);return t}const sl="get",$h="application/x-www-form-urlencoded";function ll(e){return e!=null&&typeof e.tagName=="string"}function sA(e){return ll(e)&&e.tagName.toLowerCase()==="button"}function lA(e){return ll(e)&&e.tagName.toLowerCase()==="form"}function uA(e){return ll(e)&&e.tagName.toLowerCase()==="input"}function cA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function hA(e,n){return e.button===0&&(!n||n==="_self")&&!cA(e)}function ul(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,t)=>{let r=e[t];return n.concat(Array.isArray(r)?r.map(o=>[t,o]):[[t,r]])},[]))}function dA(e,n){let t=ul(e);if(n)for(let r of n.keys())t.has(r)||n.getAll(r).forEach(o=>{t.append(r,o)});return t}function fA(e,n,t){let r,o=null,l,d;if(lA(e)){let h=n.submissionTrigger;if(n.action)o=n.action;else{let f=e.getAttribute("action");o=f?Ha(f,t):null}r=n.method||e.getAttribute("method")||sl,l=n.encType||e.getAttribute("enctype")||$h,d=new FormData(e),h&&h.name&&d.append(h.name,h.value)}else if(sA(e)||uA(e)&&(e.type==="submit"||e.type==="image")){let h=e.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');if(n.action)o=n.action;else{let f=e.getAttribute("formaction")||h.getAttribute("action");o=f?Ha(f,t):null}r=n.method||e.getAttribute("formmethod")||h.getAttribute("method")||sl,l=n.encType||e.getAttribute("formenctype")||h.getAttribute("enctype")||$h,d=new FormData(h),e.name&&d.append(e.name,e.value)}else{if(ll(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');if(r=n.method||sl,o=n.action||null,l=n.encType||$h,e instanceof FormData)d=e;else if(d=new FormData,e instanceof URLSearchParams)for(let[h,f]of e)d.append(h,f);else if(e!=null)for(let h of Object.keys(e))d.append(h,e[h])}return{action:o,method:r.toLowerCase(),encType:l,formData:d}}const pA=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],mA=["aria-current","caseSensitive","className","end","style","to","children"],gA=["reloadDocument","replace","method","action","onSubmit","fetcherKey","routeId","relative","preventScrollReset"];function vA(e){let{basename:n,children:t,window:r}=e,o=G.useRef();o.current==null&&(o.current=mk({window:r,v5Compat:!0}));let l=o.current,[d,h]=G.useState({action:l.action,location:l.location});return G.useLayoutEffect(()=>l.listen(h),[l]),G.createElement(oA,{basename:n,children:t,location:d.location,navigationType:d.action,navigator:l})}process.env.NODE_ENV;const yA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",wA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sy=G.forwardRef(function(n,t){let{onClick:r,relative:o,reloadDocument:l,replace:d,state:h,target:f,to:m,preventScrollReset:g}=n,w=Qh(n,pA),{basename:x}=G.useContext(Ur),T,P=!1;if(typeof m=="string"&&wA.test(m)&&(T=m,yA))try{let V=new URL(window.location.href),j=m.startsWith("//")?new URL(V.protocol+m):new URL(m),Z=Ha(j.pathname,x);j.origin===V.origin&&Z!=null?m=Z+j.search+j.hash:P=!0}catch{process.env.NODE_ENV!=="production"&&br(!1,'<Link to="'+m+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let C=zk(m,{relative:o}),_=TA(m,{replace:d,state:h,target:f,preventScrollReset:g,relative:o});function k(V){r&&r(V),V.defaultPrevented||_(V)}return G.createElement("a",ki({},w,{href:T||C,onClick:P||l?r:k,ref:t,target:f}))});process.env.NODE_ENV!=="production"&&(sy.displayName="Link");const bA=G.forwardRef(function(n,t){let{"aria-current":r="page",caseSensitive:o=!1,className:l="",end:d=!1,style:h,to:f,children:m}=n,g=Qh(n,mA),w=al(f,{relative:g.relative}),x=Gr(),T=G.useContext(qh),{navigator:P}=G.useContext(Ur),C=P.encodeLocation?P.encodeLocation(w).pathname:w.pathname,_=x.pathname,k=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;o||(_=_.toLowerCase(),k=k?k.toLowerCase():null,C=C.toLowerCase());let V=_===C||!d&&_.startsWith(C)&&_.charAt(C.length)==="/",j=k!=null&&(k===C||!d&&k.startsWith(C)&&k.charAt(C.length)==="/"),Z=V?r:void 0,B;typeof l=="function"?B=l({isActive:V,isPending:j}):B=[l,V?"active":null,j?"pending":null].filter(Boolean).join(" ");let Y=typeof h=="function"?h({isActive:V,isPending:j}):h;return G.createElement(sy,ki({},g,{"aria-current":Z,className:B,ref:t,style:Y,to:f}),typeof m=="function"?m({isActive:V,isPending:j}):m)});process.env.NODE_ENV!=="production"&&(bA.displayName="NavLink");const EA=G.forwardRef((e,n)=>G.createElement(ly,ki({},e,{ref:n})));process.env.NODE_ENV!=="production"&&(EA.displayName="Form");const ly=G.forwardRef((e,n)=>{let{reloadDocument:t,replace:r,method:o=sl,action:l,onSubmit:d,fetcherKey:h,routeId:f,relative:m,preventScrollReset:g}=e,w=Qh(e,gA),x=_A(h,f),T=o.toLowerCase()==="get"?"get":"post",P=CA(l,{relative:m}),C=_=>{if(d&&d(_),_.defaultPrevented)return;_.preventDefault();let k=_.nativeEvent.submitter,V=(k==null?void 0:k.getAttribute("formmethod"))||o;x(k||_.currentTarget,{method:V,replace:r,relative:m,preventScrollReset:g})};return G.createElement("form",ki({ref:n,method:T,action:P,onSubmit:t?d:C},w))});process.env.NODE_ENV!=="production"&&(ly.displayName="FormImpl"),process.env.NODE_ENV;var ed;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(ed||(ed={}));var uy;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(uy||(uy={}));function xA(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function SA(e){let n=G.useContext(ol);return n||(process.env.NODE_ENV!=="production"?Bt(!1,xA(e)):Bt(!1)),n}function TA(e,n){let{target:t,replace:r,state:o,preventScrollReset:l,relative:d}=n===void 0?{}:n,h=Va(),f=Gr(),m=al(e,{relative:d});return G.useCallback(g=>{if(hA(g,t)){g.preventDefault();let w=r!==void 0?r:ja(f)===ja(m);h(e,{replace:w,state:o,preventScrollReset:l,relative:d})}},[f,h,m,r,o,t,e,l,d])}function cy(e){process.env.NODE_ENV!=="production"&&br(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params\n\nIf you're unsure how to load polyfills, we recommend you check out https://polyfill.io/v3/ which provides some recommendations about how to load polyfills only for users that need them, instead of for every user.");let n=G.useRef(ul(e)),t=G.useRef(!1),r=Gr(),o=G.useMemo(()=>dA(r.search,t.current?null:n.current),[r.search]),l=Va(),d=G.useCallback((h,f)=>{const m=ul(typeof h=="function"?h(o):h);t.current=!0,l("?"+m,f)},[l,o]);return[o,d]}function _A(e,n){let{router:t}=SA(ed.UseSubmitImpl),{basename:r}=G.useContext(Ur),o=eA();return G.useCallback(function(l,d){if(d===void 0&&(d={}),typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");let{action:h,method:f,encType:m,formData:g}=fA(l,d,r),w={preventScrollReset:d.preventScrollReset,formData:g,formMethod:f,formEncType:m};e?(n==null&&(process.env.NODE_ENV!=="production"?Bt(!1,"No routeId available for useFetcher()"):Bt(!1)),t.fetch(e,n,h,w)):t.navigate(h,ki({},w,{replace:d.replace,fromRouteId:o}))},[t,r,e,n,o])}function CA(e,n){let{relative:t}=n===void 0?{}:n,{basename:r}=G.useContext(Ur),o=G.useContext(Wr);o||(process.env.NODE_ENV!=="production"?Bt(!1,"useFormAction must be used inside a RouteContext"):Bt(!1));let[l]=o.matches.slice(-1),d=ki({},al(e||".",{relative:t})),h=Gr();if(e==null&&(d.search=h.search,d.hash=h.hash,l.route.index)){let f=new URLSearchParams(d.search);f.delete("index"),d.search=f.toString()?"?"+f.toString():""}return(!e||e===".")&&l.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(d.pathname=d.pathname==="/"?r:pi([r,d.pathname])),ja(d)}function hy(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,r)}return t}function dy(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?hy(Object(t),!0).forEach(function(r){_i(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hy(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function ar(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 fy=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),td=function(){return Math.random().toString(36).substring(7).split("").join(".")},ro={INIT:"@@redux/INIT"+td(),REPLACE:"@@redux/REPLACE"+td(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+td()}};function py(e){if(typeof e!="object"||e===null)return!1;for(var n=e;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n}function PA(e){if(e===void 0)return"undefined";if(e===null)return"null";var n=typeof e;switch(n){case"boolean":case"string":case"number":case"symbol":case"function":return n}if(Array.isArray(e))return"array";if(kA(e))return"date";if(OA(e))return"error";var t=RA(e);switch(t){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return t}return n.slice(8,-1).toLowerCase().replace(/\s/g,"")}function RA(e){return typeof e.constructor=="function"?e.constructor.name:null}function OA(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function kA(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function io(e){var n=typeof e;return process.env.NODE_ENV!=="production"&&(n=PA(e)),n}function my(e,n,t){var r;if(typeof n=="function"&&typeof t=="function"||typeof t=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?ar(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof n=="function"&&typeof t>"u"&&(t=n,n=void 0),typeof t<"u"){if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?ar(1):"Expected the enhancer to be a function. Instead, received: '"+io(t)+"'");return t(my)(e,n)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?ar(2):"Expected the root reducer to be a function. Instead, received: '"+io(e)+"'");var o=e,l=n,d=[],h=d,f=!1;function m(){h===d&&(h=d.slice())}function g(){if(f)throw new Error(process.env.NODE_ENV==="production"?ar(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return l}function w(C){if(typeof C!="function")throw new Error(process.env.NODE_ENV==="production"?ar(4):"Expected the listener to be a function. Instead, received: '"+io(C)+"'");if(f)throw new Error(process.env.NODE_ENV==="production"?ar(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var _=!0;return m(),h.push(C),function(){if(_){if(f)throw new Error(process.env.NODE_ENV==="production"?ar(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");_=!1,m();var V=h.indexOf(C);h.splice(V,1),d=null}}}function x(C){if(!py(C))throw new Error(process.env.NODE_ENV==="production"?ar(7):"Actions must be plain objects. Instead, the actual type was: '"+io(C)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof C.type>"u")throw new Error(process.env.NODE_ENV==="production"?ar(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(f)throw new Error(process.env.NODE_ENV==="production"?ar(9):"Reducers may not dispatch actions.");try{f=!0,l=o(l,C)}finally{f=!1}for(var _=d=h,k=0;k<_.length;k++){var V=_[k];V()}return C}function T(C){if(typeof C!="function")throw new Error(process.env.NODE_ENV==="production"?ar(10):"Expected the nextReducer to be a function. Instead, received: '"+io(C));o=C,x({type:ro.REPLACE})}function P(){var C,_=w;return C={subscribe:function(V){if(typeof V!="object"||V===null)throw new Error(process.env.NODE_ENV==="production"?ar(11):"Expected the observer to be an object. Instead, received: '"+io(V)+"'");function j(){V.next&&V.next(g())}j();var Z=_(j);return{unsubscribe:Z}}},C[fy]=function(){return this},C}return x({type:ro.INIT}),r={dispatch:x,subscribe:w,getState:g,replaceReducer:T},r[fy]=P,r}function gy(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function AA(e,n,t,r){var o=Object.keys(n),l=t&&t.type===ro.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(o.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!py(e))return"The "+l+' has unexpected type of "'+io(e)+'". Expected argument to be an object with the following '+('keys: "'+o.join('", "')+'"');var d=Object.keys(e).filter(function(h){return!n.hasOwnProperty(h)&&!r[h]});if(d.forEach(function(h){r[h]=!0}),!(t&&t.type===ro.REPLACE)&&d.length>0)return"Unexpected "+(d.length>1?"keys":"key")+" "+('"'+d.join('", "')+'" found in '+l+". ")+"Expected to find one of the known reducer keys instead: "+('"'+o.join('", "')+'". Unexpected keys will be ignored.')}function DA(e){Object.keys(e).forEach(function(n){var t=e[n],r=t(void 0,{type:ro.INIT});if(typeof r>"u")throw new Error(process.env.NODE_ENV==="production"?ar(12):'The slice reducer for key "'+n+`" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof t(void 0,{type:ro.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?ar(13):'The slice reducer for key "'+n+'" returned undefined when probed with a random type. '+("Don't try to handle '"+ro.INIT+`' or other actions in "redux/*" `)+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.")})}function IA(e){for(var n=Object.keys(e),t={},r=0;r<n.length;r++){var o=n[r];process.env.NODE_ENV!=="production"&&typeof e[o]>"u"&&gy('No reducer provided for key "'+o+'"'),typeof e[o]=="function"&&(t[o]=e[o])}var l=Object.keys(t),d;process.env.NODE_ENV!=="production"&&(d={});var h;try{DA(t)}catch(f){h=f}return function(m,g){if(m===void 0&&(m={}),h)throw h;if(process.env.NODE_ENV!=="production"){var w=AA(m,t,g,d);w&&gy(w)}for(var x=!1,T={},P=0;P<l.length;P++){var C=l[P],_=t[C],k=m[C],V=_(k,g);if(typeof V>"u"){var j=g&&g.type;throw new Error(process.env.NODE_ENV==="production"?ar(14):"When called with an action of type "+(j?'"'+String(j)+'"':"(unknown type)")+', the slice reducer for key "'+C+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.')}T[C]=V,x=x||V!==k}return x=x||l.length!==Object.keys(m).length,x?T:m}}function vy(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return n.length===0?function(r){return r}:n.length===1?n[0]:n.reduce(function(r,o){return function(){return r(o.apply(void 0,arguments))}})}function MA(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return function(r){return function(){var o=r.apply(void 0,arguments),l=function(){throw new Error(process.env.NODE_ENV==="production"?ar(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},d={getState:o.getState,dispatch:function(){return l.apply(void 0,arguments)}},h=n.map(function(f){return f(d)});return l=vy.apply(void 0,h)(o.dispatch),dy(dy({},o),{},{dispatch:l})}}}var qr=function(n){return"@@redux-saga/"+n},NA=qr("CANCEL_PROMISE"),yy=qr("CHANNEL_END"),nd=qr("IO"),wy=qr("MATCH"),by=qr("MULTICAST"),Ey=qr("SAGA_ACTION"),LA=qr("SELF_CANCELLATION"),FA=qr("TASK"),Uo=qr("TASK_CANCEL"),xy=qr("TERMINATE"),BA=qr("LOCATION"),Sy=function(n){return n==null},Vn=function(n){return n!=null},vn=function(n){return typeof n=="function"},cl=function(n){return typeof n=="string"},Yr=Array.isArray,rd=function(n){return n&&!Yr(n)&&typeof n=="object"},hl=function(n){return n&&vn(n.then)},dl=function(n){return n&&vn(n.next)&&vn(n.throw)},jA=function(n){return n&&vn(n.isEmpty)&&vn(n.take)&&vn(n.put)},Ty=function e(n){return n&&(cl(n)||Cy(n)||vn(n)||Yr(n)&&n.every(e))},Ua=function(n){return n&&vn(n.take)&&vn(n.close)},_y=function(n){return vn(n)&&n.hasOwnProperty("toString")},Cy=function(n){return!!n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype},HA=function(n){return Ua(n)&&n[by]},zA=function(n){return n&&n[nd]},VA=function(n){return function(){return n}},UA=VA(!0),Jn=function(){};process.env.NODE_ENV!=="production"&&typeof Proxy<"u"&&(Jn=new Proxy(Jn,{set:function(){throw pl("There was an attempt to assign a property to internal `noop` function.")}}));var Py=function(n){return n},WA=typeof Symbol=="function",GA=WA&&Symbol.asyncIterator?Symbol.asyncIterator:"@@asyncIterator";function Kt(e,n,t){if(!n(e))throw new Error(t)}var id=function(n,t){Me(n,t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(function(r){n[r]=t[r]})},qA=function(n,t){var r;return(r=[]).concat.apply(r,t.map(n))};function fl(e,n){var t=e.indexOf(n);t>=0&&e.splice(t,1)}function YA(e){var n=!1;return function(){n||(n=!0,e())}}var XA=function(n){throw n},ZA=function(n){return{value:n,done:!0}};function od(e,n,t){n===void 0&&(n=XA),t===void 0&&(t="iterator");var r={meta:{name:t},next:e,throw:n,return:ZA,isSagaIterator:!0};return typeof Symbol<"u"&&(r[Symbol.iterator]=function(){return r}),r}function KA(e,n){var t=n.sagaStack;console.error(e),console.error(t)}var pl=function(n){return new Error(`
|
|
204
|
-
redux-saga: Error checking hooks detected an inconsistent state. This is likely a bug
|
|
205
|
-
in redux-saga code and not yours. Thanks for reporting this in the project's github repo.
|
|
206
|
-
Error: `+n+`
|
|
207
|
-
`)},Ry=function(n,t){return(n?n+".":"")+"setContext(props): argument "+t+" is not a plain object"},JA=`You can't put (a.k.a. dispatch from saga) frozen actions.
|
|
208
|
-
We have to define a special non-enumerable property on those actions for scheduling purposes.
|
|
209
|
-
Otherwise you wouldn't be able to communicate properly between sagas & other subscribers (action ordering would become far less predictable).
|
|
210
|
-
If you are using redux and you care about this behaviour (frozen actions),
|
|
211
|
-
then you might want to switch to freezing actions in a middleware rather than in action creator.
|
|
212
|
-
Example implementation:
|
|
213
|
-
|
|
214
|
-
const freezeActions = store => next => action => next(Object.freeze(action))
|
|
215
|
-
`,Oy=function(n){return Array.apply(null,new Array(n))},QA=function(n){return function(t){return process.env.NODE_ENV!=="production"&&Kt(t,function(r){return!Object.isFrozen(r)},JA),n(Object.defineProperty(t,Ey,{value:!0}))}},ky=function(n){return n===xy},Ay=function(n){return n===Uo},Dy=function(n){return ky(n)||Ay(n)};function Iy(e,n){var t=Object.keys(e),r=t.length;process.env.NODE_ENV!=="production"&&Kt(r,function(m){return m>0},"createAllStyleChildCallbacks: get an empty array or object");var o=0,l,d=Yr(e)?Oy(r):{},h={};function f(){o===r&&(l=!0,n(d))}return t.forEach(function(m){var g=function(x,T){l||(T||Dy(x)?(n.cancel(),n(x,T)):(d[m]=x,o++,f()))};g.cancel=Jn,h[m]=g}),n.cancel=function(){l||(l=!0,t.forEach(function(m){return h[m].cancel()}))},h}function ad(e){return{name:e.name||"anonymous",location:My(e)}}function My(e){return e[BA]}var $A="Channel's Buffer overflow!",eD=1,tD=3,Ny=4;function nD(e,n){e===void 0&&(e=10);var t=new Array(e),r=0,o=0,l=0,d=function(g){t[o]=g,o=(o+1)%e,r++},h=function(){if(r!=0){var g=t[l];return t[l]=null,r--,l=(l+1)%e,g}},f=function(){for(var g=[];r;)g.push(h());return g};return{isEmpty:function(){return r==0},put:function(g){if(r<e)d(g);else{var w;switch(n){case eD:throw new Error($A);case tD:t[o]=g,o=(o+1)%e,l=o;break;case Ny:w=2*e,t=f(),r=t.length,o=t.length,l=0,t.length=w,e=w,d(g);break}}},take:h,flush:f}}var rD=function(n){return nD(n,Ny)},ml="TAKE",Ly="PUT",Fy="ALL",iD="RACE",oD="CALL",aD="CPS",By="FORK",sD="JOIN",lD="CANCEL",jy="SELECT",uD="ACTION_CHANNEL",cD="CANCELLED",hD="FLUSH",dD="GET_CONTEXT",fD="SET_CONTEXT",oo=function(n,t){var r;return r={},r[nd]=!0,r.combinator=!1,r.type=n,r.payload=t,r};function pD(e,n){if(e===void 0&&(e="*"),process.env.NODE_ENV!=="production"&&arguments.length&&Kt(arguments[0],Vn,"take(patternOrChannel): patternOrChannel is undefined"),Ty(e))return Vn(n)&&console.warn("take(pattern) takes one argument but two were provided. Consider passing an array for listening to several action types"),oo(ml,{pattern:e});if(HA(e)&&Vn(n)&&Ty(n))return oo(ml,{channel:e,pattern:n});if(Ua(e))return Vn(n)&&console.warn("take(channel) takes one argument but two were provided. Second argument is ignored."),oo(ml,{channel:e});if(process.env.NODE_ENV!=="production")throw new Error("take(patternOrChannel): argument "+e+" is not valid channel or a valid pattern")}function mD(e,n){return process.env.NODE_ENV!=="production"&&(arguments.length>1?(Kt(e,Vn,"put(channel, action): argument channel is undefined"),Kt(e,Ua,"put(channel, action): argument "+e+" is not a valid channel"),Kt(n,Vn,"put(channel, action): argument action is undefined")):Kt(e,Vn,"put(action): argument action is undefined")),Sy(n)&&(n=e,e=void 0),oo(Ly,{channel:e,action:n})}function gD(e){var n=oo(Fy,e);return n.combinator=!0,n}var vD=function(n,t){if(Kt(t,Vn,n+": argument fn is undefined or null"),!vn(t)){var r=null,o;if(Yr(t))r=t[0],o=t[1],Kt(o,Vn,n+": argument of type [context, fn] has undefined or null `fn`");else if(rd(t))r=t.context,o=t.fn,Kt(o,Vn,n+": argument of type {context, fn} has undefined or null `fn`");else{Kt(t,vn,n+": argument fn is not function");return}if(r&&cl(o)){Kt(r[o],vn,n+': context arguments has no such method - "'+o+'"');return}Kt(o,vn,n+": unpacked fn argument (from [context, fn] or {context, fn}) is not a function")}};function yD(e,n){var t=null,r;return vn(e)?r=e:(Yr(e)?(t=e[0],r=e[1]):(t=e.context,r=e.fn),t&&cl(r)&&vn(t[r])&&(r=t[r])),{context:t,fn:r,args:n}}function Hy(e){process.env.NODE_ENV!=="production"&&(vD("fork",e),Kt(e,function(o){return!zA(o)},"fork: argument must not be an effect"));for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];return oo(By,yD(e,t))}function sd(e){e===void 0&&(e=Py);for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];return process.env.NODE_ENV!=="production"&&arguments.length&&(Kt(arguments[0],Vn,"select(selector, [...]): argument selector is undefined"),Kt(e,vn,"select(selector, [...]): argument "+e+" is not a function")),oo(jy,{selector:e,args:t})}function wD(){var e={};return e.promise=new Promise(function(n,t){e.resolve=n,e.reject=t}),e}var zy=[],gl=0;function bD(e){try{ld(),e()}finally{Wy()}}function Vy(e){zy.push(e),gl||(ld(),Gy())}function Uy(e){try{return ld(),e()}finally{Gy()}}function ld(){gl++}function Wy(){gl--}function Gy(){Wy();for(var e;!gl&&(e=zy.shift())!==void 0;)bD(e)}var ED=function(n){return function(t){return n.some(function(r){return ud(r)(t)})}},xD=function(n){return function(t){return n(t)}},qy=function(n){return function(t){return t.type===String(n)}},SD=function(n){return function(t){return t.type===n}},Yy=function(){return UA};function ud(e){var n=e==="*"?Yy:cl(e)?qy:Yr(e)?ED:_y(e)?qy:vn(e)?xD:Cy(e)?SD:null;if(n===null)throw new Error("invalid pattern: "+e);return n(e)}var Wa={type:yy},cd=function(n){return n&&n.type===yy},Xy="Cannot have a closed channel with pending takers",TD="invalid buffer passed to channel factory function",Zy=`Saga or channel was provided with an undefined action
|
|
216
|
-
Hints:
|
|
217
|
-
- check that your Action Creator returns a non-undefined value
|
|
218
|
-
- if the Saga was started using runSaga, check that your subscribe source provides the action to its listeners`;function _D(e){e===void 0&&(e=rD());var n=!1,t=[];process.env.NODE_ENV!=="production"&&Kt(e,jA,TD);function r(){if(n&&t.length)throw pl(Xy);if(t.length&&!e.isEmpty())throw pl("Cannot have pending takers with non empty buffer")}function o(f){if(process.env.NODE_ENV!=="production"&&(r(),Kt(f,Vn,Zy)),!n){if(t.length===0)return e.put(f);var m=t.shift();m(f)}}function l(f){process.env.NODE_ENV!=="production"&&(r(),Kt(f,vn,"channel.take's callback must be a function")),n&&e.isEmpty()?f(Wa):e.isEmpty()?(t.push(f),f.cancel=function(){fl(t,f)}):f(e.take())}function d(f){if(process.env.NODE_ENV!=="production"&&(r(),Kt(f,vn,"channel.flush' callback must be a function")),n&&e.isEmpty()){f(Wa);return}f(e.flush())}function h(){if(process.env.NODE_ENV!=="production"&&r(),!n){n=!0;var f=t;t=[];for(var m=0,g=f.length;m<g;m++){var w=f[m];w(Wa)}}}return{take:l,put:o,flush:d,close:h}}function CD(){var e,n=!1,t=[],r=t;function o(){if(n&&r.length)throw pl(Xy)}var l=function(){r===t&&(r=t.slice())},d=function(){process.env.NODE_ENV!=="production"&&o(),n=!0;var f=t=r;r=[],f.forEach(function(m){m(Wa)})};return e={},e[by]=!0,e.put=function(f){if(process.env.NODE_ENV!=="production"&&(o(),Kt(f,Vn,Zy)),!n){if(cd(f)){d();return}for(var m=t=r,g=0,w=m.length;g<w;g++){var x=m[g];x[wy](f)&&(x.cancel(),x(f))}}},e.take=function(f,m){if(m===void 0&&(m=Yy),process.env.NODE_ENV!=="production"&&o(),n){f(Wa);return}f[wy]=m,l(),r.push(f),f.cancel=YA(function(){l(),fl(r,f)})},e.close=d,e}function Ky(){var e=CD(),n=e.put;return e.put=function(t){if(t[Ey]){n(t);return}Vy(function(){n(t)})},e}var ao=0,mi=1,vl=2,Jy=3;function hd(e,n){var t=e[NA];vn(t)&&(n.cancel=t),e.then(n,function(r){n(r,!0)})}var Ga=0,Qy=function(){return++Ga},Qn;function PD(e,n){return e.isSagaIterator?{name:e.meta.name}:ad(n)}function RD(e){var n=e.context,t=e.fn,r=e.args;try{var o=t.apply(n,r);if(dl(o))return o;var l=!1,d=function(f){return l?{value:f,done:!0}:(l=!0,{value:o,done:!hl(o)})};return od(d)}catch(h){return od(function(){throw h})}}function OD(e,n,t){var r=n.channel,o=n.action,l=n.resolve;Vy(function(){var d;try{d=(r?r.put:e.dispatch)(o)}catch(h){t(h,!0);return}l&&hl(d)?hd(d,t):t(d)})}function kD(e,n,t){var r=n.channel,o=r===void 0?e.channel:r,l=n.pattern,d=n.maybe,h=function(m){if(m instanceof Error){t(m,!0);return}if(cd(m)&&!d){t(xy);return}t(m)};try{o.take(h,Vn(l)?ud(l):null)}catch(f){t(f,!0);return}t.cancel=h.cancel}function AD(e,n,t,r){var o=n.context,l=n.fn,d=n.args,h=r.task;try{var f=l.apply(o,d);if(hl(f)){hd(f,t);return}if(dl(f)){yl(e,f,h.context,Ga,ad(l),!1,t);return}t(f)}catch(m){t(m,!0)}}function DD(e,n,t){var r=n.context,o=n.fn,l=n.args;try{var d=function(f,m){Sy(f)?t(m):t(f,!0)};o.apply(r,l.concat(d)),d.cancel&&(t.cancel=d.cancel)}catch(h){t(h,!0)}}function ID(e,n,t,r){var o=n.context,l=n.fn,d=n.args,h=n.detached,f=r.task,m=RD({context:o,fn:l,args:d}),g=PD(m,l);Uy(function(){var w=yl(e,m,f.context,Ga,g,h,void 0);h?t(w):w.isRunning()?(f.queue.addTask(w),t(w)):w.isAborted()?f.queue.abort(w.error()):t(w)})}function MD(e,n,t,r){var o=r.task,l=function(f,m){if(f.isRunning()){var g={task:o,cb:m};m.cancel=function(){f.isRunning()&&fl(f.joiners,g)},f.joiners.push(g)}else f.isAborted()?m(f.error(),!0):m(f.result())};if(Yr(n)){if(n.length===0){t([]);return}var d=Iy(n,t);n.forEach(function(h,f){l(h,d[f])})}else l(n,t)}function dd(e){e.isRunning()&&e.cancel()}function ND(e,n,t,r){var o=r.task;n===LA?dd(o):Yr(n)?n.forEach(dd):dd(n),t()}function LD(e,n,t,r){var o=r.digestEffect,l=Ga,d=Object.keys(n);if(d.length===0){t(Yr(n)?[]:{});return}var h=Iy(n,t);d.forEach(function(f){o(n[f],l,h[f],f)})}function FD(e,n,t,r){var o=r.digestEffect,l=Ga,d=Object.keys(n),h=Yr(n)?Oy(d.length):{},f={},m=!1;d.forEach(function(g){var w=function(T,P){m||(P||Dy(T)?(t.cancel(),t(T,P)):(t.cancel(),m=!0,h[g]=T,t(h)))};w.cancel=Jn,f[g]=w}),t.cancel=function(){m||(m=!0,d.forEach(function(g){return f[g].cancel()}))},d.forEach(function(g){m||o(n[g],l,f[g],g)})}function BD(e,n,t){var r=n.selector,o=n.args;try{var l=r.apply(void 0,[e.getState()].concat(o));t(l)}catch(d){t(d,!0)}}function jD(e,n,t){var r=n.pattern,o=n.buffer,l=_D(o),d=ud(r),h=function m(g){cd(g)||e.channel.take(m,d),l.put(g)},f=l.close;l.close=function(){h.cancel(),f()},e.channel.take(h,d),t(l)}function HD(e,n,t,r){var o=r.task;t(o.isCancelled())}function zD(e,n,t){n.flush(t)}function VD(e,n,t,r){var o=r.task;t(o.context[n])}function UD(e,n,t,r){var o=r.task;id(o.context,n),t()}var WD=(Qn={},Qn[ml]=kD,Qn[Ly]=OD,Qn[Fy]=LD,Qn[iD]=FD,Qn[oD]=AD,Qn[aD]=DD,Qn[By]=ID,Qn[sD]=MD,Qn[lD]=ND,Qn[jy]=BD,Qn[uD]=jD,Qn[cD]=HD,Qn[hD]=zD,Qn[dD]=VD,Qn[fD]=UD,Qn);function GD(e,n,t){var r=[],o,l=!1;f(e);var d=function(){return r};function h(g){n(),m(),t(g,!0)}function f(g){r.push(g),g.cont=function(w,x){l||(fl(r,g),g.cont=Jn,x?h(w):(g===e&&(o=w),r.length||(l=!0,t(o))))}}function m(){l||(l=!0,r.forEach(function(g){g.cont=Jn,g.cancel()}),r=[])}return{addTask:f,cancelAll:m,abort:h,getTasks:d}}function $y(e,n){return e+"?"+n}function qD(e){var n=My(e);if(n){var t=n.code,r=n.fileName,o=n.lineNumber,l=t+" "+$y(r,o);return l}return""}function ew(e){var n=e.name,t=e.location;return t?n+" "+$y(t.fileName,t.lineNumber):n}function YD(e){var n=qA(function(t){return t.cancelledTasks},e);return n.length?["Tasks cancelled due to error:"].concat(n).join(`
|
|
219
|
-
`):""}var fd=null,qa=[],XD=function(n){n.crashedEffect=fd,qa.push(n)},tw=function(){fd=null,qa.length=0},ZD=function(n){fd=n},KD=function(){var n=qa[0],t=qa.slice(1),r=n.crashedEffect?qD(n.crashedEffect):null,o="The above error occurred in task "+ew(n.meta)+(r?`
|
|
220
|
-
when executing effect `+r:"");return[o].concat(t.map(function(l){return" created by "+ew(l.meta)}),[YD(qa)]).join(`
|
|
221
|
-
`)};function JD(e,n,t,r,o,l,d){var h;d===void 0&&(d=Jn);var f=ao,m,g,w=null,x=[],T=Object.create(t),P=GD(n,function(){x.push.apply(x,P.getTasks().map(function(B){return B.meta.name}))},_);function C(){f===ao&&(f=mi,P.cancelAll(),_(Uo,!1))}function _(Z,B){if(!B)Z===Uo?f=mi:f!==mi&&(f=Jy),m=Z,w&&w.resolve(Z);else{if(f=vl,XD({meta:o,cancelledTasks:x}),j.isRoot){var Y=KD();tw(),e.onError(Z,{sagaStack:Y})}g=Z,w&&w.reject(Z)}j.cont(Z,B),j.joiners.forEach(function(ie){ie.cb(Z,B)}),j.joiners=null}function k(Z){process.env.NODE_ENV!=="production"&&Kt(Z,rd,Ry("task",Z)),id(T,Z)}function V(){return w||(w=wD(),f===vl?w.reject(g):f!==ao&&w.resolve(m)),w.promise}var j=(h={},h[FA]=!0,h.id=r,h.meta=o,h.isRoot=l,h.context=T,h.joiners=[],h.queue=P,h.cancel=C,h.cont=d,h.end=_,h.setContext=k,h.toPromise=V,h.isRunning=function(){return f===ao},h.isCancelled=function(){return f===mi||f===ao&&n.status===mi},h.isAborted=function(){return f===vl},h.result=function(){return m},h.error=function(){return g},h);return j}function yl(e,n,t,r,o,l,d){if(process.env.NODE_ENV!=="production"&&n[GA])throw new Error("redux-saga doesn't support async generators, please use only regular ones");var h=e.finalizeRunEffect(T);x.cancel=Jn;var f={meta:o,cancel:w,status:ao},m=JD(e,f,t,r,o,l,d),g={task:m,digestEffect:P};function w(){f.status===ao&&(f.status=mi,x(Uo))}return d&&(d.cancel=m.cancel),x(),m;function x(C,_){try{var k;_?(k=n.throw(C),tw()):Ay(C)?(f.status=mi,x.cancel(),k=vn(n.return)?n.return(Uo):{done:!0,value:Uo}):ky(C)?k=vn(n.return)?n.return():{done:!0}:k=n.next(C),k.done?(f.status!==mi&&(f.status=Jy),f.cont(k.value)):P(k.value,r,x)}catch(V){if(f.status===mi)throw V;f.status=vl,f.cont(V,!0)}}function T(C,_,k){if(hl(C))hd(C,k);else if(dl(C))yl(e,C,m.context,_,o,!1,k);else if(C&&C[nd]){var V=WD[C.type];V(e,C.payload,k,g)}else k(C)}function P(C,_,k,V){V===void 0&&(V="");var j=Qy();e.sagaMonitor&&e.sagaMonitor.effectTriggered({effectId:j,parentEffectId:_,label:V,effect:C});var Z;function B(Y,ie){Z||(Z=!0,k.cancel=Jn,e.sagaMonitor&&(ie?e.sagaMonitor.effectRejected(j,Y):e.sagaMonitor.effectResolved(j,Y)),ie&&ZD(C),k(Y,ie))}B.cancel=Jn,k.cancel=function(){Z||(Z=!0,B.cancel(),B.cancel=Jn,e.sagaMonitor&&e.sagaMonitor.effectCancelled(j))},h(C,j,B)}}var QD="runSaga(options, saga, ...args)",nw=QD+": saga argument must be a Generator function!";function $D(e,n){var t=e.channel,r=t===void 0?Ky():t,o=e.dispatch,l=e.getState,d=e.context,h=d===void 0?{}:d,f=e.sagaMonitor,m=e.effectMiddlewares,g=e.onError,w=g===void 0?KA:g;process.env.NODE_ENV!=="production"&&Kt(n,vn,nw);for(var x=arguments.length,T=new Array(x>2?x-2:0),P=2;P<x;P++)T[P-2]=arguments[P];var C=n.apply(void 0,T);process.env.NODE_ENV!=="production"&&Kt(C,dl,nw);var _=Qy();if(f&&(f.rootSagaStarted=f.rootSagaStarted||Jn,f.effectTriggered=f.effectTriggered||Jn,f.effectResolved=f.effectResolved||Jn,f.effectRejected=f.effectRejected||Jn,f.effectCancelled=f.effectCancelled||Jn,f.actionDispatched=f.actionDispatched||Jn,f.rootSagaStarted({effectId:_,saga:n,args:T})),process.env.NODE_ENV!=="production"){if(Vn(o)&&Kt(o,vn,"dispatch must be a function"),Vn(l)&&Kt(l,vn,"getState must be a function"),Vn(m)){var k="effectMiddlewares must be an array of functions";Kt(m,Yr,k),m.forEach(function(B){return Kt(B,vn,k)})}Kt(w,vn,"onError passed to the redux-saga is not a function!")}var V;if(m){var j=vy.apply(void 0,m);V=function(Y){return function(ie,ae,le){var _e=function(de){return Y(de,ae,le)};return j(_e)(ie)}}}else V=Py;var Z={channel:r,dispatch:QA(o),getState:l,sagaMonitor:f,onError:w,finalizeRunEffect:V};return Uy(function(){var B=yl(Z,C,h,_,ad(n),!0,void 0);return f&&f.effectResolved(_,B),B})}function eI(e){var n={},t=n.context,r=t===void 0?{}:t,o=n.channel,l=o===void 0?Ky():o,d=n.sagaMonitor,h=Ji(n,["context","channel","sagaMonitor"]),f;process.env.NODE_ENV!=="production"&&Kt(l,Ua,"options.channel passed to the Saga middleware is not a channel");function m(g){var w=g.getState,x=g.dispatch;return f=$D.bind(null,Me({},h,{context:r,channel:l,dispatch:x,getState:w,sagaMonitor:d})),function(T){return function(P){d&&d.actionDispatched&&d.actionDispatched(P);var C=T(P);return l.put(P),C}}}return m.run=function(){if(process.env.NODE_ENV!=="production"&&!f)throw new Error("Before running a Saga, you must mount the Saga middleware on the Store using applyMiddleware");return f.apply(void 0,arguments)},m.setContext=function(g){process.env.NODE_ENV!=="production"&&Kt(g,rd,Ry("sagaMiddleware",g)),id(r,g)},m}var rw=function(n){return{done:!0,value:n}},pd={};function tI(e){return Ua(e)?"channel":_y(e)?String(e):vn(e)?e.name:String(e)}function nI(e,n,t){var r,o,l,d=n;function h(f,m){if(d===pd)return rw(f);if(m&&!o)throw d=pd,m;r&&r(f);var g=m?e[o](m):e[d]();return d=g.nextState,l=g.effect,r=g.stateUpdater,o=g.errorState,d===pd?rw(f):l}return od(h,function(f){return h(null,f)},t)}function rI(e,n){for(var t=arguments.length,r=new Array(t>2?t-2:0),o=2;o<t;o++)r[o-2]=arguments[o];var l={done:!1,value:pD(e)},d=function(g){return{done:!1,value:Hy.apply(void 0,[n].concat(r,[g]))}},h,f=function(g){return h=g};return nI({q1:function(){return{nextState:"q2",effect:l,stateUpdater:f}},q2:function(){return{nextState:"q1",effect:d(h)}}},"q1","takeEvery("+tI(e)+", "+n.name+")")}var iI=function(n,t,r){Kt(t,Vn,n.name+" requires a pattern or channel"),Kt(r,Vn,n.name+" requires a saga parameter")};function iw(e,n){process.env.NODE_ENV!=="production"&&iI(iw,e,n);for(var t=arguments.length,r=new Array(t>2?t-2:0),o=2;o<t;o++)r[o-2]=arguments[o];return Hy.apply(void 0,[rI,e,n].concat(r))}const ow={};ow.setFixedFrameMode=function(n,t){return{...n,fixedFrameMode:t}};const md={},oI="https://github.com/cu-mkp/editioncrafter-project/text-partial-resource.md";md.loadDocument=function(n,t){const r=hI(t,n.transcriptionTypes),{folioIndex:o,folioByName:l}=aI(r);return{...n,loaded:!0,folios:r,folioIndex:o,folioByName:l}},md.loadFolio=function(n,t){const r=n.folioIndex[t.id],o=n.folios.indexOf(r);return n.folios[o]=t,n.folioIndex[t.id]=t,n.folioByName[t.name]=t,{...n}};function aI(e){const n={},t={};for(let r=0;r<e.length;r++){const o=e[r];n[o.id]=o,t[o.name]=o}return{folioIndex:n,folioByName:t}}function sr(e){throw new Error(`IIIF manifest parser error: ${e}`)}function sI(e){console.warn(`IIIF manifest parser warning: ${e}`)}function lI(e){for(const n of e.items){n.type!=="AnnotationPage"&&sr(`Expected AnnotationPage in items property of ${e.id}`),n.items||sr(`Expected items property in AnnotationPage ${n.id}`);for(const t of n.items)if(t.type!=="Annotation"&&sr(`Expected Annotation in items property of ${n.id}`),t.motivation==="painting")return t.body||sr(`Expected body property in Annotation ${t.id}`),t.body.id?t.body.service?{bodyId:t.body.id,imageURL:`${t.body.id}/info.json`,imageType:"iiif"}:{bodyId:t.body.id,imageURL:t.body.id,imageType:"image"}:null}return sr(`Unable to find painting Annotation for canvas: ${e.id}`),null}function uI(e){return e.label?e.label.none[0]:(sI(`${e.id} does not have a label property.`),"")}function cI(e,n){const t={};if(e.annotations){for(const r of e.annotations)if(r.type==="AnnotationPage"){r.items||sr(`Expected items property in AnnotationPage ${r.id}`);for(const o of r.items)if(o.type!=="Annotation"&&sr(`Expected Annotation in items property of ${r.id}`),o.motivation==="supplementing"){o.body||sr(`Expected body property in Annotation ${o.id}`);const{body:l}=o;if(l.profile===oI&&l.type==="TextPartial"){l.id||sr(`Expected id property in TextPartial in ${o.id}`),l.format||sr(`Expected format property in TextPartial in ${o.id}`);const{id:d,format:h}=l,f=d.split("/");f.length<5&&sr(`TextPartial id property is in the wrong format: ${d}`);const m=f[f.length-2];n[m]&&(t[m]||(t[m]={}),h==="text/html"&&(t[m].htmlURL=d),h==="text/xml"&&(t[m].xmlURL=d))}}}}return t}const wl=130;function hI(e,n){if(e.type==="variorum"){let t=[];return Object.keys(e.documentData).forEach(r=>{t=t.concat(aw(e.documentData[r],n[r],r))}),t}return aw(e,n)}function aw(e,n,t){const r=[];(!e["@context"]||!e["@context"].includes("http://iiif.io/api/presentation/3/context.json"))&&sr("Expected root object to have a @context containing: http://iiif.io/api/presentation/3/context.json"),e.type!=="Manifest"&&sr("Expected root object of type 'Manifest'."),e.items||sr("Expected manifest to have an items property.");const o=e.items;for(let l=0;l<o.length;l++){const d=o[l];d.type!=="Canvas"&&sr(`Expected items[${l}] to be of type 'Canvas'.`),d.id||sr(`Expected items[${l}] to have an id property.`);const h=lI(d);if(h){const f=d.id.substr(d.id.lastIndexOf("/")+1),m=uI(d),{bodyId:g,imageURL:w,imageType:x}=h,T=cI(d,n),P=d.width/d.height;let C=[];P>1?C=[wl,Math.round(wl/P)]:C=[Math.round(wl*P),wl];const _=x==="iiif"?`${g}/full/${C.join(",")}/0/default.jpg`:w,k={id:t?`${t}_${f}`:f,doc_id:t||e.id,name:m,pageNumber:l,image_zoom_url:w,image_thumbnail_url:_,annotationURLs:T,annotations:d.annotations?d.annotations.filter(V=>V.motivation==="tagging"):[]};r.push(k)}}return r}const sw={};sw.loadGlossary=function(n,t){return{...n,loaded:!0,glossary:t}};const dI={fixedFrameMode:!1};function fI(e,n,t,r=!1,o=null,l=!1){return{documentName:n,derivativeNames:o,manifestURL:e,transcriptionTypes:t,variorum:r,threePanel:l,folios:[],loaded:!1,folioIndex:{},folioByName:{}}}function pI(e){return{glossary:{},loaded:!1,URL:e}}function mI(e){const{documentName:n,documentInfo:t,glossaryURL:r,threePanel:o=!1}=e,l=t&&Object.keys(t).length>1,d={},h={},f={};l&&Object.keys(e.documentInfo).forEach(x=>{d[x]=e.documentInfo[x].transcriptionTypes,h[x]=e.documentInfo[x].iiifManifest,f[x]=e.documentInfo[x].documentName});const m=l?d:e.transcriptionTypes,g=l?h:e.iiifManifest,w=l&&f;return IA({diplomatic:wd("DiplomaticActions",ow,dI),document:wd("DocumentActions",md,fI(g,n,m,l,w,o)),glossary:wd("GlossaryActions",sw,pI(r))})}var lw={exports:{}};(function(e){//! openseadragon 4.1.0
|
|
222
|
-
//! Built on 2023-05-25
|
|
223
|
-
//! Git commit: v4.1.0-0-8849681
|
|
224
|
-
//! http://openseadragon.github.io
|
|
225
|
-
//! License: http://openseadragon.github.io/license/
|
|
226
|
-
function n(t){return new n.Viewer(t)}(function(t){t.version={versionStr:"4.1.0",major:parseInt("4",10),minor:parseInt("1",10),revision:parseInt("0",10)};var r={"[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"},o=Object.prototype.toString,l=Object.prototype.hasOwnProperty;t.isFunction=function(d){return t.type(d)==="function"},t.isArray=Array.isArray||function(d){return t.type(d)==="array"},t.isWindow=function(d){return d&&typeof d=="object"&&"setInterval"in d},t.type=function(d){return d==null?String(d):r[o.call(d)]||"object"},t.isPlainObject=function(d){if(!d||n.type(d)!=="object"||d.nodeType||t.isWindow(d)||d.constructor&&!l.call(d,"constructor")&&!l.call(d.constructor.prototype,"isPrototypeOf"))return!1;var h;for(var f in d)h=f;return h===void 0||l.call(d,h)},t.isEmptyObject=function(d){for(var h in d)return!1;return!0},t.freezeObject=function(d){return Object.freeze?t.freezeObject=Object.freeze:t.freezeObject=function(h){return h},t.freezeObject(d)},t.supportsCanvas=function(){var d=document.createElement("canvas");return!!(t.isFunction(d.getContext)&&d.getContext("2d"))}(),t.isCanvasTainted=function(d){var h=!1;try{d.getContext("2d").getImageData(0,0,1,1)}catch{h=!0}return h},t.supportsAddEventListener=function(){return!!(document.documentElement.addEventListener&&document.addEventListener)}(),t.supportsRemoveEventListener=function(){return!!(document.documentElement.removeEventListener&&document.removeEventListener)}(),t.supportsEventListenerOptions=function(){var d=0;if(t.supportsAddEventListener)try{var h={get capture(){return d++,!1},get once(){return d++,!1},get passive(){return d++,!1}};window.addEventListener("test",null,h),window.removeEventListener("test",null,h)}catch{d=0}return d>=3}(),t.getCurrentPixelDensityRatio=function(){if(t.supportsCanvas){var d=document.createElement("canvas").getContext("2d"),h=window.devicePixelRatio||1,f=d.webkitBackingStorePixelRatio||d.mozBackingStorePixelRatio||d.msBackingStorePixelRatio||d.oBackingStorePixelRatio||d.backingStorePixelRatio||1;return Math.max(h,1)/f}else return 1},t.pixelDensityRatio=t.getCurrentPixelDensityRatio()})(n),function(t){t.extend=function(){var f,m,g,w,x,T,P=arguments[0]||{},C=arguments.length,_=!1,k=1;for(typeof P=="boolean"&&(_=P,P=arguments[1]||{},k=2),typeof P!="object"&&!n.isFunction(P)&&(P={}),C===k&&(P=this,--k);k<C;k++)if(f=arguments[k],f!==null||f!==void 0)for(m in f){var V=Object.getOwnPropertyDescriptor(f,m);if(V!==void 0){if(V.get||V.set){Object.defineProperty(P,m,V);continue}w=V.value}else{t.console.warn('Could not copy inherited property "'+m+'".');continue}P!==w&&(_&&w&&(n.isPlainObject(w)||(x=n.isArray(w)))?(g=P[m],x?(x=!1,T=g&&n.isArray(g)?g:[]):T=g&&n.isPlainObject(g)?g:{},P[m]=n.extend(_,T,w)):w!==void 0&&(P[m]=w))}return P};var r=function(){if(typeof navigator!="object")return!1;var f=navigator.userAgent;return typeof f!="string"?!1:f.indexOf("iPhone")!==-1||f.indexOf("iPad")!==-1||f.indexOf("iPod")!==-1};t.extend(t,{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:r(),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(f,m){return function(){var g=arguments;return g===void 0&&(g=[]),m.apply(f,g)}},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(f){return t._viewers.get(this.getElement(f))},getElement:function(f){return typeof f=="string"&&(f=document.getElementById(f)),f},getElementPosition:function(f){var m=new t.Point,g,w;for(f=t.getElement(f),g=t.getElementStyle(f).position==="fixed",w=h(f,g);w;)m.x+=f.offsetLeft,m.y+=f.offsetTop,g&&(m=m.plus(t.getPageScroll())),f=w,g=t.getElementStyle(f).position==="fixed",w=h(f,g);return m},getElementOffset:function(f){f=t.getElement(f);var m=f&&f.ownerDocument,g,w,x={top:0,left:0};return m?(g=m.documentElement,typeof f.getBoundingClientRect<"u"&&(x=f.getBoundingClientRect()),w=m===m.window?m:m.nodeType===9?m.defaultView||m.parentWindow:!1,new t.Point(x.left+(w.pageXOffset||g.scrollLeft)-(g.clientLeft||0),x.top+(w.pageYOffset||g.scrollTop)-(g.clientTop||0))):new t.Point},getElementSize:function(f){return f=t.getElement(f),new t.Point(f.clientWidth,f.clientHeight)},getElementStyle:document.documentElement.currentStyle?function(f){return f=t.getElement(f),f.currentStyle}:function(f){return f=t.getElement(f),window.getComputedStyle(f,"")},getCssPropertyWithVendorPrefix:function(f){var m={};return t.getCssPropertyWithVendorPrefix=function(g){if(m[g]!==void 0)return m[g];var w=document.createElement("div").style,x=null;if(w[g]!==void 0)x=g;else for(var T=["Webkit","Moz","MS","O","webkit","moz","ms","o"],P=t.capitalizeFirstLetter(g),C=0;C<T.length;C++){var _=T[C]+P;if(w[_]!==void 0){x=_;break}}return m[g]=x,x},t.getCssPropertyWithVendorPrefix(f)},capitalizeFirstLetter:function(f){return f.charAt(0).toUpperCase()+f.slice(1)},positiveModulo:function(f,m){var g=f%m;return g<0&&(g+=m),g},pointInElement:function(f,m){f=t.getElement(f);var g=t.getElementOffset(f),w=t.getElementSize(f);return m.x>=g.x&&m.x<g.x+w.x&&m.y<g.y+w.y&&m.y>=g.y},getMousePosition:function(f){if(typeof f.pageX=="number")t.getMousePosition=function(m){var g=new t.Point;return g.x=m.pageX,g.y=m.pageY,g};else if(typeof f.clientX=="number")t.getMousePosition=function(m){var g=new t.Point;return g.x=m.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,g.y=m.clientY+document.body.scrollTop+document.documentElement.scrollTop,g};else throw new Error("Unknown event mouse position, no known technique.");return t.getMousePosition(f)},getPageScroll:function(){var f=document.documentElement||{},m=document.body||{};if(typeof window.pageXOffset=="number")t.getPageScroll=function(){return new t.Point(window.pageXOffset,window.pageYOffset)};else if(m.scrollLeft||m.scrollTop)t.getPageScroll=function(){return new t.Point(document.body.scrollLeft,document.body.scrollTop)};else if(f.scrollLeft||f.scrollTop)t.getPageScroll=function(){return new t.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)};else return new t.Point(0,0);return t.getPageScroll()},setPageScroll:function(f){if(typeof window.scrollTo<"u")t.setPageScroll=function(w){window.scrollTo(w.x,w.y)};else{var m=t.getPageScroll();if(m.x===f.x&&m.y===f.y)return;document.body.scrollLeft=f.x,document.body.scrollTop=f.y;var g=t.getPageScroll();if(g.x!==m.x&&g.y!==m.y){t.setPageScroll=function(w){document.body.scrollLeft=w.x,document.body.scrollTop=w.y};return}if(document.documentElement.scrollLeft=f.x,document.documentElement.scrollTop=f.y,g=t.getPageScroll(),g.x!==m.x&&g.y!==m.y){t.setPageScroll=function(w){document.documentElement.scrollLeft=w.x,document.documentElement.scrollTop=w.y};return}t.setPageScroll=function(w){}}t.setPageScroll(f)},getWindowSize:function(){var f=document.documentElement||{},m=document.body||{};if(typeof window.innerWidth=="number")t.getWindowSize=function(){return new t.Point(window.innerWidth,window.innerHeight)};else if(f.clientWidth||f.clientHeight)t.getWindowSize=function(){return new t.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else if(m.clientWidth||m.clientHeight)t.getWindowSize=function(){return new t.Point(document.body.clientWidth,document.body.clientHeight)};else throw new Error("Unknown window size, no known technique.");return t.getWindowSize()},makeCenteredNode:function(f){f=t.getElement(f);var m=[t.makeNeutralElement("div"),t.makeNeutralElement("div"),t.makeNeutralElement("div")];return t.extend(m[0].style,{display:"table",height:"100%",width:"100%"}),t.extend(m[1].style,{display:"table-row"}),t.extend(m[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),m[0].appendChild(m[1]),m[1].appendChild(m[2]),m[2].appendChild(f),m[0]},makeNeutralElement:function(f){var m=document.createElement(f),g=m.style;return g.background="transparent none",g.border="none",g.margin="0px",g.padding="0px",g.position="static",m},now:function(){return Date.now?t.now=Date.now:t.now=function(){return new Date().getTime()},t.now()},makeTransparentImage:function(f){var m=t.makeNeutralElement("img");return m.src=f,m},setElementOpacity:function(f,m,g){var w,x;f=t.getElement(f),g&&!t.Browser.alpha&&(m=Math.round(m)),t.Browser.opacity?f.style.opacity=m<1?m:"":m<1?(w=Math.round(100*m),x="alpha(opacity="+w+")",f.style.filter=x):f.style.filter=""},setElementTouchActionNone:function(f){f=t.getElement(f),typeof f.style.touchAction<"u"?f.style.touchAction="none":typeof f.style.msTouchAction<"u"&&(f.style.msTouchAction="none")},setElementPointerEvents:function(f,m){f=t.getElement(f),typeof f.style<"u"&&typeof f.style.pointerEvents<"u"&&(f.style.pointerEvents=m)},setElementPointerEventsNone:function(f){t.setElementPointerEvents(f,"none")},addClass:function(f,m){f=t.getElement(f),f.className?(" "+f.className+" ").indexOf(" "+m+" ")===-1&&(f.className+=" "+m):f.className=m},indexOf:function(f,m,g){return Array.prototype.indexOf?this.indexOf=function(w,x,T){return w.indexOf(x,T)}:this.indexOf=function(w,x,T){var P,C=T||0,_;if(!w)throw new TypeError;if(_=w.length,_===0||C>=_)return-1;for(C<0&&(C=_-Math.abs(C)),P=C;P<_;P++)if(w[P]===x)return P;return-1},this.indexOf(f,m,g)},removeClass:function(f,m){var g,w=[],x;for(f=t.getElement(f),g=f.className.split(/\s+/),x=0;x<g.length;x++)g[x]&&g[x]!==m&&w.push(g[x]);f.className=w.join(" ")},normalizeEventListenerOptions:function(f){var m;return typeof f<"u"?typeof f=="boolean"?m=t.supportsEventListenerOptions?{capture:f}:f:m=t.supportsEventListenerOptions?f:typeof f.capture<"u"?f.capture:!1:m=t.supportsEventListenerOptions?{capture:!1}:!1,m},addEvent:function(){if(t.supportsAddEventListener)return function(f,m,g,w){w=t.normalizeEventListenerOptions(w),f=t.getElement(f),f.addEventListener(m,g,w)};if(document.documentElement.attachEvent&&document.attachEvent)return function(f,m,g){f=t.getElement(f),f.attachEvent("on"+m,g)};throw new Error("No known event model.")}(),removeEvent:function(){if(t.supportsRemoveEventListener)return function(f,m,g,w){w=t.normalizeEventListenerOptions(w),f=t.getElement(f),f.removeEventListener(m,g,w)};if(document.documentElement.detachEvent&&document.detachEvent)return function(f,m,g){f=t.getElement(f),f.detachEvent("on"+m,g)};throw new Error("No known event model.")}(),cancelEvent:function(f){f.preventDefault()},eventIsCanceled:function(f){return f.defaultPrevented},stopEvent:function(f){f.stopPropagation()},createCallback:function(f,m){var g=[],w;for(w=2;w<arguments.length;w++)g.push(arguments[w]);return function(){var x=g.concat([]),T;for(T=0;T<arguments.length;T++)x.push(arguments[T]);return m.apply(f,x)}},getUrlParameter:function(f){var m=d[f];return m||null},getUrlProtocol:function(f){var m=f.match(/^([a-z]+:)\/\//i);return m===null?window.location.protocol:m[1].toLowerCase()},createAjaxRequest:function(f){var m;try{m=!!new ActiveXObject("Microsoft.XMLHTTP")}catch{m=!1}if(m)window.XMLHttpRequest?t.createAjaxRequest=function(g){return g?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest}:t.createAjaxRequest=function(){return new ActiveXObject("Microsoft.XMLHTTP")};else if(window.XMLHttpRequest)t.createAjaxRequest=function(){return new XMLHttpRequest};else throw new Error("Browser doesn't support XMLHttpRequest.");return t.createAjaxRequest(f)},makeAjaxRequest:function(f,m,g){var w,x,T,P;t.isPlainObject(f)&&(m=f.success,g=f.error,w=f.withCredentials,x=f.headers,T=f.responseType||null,P=f.postData||null,f=f.url);var C=t.getUrlProtocol(f),_=t.createAjaxRequest(C==="file:");if(!t.isFunction(m))throw new Error("makeAjaxRequest requires a success callback");_.onreadystatechange=function(){_.readyState===4&&(_.onreadystatechange=function(){},_.status>=200&&_.status<300||_.status===0&&C!=="http:"&&C!=="https:"?m(_):t.isFunction(g)?g(_):t.console.error("AJAX request returned %d: %s",_.status,f))};var k=P?"POST":"GET";try{if(_.open(k,f,!0),T&&(_.responseType=T),x)for(var V in x)Object.prototype.hasOwnProperty.call(x,V)&&x[V]&&_.setRequestHeader(V,x[V]);w&&(_.withCredentials=!0),_.send(P)}catch(j){t.console.error("%s while making AJAX request: %s",j.name,j.message),_.onreadystatechange=function(){},t.isFunction(g)&&g(_,j)}return _},jsonp:function(f){var m,g=f.url,w=document.head||document.getElementsByTagName("head")[0]||document.documentElement,x=f.callbackName||"openseadragon"+t.now(),T=window[x],P="$1"+x+"$2",C=f.param||"callback",_=f.callback;g=g.replace(/(=)\?(&|$)|\?\?/i,P),g+=(/\?/.test(g)?"&":"?")+C+"="+x,window[x]=function(k){if(T)window[x]=T;else try{delete window[x]}catch{}_&&t.isFunction(_)&&_(k)},m=document.createElement("script"),(f.async!==void 0||f.async!==!1)&&(m.async="async"),f.scriptCharset&&(m.charset=f.scriptCharset),m.src=g,m.onload=m.onreadystatechange=function(k,V){(V||!m.readyState||/loaded|complete/.test(m.readyState))&&(m.onload=m.onreadystatechange=null,w&&m.parentNode&&w.removeChild(m),m=void 0)},w.insertBefore(m,w.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(f){if(window.DOMParser)t.parseXml=function(m){var g=null,w;return w=new DOMParser,g=w.parseFromString(m,"text/xml"),g};else if(window.ActiveXObject)t.parseXml=function(m){var g=null;return g=new ActiveXObject("Microsoft.XMLDOM"),g.async=!1,g.loadXML(m),g};else throw new Error("Browser doesn't support XML DOM.");return t.parseXml(f)},parseJSON:function(f){return t.parseJSON=window.JSON.parse,t.parseJSON(f)},imageFormatSupported:function(f){return f=f||"",!!l[f.toLowerCase()]},setImageFormatsSupported:function(f){t.extend(l,f)}});var o=function(f){};t.console=window.console||{log:o,debug:o,info:o,warn:o,error:o,assert:o},t.Browser={vendor:t.BROWSERS.UNKNOWN,version:0,alpha:!0};var l={bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1},d={};(function(){var f=navigator.appVersion,m=navigator.userAgent,g;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&(t.Browser.vendor=t.BROWSERS.IE,t.Browser.version=parseFloat(m.substring(m.indexOf("MSIE")+5,m.indexOf(";",m.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(m.indexOf("Edge")>=0?(t.Browser.vendor=t.BROWSERS.EDGE,t.Browser.version=parseFloat(m.substring(m.indexOf("Edge")+5))):m.indexOf("Edg")>=0?(t.Browser.vendor=t.BROWSERS.CHROMEEDGE,t.Browser.version=parseFloat(m.substring(m.indexOf("Edg")+4))):m.indexOf("Firefox")>=0?(t.Browser.vendor=t.BROWSERS.FIREFOX,t.Browser.version=parseFloat(m.substring(m.indexOf("Firefox")+8))):m.indexOf("Safari")>=0?(t.Browser.vendor=m.indexOf("Chrome")>=0?t.BROWSERS.CHROME:t.BROWSERS.SAFARI,t.Browser.version=parseFloat(m.substring(m.substring(0,m.indexOf("Safari")).lastIndexOf("/")+1,m.indexOf("Safari")))):(g=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"),g.exec(m)!==null&&(t.Browser.vendor=t.BROWSERS.IE,t.Browser.version=parseFloat(RegExp.$1))));break;case"Opera":t.Browser.vendor=t.BROWSERS.OPERA,t.Browser.version=parseFloat(f);break}var w=window.location.search.substring(1),x=w.split("&"),T,P,C;for(C=0;C<x.length;C++)if(T=x[C],P=T.indexOf("="),P>0){var _=T.substring(0,P),k=T.substring(P+1);try{d[_]=decodeURIComponent(k)}catch{t.console.error("Ignoring malformed URL parameter: %s=%s",_,k)}}t.Browser.alpha=!(t.Browser.vendor===t.BROWSERS.CHROME&&t.Browser.version<2),t.Browser.opacity=!0,t.Browser.vendor===t.BROWSERS.IE&&t.Browser.version<11&&t.console.error("Internet Explorer versions < 11 are not supported by OpenSeadragon")})(),function(f){var m=f.requestAnimationFrame||f.mozRequestAnimationFrame||f.webkitRequestAnimationFrame||f.msRequestAnimationFrame,g=f.cancelAnimationFrame||f.mozCancelAnimationFrame||f.webkitCancelAnimationFrame||f.msCancelAnimationFrame;if(m&&g)t.requestAnimationFrame=function(){return m.apply(f,arguments)},t.cancelAnimationFrame=function(){return g.apply(f,arguments)};else{var w=[],x=[],T=0,P;t.requestAnimationFrame=function(C){return w.push([++T,C]),P||(P=setInterval(function(){if(w.length){var _=t.now(),k=x;for(x=w,w=k;x.length;)x.shift()[1](_)}else clearInterval(P),P=void 0},1e3/50)),T},t.cancelAnimationFrame=function(C){var _,k;for(_=0,k=w.length;_<k;_+=1)if(w[_][0]===C){w.splice(_,1);return}for(_=0,k=x.length;_<k;_+=1)if(x[_][0]===C){x.splice(_,1);return}}}}(window);function h(f,m){return m&&f!==document.body?document.body:f.offsetParent}}(n),function(t,r){e.exports?e.exports=r():t.OpenSeadragon=r()}(Gn,function(){return n}),function(t){var r={supportsFullScreen:!1,isFullScreen:function(){return!1},getFullScreenElement:function(){return null},requestFullScreen:function(){},exitFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",fullScreenErrorEventName:""};document.exitFullscreen?(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.fullscreenElement},r.requestFullScreen=function(o){return o.requestFullscreen()},r.exitFullScreen=function(){document.exitFullscreen()},r.fullScreenEventName="fullscreenchange",r.fullScreenErrorEventName="fullscreenerror"):document.msExitFullscreen?(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.msFullscreenElement},r.requestFullScreen=function(o){return o.msRequestFullscreen()},r.exitFullScreen=function(){document.msExitFullscreen()},r.fullScreenEventName="MSFullscreenChange",r.fullScreenErrorEventName="MSFullscreenError"):document.webkitExitFullscreen?(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.webkitFullscreenElement},r.requestFullScreen=function(o){return o.webkitRequestFullscreen()},r.exitFullScreen=function(){document.webkitExitFullscreen()},r.fullScreenEventName="webkitfullscreenchange",r.fullScreenErrorEventName="webkitfullscreenerror"):document.webkitCancelFullScreen?(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.webkitCurrentFullScreenElement},r.requestFullScreen=function(o){return o.webkitRequestFullScreen()},r.exitFullScreen=function(){document.webkitCancelFullScreen()},r.fullScreenEventName="webkitfullscreenchange",r.fullScreenErrorEventName="webkitfullscreenerror"):document.mozCancelFullScreen&&(r.supportsFullScreen=!0,r.getFullScreenElement=function(){return document.mozFullScreenElement},r.requestFullScreen=function(o){return o.mozRequestFullScreen()},r.exitFullScreen=function(){document.mozCancelFullScreen()},r.fullScreenEventName="mozfullscreenchange",r.fullScreenErrorEventName="mozfullscreenerror"),r.isFullScreen=function(){return r.getFullScreenElement()!==null},r.cancelFullScreen=function(){t.console.error("cancelFullScreen is deprecated. Use exitFullScreen instead."),r.exitFullScreen()},t.extend(t,r)}(n),function(t){t.EventSource=function(){this.events={}},t.EventSource.prototype={addOnceHandler:function(r,o,l,d,h){var f=this;d=d||1;var m=0,g=function(w){return m++,m===d&&f.removeHandler(r,g),o(w)};this.addHandler(r,g,l,h)},addHandler:function(r,o,l,d){var h=this.events[r];if(h||(this.events[r]=h=[]),o&&t.isFunction(o)){var f=h.length,m={handler:o,userData:l||null,priority:d||0};for(h[f]=m;f>0&&h[f-1].priority<h[f].priority;)h[f]=h[f-1],h[f-1]=m,f--}},removeHandler:function(r,o){var l=this.events[r],d=[],h;if(l&&t.isArray(l)){for(h=0;h<l.length;h++)l[h].handler!==o&&d.push(l[h]);this.events[r]=d}},numberOfHandlers:function(r){var o=this.events[r];return o?o.length:0},removeAllHandlers:function(r){if(r)this.events[r]=[];else for(var o in this.events)this.events[o]=[]},getHandler:function(r){var o=this.events[r];return!o||!o.length?null:(o=o.length===1?[o[0]]:Array.apply(null,o),function(l,d){var h,f=o.length;for(h=0;h<f;h++)o[h]&&(d.eventSource=l,d.userData=o[h].userData,o[h].handler(d))})},raiseEvent:function(r,o){var l=this.getHandler(r);if(l)return l(this,o||{})}}}(n),function(t){var r={};t.MouseTracker=function(M){var L=arguments;t.isPlainObject(M)||(M={element:L[0],clickTimeThreshold:L[1],clickDistThreshold:L[2]}),this.hash=Math.random(),this.element=t.getElement(M.element),this.clickTimeThreshold=M.clickTimeThreshold||t.DEFAULT_SETTINGS.clickTimeThreshold,this.clickDistThreshold=M.clickDistThreshold||t.DEFAULT_SETTINGS.clickDistThreshold,this.dblClickTimeThreshold=M.dblClickTimeThreshold||t.DEFAULT_SETTINGS.dblClickTimeThreshold,this.dblClickDistThreshold=M.dblClickDistThreshold||t.DEFAULT_SETTINGS.dblClickDistThreshold,this.userData=M.userData||null,this.stopDelay=M.stopDelay||50,this.preProcessEventHandler=M.preProcessEventHandler||null,this.contextMenuHandler=M.contextMenuHandler||null,this.enterHandler=M.enterHandler||null,this.leaveHandler=M.leaveHandler||null,this.exitHandler=M.exitHandler||null,this.overHandler=M.overHandler||null,this.outHandler=M.outHandler||null,this.pressHandler=M.pressHandler||null,this.nonPrimaryPressHandler=M.nonPrimaryPressHandler||null,this.releaseHandler=M.releaseHandler||null,this.nonPrimaryReleaseHandler=M.nonPrimaryReleaseHandler||null,this.moveHandler=M.moveHandler||null,this.scrollHandler=M.scrollHandler||null,this.clickHandler=M.clickHandler||null,this.dblClickHandler=M.dblClickHandler||null,this.dragHandler=M.dragHandler||null,this.dragEndHandler=M.dragEndHandler||null,this.pinchHandler=M.pinchHandler||null,this.stopHandler=M.stopHandler||null,this.keyDownHandler=M.keyDownHandler||null,this.keyUpHandler=M.keyUpHandler||null,this.keyHandler=M.keyHandler||null,this.focusHandler=M.focusHandler||null,this.blurHandler=M.blurHandler||null;var q=this;r[this.hash]={click:function(J){j(q,J)},dblclick:function(J){Z(q,J)},keydown:function(J){B(q,J)},keyup:function(J){Y(q,J)},keypress:function(J){ie(q,J)},focus:function(J){ae(q,J)},blur:function(J){le(q,J)},contextmenu:function(J){_e(q,J)},wheel:function(J){fe(q,J)},mousewheel:function(J){de(q,J)},DOMMouseScroll:function(J){de(q,J)},MozMousePixelScroll:function(J){de(q,J)},losecapture:function(J){Ae(q,J)},mouseenter:function(J){X(q,J)},mouseleave:function(J){Be(q,J)},mouseover:function(J){Je(q,J)},mouseout:function(J){He(q,J)},mousedown:function(J){Ze(q,J)},mouseup:function(J){Qe(q,J)},mousemove:function(J){Le(q,J)},touchstart:function(J){ke(q,J)},touchend:function(J){me(q,J)},touchmove:function(J){be(q,J)},touchcancel:function(J){Ee(q,J)},gesturestart:function(J){Oe(q,J)},gesturechange:function(J){F(q,J)},gotpointercapture:function(J){we(q,J)},lostpointercapture:function(J){Ne(q,J)},pointerenter:function(J){X(q,J)},pointerleave:function(J){Be(q,J)},pointerover:function(J){Je(q,J)},pointerout:function(J){He(q,J)},pointerdown:function(J){Ze(q,J)},pointerup:function(J){Qe(q,J)},pointermove:function(J){Le(q,J)},pointercancel:function(J){Ce(q,J)},pointerupcaptured:function(J){it(q,J)},pointermovecaptured:function(J){pe(q,J)},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,t.MouseTracker.havePointerEvents&&t.setElementPointerEvents(this.element,"auto"),this.exitHandler&&t.console.error("MouseTracker.exitHandler is deprecated. Use MouseTracker.leaveHandler instead."),M.startDisabled||this.setTracking(!0)},t.MouseTracker.prototype={destroy:function(){f(this),this.element=null,r[this.hash]=null,delete r[this.hash]},isTracking:function(){return r[this.hash].tracking},setTracking:function(M){return M?h(this):f(this),this},getActivePointersListByType:function(M){var L=r[this.hash],q,J=L.activePointersLists.length,ye;for(q=0;q<J;q++)if(L.activePointersLists[q].type===M)return L.activePointersLists[q];return ye=new t.MouseTracker.GesturePointList(M),L.activePointersLists.push(ye),ye},getActivePointerCount:function(){var M=r[this.hash],L,q=M.activePointersLists.length,J=0;for(L=0;L<q;L++)J+=M.activePointersLists[L].getLength();return J},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 o=function(){try{return window.self!==window.top}catch{return!0}}();function l(M){try{return M.addEventListener&&M.removeEventListener}catch{return!1}}t.MouseTracker.gesturePointVelocityTracker=function(){var M=[],L=0,q=0,J=function(bt,je){return bt.hash.toString()+je.type+je.id.toString()},ye=function(){var bt,je=M.length,fn,Vt,fr=t.now(),yi,vo,wi;for(yi=fr-q,q=fr,bt=0;bt<je;bt++)fn=M[bt],Vt=fn.gPoint,Vt.direction=Math.atan2(Vt.currentPos.y-fn.lastPos.y,Vt.currentPos.x-fn.lastPos.x),vo=fn.lastPos.distanceTo(Vt.currentPos),fn.lastPos=Vt.currentPos,wi=1e3*vo/(yi+1),Vt.speed=.75*wi+.25*Vt.speed},Re=function(bt,je){var fn=J(bt,je);M.push({guid:fn,gPoint:je,lastPos:je.currentPos}),M.length===1&&(q=t.now(),L=window.setInterval(ye,50))},ot=function(bt,je){var fn=J(bt,je),Vt,fr=M.length;for(Vt=0;Vt<fr;Vt++)if(M[Vt].guid===fn){M.splice(Vt,1),fr--,fr===0&&window.clearInterval(L);break}};return{addPoint:Re,removePoint:ot}}(),t.MouseTracker.captureElement=document,t.MouseTracker.wheelEventName=t.Browser.vendor===t.BROWSERS.IE&&t.Browser.version>8||"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",t.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur","contextmenu",t.MouseTracker.wheelEventName],t.MouseTracker.wheelEventName==="DOMMouseScroll"&&t.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent?(t.MouseTracker.havePointerEvents=!0,t.MouseTracker.subscribeEvents.push("pointerenter","pointerleave","pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),t.MouseTracker.havePointerCapture=function(){var M=document.createElement("div");return t.isFunction(M.setPointerCapture)&&t.isFunction(M.releasePointerCapture)}(),t.MouseTracker.havePointerCapture&&t.MouseTracker.subscribeEvents.push("gotpointercapture","lostpointercapture")):(t.MouseTracker.havePointerEvents=!1,t.MouseTracker.subscribeEvents.push("mouseenter","mouseleave","mouseover","mouseout","mousedown","mouseup","mousemove"),t.MouseTracker.mousePointerId="legacy-mouse",t.MouseTracker.havePointerCapture=function(){var M=document.createElement("div");return t.isFunction(M.setCapture)&&t.isFunction(M.releaseCapture)}(),t.MouseTracker.havePointerCapture&&t.MouseTracker.subscribeEvents.push("losecapture"),"ontouchstart"in window&&t.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&t.MouseTracker.subscribeEvents.push("gesturestart","gesturechange")),t.MouseTracker.GesturePointList=function(M){this._gPoints=[],this.type=M,this.buttons=0,this.contacts=0,this.clicks=0,this.captureCount=0},t.MouseTracker.GesturePointList.prototype={getLength:function(){return this._gPoints.length},asArray:function(){return this._gPoints},add:function(M){return this._gPoints.push(M)},removeById:function(M){var L,q=this._gPoints.length;for(L=0;L<q;L++)if(this._gPoints[L].id===M){this._gPoints.splice(L,1);break}return this._gPoints.length},getByIndex:function(M){return M<this._gPoints.length?this._gPoints[M]:null},getById:function(M){var L,q=this._gPoints.length;for(L=0;L<q;L++)if(this._gPoints[L].id===M)return this._gPoints[L];return null},getPrimary:function(M){var L,q=this._gPoints.length;for(L=0;L<q;L++)if(this._gPoints[L].isPrimary)return this._gPoints[L];return null},addContact:function(){++this.contacts,this.contacts>1&&(this.type==="mouse"||this.type==="pen")&&(t.console.warn("GesturePointList.addContact() Implausible contacts value"),this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(this.contacts=0)}};function d(M){var L=r[M.hash],q,J,ye,Re,ot,bt=L.activePointersLists.length;for(q=0;q<bt;q++)if(ye=L.activePointersLists[q],ye.getLength()>0){for(ot=[],Re=ye.asArray(),J=0;J<Re.length;J++)ot.push(Re[J]);for(J=0;J<ot.length;J++)wt(M,ye,ot[J])}for(q=0;q<bt;q++)L.activePointersLists.pop();L.sentDragEvent=!1}function h(M){var L=r[M.hash],q,J;if(!L.tracking){for(J=0;J<t.MouseTracker.subscribeEvents.length;J++)q=t.MouseTracker.subscribeEvents[J],t.addEvent(M.element,q,L[q],q===t.MouseTracker.wheelEventName?{passive:!1,capture:!1}:!1);d(M),L.tracking=!0}}function f(M){var L=r[M.hash],q,J;if(L.tracking){for(J=0;J<t.MouseTracker.subscribeEvents.length;J++)q=t.MouseTracker.subscribeEvents[J],t.removeEvent(M.element,q,L[q],!1);d(M),L.tracking=!1}}function m(M,L){var q=r[M.hash];if(L==="pointerevent")return{upName:"pointerup",upHandler:q.pointerupcaptured,moveName:"pointermove",moveHandler:q.pointermovecaptured};if(L==="mouse")return{upName:"pointerup",upHandler:q.pointerupcaptured,moveName:"pointermove",moveHandler:q.pointermovecaptured};if(L==="touch")return{upName:"touchend",upHandler:q.touchendcaptured,moveName:"touchmove",moveHandler:q.touchmovecaptured};throw new Error("MouseTracker.getCaptureEventParams: Unknown pointer type.")}function g(M,L){var q;if(t.MouseTracker.havePointerCapture)if(t.MouseTracker.havePointerEvents)try{M.element.setPointerCapture(L.id)}catch{t.console.warn("setPointerCapture() called on invalid pointer ID");return}else M.element.setCapture(!0);else q=m(M,t.MouseTracker.havePointerEvents?"pointerevent":L.type),o&&l(window.top)&&t.addEvent(window.top,q.upName,q.upHandler,!0),t.addEvent(t.MouseTracker.captureElement,q.upName,q.upHandler,!0),t.addEvent(t.MouseTracker.captureElement,q.moveName,q.moveHandler,!0);xe(M,L,!0)}function w(M,L){var q,J,ye;if(t.MouseTracker.havePointerCapture)if(t.MouseTracker.havePointerEvents){if(J=M.getActivePointersListByType(L.type),ye=J.getById(L.id),!ye||!ye.captured)return;try{M.element.releasePointerCapture(L.id)}catch{}}else M.element.releaseCapture();else q=m(M,t.MouseTracker.havePointerEvents?"pointerevent":L.type),o&&l(window.top)&&t.removeEvent(window.top,q.upName,q.upHandler,!0),t.removeEvent(t.MouseTracker.captureElement,q.moveName,q.moveHandler,!0),t.removeEvent(t.MouseTracker.captureElement,q.upName,q.upHandler,!0);xe(M,L,!1)}function x(M){return t.MouseTracker.havePointerEvents?M.pointerId:t.MouseTracker.mousePointerId}function T(M){return t.MouseTracker.havePointerEvents?M.pointerType||(t.Browser.vendor===t.BROWSERS.IE?"mouse":""):"mouse"}function P(M){return t.MouseTracker.havePointerEvents?M.isPrimary:!0}function C(M){return t.getMousePosition(M)}function _(M,L){return k(C(M),L)}function k(M,L){var q=t.getElementOffset(L);return M.minus(q)}function V(M,L){return new t.Point((M.x+L.x)/2,(M.y+L.y)/2)}function j(M,L){var q={originalEvent:L,eventType:"click",pointerType:"mouse",isEmulated:!1};K(M,q),q.preventDefault&&!q.defaultPrevented&&t.cancelEvent(L),q.stopPropagation&&t.stopEvent(L)}function Z(M,L){var q={originalEvent:L,eventType:"dblclick",pointerType:"mouse",isEmulated:!1};K(M,q),q.preventDefault&&!q.defaultPrevented&&t.cancelEvent(L),q.stopPropagation&&t.stopEvent(L)}function B(M,L){var q=null,J={originalEvent:L,eventType:"keydown",pointerType:"",isEmulated:!1};K(M,J),M.keyDownHandler&&!J.preventGesture&&!J.defaultPrevented&&(q={eventSource:M,keyCode:L.keyCode?L.keyCode:L.charCode,ctrl:L.ctrlKey,shift:L.shiftKey,alt:L.altKey,meta:L.metaKey,originalEvent:L,preventDefault:J.preventDefault||J.defaultPrevented,userData:M.userData},M.keyDownHandler(q)),(q&&q.preventDefault||J.preventDefault&&!J.defaultPrevented)&&t.cancelEvent(L),J.stopPropagation&&t.stopEvent(L)}function Y(M,L){var q=null,J={originalEvent:L,eventType:"keyup",pointerType:"",isEmulated:!1};K(M,J),M.keyUpHandler&&!J.preventGesture&&!J.defaultPrevented&&(q={eventSource:M,keyCode:L.keyCode?L.keyCode:L.charCode,ctrl:L.ctrlKey,shift:L.shiftKey,alt:L.altKey,meta:L.metaKey,originalEvent:L,preventDefault:J.preventDefault||J.defaultPrevented,userData:M.userData},M.keyUpHandler(q)),(q&&q.preventDefault||J.preventDefault&&!J.defaultPrevented)&&t.cancelEvent(L),J.stopPropagation&&t.stopEvent(L)}function ie(M,L){var q=null,J={originalEvent:L,eventType:"keypress",pointerType:"",isEmulated:!1};K(M,J),M.keyHandler&&!J.preventGesture&&!J.defaultPrevented&&(q={eventSource:M,keyCode:L.keyCode?L.keyCode:L.charCode,ctrl:L.ctrlKey,shift:L.shiftKey,alt:L.altKey,meta:L.metaKey,originalEvent:L,preventDefault:J.preventDefault||J.defaultPrevented,userData:M.userData},M.keyHandler(q)),(q&&q.preventDefault||J.preventDefault&&!J.defaultPrevented)&&t.cancelEvent(L),J.stopPropagation&&t.stopEvent(L)}function ae(M,L){var q={originalEvent:L,eventType:"focus",pointerType:"",isEmulated:!1};K(M,q),M.focusHandler&&!q.preventGesture&&M.focusHandler({eventSource:M,originalEvent:L,userData:M.userData})}function le(M,L){var q={originalEvent:L,eventType:"blur",pointerType:"",isEmulated:!1};K(M,q),M.blurHandler&&!q.preventGesture&&M.blurHandler({eventSource:M,originalEvent:L,userData:M.userData})}function _e(M,L){var q=null,J={originalEvent:L,eventType:"contextmenu",pointerType:"mouse",isEmulated:!1};K(M,J),M.contextMenuHandler&&!J.preventGesture&&!J.defaultPrevented&&(q={eventSource:M,position:k(C(L),M.element),originalEvent:J.originalEvent,preventDefault:J.preventDefault||J.defaultPrevented,userData:M.userData},M.contextMenuHandler(q)),(q&&q.preventDefault||J.preventDefault&&!J.defaultPrevented)&&t.cancelEvent(L),J.stopPropagation&&t.stopEvent(L)}function fe(M,L){ve(M,L,L)}function de(M,L){var q={target:L.target||L.srcElement,type:"wheel",shiftKey:L.shiftKey||!1,clientX:L.clientX,clientY:L.clientY,pageX:L.pageX?L.pageX:L.clientX,pageY:L.pageY?L.pageY:L.clientY,deltaMode:L.type==="MozMousePixelScroll"?0:1,deltaX:0,deltaZ:0};t.MouseTracker.wheelEventName==="mousewheel"?q.deltaY=-L.wheelDelta/t.DEFAULT_SETTINGS.pixelsPerWheelLine:q.deltaY=L.detail,ve(M,q,L)}function ve(M,L,q){var J=0,ye,Re=null;J=L.deltaY<0?1:-1,ye={originalEvent:L,eventType:"wheel",pointerType:"mouse",isEmulated:L!==q},K(M,ye),M.scrollHandler&&!ye.preventGesture&&!ye.defaultPrevented&&(Re={eventSource:M,pointerType:"mouse",position:_(L,M.element),scroll:J,shift:L.shiftKey,isTouchEvent:!1,originalEvent:q,preventDefault:ye.preventDefault||ye.defaultPrevented,userData:M.userData},M.scrollHandler(Re)),ye.stopPropagation&&t.stopEvent(q),(Re&&Re.preventDefault||ye.preventDefault&&!ye.defaultPrevented)&&t.cancelEvent(q)}function Ae(M,L){var q={id:t.MouseTracker.mousePointerId,type:"mouse"},J={originalEvent:L,eventType:"lostpointercapture",pointerType:"mouse",isEmulated:!1};K(M,J),L.target===M.element&&xe(M,q,!1),J.stopPropagation&&t.stopEvent(L)}function ke(M,L){var q,J,ye=L.changedTouches.length,Re,ot=M.getActivePointersListByType("touch");q=t.now(),ot.getLength()>L.touches.length-ye&&t.console.warn("Tracked touch contact count doesn't match event.touches.length");var bt={originalEvent:L,eventType:"pointerdown",pointerType:"touch",isEmulated:!1};for(K(M,bt),J=0;J<ye;J++)Re={id:L.changedTouches[J].identifier,type:"touch",isPrimary:ot.getLength()===0,currentPos:C(L.changedTouches[J]),currentTime:q},ze(M,bt,Re),gt(M,bt,Re,0),xe(M,Re,!0);bt.preventDefault&&!bt.defaultPrevented&&t.cancelEvent(L),bt.stopPropagation&&t.stopEvent(L)}function me(M,L){var q,J,ye=L.changedTouches.length,Re;q=t.now();var ot={originalEvent:L,eventType:"pointerup",pointerType:"touch",isEmulated:!1};for(K(M,ot),J=0;J<ye;J++)Re={id:L.changedTouches[J].identifier,type:"touch",currentPos:C(L.changedTouches[J]),currentTime:q},Ct(M,ot,Re,0),xe(M,Re,!1),Ve(M,ot,Re);ot.preventDefault&&!ot.defaultPrevented&&t.cancelEvent(L),ot.stopPropagation&&t.stopEvent(L)}function be(M,L){var q,J,ye=L.changedTouches.length,Re;q=t.now();var ot={originalEvent:L,eventType:"pointermove",pointerType:"touch",isEmulated:!1};for(K(M,ot),J=0;J<ye;J++)Re={id:L.changedTouches[J].identifier,type:"touch",currentPos:C(L.changedTouches[J]),currentTime:q},St(M,ot,Re);ot.preventDefault&&!ot.defaultPrevented&&t.cancelEvent(L),ot.stopPropagation&&t.stopEvent(L)}function Ee(M,L){var q=L.changedTouches.length,J,ye,Re={originalEvent:L,eventType:"pointercancel",pointerType:"touch",isEmulated:!1};for(K(M,Re),J=0;J<q;J++)ye={id:L.changedTouches[J].identifier,type:"touch"},ge(M,Re,ye);Re.stopPropagation&&t.stopEvent(L)}function Oe(M,L){return t.eventIsCanceled(L)||L.preventDefault(),!1}function F(M,L){return t.eventIsCanceled(L)||L.preventDefault(),!1}function we(M,L){var q={originalEvent:L,eventType:"gotpointercapture",pointerType:T(L),isEmulated:!1};K(M,q),L.target===M.element&&xe(M,{id:L.pointerId,type:T(L)},!0),q.stopPropagation&&t.stopEvent(L)}function Ne(M,L){var q={originalEvent:L,eventType:"lostpointercapture",pointerType:T(L),isEmulated:!1};K(M,q),L.target===M.element&&xe(M,{id:L.pointerId,type:T(L)},!1),q.stopPropagation&&t.stopEvent(L)}function X(M,L){var q={id:x(L),type:T(L),isPrimary:P(L),currentPos:C(L),currentTime:t.now()},J={originalEvent:L,eventType:"pointerenter",pointerType:q.type,isEmulated:!1};K(M,J),ze(M,J,q)}function Be(M,L){var q={id:x(L),type:T(L),isPrimary:P(L),currentPos:C(L),currentTime:t.now()},J={originalEvent:L,eventType:"pointerleave",pointerType:q.type,isEmulated:!1};K(M,J),Ve(M,J,q)}function Je(M,L){var q={id:x(L),type:T(L),isPrimary:P(L),currentPos:C(L),currentTime:t.now()},J={originalEvent:L,eventType:"pointerover",pointerType:q.type,isEmulated:!1};K(M,J),ut(M,J,q),J.preventDefault&&!J.defaultPrevented&&t.cancelEvent(L),J.stopPropagation&&t.stopEvent(L)}function He(M,L){var q={id:x(L),type:T(L),isPrimary:P(L),currentPos:C(L),currentTime:t.now()},J={originalEvent:L,eventType:"pointerout",pointerType:q.type,isEmulated:!1};K(M,J),Ye(M,J,q),J.preventDefault&&!J.defaultPrevented&&t.cancelEvent(L),J.stopPropagation&&t.stopEvent(L)}function Ze(M,L){var q={id:x(L),type:T(L),isPrimary:P(L),currentPos:C(L),currentTime:t.now()},J=t.MouseTracker.havePointerEvents&&q.type==="touch"&&t.Browser.vendor!==t.BROWSERS.IE,ye={originalEvent:L,eventType:"pointerdown",pointerType:q.type,isEmulated:!1};K(M,ye),gt(M,ye,q,L.button),ye.preventDefault&&!ye.defaultPrevented&&t.cancelEvent(L),ye.stopPropagation&&t.stopEvent(L),ye.shouldCapture&&(J?xe(M,q,!0):g(M,q))}function Qe(M,L){Ke(M,L)}function it(M,L){var q=M.getActivePointersListByType(T(L));q.getById(L.pointerId)&&Ke(M,L),t.stopEvent(L)}function Ke(M,L){var q;q={id:x(L),type:T(L),isPrimary:P(L),currentPos:C(L),currentTime:t.now()};var J={originalEvent:L,eventType:"pointerup",pointerType:q.type,isEmulated:!1};K(M,J),Ct(M,J,q,L.button),J.preventDefault&&!J.defaultPrevented&&t.cancelEvent(L),J.stopPropagation&&t.stopEvent(L),J.shouldReleaseCapture&&(L.target===M.element?w(M,q):xe(M,q,!1))}function Le(M,L){mt(M,L)}function pe(M,L){var q=M.getActivePointersListByType(T(L));q.getById(L.pointerId)&&mt(M,L),t.stopEvent(L)}function mt(M,L){var q={id:x(L),type:T(L),isPrimary:P(L),currentPos:C(L),currentTime:t.now()},J={originalEvent:L,eventType:"pointermove",pointerType:q.type,isEmulated:!1};K(M,J),St(M,J,q),J.preventDefault&&!J.defaultPrevented&&t.cancelEvent(L),J.stopPropagation&&t.stopEvent(L)}function Ce(M,L){var q={id:L.pointerId,type:T(L)},J={originalEvent:L,eventType:"pointercancel",pointerType:q.type,isEmulated:!1};K(M,J),ge(M,J,q),J.stopPropagation&&t.stopEvent(L)}function Pt(M,L){return L.speed=0,L.direction=0,L.contactPos=L.currentPos,L.contactTime=L.currentTime,L.lastPos=L.currentPos,L.lastTime=L.currentTime,M.add(L)}function wt(M,L,q){var J,ye=L.getById(q.id);return ye?(ye.captured&&(t.console.warn("stopTrackingPointer() called on captured pointer"),w(M,ye)),L.removeContact(),J=L.removeById(q.id)):J=L.getLength(),J}function D(M,L){switch(L.eventType){case"pointermove":L.isStoppable=!0,L.isCancelable=!0,L.preventDefault=!1,L.preventGesture=!M.hasGestureHandlers,L.stopPropagation=!1;break;case"pointerover":case"pointerout":case"contextmenu":case"keydown":case"keyup":case"keypress":L.isStoppable=!0,L.isCancelable=!0,L.preventDefault=!1,L.preventGesture=!1,L.stopPropagation=!1;break;case"pointerdown":L.isStoppable=!0,L.isCancelable=!0,L.preventDefault=!1,L.preventGesture=!M.hasGestureHandlers,L.stopPropagation=!1;break;case"pointerup":L.isStoppable=!0,L.isCancelable=!0,L.preventDefault=!1,L.preventGesture=!M.hasGestureHandlers,L.stopPropagation=!1;break;case"wheel":L.isStoppable=!0,L.isCancelable=!0,L.preventDefault=!1,L.preventGesture=!M.hasScrollHandler,L.stopPropagation=!1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":L.isStoppable=!0,L.isCancelable=!1,L.preventDefault=!1,L.preventGesture=!1,L.stopPropagation=!1;break;case"click":L.isStoppable=!0,L.isCancelable=!0,L.preventDefault=!!M.clickHandler,L.preventGesture=!1,L.stopPropagation=!1;break;case"dblclick":L.isStoppable=!0,L.isCancelable=!0,L.preventDefault=!!M.dblClickHandler,L.preventGesture=!1,L.stopPropagation=!1;break;case"focus":case"blur":case"pointerenter":case"pointerleave":default:L.isStoppable=!1,L.isCancelable=!1,L.preventDefault=!1,L.preventGesture=!1,L.stopPropagation=!1;break}}function K(M,L){L.eventSource=M,L.eventPhase=L.originalEvent&&typeof L.originalEvent.eventPhase<"u"?L.originalEvent.eventPhase:0,L.defaultPrevented=t.eventIsCanceled(L.originalEvent),L.shouldCapture=!1,L.shouldReleaseCapture=!1,L.userData=M.userData,D(M,L),M.preProcessEventHandler&&M.preProcessEventHandler(L)}function xe(M,L,q){var J=M.getActivePointersListByType(L.type),ye=J.getById(L.id);ye?q&&!ye.captured?(ye.captured=!0,J.captureCount++):!q&&ye.captured&&(ye.captured=!1,J.captureCount--,J.captureCount<0&&(J.captureCount=0,t.console.warn("updatePointerCaptured() - pointsList.captureCount went negative"))):t.console.warn("updatePointerCaptured() called on untracked pointer")}function ze(M,L,q){var J=M.getActivePointersListByType(q.type),ye;ye=J.getById(q.id),ye?(ye.insideElement=!0,ye.lastPos=ye.currentPos,ye.lastTime=ye.currentTime,ye.currentPos=q.currentPos,ye.currentTime=q.currentTime,q=ye):(q.captured=!1,q.insideElementPressed=!1,q.insideElement=!0,Pt(J,q)),M.enterHandler&&M.enterHandler({eventSource:M,pointerType:q.type,position:k(q.currentPos,M.element),buttons:J.buttons,pointers:M.getActivePointerCount(),insideElementPressed:q.insideElementPressed,buttonDownAny:J.buttons!==0,isTouchEvent:q.type==="touch",originalEvent:L.originalEvent,userData:M.userData})}function Ve(M,L,q){var J=M.getActivePointersListByType(q.type),ye,Re;ye=J.getById(q.id),ye?(ye.captured?(ye.insideElement=!1,ye.lastPos=ye.currentPos,ye.lastTime=ye.currentTime,ye.currentPos=q.currentPos,ye.currentTime=q.currentTime):wt(M,J,ye),q=ye):(q.captured=!1,q.insideElementPressed=!1),(M.leaveHandler||M.exitHandler)&&(Re={eventSource:M,pointerType:q.type,position:q.currentPos&&k(q.currentPos,M.element),buttons:J.buttons,pointers:M.getActivePointerCount(),insideElementPressed:q.insideElementPressed,buttonDownAny:J.buttons!==0,isTouchEvent:q.type==="touch",originalEvent:L.originalEvent,userData:M.userData},M.leaveHandler&&M.leaveHandler(Re),M.exitHandler&&M.exitHandler(Re))}function ut(M,L,q){var J,ye;J=M.getActivePointersListByType(q.type),ye=J.getById(q.id),ye?q=ye:(q.captured=!1,q.insideElementPressed=!1),M.overHandler&&M.overHandler({eventSource:M,pointerType:q.type,position:k(q.currentPos,M.element),buttons:J.buttons,pointers:M.getActivePointerCount(),insideElementPressed:q.insideElementPressed,buttonDownAny:J.buttons!==0,isTouchEvent:q.type==="touch",originalEvent:L.originalEvent,userData:M.userData})}function Ye(M,L,q){var J,ye;J=M.getActivePointersListByType(q.type),ye=J.getById(q.id),ye?q=ye:(q.captured=!1,q.insideElementPressed=!1),M.outHandler&&M.outHandler({eventSource:M,pointerType:q.type,position:q.currentPos&&k(q.currentPos,M.element),buttons:J.buttons,pointers:M.getActivePointerCount(),insideElementPressed:q.insideElementPressed,buttonDownAny:J.buttons!==0,isTouchEvent:q.type==="touch",originalEvent:L.originalEvent,userData:M.userData})}function gt(M,L,q,J){var ye=r[M.hash],Re=M.getActivePointersListByType(q.type),ot;if(typeof L.originalEvent.buttons<"u"?Re.buttons=L.originalEvent.buttons:J===0?Re.buttons|=1:J===1?Re.buttons|=4:J===2?Re.buttons|=2:J===3?Re.buttons|=8:J===4?Re.buttons|=16:J===5&&(Re.buttons|=32),J!==0){L.shouldCapture=!1,L.shouldReleaseCapture=!1,M.nonPrimaryPressHandler&&!L.preventGesture&&!L.defaultPrevented&&(L.preventDefault=!0,M.nonPrimaryPressHandler({eventSource:M,pointerType:q.type,position:k(q.currentPos,M.element),button:J,buttons:Re.buttons,isTouchEvent:q.type==="touch",originalEvent:L.originalEvent,userData:M.userData}));return}ot=Re.getById(q.id),ot?(ot.insideElementPressed=!0,ot.insideElement=!0,ot.originalTarget=L.originalEvent.target,ot.contactPos=q.currentPos,ot.contactTime=q.currentTime,ot.lastPos=ot.currentPos,ot.lastTime=ot.currentTime,ot.currentPos=q.currentPos,ot.currentTime=q.currentTime,q=ot):(q.captured=!1,q.insideElementPressed=!0,q.insideElement=!0,q.originalTarget=L.originalEvent.target,Pt(Re,q)),Re.addContact(),!L.preventGesture&&!L.defaultPrevented?(L.shouldCapture=!0,L.shouldReleaseCapture=!1,L.preventDefault=!0,(M.dragHandler||M.dragEndHandler||M.pinchHandler)&&t.MouseTracker.gesturePointVelocityTracker.addPoint(M,q),Re.contacts===1?M.pressHandler&&!L.preventGesture&&M.pressHandler({eventSource:M,pointerType:q.type,position:k(q.contactPos,M.element),buttons:Re.buttons,isTouchEvent:q.type==="touch",originalEvent:L.originalEvent,userData:M.userData}):Re.contacts===2&&M.pinchHandler&&q.type==="touch"&&(ye.pinchGPoints=Re.asArray(),ye.lastPinchDist=ye.currentPinchDist=ye.pinchGPoints[0].currentPos.distanceTo(ye.pinchGPoints[1].currentPos),ye.lastPinchCenter=ye.currentPinchCenter=V(ye.pinchGPoints[0].currentPos,ye.pinchGPoints[1].currentPos))):(L.shouldCapture=!1,L.shouldReleaseCapture=!1)}function Ct(M,L,q,J){var ye=r[M.hash],Re=M.getActivePointersListByType(q.type),ot,bt,je,fn=!1,Vt;if(typeof L.originalEvent.buttons<"u"?Re.buttons=L.originalEvent.buttons:J===0?Re.buttons^=-2:J===1?Re.buttons^=-5:J===2?Re.buttons^=-3:J===3?Re.buttons^=-9:J===4?Re.buttons^=-17:J===5&&(Re.buttons^=-33),L.shouldCapture=!1,J!==0){L.shouldReleaseCapture=!1,M.nonPrimaryReleaseHandler&&!L.preventGesture&&!L.defaultPrevented&&(L.preventDefault=!0,M.nonPrimaryReleaseHandler({eventSource:M,pointerType:q.type,position:k(q.currentPos,M.element),button:J,buttons:Re.buttons,isTouchEvent:q.type==="touch",originalEvent:L.originalEvent,userData:M.userData}));return}je=Re.getById(q.id),je?(Re.removeContact(),je.captured&&(fn=!0),je.lastPos=je.currentPos,je.lastTime=je.currentTime,je.currentPos=q.currentPos,je.currentTime=q.currentTime,je.insideElement||wt(M,Re,je),ot=je.currentPos,bt=je.currentTime):(q.captured=!1,q.insideElementPressed=!1,q.insideElement=!0,Pt(Re,q),je=q),!L.preventGesture&&!L.defaultPrevented&&(fn?(L.shouldReleaseCapture=!0,L.preventDefault=!0,(M.dragHandler||M.dragEndHandler||M.pinchHandler)&&t.MouseTracker.gesturePointVelocityTracker.removePoint(M,je),Re.contacts===0?(M.releaseHandler&&ot&&M.releaseHandler({eventSource:M,pointerType:je.type,position:k(ot,M.element),buttons:Re.buttons,insideElementPressed:je.insideElementPressed,insideElementReleased:je.insideElement,isTouchEvent:je.type==="touch",originalEvent:L.originalEvent,userData:M.userData}),M.dragEndHandler&&ye.sentDragEvent&&M.dragEndHandler({eventSource:M,pointerType:je.type,position:k(je.currentPos,M.element),speed:je.speed,direction:je.direction,shift:L.originalEvent.shiftKey,isTouchEvent:je.type==="touch",originalEvent:L.originalEvent,userData:M.userData}),ye.sentDragEvent=!1,(M.clickHandler||M.dblClickHandler)&&je.insideElement&&(Vt=bt-je.contactTime<=M.clickTimeThreshold&&je.contactPos.distanceTo(ot)<=M.clickDistThreshold,M.clickHandler&&M.clickHandler({eventSource:M,pointerType:je.type,position:k(je.currentPos,M.element),quick:Vt,shift:L.originalEvent.shiftKey,isTouchEvent:je.type==="touch",originalEvent:L.originalEvent,originalTarget:je.originalTarget,userData:M.userData}),M.dblClickHandler&&Vt&&(Re.clicks++,Re.clicks===1?(ye.lastClickPos=ot,ye.dblClickTimeOut=setTimeout(function(){Re.clicks=0},M.dblClickTimeThreshold)):Re.clicks===2&&(clearTimeout(ye.dblClickTimeOut),Re.clicks=0,ye.lastClickPos.distanceTo(ot)<=M.dblClickDistThreshold&&M.dblClickHandler({eventSource:M,pointerType:je.type,position:k(je.currentPos,M.element),shift:L.originalEvent.shiftKey,isTouchEvent:je.type==="touch",originalEvent:L.originalEvent,userData:M.userData}),ye.lastClickPos=null)))):Re.contacts===2&&M.pinchHandler&&je.type==="touch"&&(ye.pinchGPoints=Re.asArray(),ye.lastPinchDist=ye.currentPinchDist=ye.pinchGPoints[0].currentPos.distanceTo(ye.pinchGPoints[1].currentPos),ye.lastPinchCenter=ye.currentPinchCenter=V(ye.pinchGPoints[0].currentPos,ye.pinchGPoints[1].currentPos))):(L.shouldReleaseCapture=!1,M.releaseHandler&&ot&&(M.releaseHandler({eventSource:M,pointerType:je.type,position:k(ot,M.element),buttons:Re.buttons,insideElementPressed:je.insideElementPressed,insideElementReleased:je.insideElement,isTouchEvent:je.type==="touch",originalEvent:L.originalEvent,userData:M.userData}),L.preventDefault=!0)))}function St(M,L,q){var J=r[M.hash],ye=M.getActivePointersListByType(q.type),Re,ot,bt;if(typeof L.originalEvent.buttons<"u"&&(ye.buttons=L.originalEvent.buttons),Re=ye.getById(q.id),Re)Re.lastPos=Re.currentPos,Re.lastTime=Re.currentTime,Re.currentPos=q.currentPos,Re.currentTime=q.currentTime;else return;L.shouldCapture=!1,L.shouldReleaseCapture=!1,M.stopHandler&&q.type==="mouse"&&(clearTimeout(M.stopTimeOut),M.stopTimeOut=setTimeout(function(){Ie(M,L.originalEvent,q.type)},M.stopDelay)),ye.contacts===0?M.moveHandler&&M.moveHandler({eventSource:M,pointerType:q.type,position:k(q.currentPos,M.element),buttons:ye.buttons,isTouchEvent:q.type==="touch",originalEvent:L.originalEvent,userData:M.userData}):ye.contacts===1?(M.moveHandler&&(Re=ye.asArray()[0],M.moveHandler({eventSource:M,pointerType:Re.type,position:k(Re.currentPos,M.element),buttons:ye.buttons,isTouchEvent:Re.type==="touch",originalEvent:L.originalEvent,userData:M.userData})),M.dragHandler&&!L.preventGesture&&!L.defaultPrevented&&(Re=ye.asArray()[0],bt=Re.currentPos.minus(Re.lastPos),M.dragHandler({eventSource:M,pointerType:Re.type,position:k(Re.currentPos,M.element),buttons:ye.buttons,delta:bt,speed:Re.speed,direction:Re.direction,shift:L.originalEvent.shiftKey,isTouchEvent:Re.type==="touch",originalEvent:L.originalEvent,userData:M.userData}),L.preventDefault=!0,J.sentDragEvent=!0)):ye.contacts===2&&(M.moveHandler&&(ot=ye.asArray(),M.moveHandler({eventSource:M,pointerType:ot[0].type,position:k(V(ot[0].currentPos,ot[1].currentPos),M.element),buttons:ye.buttons,isTouchEvent:ot[0].type==="touch",originalEvent:L.originalEvent,userData:M.userData})),M.pinchHandler&&q.type==="touch"&&!L.preventGesture&&!L.defaultPrevented&&(bt=J.pinchGPoints[0].currentPos.distanceTo(J.pinchGPoints[1].currentPos),bt!==J.currentPinchDist&&(J.lastPinchDist=J.currentPinchDist,J.currentPinchDist=bt,J.lastPinchCenter=J.currentPinchCenter,J.currentPinchCenter=V(J.pinchGPoints[0].currentPos,J.pinchGPoints[1].currentPos),M.pinchHandler({eventSource:M,pointerType:"touch",gesturePoints:J.pinchGPoints,lastCenter:k(J.lastPinchCenter,M.element),center:k(J.currentPinchCenter,M.element),lastDistance:J.lastPinchDist,distance:J.currentPinchDist,shift:L.originalEvent.shiftKey,originalEvent:L.originalEvent,userData:M.userData}),L.preventDefault=!0)))}function ge(M,L,q){var J=M.getActivePointersListByType(q.type),ye;ye=J.getById(q.id),ye&&wt(M,J,ye)}function Ie(M,L,q){M.stopHandler&&M.stopHandler({eventSource:M,pointerType:q,position:_(L,M.element),buttons:M.getActivePointersListByType(q).buttons,isTouchEvent:q==="touch",originalEvent:L,userData:M.userData})}}(n),function(t){t.ControlAnchor={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4,ABSOLUTE:5},t.Control=function(r,o,l){var d=r.parentNode;typeof o=="number"&&(t.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"),o={anchor:o}),o.attachToViewer=typeof o.attachToViewer>"u"?!0:o.attachToViewer,this.autoFade=typeof o.autoFade>"u"?!0:o.autoFade,this.element=r,this.anchor=o.anchor,this.container=l,this.anchor===t.ControlAnchor.ABSOLUTE?(this.wrapper=t.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top=typeof o.top=="number"?o.top+"px":o.top,this.wrapper.style.left=typeof o.left=="number"?o.left+"px":o.left,this.wrapper.style.height=typeof o.height=="number"?o.height+"px":o.height,this.wrapper.style.width=typeof o.width=="number"?o.width+"px":o.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=t.makeNeutralElement("div"),this.wrapper.style.display="inline-block",this.anchor===t.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%")),this.wrapper.appendChild(this.element),o.attachToViewer?this.anchor===t.ControlAnchor.TOP_RIGHT||this.anchor===t.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.wrapper,this.container.firstChild):this.container.appendChild(this.wrapper):d.appendChild(this.wrapper)},t.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.anchor!==t.ControlAnchor.NONE&&this.container.removeChild(this.wrapper)},isVisible:function(){return this.wrapper.style.display!=="none"},setVisible:function(r){this.wrapper.style.display=r?this.anchor===t.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(r){this.element[t.SIGNAL]&&t.Browser.vendor===t.BROWSERS.IE?t.setElementOpacity(this.element,r,!0):t.setElementOpacity(this.wrapper,r,!0)}}}(n),function(t){t.ControlDock=function(o){var l=["topleft","topright","bottomright","bottomleft"],d,h;for(t.extend(!0,this,{id:"controldock-"+t.now()+"-"+Math.floor(Math.random()*1e6),container:t.makeNeutralElement("div"),controls:[]},o),this.container.onsubmit=function(){return!1},this.element&&(this.element=t.getElement(this.element),this.element.appendChild(this.container),this.element.style.position="relative",this.container.style.width="100%",this.container.style.height="100%"),h=0;h<l.length;h++)d=l[h],this.controls[d]=t.makeNeutralElement("div"),this.controls[d].style.position="absolute",d.match("left")&&(this.controls[d].style.left="0px"),d.match("right")&&(this.controls[d].style.right="0px"),d.match("top")&&(this.controls[d].style.top="0px"),d.match("bottom")&&(this.controls[d].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)},t.ControlDock.prototype={addControl:function(o,l){o=t.getElement(o);var d=null;if(!(r(this,o)>=0)){switch(l.anchor){case t.ControlAnchor.TOP_RIGHT:d=this.controls.topright,o.style.position="relative",o.style.paddingRight="0px",o.style.paddingTop="0px";break;case t.ControlAnchor.BOTTOM_RIGHT:d=this.controls.bottomright,o.style.position="relative",o.style.paddingRight="0px",o.style.paddingBottom="0px";break;case t.ControlAnchor.BOTTOM_LEFT:d=this.controls.bottomleft,o.style.position="relative",o.style.paddingLeft="0px",o.style.paddingBottom="0px";break;case t.ControlAnchor.TOP_LEFT:d=this.controls.topleft,o.style.position="relative",o.style.paddingLeft="0px",o.style.paddingTop="0px";break;case t.ControlAnchor.ABSOLUTE:d=this.container,o.style.margin="0px",o.style.padding="0px";break;default:case t.ControlAnchor.NONE:d=this.container,o.style.margin="0px",o.style.padding="0px";break}this.controls.push(new t.Control(o,l,d)),o.style.display="inline-block"}},removeControl:function(o){o=t.getElement(o);var l=r(this,o);return l>=0&&(this.controls[l].destroy(),this.controls.splice(l,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var o;for(o=this.controls.length-1;o>=0;o--)if(this.controls[o].isVisible())return!0;return!1},setControlsEnabled:function(o){var l;for(l=this.controls.length-1;l>=0;l--)this.controls[l].setVisible(o);return this}};function r(o,l){var d=o.controls,h;for(h=d.length-1;h>=0;h--)if(d[h].element===l)return h;return-1}}(n),function(t){t.Placement=t.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}}})}(n),function(t){var r={},o=1;t.Viewer=function(D){var K=arguments,xe=this,ze;if(t.isPlainObject(D)||(D={id:K[0],xmlPath:K.length>1?K[1]:void 0,prefixUrl:K.length>2?K[2]:void 0,controls:K.length>3?K[3]:void 0,overlays:K.length>4?K[4]:void 0}),D.config&&(t.extend(!0,D,D.config),delete D.config),t.extend(!0,this,{id:D.id,hash:D.hash||o++,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},t.DEFAULT_SETTINGS,D),typeof this.hash>"u")throw new Error("A hash must be defined, either by specifying options.id or options.hash.");for(typeof r[this.hash]<"u"&&t.console.warn("Hash "+this.hash+" has already been used."),r[this.hash]={fsBoundsDelta:new t.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=t.now(),t.EventSource.call(this),this.addHandler("open-failed",function(Ve){var ut=t.getString("Errors.OpenFailed",Ve.eventSource,Ve.message);xe._showMessage(ut)}),t.ControlDock.call(this,D),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=t.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",function(Ve){Ve.width="100%",Ve.height="100%",Ve.overflow="hidden",Ve.position="absolute",Ve.top="0px",Ve.left="0px"}(this.canvas.style),t.setElementTouchActionNone(this.canvas),D.tabIndex!==""&&(this.canvas.tabIndex=D.tabIndex===void 0?0:D.tabIndex),this.container.className="openseadragon-container",function(Ve){Ve.width="100%",Ve.height="100%",Ve.position="relative",Ve.overflow="hidden",Ve.left="0px",Ve.top="0px",Ve.textAlign="left"}(this.container.style),t.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 t.MouseTracker({userData:"Viewer.innerTracker",element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,contextMenuHandler:t.delegate(this,_),keyDownHandler:t.delegate(this,k),keyHandler:t.delegate(this,V),clickHandler:t.delegate(this,j),dblClickHandler:t.delegate(this,Z),dragHandler:t.delegate(this,B),dragEndHandler:t.delegate(this,Y),enterHandler:t.delegate(this,ie),leaveHandler:t.delegate(this,ae),pressHandler:t.delegate(this,le),releaseHandler:t.delegate(this,_e),nonPrimaryPressHandler:t.delegate(this,fe),nonPrimaryReleaseHandler:t.delegate(this,de),scrollHandler:t.delegate(this,me),pinchHandler:t.delegate(this,ve),focusHandler:t.delegate(this,Ae),blurHandler:t.delegate(this,ke)}),this.outerTracker=new t.MouseTracker({userData:"Viewer.outerTracker",element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:t.delegate(this,be),leaveHandler:t.delegate(this,Ee)}),this.toolbar&&(this.toolbar=new t.ControlDock({element:this.toolbar})),this.bindStandardControls(),r[this.hash].prevContainerSize=l(this.container),window.ResizeObserver?(this._autoResizePolling=!1,this._resizeObserver=new ResizeObserver(function(){r[xe.hash].needsResize=!0}),this._resizeObserver.observe(this.container,{})):this._autoResizePolling=!0,this.world=new t.World({viewer:this}),this.world.addHandler("add-item",function(Ve){xe.source=xe.world.getItemAt(0).source,r[xe.hash].forceRedraw=!0,xe._updateRequestId||(xe._updateRequestId=m(xe,Oe))}),this.world.addHandler("remove-item",function(Ve){xe.world.getItemCount()?xe.source=xe.world.getItemAt(0).source:xe.source=null,r[xe.hash].forceRedraw=!0}),this.world.addHandler("metrics-change",function(Ve){xe.viewport&&xe.viewport._setContentBounds(xe.world.getHomeBounds(),xe.world.getContentFactor())}),this.world.addHandler("item-index-change",function(Ve){xe.source=xe.world.getItemAt(0).source}),this.viewport=new t.Viewport({containerSize:r[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 t.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:D.timeout,tileRetryMax:this.tileRetryMax,tileRetryDelay:this.tileRetryDelay}),this.tileCache=new t.TileCache({maxImageCacheCount:this.maxImageCacheCount}),this.drawer=new t.Drawer({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor}),this.overlaysContainer=t.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),this.drawer.canRotate()||(this.rotateLeft&&(ze=this.buttonGroup.buttons.indexOf(this.rotateLeft),this.buttonGroup.buttons.splice(ze,1),this.buttonGroup.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(ze=this.buttonGroup.buttons.indexOf(this.rotateRight),this.buttonGroup.buttons.splice(ze,1),this.buttonGroup.element.removeChild(this.rotateRight.element))),this._addUpdatePixelDensityRatioEvent(),this.showNavigator&&(this.navigator=new t.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),ze=0;ze<this.customControls.length;ze++)this.addControl(this.customControls[ze].id,{anchor:this.customControls[ze].anchor});t.requestAnimationFrame(function(){w(xe)}),this.imageSmoothingEnabled!==void 0&&!this.imageSmoothingEnabled&&this.drawer.setImageSmoothingEnabled(this.imageSmoothingEnabled),t._viewers.set(this.element,this)},t.extend(t.Viewer.prototype,t.EventSource.prototype,t.ControlDock.prototype,{isOpen:function(){return!!this.world.getItemCount()},openDzi:function(D){return t.console.error("[Viewer.openDzi] this function is deprecated; use Viewer.open() instead."),this.open(D)},openTileSource:function(D){return t.console.error("[Viewer.openTileSource] this function is deprecated; use Viewer.open() instead."),this.open(D)},get buttons(){return t.console.warn("Viewer.buttons is deprecated; Please use Viewer.buttonGroup"),this.buttonGroup},open:function(D,K){var xe=this;if(this.close(),!D)return this;if(this.sequenceMode&&t.isArray(D))return this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null),typeof K<"u"&&!isNaN(K)&&(this.initialPage=K),this.tileSources=D,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(t.isArray(D)||(D=[D]),!D.length)return this;this._opening=!0;for(var ze=D.length,Ve=0,ut=0,Ye,gt=function(){if(Ve+ut===ze)if(Ve){(xe._firstOpen||!xe.preserveViewport)&&(xe.viewport.goHome(!0),xe.viewport.update()),xe._firstOpen=!1;var ge=D[0];if(ge.tileSource&&(ge=ge.tileSource),xe.overlays&&!xe.preserveOverlays)for(var Ie=0;Ie<xe.overlays.length;Ie++)xe.currentOverlays[Ie]=h(xe,xe.overlays[Ie]);xe._drawOverlays(),xe._opening=!1,xe.raiseEvent("open",{source:ge})}else xe._opening=!1,xe.raiseEvent("open-failed",Ye)},Ct=function(ge){(!t.isPlainObject(ge)||!ge.tileSource)&&(ge={tileSource:ge}),ge.index!==void 0&&(t.console.error("[Viewer.open] setting indexes here is not supported; use addTiledImage instead"),delete ge.index),ge.collectionImmediately===void 0&&(ge.collectionImmediately=!0);var Ie=ge.success;ge.success=function(L){if(Ve++,ge.tileSource.overlays)for(var q=0;q<ge.tileSource.overlays.length;q++)xe.addOverlay(ge.tileSource.overlays[q]);Ie&&Ie(L),gt()};var M=ge.error;ge.error=function(L){ut++,Ye||(Ye=L),M&&M(L),gt()},xe.addTiledImage(ge)},St=0;St<D.length;St++)Ct(D[St]);return this},close:function(){return r[this.hash]?(this._opening=!1,this.navigator&&this.navigator.close(),this.preserveOverlays||(this.clearOverlays(),this.overlaysContainer.innerHTML=""),r[this.hash].animating=!1,this.world.removeAll(),this.imageLoader.clear(),this.raiseEvent("close"),this):this},destroy:function(){if(r[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),this._updateRequestId!==null&&(t.cancelAnimationFrame(this._updateRequestId),this._updateRequestId=null),this.drawer&&this.drawer.destroy(),this.navigator&&(this.navigator.destroy(),r[this.navigator.hash]=null,delete r[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(),r[this.hash]=null,delete r[this.hash],this.canvas=null,this.container=null,t._viewers.delete(this.element),this.element=null,this.raiseEvent("destroy"),this.removeAllHandlers()}},isMouseNavEnabled:function(){return this.innerTracker.isTracking()},setMouseNavEnabled:function(D){return this.innerTracker.setTracking(D),this.outerTracker.setTracking(D),this.raiseEvent("mouse-enabled",{enabled:D}),this},areControlsEnabled:function(){var D=this.controls.length,K;for(K=0;K<this.controls.length;K++)D=D&&this.controls[K].isVisible();return D},setControlsEnabled:function(D){return D?T(this):w(this),this.raiseEvent("controls-enabled",{enabled:D}),this},setDebugMode:function(D){for(var K=0;K<this.world.getItemCount();K++)this.world.getItemAt(K).debugMode=D;this.debugMode=D,this.forceRedraw()},setAjaxHeaders:function(D,K){if(D===null&&(D={}),!t.isPlainObject(D)){console.error("[Viewer.setAjaxHeaders] Ignoring invalid headers, must be a plain object");return}if(K===void 0&&(K=!0),this.ajaxHeaders=D,K){for(var xe=0;xe<this.world.getItemCount();xe++)this.world.getItemAt(xe)._updateAjaxHeaders(!0);if(this.navigator&&this.navigator.setAjaxHeaders(this.ajaxHeaders,!0),this.referenceStrip&&this.referenceStrip.miniViewers)for(var ze in this.referenceStrip.miniViewers)this.referenceStrip.miniViewers[ze].setAjaxHeaders(this.ajaxHeaders,!0)}},addButton:function(D){this.buttonGroup.addButton(D)},isFullPage:function(){return r[this.hash].fullPage},setFullPage:function(D){var K=document.body,xe=K.style,ze=document.documentElement.style,Ve=this,ut,Ye;if(D===this.isFullPage())return this;var gt={fullPage:D,preventDefaultAction:!1};if(this.raiseEvent("pre-full-page",gt),gt.preventDefaultAction)return this;if(D){for(this.elementSize=t.getElementSize(this.element),this.pageScroll=t.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=xe.margin,this.docMargin=ze.margin,xe.margin="0",ze.margin="0",this.bodyPadding=xe.padding,this.docPadding=ze.padding,xe.padding="0",ze.padding="0",this.bodyWidth=xe.width,this.docWidth=ze.width,xe.width="100%",ze.width="100%",this.bodyHeight=xe.height,this.docHeight=ze.height,xe.height="100%",ze.height="100%",this.bodyDisplay=xe.display,xe.display="block",this.previousBody=[],r[this.hash].prevElementParent=this.element.parentNode,r[this.hash].prevNextSibling=this.element.nextSibling,r[this.hash].prevElementWidth=this.element.style.width,r[this.hash].prevElementHeight=this.element.style.height,ut=K.childNodes.length,Ye=0;Ye<ut;Ye++)this.previousBody.push(K.childNodes[0]),K.removeChild(K.childNodes[0]);this.toolbar&&this.toolbar.element&&(this.toolbar.parentNode=this.toolbar.element.parentNode,this.toolbar.nextSibling=this.toolbar.element.nextSibling,K.appendChild(this.toolbar.element),t.addClass(this.toolbar.element,"fullpage")),t.addClass(this.element,"fullpage"),K.appendChild(this.element),this.element.style.height="100vh",this.element.style.width="100vw",this.toolbar&&this.toolbar.element&&(this.element.style.height=t.getElementSize(this.element).y-t.getElementSize(this.toolbar.element).y+"px"),r[this.hash].fullPage=!0,t.delegate(this,be)({})}else{for(this.element.style.margin=this.elementMargin,this.element.style.padding=this.elementPadding,xe.margin=this.bodyMargin,ze.margin=this.docMargin,xe.padding=this.bodyPadding,ze.padding=this.docPadding,xe.width=this.bodyWidth,ze.width=this.docWidth,xe.height=this.bodyHeight,ze.height=this.docHeight,xe.display=this.bodyDisplay,K.removeChild(this.element),ut=this.previousBody.length,Ye=0;Ye<ut;Ye++)K.appendChild(this.previousBody.shift());t.removeClass(this.element,"fullpage"),r[this.hash].prevElementParent.insertBefore(this.element,r[this.hash].prevNextSibling),this.toolbar&&this.toolbar.element&&(K.removeChild(this.toolbar.element),t.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=r[this.hash].prevElementWidth,this.element.style.height=r[this.hash].prevElementHeight;var Ct=0,St=function(){t.setPageScroll(Ve.pageScroll);var ge=t.getPageScroll();Ct++,Ct<10&&(ge.x!==Ve.pageScroll.x||ge.y!==Ve.pageScroll.y)&&t.requestAnimationFrame(St)};t.requestAnimationFrame(St),r[this.hash].fullPage=!1,t.delegate(this,Ee)({})}return this.navigator&&this.viewport&&this.navigator.update(this.viewport),this.raiseEvent("full-page",{fullPage:D}),this},setFullScreen:function(D){var K=this;if(!t.supportsFullScreen)return this.setFullPage(D);if(t.isFullScreen()===D)return this;var xe={fullScreen:D,preventDefaultAction:!1};if(this.raiseEvent("pre-full-screen",xe),xe.preventDefaultAction)return this;if(D){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 ze=function(){var Ve=t.isFullScreen();Ve||(t.removeEvent(document,t.fullScreenEventName,ze),t.removeEvent(document,t.fullScreenErrorEventName,ze),K.setFullPage(!1),K.isFullPage()&&(K.element.style.width=K.fullPageStyleWidth,K.element.style.height=K.fullPageStyleHeight)),K.navigator&&K.viewport&&setTimeout(function(){K.navigator.update(K.viewport)}),K.raiseEvent("full-screen",{fullScreen:Ve})};t.addEvent(document,t.fullScreenEventName,ze),t.addEvent(document,t.fullScreenErrorEventName,ze),t.requestFullScreen(document.body)}else t.exitFullScreen();return this},isVisible:function(){return this.container.style.visibility!=="hidden"},isFullScreen:function(){return t.isFullScreen()&&this.isFullPage()},setVisible:function(D){return this.container.style.visibility=D?"":"hidden",this.raiseEvent("visible",{visible:D}),this},addTiledImage:function(D){t.console.assert(D,"[Viewer.addTiledImage] options is required"),t.console.assert(D.tileSource,"[Viewer.addTiledImage] options.tileSource is required"),t.console.assert(!D.replace||D.index>-1&&D.index<this.world.getItemCount(),"[Viewer.addTiledImage] if options.replace is used, options.index must be a valid index in Viewer.world");var K=this;D.replace&&(D.replaceItem=K.world.getItemAt(D.index)),this._hideMessage(),D.placeholderFillStyle===void 0&&(D.placeholderFillStyle=this.placeholderFillStyle),D.opacity===void 0&&(D.opacity=this.opacity),D.preload===void 0&&(D.preload=this.preload),D.compositeOperation===void 0&&(D.compositeOperation=this.compositeOperation),D.crossOriginPolicy===void 0&&(D.crossOriginPolicy=D.tileSource.crossOriginPolicy!==void 0?D.tileSource.crossOriginPolicy:this.crossOriginPolicy),D.ajaxWithCredentials===void 0&&(D.ajaxWithCredentials=this.ajaxWithCredentials),D.loadTilesWithAjax===void 0&&(D.loadTilesWithAjax=this.loadTilesWithAjax),t.isPlainObject(D.ajaxHeaders)||(D.ajaxHeaders={});var xe={options:D};function ze(Ye){for(var gt=0;gt<K._loadQueue.length;gt++)if(K._loadQueue[gt]===xe){K._loadQueue.splice(gt,1);break}K._loadQueue.length===0&&Ve(xe),K.raiseEvent("add-item-failed",Ye),D.error&&D.error(Ye)}function Ve(Ye){K.collectionMode&&(K.world.arrange({immediately:Ye.options.collectionImmediately,rows:K.collectionRows,columns:K.collectionColumns,layout:K.collectionLayout,tileSize:K.collectionTileSize,tileMargin:K.collectionTileMargin}),K.world.setAutoRefigureSizes(!0))}if(t.isArray(D.tileSource)){setTimeout(function(){ze({message:"[Viewer.addTiledImage] Sequences can not be added; add them one at a time instead.",source:D.tileSource,options:D})});return}this._loadQueue.push(xe);function ut(){for(var Ye,gt,Ct;K._loadQueue.length&&(Ye=K._loadQueue[0],!!Ye.tileSource);){if(K._loadQueue.splice(0,1),Ye.options.replace){var St=K.world.getIndexOfItem(Ye.options.replaceItem);St!==-1&&(Ye.options.index=St),K.world.removeItem(Ye.options.replaceItem)}gt=new t.TiledImage({viewer:K,source:Ye.tileSource,viewport:K.viewport,drawer:K.drawer,tileCache:K.tileCache,imageLoader:K.imageLoader,x:Ye.options.x,y:Ye.options.y,width:Ye.options.width,height:Ye.options.height,fitBounds:Ye.options.fitBounds,fitBoundsPlacement:Ye.options.fitBoundsPlacement,clip:Ye.options.clip,placeholderFillStyle:Ye.options.placeholderFillStyle,opacity:Ye.options.opacity,preload:Ye.options.preload,degrees:Ye.options.degrees,flipped:Ye.options.flipped,compositeOperation:Ye.options.compositeOperation,springStiffness:K.springStiffness,animationTime:K.animationTime,minZoomImageRatio:K.minZoomImageRatio,wrapHorizontal:K.wrapHorizontal,wrapVertical:K.wrapVertical,immediateRender:K.immediateRender,blendTime:K.blendTime,alwaysBlend:K.alwaysBlend,minPixelRatio:K.minPixelRatio,smoothTileEdgesMinZoom:K.smoothTileEdgesMinZoom,iOSDevice:K.iOSDevice,crossOriginPolicy:Ye.options.crossOriginPolicy,ajaxWithCredentials:Ye.options.ajaxWithCredentials,loadTilesWithAjax:Ye.options.loadTilesWithAjax,ajaxHeaders:Ye.options.ajaxHeaders,debugMode:K.debugMode,subPixelRoundingForTransparency:K.subPixelRoundingForTransparency}),K.collectionMode&&K.world.setAutoRefigureSizes(!1),K.navigator&&(Ct=t.extend({},Ye.options,{replace:!1,originalTiledImage:gt,tileSource:Ye.tileSource}),K.navigator.addTiledImage(Ct)),K.world.addItem(gt,{index:Ye.options.index}),K._loadQueue.length===0&&Ve(Ye),K.world.getItemCount()===1&&!K.preserveViewport&&K.viewport.goHome(!0),Ye.options.success&&Ye.options.success({item:gt})}}d(this,D.tileSource,D,function(Ye){xe.tileSource=Ye,ut()},function(Ye){Ye.options=D,ze(Ye),ut()})},addSimpleImage:function(D){t.console.assert(D,"[Viewer.addSimpleImage] options is required"),t.console.assert(D.url,"[Viewer.addSimpleImage] options.url is required");var K=t.extend({},D,{tileSource:{type:"image",url:D.url}});delete K.url,this.addTiledImage(K)},addLayer:function(D){var K=this;t.console.error("[Viewer.addLayer] this function is deprecated; use Viewer.addTiledImage() instead.");var xe=t.extend({},D,{success:function(ze){K.raiseEvent("add-layer",{options:D,drawer:ze.item})},error:function(ze){K.raiseEvent("add-layer-failed",ze)}});return this.addTiledImage(xe),this},getLayerAtLevel:function(D){return t.console.error("[Viewer.getLayerAtLevel] this function is deprecated; use World.getItemAt() instead."),this.world.getItemAt(D)},getLevelOfLayer:function(D){return t.console.error("[Viewer.getLevelOfLayer] this function is deprecated; use World.getIndexOfItem() instead."),this.world.getIndexOfItem(D)},getLayersCount:function(){return t.console.error("[Viewer.getLayersCount] this function is deprecated; use World.getItemCount() instead."),this.world.getItemCount()},setLayerLevel:function(D,K){return t.console.error("[Viewer.setLayerLevel] this function is deprecated; use World.setItemIndex() instead."),this.world.setItemIndex(D,K)},removeLayer:function(D){return t.console.error("[Viewer.removeLayer] this function is deprecated; use World.removeItem() instead."),this.world.removeItem(D)},forceRedraw:function(){return r[this.hash].forceRedraw=!0,this},forceResize:function(){r[this.hash].needsResize=!0,r[this.hash].forceResize=!0},bindSequenceControls:function(){var D=t.delegate(this,P),K=t.delegate(this,C),xe=t.delegate(this,this.goToNextPage),ze=t.delegate(this,this.goToPreviousPage),Ve=this.navImages,ut=!0;return this.showSequenceControl&&((this.previousButton||this.nextButton)&&(ut=!1),this.previousButton=new t.Button({element:this.previousButton?t.getElement(this.previousButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.PreviousPage"),srcRest:X(this.prefixUrl,Ve.previous.REST),srcGroup:X(this.prefixUrl,Ve.previous.GROUP),srcHover:X(this.prefixUrl,Ve.previous.HOVER),srcDown:X(this.prefixUrl,Ve.previous.DOWN),onRelease:ze,onFocus:D,onBlur:K}),this.nextButton=new t.Button({element:this.nextButton?t.getElement(this.nextButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.NextPage"),srcRest:X(this.prefixUrl,Ve.next.REST),srcGroup:X(this.prefixUrl,Ve.next.GROUP),srcHover:X(this.prefixUrl,Ve.next.HOVER),srcDown:X(this.prefixUrl,Ve.next.DOWN),onRelease:xe,onFocus:D,onBlur:K}),this.navPrevNextWrap||this.previousButton.disable(),(!this.tileSources||!this.tileSources.length)&&this.nextButton.disable(),ut&&(this.paging=new t.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:t.ControlAnchor.BOTTOM_RIGHT}):this.addControl(this.pagingControl,{anchor:this.sequenceControlAnchor||t.ControlAnchor.TOP_LEFT}))),this},bindStandardControls:function(){var D=t.delegate(this,Be),K=t.delegate(this,He),xe=t.delegate(this,it),ze=t.delegate(this,Je),Ve=t.delegate(this,Ke),ut=t.delegate(this,pe),Ye=t.delegate(this,mt),gt=t.delegate(this,Ce),Ct=t.delegate(this,Pt),St=t.delegate(this,wt),ge=t.delegate(this,P),Ie=t.delegate(this,C),M=this.navImages,L=[],q=!0;return this.showNavigationControl&&((this.zoomInButton||this.zoomOutButton||this.homeButton||this.fullPageButton||this.rotateLeftButton||this.rotateRightButton||this.flipButton)&&(q=!1),this.showZoomControl&&(L.push(this.zoomInButton=new t.Button({element:this.zoomInButton?t.getElement(this.zoomInButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.ZoomIn"),srcRest:X(this.prefixUrl,M.zoomIn.REST),srcGroup:X(this.prefixUrl,M.zoomIn.GROUP),srcHover:X(this.prefixUrl,M.zoomIn.HOVER),srcDown:X(this.prefixUrl,M.zoomIn.DOWN),onPress:D,onRelease:K,onClick:xe,onEnter:D,onExit:K,onFocus:ge,onBlur:Ie})),L.push(this.zoomOutButton=new t.Button({element:this.zoomOutButton?t.getElement(this.zoomOutButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.ZoomOut"),srcRest:X(this.prefixUrl,M.zoomOut.REST),srcGroup:X(this.prefixUrl,M.zoomOut.GROUP),srcHover:X(this.prefixUrl,M.zoomOut.HOVER),srcDown:X(this.prefixUrl,M.zoomOut.DOWN),onPress:ze,onRelease:K,onClick:Ve,onEnter:ze,onExit:K,onFocus:ge,onBlur:Ie}))),this.showHomeControl&&L.push(this.homeButton=new t.Button({element:this.homeButton?t.getElement(this.homeButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.Home"),srcRest:X(this.prefixUrl,M.home.REST),srcGroup:X(this.prefixUrl,M.home.GROUP),srcHover:X(this.prefixUrl,M.home.HOVER),srcDown:X(this.prefixUrl,M.home.DOWN),onRelease:ut,onFocus:ge,onBlur:Ie})),this.showFullPageControl&&L.push(this.fullPageButton=new t.Button({element:this.fullPageButton?t.getElement(this.fullPageButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.FullPage"),srcRest:X(this.prefixUrl,M.fullpage.REST),srcGroup:X(this.prefixUrl,M.fullpage.GROUP),srcHover:X(this.prefixUrl,M.fullpage.HOVER),srcDown:X(this.prefixUrl,M.fullpage.DOWN),onRelease:Ye,onFocus:ge,onBlur:Ie})),this.showRotationControl&&(L.push(this.rotateLeftButton=new t.Button({element:this.rotateLeftButton?t.getElement(this.rotateLeftButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.RotateLeft"),srcRest:X(this.prefixUrl,M.rotateleft.REST),srcGroup:X(this.prefixUrl,M.rotateleft.GROUP),srcHover:X(this.prefixUrl,M.rotateleft.HOVER),srcDown:X(this.prefixUrl,M.rotateleft.DOWN),onRelease:gt,onFocus:ge,onBlur:Ie})),L.push(this.rotateRightButton=new t.Button({element:this.rotateRightButton?t.getElement(this.rotateRightButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.RotateRight"),srcRest:X(this.prefixUrl,M.rotateright.REST),srcGroup:X(this.prefixUrl,M.rotateright.GROUP),srcHover:X(this.prefixUrl,M.rotateright.HOVER),srcDown:X(this.prefixUrl,M.rotateright.DOWN),onRelease:Ct,onFocus:ge,onBlur:Ie}))),this.showFlipControl&&L.push(this.flipButton=new t.Button({element:this.flipButton?t.getElement(this.flipButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:t.getString("Tooltips.Flip"),srcRest:X(this.prefixUrl,M.flip.REST),srcGroup:X(this.prefixUrl,M.flip.GROUP),srcHover:X(this.prefixUrl,M.flip.HOVER),srcDown:X(this.prefixUrl,M.flip.DOWN),onRelease:St,onFocus:ge,onBlur:Ie})),q?(this.buttonGroup=new t.ButtonGroup({buttons:L,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.navControl=this.buttonGroup.element,this.addHandler("open",t.delegate(this,Le)),this.toolbar?this.toolbar.addControl(this.navControl,{anchor:this.navigationControlAnchor||t.ControlAnchor.TOP_LEFT}):this.addControl(this.navControl,{anchor:this.navigationControlAnchor||t.ControlAnchor.TOP_LEFT})):this.customButtons=L),this},currentPage:function(){return this._sequenceIndex},goToPage:function(D){return this.tileSources&&D>=0&&D<this.tileSources.length&&(this._sequenceIndex=D,this._updateSequenceButtons(D),this.open(this.tileSources[D]),this.referenceStrip&&this.referenceStrip.setFocus(D),this.raiseEvent("page",{page:D})),this},addOverlay:function(D,K,xe,ze){var Ve;if(t.isPlainObject(D)?Ve=D:Ve={element:D,location:K,placement:xe,onDraw:ze},D=t.getElement(Ve.element),f(this.currentOverlays,D)>=0)return this;var ut=h(this,Ve);return this.currentOverlays.push(ut),ut.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:D,location:Ve.location,placement:Ve.placement}),this},updateOverlay:function(D,K,xe){var ze;return D=t.getElement(D),ze=f(this.currentOverlays,D),ze>=0&&(this.currentOverlays[ze].update(K,xe),r[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:D,location:K,placement:xe})),this},removeOverlay:function(D){var K;return D=t.getElement(D),K=f(this.currentOverlays,D),K>=0&&(this.currentOverlays[K].destroy(),this.currentOverlays.splice(K,1),r[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:D})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return r[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(D){var K;return D=t.getElement(D),K=f(this.currentOverlays,D),K>=0?this.currentOverlays[K]:null},_updateSequenceButtons:function(D){this.nextButton&&(!this.tileSources||this.tileSources.length-1===D?this.navPrevNextWrap||this.nextButton.disable():this.nextButton.enable()),this.previousButton&&(D>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(D){this._hideMessage();var K=t.makeNeutralElement("div");K.appendChild(document.createTextNode(D)),this.messageDiv=t.makeCenteredNode(K),t.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var D=this.messageDiv;D&&(D.parentNode.removeChild(D),delete this.messageDiv)},gestureSettingsByDeviceType:function(D){switch(D){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var D,K=this.currentOverlays.length;for(D=0;D<K;D++)this.currentOverlays[D].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 t.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 t.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')},_addUpdatePixelDensityRatioEvent:function(){this._updatePixelDensityRatioBind=this._updatePixelDensityRatio.bind(this),t.addEvent(window,"resize",this._updatePixelDensityRatioBind)},_removeUpdatePixelDensityRatioEvent:function(){t.removeEvent(window,"resize",this._updatePixelDensityRatioBind)},_updatePixelDensityRatio:function(){var D=t.pixelDensityRatio,K=t.getCurrentPixelDensityRatio();D!==K&&(t.pixelDensityRatio=K,this.world.resetItems(),this.forceRedraw())},goToPreviousPage:function(){var D=this._sequenceIndex-1;this.navPrevNextWrap&&D<0&&(D+=this.tileSources.length),this.goToPage(D)},goToNextPage:function(){var D=this._sequenceIndex+1;this.navPrevNextWrap&&D>=this.tileSources.length&&(D=0),this.goToPage(D)},isAnimating:function(){return r[this.hash].animating}});function l(D){return D=t.getElement(D),new t.Point(D.clientWidth===0?1:D.clientWidth,D.clientHeight===0?1:D.clientHeight)}function d(D,K,xe,ze,Ve){var ut=D;if(t.type(K)==="string"){if(K.match(/^\s*<.*>\s*$/))K=t.parseXml(K);else if(K.match(/^\s*[{[].*[}\]]\s*$/))try{var Ye=t.parseJSON(K);K=Ye}catch{}}function gt(Ct,St){Ct.ready?ze(Ct):(Ct.addHandler("ready",function(){ze(Ct)}),Ct.addHandler("open-failed",function(ge){Ve({message:ge.message,source:St})}))}setTimeout(function(){if(t.type(K)==="string")K=new t.TileSource({url:K,crossOriginPolicy:xe.crossOriginPolicy!==void 0?xe.crossOriginPolicy:D.crossOriginPolicy,ajaxWithCredentials:D.ajaxWithCredentials,ajaxHeaders:xe.ajaxHeaders?xe.ajaxHeaders:D.ajaxHeaders,splitHashDataForPost:D.splitHashDataForPost,useCanvas:D.useCanvas,success:function(Ie){ze(Ie.tileSource)}}),K.addHandler("open-failed",function(Ie){Ve(Ie)});else if(t.isPlainObject(K)||K.nodeType)if(K.crossOriginPolicy===void 0&&(xe.crossOriginPolicy!==void 0||D.crossOriginPolicy!==void 0)&&(K.crossOriginPolicy=xe.crossOriginPolicy!==void 0?xe.crossOriginPolicy:D.crossOriginPolicy),K.ajaxWithCredentials===void 0&&(K.ajaxWithCredentials=D.ajaxWithCredentials),K.useCanvas===void 0&&(K.useCanvas=D.useCanvas),t.isFunction(K.getTileUrl)){var Ct=new t.TileSource(K);Ct.getTileUrl=K.getTileUrl,ze(Ct)}else{var St=t.TileSource.determineType(ut,K);if(!St){Ve({message:"Unable to load TileSource",source:K});return}var ge=St.prototype.configure.apply(ut,[K]);gt(new St(ge),K)}else gt(K,K)})}function h(D,K){if(K instanceof t.Overlay)return K;var xe=null;if(K.element)xe=t.getElement(K.element);else{var ze=K.id?K.id:"openseadragon-overlay-"+Math.floor(Math.random()*1e7);xe=t.getElement(K.id),xe||(xe=document.createElement("a"),xe.href="#/overlay/"+ze),xe.id=ze,t.addClass(xe,K.className?K.className:"openseadragon-overlay")}var Ve=K.location,ut=K.width,Ye=K.height;if(!Ve){var gt=K.x,Ct=K.y;if(K.px!==void 0){var St=D.viewport.imageToViewportRectangle(new t.Rect(K.px,K.py,ut||0,Ye||0));gt=St.x,Ct=St.y,ut=ut!==void 0?St.width:void 0,Ye=Ye!==void 0?St.height:void 0}Ve=new t.Point(gt,Ct)}var ge=K.placement;return ge&&t.type(ge)==="string"&&(ge=t.Placement[K.placement.toUpperCase()]),new t.Overlay({element:xe,location:Ve,placement:ge,onDraw:K.onDraw,checkResize:K.checkResize,width:ut,height:Ye,rotationMode:K.rotationMode})}function f(D,K){var xe;for(xe=D.length-1;xe>=0;xe--)if(D[xe].element===K)return xe;return-1}function m(D,K){return t.requestAnimationFrame(function(){K(D)})}function g(D){t.requestAnimationFrame(function(){x(D)})}function w(D){D.autoHideControls&&(D.controlsShouldFade=!0,D.controlsFadeBeginTime=t.now()+D.controlsFadeDelay,window.setTimeout(function(){g(D)},D.controlsFadeDelay))}function x(D){var K,xe,ze,Ve;if(D.controlsShouldFade){for(K=t.now(),xe=K-D.controlsFadeBeginTime,ze=1-xe/D.controlsFadeLength,ze=Math.min(1,ze),ze=Math.max(0,ze),Ve=D.controls.length-1;Ve>=0;Ve--)D.controls[Ve].autoFade&&D.controls[Ve].setOpacity(ze);ze>0&&g(D)}}function T(D){var K;for(D.controlsShouldFade=!1,K=D.controls.length-1;K>=0;K--)D.controls[K].setOpacity(1)}function P(){T(this)}function C(){w(this)}function _(D){var K={tracker:D.eventSource,position:D.position,originalEvent:D.originalEvent,preventDefault:D.preventDefault};this.raiseEvent("canvas-contextmenu",K),D.preventDefault=K.preventDefault}function k(D){var K={originalEvent:D.originalEvent,preventDefaultAction:!1,preventVerticalPan:D.preventVerticalPan||!this.panVertical,preventHorizontalPan:D.preventHorizontalPan||!this.panHorizontal};if(this.raiseEvent("canvas-key",K),!K.preventDefaultAction&&!D.ctrl&&!D.alt&&!D.meta)switch(D.keyCode){case 38:K.preventVerticalPan||(D.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),D.preventDefault=!0;break;case 40:K.preventVerticalPan||(D.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),D.preventDefault=!0;break;case 37:K.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),D.preventDefault=!0;break;case 39:K.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),D.preventDefault=!0;break;case 187:this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),D.preventDefault=!0;break;case 189:this.viewport.zoomBy(.9),this.viewport.applyConstraints(),D.preventDefault=!0;break;case 48:this.viewport.goHome(),this.viewport.applyConstraints(),D.preventDefault=!0;break;case 87:K.preventVerticalPan||(D.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(0,-40))),this.viewport.applyConstraints()),D.preventDefault=!0;break;case 83:K.preventVerticalPan||(D.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(0,40))),this.viewport.applyConstraints()),D.preventDefault=!0;break;case 65:K.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(-40,0))),this.viewport.applyConstraints()),D.preventDefault=!0;break;case 68:K.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new t.Point(40,0))),this.viewport.applyConstraints()),D.preventDefault=!0;break;case 82:D.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(),D.preventDefault=!0;break;case 70:this.viewport.toggleFlip(),D.preventDefault=!0;break;case 74:this.goToPreviousPage();break;case 75:this.goToNextPage();break;default:D.preventDefault=!1;break}else D.preventDefault=!1}function V(D){var K={originalEvent:D.originalEvent};this.raiseEvent("canvas-key-press",K)}function j(D){var K,xe=document.activeElement===this.canvas;xe||this.canvas.focus(),this.viewport.flipped&&(D.position.x=this.viewport.getContainerSize().x-D.position.x);var ze={tracker:D.eventSource,position:D.position,quick:D.quick,shift:D.shift,originalEvent:D.originalEvent,originalTarget:D.originalTarget,preventDefaultAction:!1};this.raiseEvent("canvas-click",ze),!ze.preventDefaultAction&&this.viewport&&D.quick&&(K=this.gestureSettingsByDeviceType(D.pointerType),K.clickToZoom===!0&&(this.viewport.zoomBy(D.shift?1/this.zoomPerClick:this.zoomPerClick,K.zoomToRefPoint?this.viewport.pointFromPixel(D.position,!0):null),this.viewport.applyConstraints()),K.dblClickDragToZoom&&(r[this.hash].draggingToZoom===!0?(r[this.hash].lastClickTime=null,r[this.hash].draggingToZoom=!1):r[this.hash].lastClickTime=t.now()))}function Z(D){var K,xe={tracker:D.eventSource,position:D.position,shift:D.shift,originalEvent:D.originalEvent,preventDefaultAction:!1};this.raiseEvent("canvas-double-click",xe),!xe.preventDefaultAction&&this.viewport&&(K=this.gestureSettingsByDeviceType(D.pointerType),K.dblClickToZoom&&(this.viewport.zoomBy(D.shift?1/this.zoomPerClick:this.zoomPerClick,K.zoomToRefPoint?this.viewport.pointFromPixel(D.position,!0):null),this.viewport.applyConstraints()))}function B(D){var K,xe={tracker:D.eventSource,pointerType:D.pointerType,position:D.position,delta:D.delta,speed:D.speed,direction:D.direction,shift:D.shift,originalEvent:D.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag",xe),K=this.gestureSettingsByDeviceType(D.pointerType),!xe.preventDefaultAction&&this.viewport){if(K.dblClickDragToZoom&&r[this.hash].draggingToZoom){var ze=Math.pow(this.zoomPerDblClickDrag,D.delta.y/50);this.viewport.zoomBy(ze)}else if(K.dragToPan&&!r[this.hash].draggingToZoom){if(this.panHorizontal||(D.delta.x=0),this.panVertical||(D.delta.y=0),this.viewport.flipped&&(D.delta.x=-D.delta.x),this.constrainDuringPan){var Ve=this.viewport.deltaPointsFromPixels(D.delta.negate());this.viewport.centerSpringX.target.value+=Ve.x,this.viewport.centerSpringY.target.value+=Ve.y;var ut=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=Ve.x,this.viewport.centerSpringY.target.value-=Ve.y,ut.xConstrained&&(D.delta.x=0),ut.yConstrained&&(D.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(D.delta.negate()),K.flickEnabled&&!this.constrainDuringPan)}}}function Y(D){var K,xe={tracker:D.eventSource,pointerType:D.pointerType,position:D.position,speed:D.speed,direction:D.direction,shift:D.shift,originalEvent:D.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag-end",xe),K=this.gestureSettingsByDeviceType(D.pointerType),!xe.preventDefaultAction&&this.viewport){if(!r[this.hash].draggingToZoom&&K.flickEnabled&&D.speed>=K.flickMinSpeed){var ze=0;this.panHorizontal&&(ze=K.flickMomentum*D.speed*Math.cos(D.direction));var Ve=0;this.panVertical&&(Ve=K.flickMomentum*D.speed*Math.sin(D.direction));var ut=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),Ye=this.viewport.pointFromPixel(new t.Point(ut.x-ze,ut.y-Ve));this.viewport.panTo(Ye,!1)}this.viewport.applyConstraints()}K.dblClickDragToZoom&&r[this.hash].draggingToZoom===!0&&(r[this.hash].draggingToZoom=!1)}function ie(D){this.raiseEvent("canvas-enter",{tracker:D.eventSource,pointerType:D.pointerType,position:D.position,buttons:D.buttons,pointers:D.pointers,insideElementPressed:D.insideElementPressed,buttonDownAny:D.buttonDownAny,originalEvent:D.originalEvent})}function ae(D){this.raiseEvent("canvas-exit",{tracker:D.eventSource,pointerType:D.pointerType,position:D.position,buttons:D.buttons,pointers:D.pointers,insideElementPressed:D.insideElementPressed,buttonDownAny:D.buttonDownAny,originalEvent:D.originalEvent})}function le(D){var K;if(this.raiseEvent("canvas-press",{tracker:D.eventSource,pointerType:D.pointerType,position:D.position,insideElementPressed:D.insideElementPressed,insideElementReleased:D.insideElementReleased,originalEvent:D.originalEvent}),K=this.gestureSettingsByDeviceType(D.pointerType),K.dblClickDragToZoom){var xe=r[this.hash].lastClickTime,ze=t.now();if(xe===null)return;ze-xe<this.dblClickTimeThreshold&&(r[this.hash].draggingToZoom=!0),r[this.hash].lastClickTime=null}}function _e(D){this.raiseEvent("canvas-release",{tracker:D.eventSource,pointerType:D.pointerType,position:D.position,insideElementPressed:D.insideElementPressed,insideElementReleased:D.insideElementReleased,originalEvent:D.originalEvent})}function fe(D){this.raiseEvent("canvas-nonprimary-press",{tracker:D.eventSource,position:D.position,pointerType:D.pointerType,button:D.button,buttons:D.buttons,originalEvent:D.originalEvent})}function de(D){this.raiseEvent("canvas-nonprimary-release",{tracker:D.eventSource,position:D.position,pointerType:D.pointerType,button:D.button,buttons:D.buttons,originalEvent:D.originalEvent})}function ve(D){var K,xe,ze,Ve,ut={tracker:D.eventSource,pointerType:D.pointerType,gesturePoints:D.gesturePoints,lastCenter:D.lastCenter,center:D.center,lastDistance:D.lastDistance,distance:D.distance,shift:D.shift,originalEvent:D.originalEvent,preventDefaultPanAction:!1,preventDefaultZoomAction:!1,preventDefaultRotateAction:!1};if(this.raiseEvent("canvas-pinch",ut),this.viewport&&(K=this.gestureSettingsByDeviceType(D.pointerType),K.pinchToZoom&&(!ut.preventDefaultPanAction||!ut.preventDefaultZoomAction)&&(xe=this.viewport.pointFromPixel(D.center,!0),K.zoomToRefPoint&&!ut.preventDefaultPanAction&&(ze=this.viewport.pointFromPixel(D.lastCenter,!0),Ve=ze.minus(xe),this.panHorizontal||(Ve.x=0),this.panVertical||(Ve.y=0),this.viewport.panBy(Ve,!0)),ut.preventDefaultZoomAction||this.viewport.zoomBy(D.distance/D.lastDistance,xe,!0),this.viewport.applyConstraints()),K.pinchRotate&&!ut.preventDefaultRotateAction)){var Ye=Math.atan2(D.gesturePoints[0].currentPos.y-D.gesturePoints[1].currentPos.y,D.gesturePoints[0].currentPos.x-D.gesturePoints[1].currentPos.x),gt=Math.atan2(D.gesturePoints[0].lastPos.y-D.gesturePoints[1].lastPos.y,D.gesturePoints[0].lastPos.x-D.gesturePoints[1].lastPos.x);xe=this.viewport.pointFromPixel(D.center,!0),this.viewport.rotateTo(this.viewport.getRotation(!0)+(Ye-gt)*(180/Math.PI),xe,!0)}}function Ae(D){this.raiseEvent("canvas-focus",{tracker:D.eventSource,originalEvent:D.originalEvent})}function ke(D){this.raiseEvent("canvas-blur",{tracker:D.eventSource,originalEvent:D.originalEvent})}function me(D){var K,xe,ze,Ve,ut;Ve=t.now(),ut=Ve-this._lastScrollTime,ut>this.minScrollDeltaTime?(this._lastScrollTime=Ve,K={tracker:D.eventSource,position:D.position,scroll:D.scroll,shift:D.shift,originalEvent:D.originalEvent,preventDefaultAction:!1,preventDefault:!0},this.raiseEvent("canvas-scroll",K),!K.preventDefaultAction&&this.viewport&&(this.viewport.flipped&&(D.position.x=this.viewport.getContainerSize().x-D.position.x),xe=this.gestureSettingsByDeviceType(D.pointerType),xe.scrollToZoom&&(ze=Math.pow(this.zoomPerScroll,D.scroll),this.viewport.zoomBy(ze,xe.zoomToRefPoint?this.viewport.pointFromPixel(D.position,!0):null),this.viewport.applyConstraints())),D.preventDefault=K.preventDefault):D.preventDefault=!0}function be(D){r[this.hash].mouseInside=!0,T(this),this.raiseEvent("container-enter",{tracker:D.eventSource,pointerType:D.pointerType,position:D.position,buttons:D.buttons,pointers:D.pointers,insideElementPressed:D.insideElementPressed,buttonDownAny:D.buttonDownAny,originalEvent:D.originalEvent})}function Ee(D){D.pointers<1&&(r[this.hash].mouseInside=!1,r[this.hash].animating||w(this)),this.raiseEvent("container-exit",{tracker:D.eventSource,pointerType:D.pointerType,position:D.position,buttons:D.buttons,pointers:D.pointers,insideElementPressed:D.insideElementPressed,buttonDownAny:D.buttonDownAny,originalEvent:D.originalEvent})}function Oe(D){we(D),D.isOpen()?D._updateRequestId=m(D,Oe):D._updateRequestId=!1}function F(D,K){var xe=D.viewport,ze=xe.getZoom(),Ve=xe.getCenter();xe.resize(K,D.preserveImageSizeOnResize),xe.panTo(Ve,!0);var ut;if(D.preserveImageSizeOnResize)ut=r[D.hash].prevContainerSize.x/K.x;else{var Ye=new t.Point(0,0),gt=new t.Point(r[D.hash].prevContainerSize.x,r[D.hash].prevContainerSize.y).distanceTo(Ye),Ct=new t.Point(K.x,K.y).distanceTo(Ye);ut=Ct/gt*r[D.hash].prevContainerSize.x/K.x}xe.zoomTo(ze*ut,null,!0),r[D.hash].prevContainerSize=K,r[D.hash].forceRedraw=!0,r[D.hash].needsResize=!1,r[D.hash].forceResize=!1}function we(D){if(!(D._opening||!r[D.hash])){if(D.autoResize||r[D.hash].forceResize){var K;if(D._autoResizePolling){K=l(D.container);var xe=r[D.hash].prevContainerSize;K.equals(xe)||(r[D.hash].needsResize=!0)}r[D.hash].needsResize&&F(D,K||l(D.container))}var ze=D.viewport.update(),Ve=D.world.update()||ze;ze&&D.raiseEvent("viewport-change"),D.referenceStrip&&(Ve=D.referenceStrip.update(D.viewport)||Ve);var ut=r[D.hash].animating;!ut&&Ve&&(D.raiseEvent("animation-start"),T(D));var Ye=ut&&!Ve;Ye&&(r[D.hash].animating=!1),(Ve||Ye||r[D.hash].forceRedraw||D.world.needsDraw())&&(Ne(D),D._drawOverlays(),D.navigator&&D.navigator.update(D.viewport),r[D.hash].forceRedraw=!1,Ve&&D.raiseEvent("animation")),Ye&&(D.raiseEvent("animation-finish"),r[D.hash].mouseInside||w(D)),r[D.hash].animating=Ve}}function Ne(D){D.imageLoader.clear(),D.drawer.clear(),D.world.draw(),D.raiseEvent("update-viewport",{})}function X(D,K){return D?D+K:K}function Be(){r[this.hash].lastZoomTime=t.now(),r[this.hash].zoomFactor=this.zoomPerSecond,r[this.hash].zooming=!0,Ze(this)}function Je(){r[this.hash].lastZoomTime=t.now(),r[this.hash].zoomFactor=1/this.zoomPerSecond,r[this.hash].zooming=!0,Ze(this)}function He(){r[this.hash].zooming=!1}function Ze(D){t.requestAnimationFrame(t.delegate(D,Qe))}function Qe(){var D,K,xe;r[this.hash].zooming&&this.viewport&&(D=t.now(),K=D-r[this.hash].lastZoomTime,xe=Math.pow(r[this.hash].zoomFactor,K/1e3),this.viewport.zoomBy(xe),this.viewport.applyConstraints(),r[this.hash].lastZoomTime=D,Ze(this))}function it(){this.viewport&&(r[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function Ke(){this.viewport&&(r[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function Le(){this.buttonGroup&&(this.buttonGroup.emulateEnter(),this.buttonGroup.emulateLeave())}function pe(){this.viewport&&this.viewport.goHome()}function mt(){this.isFullPage()&&!t.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttonGroup&&this.buttonGroup.emulateLeave(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function Ce(){if(this.viewport){var D=this.viewport.getRotation();this.viewport.flipped?D+=this.rotationIncrement:D-=this.rotationIncrement,this.viewport.setRotation(D)}}function Pt(){if(this.viewport){var D=this.viewport.getRotation();this.viewport.flipped?D-=this.rotationIncrement:D+=this.rotationIncrement,this.viewport.setRotation(D)}}function wt(){this.viewport.toggleFlip()}}(n),function(t){t.Navigator=function(m){var g=m.viewer,w=this,x,T;m.element||m.id?(m.element?(m.id&&t.console.warn("Given option.id for Navigator was ignored since option.element was provided and is being used instead."),m.element.id?m.id=m.element.id:m.id="navigator-"+t.now(),this.element=m.element):this.element=document.getElementById(m.id),m.controlOptions={anchor:t.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(m.id="navigator-"+t.now(),this.element=t.makeNeutralElement("div"),m.controlOptions={anchor:t.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:m.autoFade},m.position&&(m.position==="BOTTOM_RIGHT"?m.controlOptions.anchor=t.ControlAnchor.BOTTOM_RIGHT:m.position==="BOTTOM_LEFT"?m.controlOptions.anchor=t.ControlAnchor.BOTTOM_LEFT:m.position==="TOP_RIGHT"?m.controlOptions.anchor=t.ControlAnchor.TOP_RIGHT:m.position==="TOP_LEFT"?m.controlOptions.anchor=t.ControlAnchor.TOP_LEFT:m.position==="ABSOLUTE"&&(m.controlOptions.anchor=t.ControlAnchor.ABSOLUTE,m.controlOptions.top=m.top,m.controlOptions.left=m.left,m.controlOptions.height=m.height,m.controlOptions.width=m.width))),this.element.id=m.id,this.element.className+=" navigator",m=t.extend(!0,{sizeRatio:t.DEFAULT_SETTINGS.navigatorSizeRatio},m,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:m.animationTime,autoResize:!1,minZoomImageRatio:1,background:m.background,opacity:m.opacity,borderColor:m.borderColor,displayRegionColor:m.displayRegionColor}),m.minPixelRatio=this.minPixelRatio=g.minPixelRatio,t.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new t.Point(1,1),this.totalBorderWidths=new t.Point(this.borderWidth*2,this.borderWidth*2).minus(this.fudge),m.controlOptions.anchor!==t.ControlAnchor.NONE&&function(_,k){_.margin="0px",_.border=k+"px solid "+m.borderColor,_.padding="0px",_.background=m.background,_.opacity=m.opacity,_.overflow="hidden"}(this.element.style,this.borderWidth),this.displayRegion=t.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function(_,k){_.position="relative",_.top="0px",_.left="0px",_.fontSize="0px",_.overflow="hidden",_.border=k+"px solid "+m.displayRegionColor,_.margin="0px",_.padding="0px",_.background="transparent",_.float="left",_.cssFloat="left",_.styleFloat="left",_.zIndex=999999999,_.cursor="default",_.boxSizing="content-box"}(this.displayRegion.style,this.borderWidth),t.setElementPointerEventsNone(this.displayRegion),t.setElementTouchActionNone(this.displayRegion),this.displayRegionContainer=t.makeNeutralElement("div"),this.displayRegionContainer.id=this.element.id+"-displayregioncontainer",this.displayRegionContainer.className="displayregioncontainer",this.displayRegionContainer.style.width="100%",this.displayRegionContainer.style.height="100%",t.setElementPointerEventsNone(this.displayRegionContainer),t.setElementTouchActionNone(this.displayRegionContainer),g.addControl(this.element,m.controlOptions),this._resizeWithViewer=m.controlOptions.anchor!==t.ControlAnchor.ABSOLUTE&&m.controlOptions.anchor!==t.ControlAnchor.NONE,m.width&&m.height?(this.setWidth(m.width),this.setHeight(m.height)):this._resizeWithViewer&&(x=t.getElementSize(g.element),this.element.style.height=Math.round(x.y*m.sizeRatio)+"px",this.element.style.width=Math.round(x.x*m.sizeRatio)+"px",this.oldViewerSize=x,T=t.getElementSize(this.element),this.elementArea=T.x*T.y),this.oldContainerSize=new t.Point(0,0),t.Viewer.apply(this,[m]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer);function P(_,k){h(w.displayRegionContainer,_),h(w.displayRegion,-_),w.viewport.setRotation(_,k)}if(m.navigatorRotate){var C=m.viewer.viewport?m.viewer.viewport.getRotation():m.viewer.degrees||0;P(C,!0),m.viewer.addHandler("rotate",function(_){P(_.degrees,_.immediately)})}this.innerTracker.destroy(),this.innerTracker=new t.MouseTracker({userData:"Navigator.innerTracker",element:this.element,dragHandler:t.delegate(this,o),clickHandler:t.delegate(this,r),releaseHandler:t.delegate(this,l),scrollHandler:t.delegate(this,d),preProcessEventHandler:function(_){_.eventType==="wheel"&&(_.preventDefault=!0)}}),this.outerTracker.userData="Navigator.outerTracker",t.setElementPointerEventsNone(this.canvas),t.setElementPointerEventsNone(this.container),this.addHandler("reset-size",function(){w.viewport&&w.viewport.goHome(!0)}),g.world.addHandler("item-index-change",function(_){window.setTimeout(function(){var k=w.world.getItemAt(_.previousIndex);w.world.setItemIndex(k,_.newIndex)},1)}),g.world.addHandler("remove-item",function(_){var k=_.item,V=w._getMatchingItem(k);V&&w.world.removeItem(V)}),this.update(g.viewport)},t.extend(t.Navigator.prototype,t.EventSource.prototype,t.Viewer.prototype,{updateSize:function(){if(this.viewport){var m=new t.Point(this.container.clientWidth===0?1:this.container.clientWidth,this.container.clientHeight===0?1:this.container.clientHeight);m.equals(this.oldContainerSize)||(this.viewport.resize(m,!0),this.viewport.goHome(!0),this.oldContainerSize=m,this.drawer.clear(),this.world.draw())}},setWidth:function(m){this.width=m,this.element.style.width=typeof m=="number"?m+"px":m,this._resizeWithViewer=!1,this.updateSize()},setHeight:function(m){this.height=m,this.element.style.height=typeof m=="number"?m+"px":m,this._resizeWithViewer=!1,this.updateSize()},setFlip:function(m){return this.viewport.setFlip(m),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(m){f(this.displayRegion,m),f(this.canvas,m),f(this.element,m)},update:function(m){var g,w,x,T,P,C;if(g=t.getElementSize(this.viewer.element),this._resizeWithViewer&&g.x&&g.y&&!g.equals(this.oldViewerSize)&&(this.oldViewerSize=g,this.maintainSizeRatio||!this.elementArea?(w=g.x*this.sizeRatio,x=g.y*this.sizeRatio):(w=Math.sqrt(this.elementArea*(g.x/g.y)),x=this.elementArea/w),this.element.style.width=Math.round(w)+"px",this.element.style.height=Math.round(x)+"px",this.elementArea||(this.elementArea=w*x),this.updateSize()),m&&this.viewport){if(T=m.getBoundsNoRotate(!0),P=this.viewport.pixelFromPointNoRotate(T.getTopLeft(),!1),C=this.viewport.pixelFromPointNoRotate(T.getBottomRight(),!1).minus(this.totalBorderWidths),!this.navigatorRotate){var _=m.getRotation(!0);h(this.displayRegion,-_)}var k=this.displayRegion.style;k.display=this.world.getItemCount()?"block":"none",k.top=P.y.toFixed(2)+"px",k.left=P.x.toFixed(2)+"px";var V=C.x-P.x,j=C.y-P.y;k.width=Math.round(Math.max(V,0))+"px",k.height=Math.round(Math.max(j,0))+"px"}},addTiledImage:function(m){var g=this,w=m.originalTiledImage;delete m.original;var x=t.extend({},m,{success:function(T){var P=T.item;P._originalForNavigator=w,g._matchBounds(P,w,!0),g._matchOpacity(P,w),g._matchCompositeOperation(P,w);function C(){g._matchBounds(P,w)}function _(){g._matchOpacity(P,w)}function k(){g._matchCompositeOperation(P,w)}w.addHandler("bounds-change",C),w.addHandler("clip-change",C),w.addHandler("opacity-change",_),w.addHandler("composite-operation-change",k)}});return t.Viewer.prototype.addTiledImage.apply(this,[x])},destroy:function(){return t.Viewer.prototype.destroy.apply(this)},_getMatchingItem:function(m){for(var g=this.world.getItemCount(),w,x=0;x<g;x++)if(w=this.world.getItemAt(x),w._originalForNavigator===m)return w;return null},_matchBounds:function(m,g,w){var x=g.getBoundsNoRotate();m.setPosition(x.getTopLeft(),w),m.setWidth(x.width,w),m.setRotation(g.getRotation(),w),m.setClip(g.getClip()),m.setFlip(g.getFlip())},_matchOpacity:function(m,g){m.setOpacity(g.opacity)},_matchCompositeOperation:function(m,g){m.setCompositeOperation(g.compositeOperation)}});function r(m){var g={tracker:m.eventSource,position:m.position,quick:m.quick,shift:m.shift,originalEvent:m.originalEvent,preventDefaultAction:!1};if(this.viewer.raiseEvent("navigator-click",g),!g.preventDefaultAction&&m.quick&&this.viewer.viewport&&(this.panVertical||this.panHorizontal)){this.viewer.viewport.flipped&&(m.position.x=this.viewport.getContainerSize().x-m.position.x);var w=this.viewport.pointFromPixel(m.position);this.panVertical?this.panHorizontal||(w.x=this.viewer.viewport.getCenter(!0).x):w.y=this.viewer.viewport.getCenter(!0).y,this.viewer.viewport.panTo(w),this.viewer.viewport.applyConstraints()}}function o(m){var g={tracker:m.eventSource,position:m.position,delta:m.delta,speed:m.speed,direction:m.direction,shift:m.shift,originalEvent:m.originalEvent,preventDefaultAction:!1};this.viewer.raiseEvent("navigator-drag",g),!g.preventDefaultAction&&this.viewer.viewport&&(this.panHorizontal||(m.delta.x=0),this.panVertical||(m.delta.y=0),this.viewer.viewport.flipped&&(m.delta.x=-m.delta.x),this.viewer.viewport.panBy(this.viewport.deltaPointsFromPixels(m.delta)),this.viewer.constrainDuringPan&&this.viewer.viewport.applyConstraints())}function l(m){m.insideElementPressed&&this.viewer.viewport&&this.viewer.viewport.applyConstraints()}function d(m){var g={tracker:m.eventSource,position:m.position,scroll:m.scroll,shift:m.shift,originalEvent:m.originalEvent,preventDefault:m.preventDefault};this.viewer.raiseEvent("navigator-scroll",g),m.preventDefault=g.preventDefault}function h(m,g){f(m,"rotate("+g+"deg)")}function f(m,g){m.style.webkitTransform=g,m.style.mozTransform=g,m.style.msTransform=g,m.style.oTransform=g,m.style.transform=g}}(n),function(t){var r={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"}};t.extend(t,{getString:function(o){var l=o.split("."),d=null,h=arguments,f=r,m;for(m=0;m<l.length-1;m++)f=f[l[m]]||{};return d=f[l[m]],typeof d!="string"&&(t.console.error("Untranslated source string:",o),d=""),d.replace(/\{\d+\}/g,function(g){var w=parseInt(g.match(/\d+/),10)+1;return w<h.length?h[w]:""})},setString:function(o,l){var d=o.split("."),h=r,f;for(f=0;f<d.length-1;f++)h[d[f]]||(h[d[f]]={}),h=h[d[f]];h[d[f]]=l}})}(n),function(t){t.Point=function(r,o){this.x=typeof r=="number"?r:0,this.y=typeof o=="number"?o:0},t.Point.prototype={clone:function(){return new t.Point(this.x,this.y)},plus:function(r){return new t.Point(this.x+r.x,this.y+r.y)},minus:function(r){return new t.Point(this.x-r.x,this.y-r.y)},times:function(r){return new t.Point(this.x*r,this.y*r)},divide:function(r){return new t.Point(this.x/r,this.y/r)},negate:function(){return new t.Point(-this.x,-this.y)},distanceTo:function(r){return Math.sqrt(Math.pow(this.x-r.x,2)+Math.pow(this.y-r.y,2))},squaredDistanceTo:function(r){return Math.pow(this.x-r.x,2)+Math.pow(this.y-r.y,2)},apply:function(r){return new t.Point(r(this.x),r(this.y))},equals:function(r){return r instanceof t.Point&&this.x===r.x&&this.y===r.y},rotate:function(r,o){o=o||new t.Point(0,0);var l,d;if(r%90===0){var h=t.positiveModulo(r,360);switch(h){case 0:l=1,d=0;break;case 90:l=0,d=1;break;case 180:l=-1,d=0;break;case 270:l=0,d=-1;break}}else{var f=r*Math.PI/180;l=Math.cos(f),d=Math.sin(f)}var m=l*(this.x-o.x)-d*(this.y-o.y)+o.x,g=d*(this.x-o.x)+l*(this.y-o.y)+o.y;return new t.Point(m,g)},toString:function(){return"("+Math.round(this.x*100)/100+","+Math.round(this.y*100)/100+")"}}}(n),function(t){t.TileSource=function(o,l,d,h,f,m){var g=this,w=arguments,x,T;if(t.isPlainObject(o)?x=o:x={width:w[0],height:w[1],tileSize:w[2],tileOverlap:w[3],minLevel:w[4],maxLevel:w[5]},t.EventSource.call(this),t.extend(!0,this,x),!this.success){for(T=0;T<arguments.length;T++)if(t.isFunction(arguments[T])){this.success=arguments[T];break}}this.success&&this.addHandler("ready",function(P){g.success(P)}),t.type(arguments[0])==="string"&&(this.url=arguments[0]),this.url?(this.aspectRatio=1,this.dimensions=new t.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=x.width&&x.height?x.width/x.height:1,this.dimensions=new t.Point(x.width,x.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=x.tileOverlap?x.tileOverlap:0,this.minLevel=x.minLevel?x.minLevel:0,this.maxLevel=x.maxLevel!==void 0&&x.maxLevel!==null?x.maxLevel:x.width&&x.height?Math.ceil(Math.log(Math.max(x.width,x.height))/Math.log(2)):0,this.success&&t.isFunction(this.success)&&this.success(this))},t.TileSource.prototype={getTileSize:function(o){return t.console.error("[TileSource.getTileSize] is deprecated. Use TileSource.getTileWidth() and TileSource.getTileHeight() instead"),this._tileWidth},getTileWidth:function(o){return this._tileWidth?this._tileWidth:this.getTileSize(o)},getTileHeight:function(o){return this._tileHeight?this._tileHeight:this.getTileSize(o)},setMaxLevel:function(o){this.maxLevel=o,this._memoizeLevelScale()},getLevelScale:function(o){return this._memoizeLevelScale(),this.getLevelScale(o)},_memoizeLevelScale:function(){var o={},l;for(l=0;l<=this.maxLevel;l++)o[l]=1/Math.pow(2,this.maxLevel-l);this.getLevelScale=function(d){return o[d]}},getNumTiles:function(o){var l=this.getLevelScale(o),d=Math.ceil(l*this.dimensions.x/this.getTileWidth(o)),h=Math.ceil(l*this.dimensions.y/this.getTileHeight(o));return new t.Point(d,h)},getPixelRatio:function(o){var l=this.dimensions.times(this.getLevelScale(o)),d=1/l.x*t.pixelDensityRatio,h=1/l.y*t.pixelDensityRatio;return new t.Point(d,h)},getClosestLevel:function(){var o,l;for(o=this.minLevel+1;o<=this.maxLevel&&(l=this.getNumTiles(o),!(l.x>1||l.y>1));o++);return o-1},getTileAtPoint:function(o,l){var d=l.x>=0&&l.x<=1&&l.y>=0&&l.y<=1/this.aspectRatio;t.console.assert(d,"[TileSource.getTileAtPoint] must be called with a valid point.");var h=this.dimensions.x*this.getLevelScale(o),f=l.x*h,m=l.y*h,g=Math.floor(f/this.getTileWidth(o)),w=Math.floor(m/this.getTileHeight(o));l.x>=1&&(g=this.getNumTiles(o).x-1);var x=1e-15;return l.y>=1/this.aspectRatio-x&&(w=this.getNumTiles(o).y-1),new t.Point(g,w)},getTileBounds:function(o,l,d,h){var f=this.dimensions.times(this.getLevelScale(o)),m=this.getTileWidth(o),g=this.getTileHeight(o),w=l===0?0:m*l-this.tileOverlap,x=d===0?0:g*d-this.tileOverlap,T=m+(l===0?1:2)*this.tileOverlap,P=g+(d===0?1:2)*this.tileOverlap,C=1/f.x;return T=Math.min(T,f.x-w),P=Math.min(P,f.y-x),h?new t.Rect(0,0,T,P):new t.Rect(w*C,x*C,T*C,P*C)},getImageInfo:function(o){var l=this,d,h,f,m,g,w,x;o&&(g=o.split("/"),w=g[g.length-1],x=w.lastIndexOf("."),x>-1&&(g[g.length-1]=w.slice(0,x)));var T=null;if(this.splitHashDataForPost){var P=o.indexOf("#");P!==-1&&(T=o.substring(P+1),o=o.substr(0,P))}h=function(C){typeof C=="string"&&(C=t.parseXml(C));var _=t.TileSource.determineType(l,C,o);if(!_){l.raiseEvent("open-failed",{message:"Unable to load TileSource",source:o});return}m=_.prototype.configure.apply(l,[C,o,T]),m.ajaxWithCredentials===void 0&&(m.ajaxWithCredentials=l.ajaxWithCredentials),f=new _(m),l.ready=!0,l.raiseEvent("ready",{tileSource:f})},o.match(/\.js$/)?(d=o.split("/").pop().replace(".js",""),t.jsonp({url:o,async:!1,callbackName:d,callback:h})):t.makeAjaxRequest({url:o,postData:T,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(C){var _=r(C);h(_)},error:function(C,_){var k;try{k="HTTP "+C.status+" attempting to load TileSource: "+o}catch{var V;typeof _>"u"||!_.toString?V="Unknown error":V=_.toString(),k=V+" attempting to load TileSource: "+o}t.console.error(k),l.raiseEvent("open-failed",{message:k,source:o,postData:T})}})},supports:function(o,l){return!1},configure:function(o,l,d){throw new Error("Method not implemented.")},getTileUrl:function(o,l,d){throw new Error("Method not implemented.")},getTilePostData:function(o,l,d){return null},getTileAjaxHeaders:function(o,l,d){return{}},getTileHashKey:function(o,l,d,h,f,m){function g(w){return f?w+"+"+JSON.stringify(f):w}return g(typeof h!="string"?o+"/"+l+"_"+d:h)},tileExists:function(o,l,d){var h=this.getNumTiles(o);return o>=this.minLevel&&o<=this.maxLevel&&l>=0&&d>=0&&l<h.x&&d<h.y},hasTransparency:function(o,l,d,h){return!!o||l.match(".png")},downloadTileStart:function(o){var l=o.userData,d=new Image;l.image=d,l.request=null;var h=function(f){if(!d){o.finish(null,l.request,"Image load failed: undefined Image instance.");return}d.onload=d.onerror=d.onabort=null,o.finish(f?null:d,l.request,f)};d.onload=function(){h()},d.onabort=d.onerror=function(){h("Image load aborted.")},o.loadWithAjax?l.request=t.makeAjaxRequest({url:o.src,withCredentials:o.ajaxWithCredentials,headers:o.ajaxHeaders,responseType:"arraybuffer",postData:o.postData,success:function(f){var m;try{m=new window.Blob([f.response])}catch(x){var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(x.name==="TypeError"&&g){var w=new g;w.append(f.response),m=w.getBlob()}}m.size===0?h("Empty image response."):d.src=(window.URL||window.webkitURL).createObjectURL(m)},error:function(f){h("Image load aborted - XHR error")}}):(o.crossOriginPolicy!==!1&&(d.crossOrigin=o.crossOriginPolicy),d.src=o.src)},downloadTileAbort:function(o){o.userData.request&&o.userData.request.abort();var l=o.userData.image;o.userData.image&&(l.onload=l.onerror=l.onabort=null)},createTileCache:function(o,l,d){o._data=l},destroyTileCache:function(o){o._data=null,o._renderedContext=null},getTileCacheData:function(o){return o._data},getTileCacheDataAsImage:function(o){return o._data},getTileCacheDataAsContext2D:function(o){if(!o._renderedContext){var l=document.createElement("canvas");l.width=o._data.width,l.height=o._data.height,o._renderedContext=l.getContext("2d"),o._renderedContext.drawImage(o._data,0,0),o._data=null}return o._renderedContext}},t.extend(!0,t.TileSource.prototype,t.EventSource.prototype);function r(o){var l=o.responseText,d=o.status,h,f;if(o){if(o.status!==200&&o.status!==0)throw d=o.status,h=d===404?"Not Found":o.statusText,new Error(t.getString("Errors.Status",d,h))}else throw new Error(t.getString("Errors.Security"));if(l.match(/^\s*<.*/))try{f=o.responseXML&&o.responseXML.documentElement?o.responseXML:t.parseXml(l)}catch{f=o.responseText}else if(l.match(/\s*[{[].*/))try{f=t.parseJSON(l)}catch{f=l}else f=l;return f}t.TileSource.determineType=function(o,l,d){var h;for(h in n)if(h.match(/.+TileSource$/)&&t.isFunction(n[h])&&t.isFunction(n[h].prototype.supports)&&n[h].prototype.supports.call(o,l,d))return n[h];return t.console.error("No TileSource was able to open %s %s",d,l),null}}(n),function(t){t.DziTileSource=function(l,d,h,f,m,g,w,x,T){var P,C,_,k;if(t.isPlainObject(l)?k=l:k={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=k.tilesUrl,this.fileFormat=k.fileFormat,this.displayRects=k.displayRects,this.displayRects)for(P=this.displayRects.length-1;P>=0;P--)for(C=this.displayRects[P],_=C.minLevel;_<=C.maxLevel;_++)this._levelRects[_]||(this._levelRects[_]=[]),this._levelRects[_].push(C);t.TileSource.apply(this,[k])},t.extend(t.DziTileSource.prototype,t.TileSource.prototype,{supports:function(l,d){var h;return l.Image?h=l.Image.xmlns:l.documentElement&&(l.documentElement.localName==="Image"||l.documentElement.tagName==="Image")&&(h=l.documentElement.namespaceURI),h=(h||"").toLowerCase(),h.indexOf("schemas.microsoft.com/deepzoom/2008")!==-1||h.indexOf("schemas.microsoft.com/deepzoom/2009")!==-1},configure:function(l,d,h){var f;return t.isPlainObject(l)?f=o(this,l):f=r(this,l),d&&!f.tilesUrl&&(f.tilesUrl=d.replace(/([^/]+?)(\.(dzi|xml|js)?(\?[^/]*)?)?\/?$/,"$1_files/"),d.search(/\.(dzi|xml|js)\?/)!==-1?f.queryParams=d.match(/\?.*/):f.queryParams=""),f},getTileUrl:function(l,d,h){return[this.tilesUrl,l,"/",d,"_",h,".",this.fileFormat,this.queryParams].join("")},tileExists:function(l,d,h){var f=this._levelRects[l],m,g,w,x,T,P,C;if(this.minLevel&&l<this.minLevel||this.maxLevel&&l>this.maxLevel)return!1;if(!f||!f.length)return!0;for(C=f.length-1;C>=0;C--)if(m=f[C],!(l<m.minLevel||l>m.maxLevel)&&(g=this.getLevelScale(l),w=m.x*g,x=m.y*g,T=w+m.width*g,P=x+m.height*g,w=Math.floor(w/this._tileWidth),x=Math.floor(x/this._tileWidth),T=Math.ceil(T/this._tileWidth),P=Math.ceil(P/this._tileWidth),w<=d&&d<T&&x<=h&&h<P))return!0;return!1}});function r(l,d){if(!d||!d.documentElement)throw new Error(t.getString("Errors.Xml"));var h=d.documentElement,f=h.localName||h.tagName,m=d.documentElement.namespaceURI,g=null,w=[],x,T,P,C,_;if(f==="Image")try{if(C=h.getElementsByTagName("Size")[0],C===void 0&&(C=h.getElementsByTagNameNS(m,"Size")[0]),g={Image:{xmlns:"http://schemas.microsoft.com/deepzoom/2008",Url:h.getAttribute("Url"),Format:h.getAttribute("Format"),DisplayRect:null,Overlap:parseInt(h.getAttribute("Overlap"),10),TileSize:parseInt(h.getAttribute("TileSize"),10),Size:{Height:parseInt(C.getAttribute("Height"),10),Width:parseInt(C.getAttribute("Width"),10)}}},!t.imageFormatSupported(g.Image.Format))throw new Error(t.getString("Errors.ImageFormat",g.Image.Format.toUpperCase()));for(x=h.getElementsByTagName("DisplayRect"),x===void 0&&(x=h.getElementsByTagNameNS(m,"DisplayRect")[0]),_=0;_<x.length;_++)T=x[_],P=T.getElementsByTagName("Rect")[0],P===void 0&&(P=T.getElementsByTagNameNS(m,"Rect")[0]),w.push({Rect:{X:parseInt(P.getAttribute("X"),10),Y:parseInt(P.getAttribute("Y"),10),Width:parseInt(P.getAttribute("Width"),10),Height:parseInt(P.getAttribute("Height"),10),MinLevel:parseInt(T.getAttribute("MinLevel"),10),MaxLevel:parseInt(T.getAttribute("MaxLevel"),10)}});return w.length&&(g.Image.DisplayRect=w),o(l,g)}catch(j){throw j instanceof Error?j:new Error(t.getString("Errors.Dzi"))}else{if(f==="Collection")throw new Error(t.getString("Errors.Dzc"));if(f==="Error"){var k=h.getElementsByTagName("Message")[0],V=k.firstChild.nodeValue;throw new Error(V)}}throw new Error(t.getString("Errors.Dzi"))}function o(l,d){var h=d.Image,f=h.Url,m=h.Format,g=h.Size,w=h.DisplayRect||[],x=parseInt(g.Width,10),T=parseInt(g.Height,10),P=parseInt(h.TileSize,10),C=parseInt(h.Overlap,10),_=[],k,V;for(V=0;V<w.length;V++)k=w[V].Rect,_.push(new t.DisplayRect(parseInt(k.X,10),parseInt(k.Y,10),parseInt(k.Width,10),parseInt(k.Height,10),parseInt(k.MinLevel,10),parseInt(k.MaxLevel,10)));return t.extend(!0,{width:x,height:T,tileSize:P,tileOverlap:C,minLevel:null,maxLevel:null,tilesUrl:f,fileFormat:m,displayRects:_},d)}}(n),function(t){t.IIIFTileSource=function(h){if(t.extend(!0,this,h),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(h.tileSizePerScaleFactor={},this.tileFormat=this.tileFormat||"jpg",this.version=h.version,this.tile_width&&this.tile_height)h.tileWidth=this.tile_width,h.tileHeight=this.tile_height;else if(this.tile_width)h.tileSize=this.tile_width;else if(this.tile_height)h.tileSize=this.tile_height;else if(this.tiles)if(this.tiles.length===1)h.tileWidth=this.tiles[0].width,h.tileHeight=this.tiles[0].height||this.tiles[0].width,this.scale_factors=this.tiles[0].scaleFactors;else{this.scale_factors=[];for(var f=0;f<this.tiles.length;f++)for(var m=0;m<this.tiles[f].scaleFactors.length;m++){var g=this.tiles[f].scaleFactors[m];this.scale_factors.push(g),h.tileSizePerScaleFactor[g]={width:this.tiles[f].width,height:this.tiles[f].height||this.tiles[f].width}}}else if(r(h)){for(var w=Math.min(this.height,this.width),x=[256,512,1024],T=[],P=0;P<x.length;P++)x[P]<=w&&T.push(x[P]);T.length>0?h.tileSize=Math.max.apply(null,T):h.tileSize=w}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,h.levels=o(this),t.extend(!0,h,{width:h.levels[h.levels.length-1].width,height:h.levels[h.levels.length-1].height,tileSize:Math.max(h.height,h.width),tileOverlap:0,minLevel:0,maxLevel:h.levels.length-1}),this.levels=h.levels):t.console.error("Nothing in the info.json to construct image pyramids from");if(!h.maxLevel&&!this.emulateLegacyImagePyramid)if(!this.scale_factors)h.maxLevel=Number(Math.round(Math.log(Math.max(this.width,this.height),2)));else{var C=Math.max.apply(null,this.scale_factors);h.maxLevel=Math.round(Math.log(C)*Math.LOG2E)}if(this.sizes){var _=this.sizes.length;(_===h.maxLevel||_===h.maxLevel+1)&&(this.levelSizes=this.sizes,_===h.maxLevel&&this.levelSizes.push({width:this.width,height:this.height}))}t.TileSource.apply(this,[h])},t.extend(t.IIIFTileSource.prototype,t.TileSource.prototype,{supports:function(h,f){return h.protocol&&h.protocol==="http://iiif.io/api/image"||h["@context"]&&(h["@context"]==="http://library.stanford.edu/iiif/image-api/1.1/context.json"||h["@context"]==="http://iiif.io/api/image/1/context.json")||h.profile&&h.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html")===0||h.identifier&&h.width&&h.height?!0:!!(h.documentElement&&h.documentElement.tagName==="info"&&h.documentElement.namespaceURI==="http://library.stanford.edu/iiif/image-api/ns/")},configure:function(h,f,m){if(t.isPlainObject(h)){if(!h["@context"])h["@context"]="http://iiif.io/api/image/1.0/context.json",h["@id"]=f.replace("/info.json",""),h.version=1;else{var w=h["@context"];if(Array.isArray(w)){for(var x=0;x<w.length;x++)if(typeof w[x]=="string"&&(/^http:\/\/iiif\.io\/api\/image\/[1-3]\/context\.json$/.test(w[x])||w[x]==="http://library.stanford.edu/iiif/image-api/1.1/context.json")){w=w[x];break}}switch(w){case"http://iiif.io/api/image/1/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/context.json":h.version=1;break;case"http://iiif.io/api/image/2/context.json":h.version=2;break;case"http://iiif.io/api/image/3/context.json":h.version=3;break;default:t.console.error("Data has a @context property which contains no known IIIF context URI.")}}if(h.preferredFormats){for(var T=0;T<h.preferredFormats.length;T++)if(n.imageFormatSupported(h.preferredFormats[T])){h.tileFormat=h.preferredFormats[T];break}}return h}else{var g=l(h);return g["@context"]="http://iiif.io/api/image/1.0/context.json",g["@id"]=f.replace("/info.xml",""),g.version=1,g}},getTileWidth:function(h){if(this.emulateLegacyImagePyramid)return t.TileSource.prototype.getTileWidth.call(this,h);var f=Math.pow(2,this.maxLevel-h);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[f]?this.tileSizePerScaleFactor[f].width:this._tileWidth},getTileHeight:function(h){if(this.emulateLegacyImagePyramid)return t.TileSource.prototype.getTileHeight.call(this,h);var f=Math.pow(2,this.maxLevel-h);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[f]?this.tileSizePerScaleFactor[f].height:this._tileHeight},getLevelScale:function(h){if(this.emulateLegacyImagePyramid){var f=NaN;return this.levels.length>0&&h>=this.minLevel&&h<=this.maxLevel&&(f=this.levels[h].width/this.levels[this.maxLevel].width),f}return t.TileSource.prototype.getLevelScale.call(this,h)},getNumTiles:function(h){if(this.emulateLegacyImagePyramid){var f=this.getLevelScale(h);return f?new t.Point(1,1):new t.Point(0,0)}if(this.levelSizes){var m=this.levelSizes[h],g=Math.ceil(m.width/this.getTileWidth(h)),w=Math.ceil(m.height/this.getTileHeight(h));return new t.Point(g,w)}else return t.TileSource.prototype.getNumTiles.call(this,h)},getTileAtPoint:function(h,f){if(this.emulateLegacyImagePyramid)return new t.Point(0,0);if(this.levelSizes){var m=f.x>=0&&f.x<=1&&f.y>=0&&f.y<=1/this.aspectRatio;t.console.assert(m,"[TileSource.getTileAtPoint] must be called with a valid point.");var g=this.levelSizes[h].width,w=f.x*g,x=f.y*g,T=Math.floor(w/this.getTileWidth(h)),P=Math.floor(x/this.getTileHeight(h));f.x>=1&&(T=this.getNumTiles(h).x-1);var C=1e-15;return f.y>=1/this.aspectRatio-C&&(P=this.getNumTiles(h).y-1),new t.Point(T,P)}return t.TileSource.prototype.getTileAtPoint.call(this,h,f)},getTileUrl:function(h,f,m){if(this.emulateLegacyImagePyramid){var g=null;return this.levels.length>0&&h>=this.minLevel&&h<=this.maxLevel&&(g=this.levels[h].url),g}var w="0",x=Math.pow(.5,this.maxLevel-h),T,P,C,_,k,V,j,Z,B,Y,ie,ae,le,_e,fe,de;return this.levelSizes?(T=this.levelSizes[h].width,P=this.levelSizes[h].height):(T=Math.ceil(this.width*x),P=Math.ceil(this.height*x)),C=this.getTileWidth(h),_=this.getTileHeight(h),k=Math.round(C/x),V=Math.round(_/x),this.version===1?fe="native."+this.tileFormat:fe="default."+this.tileFormat,T<C&&P<_?(this.version===2&&T===this.width?ae="full":this.version===3&&T===this.width&&P===this.height?ae="max":this.version===3?ae=T+","+P:ae=T+",",j="full"):(Z=f*k,B=m*V,Y=Math.min(k,this.width-Z),ie=Math.min(V,this.height-B),f===0&&m===0&&Y===this.width&&ie===this.height?j="full":j=[Z,B,Y,ie].join(","),le=Math.min(C,T-f*C),_e=Math.min(_,P-m*_),this.version===2&&le===this.width?ae="full":this.version===3&&le===this.width&&_e===this.height?ae="max":this.version===3?ae=le+","+_e:ae=le+","),de=[this._id,j,ae,w,fe].join("/"),de},__testonly__:{canBeTiled:r,constructLevels:o}});function r(h){var f=["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"],m=Array.isArray(h.profile)?h.profile[0]:h.profile,g=f.indexOf(m)!==-1,w=!1;return h.version===2&&h.profile.length>1&&h.profile[1].supports&&(w=h.profile[1].supports.indexOf("sizeByW")!==-1),h.version===3&&h.extraFeatures&&(w=h.extraFeatures.indexOf("sizeByWh")!==-1),!g||w}function o(h){for(var f=[],m=0;m<h.sizes.length;m++)f.push({url:h._id+"/full/"+h.sizes[m].width+","+(h.version===3?h.sizes[m].height:"")+"/0/default."+h.tileFormat,width:h.sizes[m].width,height:h.sizes[m].height});return f.sort(function(g,w){return g.width-w.width})}function l(h){if(!h||!h.documentElement)throw new Error(t.getString("Errors.Xml"));var f=h.documentElement,m=f.tagName,g=null;if(m==="info")try{return g={},d(f,g),g}catch(w){throw w instanceof Error?w:new Error(t.getString("Errors.IIIF"))}throw new Error(t.getString("Errors.IIIF"))}function d(h,f,m){var g,w;if(h.nodeType===3&&m)w=h.nodeValue.trim(),w.match(/^\d*$/)&&(w=Number(w)),f[m]?(t.isArray(f[m])||(f[m]=[f[m]]),f[m].push(w)):f[m]=w;else if(h.nodeType===1)for(g=0;g<h.childNodes.length;g++)d(h.childNodes[g],f,h.nodeName)}}(n),function(t){t.OsmTileSource=function(r,o,l,d,h){var f;t.isPlainObject(r)?f=r:f={width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]},(!f.width||!f.height)&&(f.width=65572864,f.height=65572864),f.tileSize||(f.tileSize=256,f.tileOverlap=0),f.tilesUrl||(f.tilesUrl="http://tile.openstreetmap.org/"),f.minLevel=8,t.TileSource.apply(this,[f])},t.extend(t.OsmTileSource.prototype,t.TileSource.prototype,{supports:function(r,o){return r.type&&r.type==="openstreetmaps"},configure:function(r,o,l){return r},getTileUrl:function(r,o,l){return this.tilesUrl+(r-8)+"/"+o+"/"+l+".png"}})}(n),function(t){t.TmsTileSource=function(r,o,l,d,h){var f;t.isPlainObject(r)?f=r:f={width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]};var m=Math.ceil(f.width/256)*256,g=Math.ceil(f.height/256)*256,w;m>g?w=m/256:w=g/256,f.maxLevel=Math.ceil(Math.log(w)/Math.log(2))-1,f.tileSize=256,f.width=m,f.height=g,t.TileSource.apply(this,[f])},t.extend(t.TmsTileSource.prototype,t.TileSource.prototype,{supports:function(r,o){return r.type&&r.type==="tiledmapservice"},configure:function(r,o,l){return r},getTileUrl:function(r,o,l){var d=this.getNumTiles(r).y-1;return this.tilesUrl+r+"/"+o+"/"+(d-l)+".png"}})}(n),function(t){t.ZoomifyTileSource=function(r){typeof r.tileSize>"u"&&(r.tileSize=256),typeof r.fileFormat>"u"&&(r.fileFormat="jpg",this.fileFormat=r.fileFormat);var o={x:r.width,y:r.height};for(r.imageSizes=[{x:r.width,y:r.height}],r.gridSize=[this._getGridSize(r.width,r.height,r.tileSize)];parseInt(o.x,10)>r.tileSize||parseInt(o.y,10)>r.tileSize;)o.x=Math.floor(o.x/2),o.y=Math.floor(o.y/2),r.imageSizes.push({x:o.x,y:o.y}),r.gridSize.push(this._getGridSize(o.x,o.y,r.tileSize));r.imageSizes.reverse(),r.gridSize.reverse(),r.minLevel=0,r.maxLevel=r.gridSize.length-1,n.TileSource.apply(this,[r])},t.extend(t.ZoomifyTileSource.prototype,t.TileSource.prototype,{_getGridSize:function(r,o,l){return{x:Math.ceil(r/l),y:Math.ceil(o/l)}},_calculateAbsoluteTileNumber:function(r,o,l){for(var d=0,h={},f=0;f<r;f++)h=this.gridSize[f],d+=h.x*h.y;return h=this.gridSize[r],d+=h.x*l+o,d},supports:function(r,o){return r.type&&r.type==="zoomifytileservice"},configure:function(r,o,l){return r},getTileUrl:function(r,o,l){var d=0,h=this._calculateAbsoluteTileNumber(r,o,l);return d=Math.floor(h/256),this.tilesUrl+"TileGroup"+d+"/"+r+"-"+o+"-"+l+"."+this.fileFormat}})}(n),function(t){t.LegacyTileSource=function(d){var h,f,m;t.isArray(d)&&(h={type:"legacy-image-pyramid",levels:d}),h.levels=r(h.levels),h.levels.length>0?(f=h.levels[h.levels.length-1].width,m=h.levels[h.levels.length-1].height):(f=0,m=0,t.console.error("No supported image formats found")),t.extend(!0,h,{width:f,height:m,tileSize:Math.max(m,f),tileOverlap:0,minLevel:0,maxLevel:h.levels.length>0?h.levels.length-1:0}),t.TileSource.apply(this,[h]),this.levels=h.levels},t.extend(t.LegacyTileSource.prototype,t.TileSource.prototype,{supports:function(d,h){return d.type&&d.type==="legacy-image-pyramid"||d.documentElement&&d.documentElement.getAttribute("type")==="legacy-image-pyramid"},configure:function(d,h,f){var m;return t.isPlainObject(d)?m=l(this,d):m=o(this,d),m},getLevelScale:function(d){var h=NaN;return this.levels.length>0&&d>=this.minLevel&&d<=this.maxLevel&&(h=this.levels[d].width/this.levels[this.maxLevel].width),h},getNumTiles:function(d){var h=this.getLevelScale(d);return h?new t.Point(1,1):new t.Point(0,0)},getTileUrl:function(d,h,f){var m=null;return this.levels.length>0&&d>=this.minLevel&&d<=this.maxLevel&&(m=this.levels[d].url),m}});function r(d){var h=[],f,m;for(m=0;m<d.length;m++)f=d[m],f.height&&f.width&&f.url?h.push({url:f.url,width:Number(f.width),height:Number(f.height)}):t.console.error("Unsupported image format: %s",f.url?f.url:"<no URL>");return h.sort(function(g,w){return g.height-w.height})}function o(d,h){if(!h||!h.documentElement)throw new Error(t.getString("Errors.Xml"));var f=h.documentElement,m=f.tagName,g=null,w=[],x,T;if(m==="image")try{for(g={type:f.getAttribute("type"),levels:[]},w=f.getElementsByTagName("level"),T=0;T<w.length;T++)x=w[T],g.levels.push({url:x.getAttribute("url"),width:parseInt(x.getAttribute("width"),10),height:parseInt(x.getAttribute("height"),10)});return l(d,g)}catch(P){throw P instanceof Error?P:new Error("Unknown error parsing Legacy Image Pyramid XML.")}else{if(m==="collection")throw new Error("Legacy Image Pyramid Collections not yet supported.");if(m==="error")throw new Error("Error: "+h)}throw new Error("Unknown element "+m)}function l(d,h){return h.levels}}(n),function(t){t.ImageTileSource=function(r){r=t.extend({buildPyramid:!0,crossOriginPolicy:!1,ajaxWithCredentials:!1,useCanvas:!0},r),t.TileSource.apply(this,[r])},t.extend(t.ImageTileSource.prototype,t.TileSource.prototype,{supports:function(r,o){return r.type&&r.type==="image"},configure:function(r,o,l){return r},getImageInfo:function(r){var o=this._image=new Image,l=this;this.crossOriginPolicy&&(o.crossOrigin=this.crossOriginPolicy),this.ajaxWithCredentials&&(o.useCredentials=this.ajaxWithCredentials),t.addEvent(o,"load",function(){l.width=o.naturalWidth,l.height=o.naturalHeight,l.aspectRatio=l.width/l.height,l.dimensions=new t.Point(l.width,l.height),l._tileWidth=l.width,l._tileHeight=l.height,l.tileOverlap=0,l.minLevel=0,l.levels=l._buildLevels(),l.maxLevel=l.levels.length-1,l.ready=!0,l.raiseEvent("ready",{tileSource:l})}),t.addEvent(o,"error",function(){l.raiseEvent("open-failed",{message:"Error loading image at "+r,source:r})}),o.src=r},getLevelScale:function(r){var o=NaN;return r>=this.minLevel&&r<=this.maxLevel&&(o=this.levels[r].width/this.levels[this.maxLevel].width),o},getNumTiles:function(r){var o=this.getLevelScale(r);return o?new t.Point(1,1):new t.Point(0,0)},getTileUrl:function(r,o,l){var d=null;return r>=this.minLevel&&r<=this.maxLevel&&(d=this.levels[r].url),d},getContext2D:function(r,o,l){var d=null;return r>=this.minLevel&&r<=this.maxLevel&&(d=this.levels[r].context2D),d},destroy:function(){this._freeupCanvasMemory()},_buildLevels:function(){var r=[{url:this._image.src,width:this._image.naturalWidth,height:this._image.naturalHeight}];if(!this.buildPyramid||!t.supportsCanvas||!this.useCanvas)return delete this._image,r;var o=this._image.naturalWidth,l=this._image.naturalHeight,d=document.createElement("canvas"),h=d.getContext("2d");if(d.width=o,d.height=l,h.drawImage(this._image,0,0,o,l),r[0].context2D=h,delete this._image,t.isCanvasTainted(d))return r;for(;o>=2&&l>=2;){o=Math.floor(o/2),l=Math.floor(l/2);var f=document.createElement("canvas"),m=f.getContext("2d");f.width=o,f.height=l,m.drawImage(d,0,0,o,l),r.splice(0,0,{context2D:m,width:o,height:l}),d=f,h=m}return r},_freeupCanvasMemory:function(){for(var r=0;r<this.levels.length;r++)this.levels[r].context2D&&(this.levels[r].context2D.canvas.height=0,this.levels[r].context2D.canvas.width=0)}})}(n),function(t){t.TileSourceCollection=function(r,o,l,d){t.console.error("TileSourceCollection is deprecated; use World instead")}}(n),function(t){t.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},t.Button=function(m){var g=this;t.EventSource.call(this),t.extend(!0,this,{tooltip:null,srcRest:null,srcGroup:null,srcHover:null,srcDown:null,clickTimeThreshold:t.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:t.DEFAULT_SETTINGS.clickDistThreshold,fadeDelay:0,fadeLength:2e3,onPress:null,onRelease:null,onClick:null,onEnter:null,onExit:null,onFocus:null,onBlur:null,userData:null},m),this.element=m.element||t.makeNeutralElement("div"),m.element||(this.imgRest=t.makeTransparentImage(this.srcRest),this.imgGroup=t.makeTransparentImage(this.srcGroup),this.imgHover=t.makeTransparentImage(this.srcHover),this.imgDown=t.makeTransparentImage(this.srcDown),this.imgRest.alt=this.imgGroup.alt=this.imgHover.alt=this.imgDown.alt=this.tooltip,t.setElementPointerEventsNone(this.imgRest),t.setElementPointerEventsNone(this.imgGroup),t.setElementPointerEventsNone(this.imgHover),t.setElementPointerEventsNone(this.imgDown),this.element.style.position="relative",t.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",t.Browser.vendor===t.BROWSERS.FIREFOX&&t.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=t.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 t.MouseTracker({userData:"Button.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(w){w.insideElementPressed?(h(g,t.ButtonState.DOWN),g.raiseEvent("enter",{originalEvent:w.originalEvent})):w.buttonDownAny||h(g,t.ButtonState.HOVER)},focusHandler:function(w){g.tracker.enterHandler(w),g.raiseEvent("focus",{originalEvent:w.originalEvent})},leaveHandler:function(w){f(g,t.ButtonState.GROUP),w.insideElementPressed&&g.raiseEvent("exit",{originalEvent:w.originalEvent})},blurHandler:function(w){g.tracker.leaveHandler(w),g.raiseEvent("blur",{originalEvent:w.originalEvent})},pressHandler:function(w){h(g,t.ButtonState.DOWN),g.raiseEvent("press",{originalEvent:w.originalEvent})},releaseHandler:function(w){w.insideElementPressed&&w.insideElementReleased?(f(g,t.ButtonState.HOVER),g.raiseEvent("release",{originalEvent:w.originalEvent})):w.insideElementPressed?f(g,t.ButtonState.GROUP):h(g,t.ButtonState.HOVER)},clickHandler:function(w){w.quick&&g.raiseEvent("click",{originalEvent:w.originalEvent})},keyHandler:function(w){w.keyCode===13?(g.raiseEvent("click",{originalEvent:w.originalEvent}),g.raiseEvent("release",{originalEvent:w.originalEvent}),w.preventDefault=!0):w.preventDefault=!1}}),f(this,t.ButtonState.REST)},t.extend(t.Button.prototype,t.EventSource.prototype,{notifyGroupEnter:function(){h(this,t.ButtonState.GROUP)},notifyGroupExit:function(){f(this,t.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,this.tracker.setTracking(!1),t.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,this.tracker.setTracking(!0),t.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}});function r(m){t.requestAnimationFrame(function(){o(m)})}function o(m){var g,w,x;m.shouldFade&&(g=t.now(),w=g-m.fadeBeginTime,x=1-w/m.fadeLength,x=Math.min(1,x),x=Math.max(0,x),m.imgGroup&&t.setElementOpacity(m.imgGroup,x,!0),x>0&&r(m))}function l(m){m.shouldFade=!0,m.fadeBeginTime=t.now()+m.fadeDelay,window.setTimeout(function(){r(m)},m.fadeDelay)}function d(m){m.shouldFade=!1,m.imgGroup&&t.setElementOpacity(m.imgGroup,1,!0)}function h(m,g){m.element.disabled||(g>=t.ButtonState.GROUP&&m.currentState===t.ButtonState.REST&&(d(m),m.currentState=t.ButtonState.GROUP),g>=t.ButtonState.HOVER&&m.currentState===t.ButtonState.GROUP&&(m.imgHover&&(m.imgHover.style.visibility=""),m.currentState=t.ButtonState.HOVER),g>=t.ButtonState.DOWN&&m.currentState===t.ButtonState.HOVER&&(m.imgDown&&(m.imgDown.style.visibility=""),m.currentState=t.ButtonState.DOWN))}function f(m,g){m.element.disabled||(g<=t.ButtonState.HOVER&&m.currentState===t.ButtonState.DOWN&&(m.imgDown&&(m.imgDown.style.visibility="hidden"),m.currentState=t.ButtonState.HOVER),g<=t.ButtonState.GROUP&&m.currentState===t.ButtonState.HOVER&&(m.imgHover&&(m.imgHover.style.visibility="hidden"),m.currentState=t.ButtonState.GROUP),g<=t.ButtonState.REST&&m.currentState===t.ButtonState.GROUP&&(l(m),m.currentState=t.ButtonState.REST))}}(n),function(t){t.ButtonGroup=function(r){t.extend(!0,this,{buttons:[],clickTimeThreshold:t.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:t.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},r);var o=this.buttons.concat([]),l=this,d;if(this.element=r.element||t.makeNeutralElement("div"),!r.group)for(this.element.style.display="inline-block",d=0;d<o.length;d++)this.element.appendChild(o[d].element);t.setElementTouchActionNone(this.element),this.tracker=new t.MouseTracker({userData:"ButtonGroup.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(h){var f;for(f=0;f<l.buttons.length;f++)l.buttons[f].notifyGroupEnter()},leaveHandler:function(h){var f;if(!h.insideElementPressed)for(f=0;f<l.buttons.length;f++)l.buttons[f].notifyGroupExit()}})},t.ButtonGroup.prototype={addButton:function(r){this.buttons.push(r),this.element.appendChild(r.element)},emulateEnter:function(){this.tracker.enterHandler({eventSource:this.tracker})},emulateLeave:function(){this.tracker.leaveHandler({eventSource:this.tracker})},destroy:function(){for(;this.buttons.length;){var r=this.buttons.pop();this.element.removeChild(r.element),r.destroy()}this.tracker.destroy(),this.element=null}}}(n),function(t){t.Rect=function(r,o,l,d,h){this.x=typeof r=="number"?r:0,this.y=typeof o=="number"?o:0,this.width=typeof l=="number"?l:0,this.height=typeof d=="number"?d:0,this.degrees=typeof h=="number"?h:0,this.degrees=t.positiveModulo(this.degrees,360);var f,m;this.degrees>=270?(f=this.getTopRight(),this.x=f.x,this.y=f.y,m=this.height,this.height=this.width,this.width=m,this.degrees-=270):this.degrees>=180?(f=this.getBottomRight(),this.x=f.x,this.y=f.y,this.degrees-=180):this.degrees>=90&&(f=this.getBottomLeft(),this.x=f.x,this.y=f.y,m=this.height,this.height=this.width,this.width=m,this.degrees-=90)},t.Rect.fromSummits=function(r,o,l){var d=r.distanceTo(o),h=r.distanceTo(l),f=o.minus(r),m=Math.atan(f.y/f.x);return f.x<0?m+=Math.PI:f.y<0&&(m+=2*Math.PI),new t.Rect(r.x,r.y,d,h,m/Math.PI*180)},t.Rect.prototype={clone:function(){return new t.Rect(this.x,this.y,this.width,this.height,this.degrees)},getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new t.Point(this.x,this.y)},getBottomRight:function(){return new t.Point(this.x+this.width,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getTopRight:function(){return new t.Point(this.x+this.width,this.y).rotate(this.degrees,this.getTopLeft())},getBottomLeft:function(){return new t.Point(this.x,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getCenter:function(){return new t.Point(this.x+this.width/2,this.y+this.height/2).rotate(this.degrees,this.getTopLeft())},getSize:function(){return new t.Point(this.width,this.height)},equals:function(r){return r instanceof t.Rect&&this.x===r.x&&this.y===r.y&&this.width===r.width&&this.height===r.height&&this.degrees===r.degrees},times:function(r){return new t.Rect(this.x*r,this.y*r,this.width*r,this.height*r,this.degrees)},translate:function(r){return new t.Rect(this.x+r.x,this.y+r.y,this.width,this.height,this.degrees)},union:function(r){var o=this.getBoundingBox(),l=r.getBoundingBox(),d=Math.min(o.x,l.x),h=Math.min(o.y,l.y),f=Math.max(o.x+o.width,l.x+l.width),m=Math.max(o.y+o.height,l.y+l.height);return new t.Rect(d,h,f-d,m-h)},intersection:function(r){var o=1e-10,l=[],d=this.getTopLeft();r.containsPoint(d,o)&&l.push(d);var h=this.getTopRight();r.containsPoint(h,o)&&l.push(h);var f=this.getBottomLeft();r.containsPoint(f,o)&&l.push(f);var m=this.getBottomRight();r.containsPoint(m,o)&&l.push(m);var g=r.getTopLeft();this.containsPoint(g,o)&&l.push(g);var w=r.getTopRight();this.containsPoint(w,o)&&l.push(w);var x=r.getBottomLeft();this.containsPoint(x,o)&&l.push(x);var T=r.getBottomRight();this.containsPoint(T,o)&&l.push(T);for(var P=this._getSegments(),C=r._getSegments(),_=0;_<P.length;_++)for(var k=P[_],V=0;V<C.length;V++){var j=C[V],Z=B(k[0],k[1],j[0],j[1]);Z&&l.push(Z)}function B(de,ve,Ae,ke){var me=ve.minus(de),be=ke.minus(Ae),Ee=-be.x*me.y+me.x*be.y;if(Ee===0)return null;var Oe=(me.x*(de.y-Ae.y)-me.y*(de.x-Ae.x))/Ee,F=(be.x*(de.y-Ae.y)-be.y*(de.x-Ae.x))/Ee;return-o<=Oe&&Oe<=1-o&&-o<=F&&F<=1-o?new t.Point(de.x+F*me.x,de.y+F*me.y):null}if(l.length===0)return null;for(var Y=l[0].x,ie=l[0].x,ae=l[0].y,le=l[0].y,_e=1;_e<l.length;_e++){var fe=l[_e];fe.x<Y&&(Y=fe.x),fe.x>ie&&(ie=fe.x),fe.y<ae&&(ae=fe.y),fe.y>le&&(le=fe.y)}return new t.Rect(Y,ae,ie-Y,le-ae)},_getSegments:function(){var r=this.getTopLeft(),o=this.getTopRight(),l=this.getBottomLeft(),d=this.getBottomRight();return[[r,o],[o,d],[d,l],[l,r]]},rotate:function(r,o){if(r=t.positiveModulo(r,360),r===0)return this.clone();o=o||this.getCenter();var l=this.getTopLeft().rotate(r,o),d=this.getTopRight().rotate(r,o),h=d.minus(l);h=h.apply(function(m){var g=1e-15;return Math.abs(m)<g?0:m});var f=Math.atan(h.y/h.x);return h.x<0?f+=Math.PI:h.y<0&&(f+=2*Math.PI),new t.Rect(l.x,l.y,this.width,this.height,f/Math.PI*180)},getBoundingBox:function(){if(this.degrees===0)return this.clone();var r=this.getTopLeft(),o=this.getTopRight(),l=this.getBottomLeft(),d=this.getBottomRight(),h=Math.min(r.x,o.x,l.x,d.x),f=Math.max(r.x,o.x,l.x,d.x),m=Math.min(r.y,o.y,l.y,d.y),g=Math.max(r.y,o.y,l.y,d.y);return new t.Rect(h,m,f-h,g-m)},getIntegerBoundingBox:function(){var r=this.getBoundingBox(),o=Math.floor(r.x),l=Math.floor(r.y),d=Math.ceil(r.width+r.x-o),h=Math.ceil(r.height+r.y-l);return new t.Rect(o,l,d,h)},containsPoint:function(r,o){o=o||0;var l=this.getTopLeft(),d=this.getTopRight(),h=this.getBottomLeft(),f=d.minus(l),m=h.minus(l);return(r.x-l.x)*f.x+(r.y-l.y)*f.y>=-o&&(r.x-d.x)*f.x+(r.y-d.y)*f.y<=o&&(r.x-l.x)*m.x+(r.y-l.y)*m.y>=-o&&(r.x-h.x)*m.x+(r.y-h.y)*m.y<=o},toString:function(){return"["+Math.round(this.x*100)/100+", "+Math.round(this.y*100)/100+", "+Math.round(this.width*100)/100+"x"+Math.round(this.height*100)/100+", "+Math.round(this.degrees*100)/100+"deg]"}}}(n),function(t){var r={};t.ReferenceStrip=function(x){var T=this,P=x.viewer,C=t.getElementSize(P.element),_,k,V;for(x.id||(x.id="referencestrip-"+t.now(),this.element=t.makeNeutralElement("div"),this.element.id=x.id,this.element.className="referencestrip"),x=t.extend(!0,{sizeRatio:t.DEFAULT_SETTINGS.referenceStripSizeRatio,position:t.DEFAULT_SETTINGS.referenceStripPosition,scroll:t.DEFAULT_SETTINGS.referenceStripScroll,clickTimeThreshold:t.DEFAULT_SETTINGS.clickTimeThreshold},x,{element:this.element}),t.extend(this,x),r[this.id]={animating:!1},this.minPixelRatio=this.viewer.minPixelRatio,this.element.tabIndex=0,k=this.element.style,k.marginTop="0px",k.marginRight="0px",k.marginBottom="0px",k.marginLeft="0px",k.left="0px",k.bottom="0px",k.border="0px",k.background="#000",k.position="relative",t.setElementTouchActionNone(this.element),t.setElementOpacity(this.element,.8),this.viewer=P,this.tracker=new t.MouseTracker({userData:"ReferenceStrip.tracker",element:this.element,clickHandler:t.delegate(this,o),dragHandler:t.delegate(this,l),scrollHandler:t.delegate(this,d),enterHandler:t.delegate(this,f),leaveHandler:t.delegate(this,m),keyDownHandler:t.delegate(this,g),keyHandler:t.delegate(this,w),preProcessEventHandler:function(j){j.eventType==="wheel"&&(j.preventDefault=!0)}}),x.width&&x.height?(this.element.style.width=x.width+"px",this.element.style.height=x.height+"px",P.addControl(this.element,{anchor:t.ControlAnchor.BOTTOM_LEFT})):x.scroll==="horizontal"?(this.element.style.width=C.x*x.sizeRatio*P.tileSources.length+12*P.tileSources.length+"px",this.element.style.height=C.y*x.sizeRatio+"px",P.addControl(this.element,{anchor:t.ControlAnchor.BOTTOM_LEFT})):(this.element.style.height=C.y*x.sizeRatio*P.tileSources.length+12*P.tileSources.length+"px",this.element.style.width=C.x*x.sizeRatio+"px",P.addControl(this.element,{anchor:t.ControlAnchor.TOP_LEFT})),this.panelWidth=C.x*this.sizeRatio+8,this.panelHeight=C.y*this.sizeRatio+8,this.panels=[],this.miniViewers={},V=0;V<P.tileSources.length;V++)_=t.makeNeutralElement("div"),_.id=this.element.id+"-"+V,_.style.width=T.panelWidth+"px",_.style.height=T.panelHeight+"px",_.style.display="inline",_.style.float="left",_.style.cssFloat="left",_.style.styleFloat="left",_.style.padding="2px",t.setElementTouchActionNone(_),t.setElementPointerEventsNone(_),this.element.appendChild(_),_.activePanel=!1,this.panels.push(_);h(this,this.scroll==="vertical"?C.y:C.x,0),this.setFocus(0)},t.ReferenceStrip.prototype={setFocus:function(x){var T=this.element.querySelector("#"+this.element.id+"-"+x),P=t.getElementSize(this.viewer.canvas),C=Number(this.element.style.width.replace("px","")),_=Number(this.element.style.height.replace("px","")),k=-Number(this.element.style.marginLeft.replace("px","")),V=-Number(this.element.style.marginTop.replace("px","")),j;this.currentSelected!==T&&(this.currentSelected&&(this.currentSelected.style.background="#000"),this.currentSelected=T,this.currentSelected.style.background="#999",this.scroll==="horizontal"?(j=Number(x)*(this.panelWidth+3),j>k+P.x-this.panelWidth?(j=Math.min(j,C-P.x),this.element.style.marginLeft=-j+"px",h(this,P.x,-j)):j<k&&(j=Math.max(0,j-P.x/2),this.element.style.marginLeft=-j+"px",h(this,P.x,-j))):(j=Number(x)*(this.panelHeight+3),j>V+P.y-this.panelHeight?(j=Math.min(j,_-P.y),this.element.style.marginTop=-j+"px",h(this,P.y,-j)):j<V&&(j=Math.max(0,j-P.y/2),this.element.style.marginTop=-j+"px",h(this,P.y,-j))),this.currentPage=x,f.call(this,{eventSource:this.tracker}))},update:function(){return!!r[this.id].animating},destroy:function(){if(this.miniViewers)for(var x in this.miniViewers)this.miniViewers[x].destroy();this.tracker.destroy(),this.element&&this.viewer.removeControl(this.element)}};function o(x){if(x.quick){var T;this.scroll==="horizontal"?T=Math.floor(x.position.x/(this.panelWidth+4)):T=Math.floor(x.position.y/this.panelHeight),this.viewer.goToPage(T)}this.element.focus()}function l(x){if(this.dragging=!0,this.element){var T=Number(this.element.style.marginLeft.replace("px","")),P=Number(this.element.style.marginTop.replace("px","")),C=Number(this.element.style.width.replace("px","")),_=Number(this.element.style.height.replace("px","")),k=t.getElementSize(this.viewer.canvas);this.scroll==="horizontal"?-x.delta.x>0?T>-(C-k.x)&&(this.element.style.marginLeft=T+x.delta.x*2+"px",h(this,k.x,T+x.delta.x*2)):-x.delta.x<0&&T<0&&(this.element.style.marginLeft=T+x.delta.x*2+"px",h(this,k.x,T+x.delta.x*2)):-x.delta.y>0?P>-(_-k.y)&&(this.element.style.marginTop=P+x.delta.y*2+"px",h(this,k.y,P+x.delta.y*2)):-x.delta.y<0&&P<0&&(this.element.style.marginTop=P+x.delta.y*2+"px",h(this,k.y,P+x.delta.y*2))}}function d(x){if(this.element){var T=Number(this.element.style.marginLeft.replace("px","")),P=Number(this.element.style.marginTop.replace("px","")),C=Number(this.element.style.width.replace("px","")),_=Number(this.element.style.height.replace("px","")),k=t.getElementSize(this.viewer.canvas);this.scroll==="horizontal"?x.scroll>0?T>-(C-k.x)&&(this.element.style.marginLeft=T-x.scroll*60+"px",h(this,k.x,T-x.scroll*60)):x.scroll<0&&T<0&&(this.element.style.marginLeft=T-x.scroll*60+"px",h(this,k.x,T-x.scroll*60)):x.scroll<0?P>k.y-_&&(this.element.style.marginTop=P+x.scroll*60+"px",h(this,k.y,P+x.scroll*60)):x.scroll>0&&P<0&&(this.element.style.marginTop=P+x.scroll*60+"px",h(this,k.y,P+x.scroll*60)),x.preventDefault=!0}}function h(x,T,P){var C,_,k,V,j,Z;for(x.scroll==="horizontal"?C=x.panelWidth:C=x.panelHeight,_=Math.ceil(T/C)+5,k=Math.ceil((Math.abs(P)+T)/C)+1,_=k-_,_=_<0?0:_,j=_;j<k&&j<x.panels.length;j++)if(Z=x.panels[j],!Z.activePanel){var B,Y=x.viewer.tileSources[j];Y.referenceStripThumbnailUrl?B={type:"image",url:Y.referenceStripThumbnailUrl}:B=Y,V=new t.Viewer({id:Z.id,tileSources:[B],element:Z,navigatorSizeRatio:x.sizeRatio,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,loadTilesWithAjax:x.viewer.loadTilesWithAjax,ajaxHeaders:x.viewer.ajaxHeaders,useCanvas:x.useCanvas}),t.setElementPointerEventsNone(V.canvas),t.setElementPointerEventsNone(V.container),V.innerTracker.setTracking(!1),V.outerTracker.setTracking(!1),x.miniViewers[Z.id]=V,Z.activePanel=!0}}function f(x){var T=x.eventSource.element;this.scroll==="horizontal"?T.style.marginBottom="0px":T.style.marginLeft="0px"}function m(x){var T=x.eventSource.element;this.scroll==="horizontal"?T.style.marginBottom="-"+t.getElementSize(T).y/2+"px":T.style.marginLeft="-"+t.getElementSize(T).x/2+"px"}function g(x){if(!x.ctrl&&!x.alt&&!x.meta)switch(x.keyCode){case 38:d.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),x.preventDefault=!0;break;case 40:d.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),x.preventDefault=!0;break;case 37:d.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),x.preventDefault=!0;break;case 39:d.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),x.preventDefault=!0;break;default:x.preventDefault=!1;break}else x.preventDefault=!1}function w(x){if(!x.ctrl&&!x.alt&&!x.meta)switch(x.keyCode){case 61:d.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),x.preventDefault=!0;break;case 45:d.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),x.preventDefault=!0;break;case 48:case 119:case 87:d.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),x.preventDefault=!0;break;case 115:case 83:d.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),x.preventDefault=!0;break;case 97:d.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),x.preventDefault=!0;break;case 100:d.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),x.preventDefault=!0;break;default:x.preventDefault=!1;break}else x.preventDefault=!1}}(n),function(t){t.DisplayRect=function(r,o,l,d,h,f){t.Rect.apply(this,[r,o,l,d]),this.minLevel=h,this.maxLevel=f},t.extend(t.DisplayRect.prototype,t.Rect.prototype)}(n),function(t){t.Spring=function(o){var l=arguments;typeof o!="object"&&(o={initial:l.length&&typeof l[0]=="number"?l[0]:void 0,springStiffness:l.length>1?l[1].springStiffness:5,animationTime:l.length>1?l[1].animationTime:1.5}),t.console.assert(typeof o.springStiffness=="number"&&o.springStiffness!==0,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),t.console.assert(typeof o.animationTime=="number"&&o.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),o.exponential&&(this._exponential=!0,delete o.exponential),t.extend(!0,this,o),this.current={value:typeof this.initial=="number"?this.initial:this._exponential?0:1,time:t.now()},t.console.assert(!this._exponential||this.current.value!==0,"[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))},t.Spring.prototype={resetTo:function(o){t.console.assert(!this._exponential||o!==0,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=o,this.start.time=this.target.time=this.current.time=t.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(o){t.console.assert(!this._exponential||o!==0,"[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=o,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(o){this.start.value+=o,this.target.value+=o,this._exponential&&(t.console.assert(this.target.value!==0&&this.start.value!==0,"[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(o){this._exponential=o,this._exponential&&(t.console.assert(this.current.value!==0&&this.target.value!==0&&this.start.value!==0,"[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(){this.current.time=t.now();var o,l;this._exponential?(o=this.start._logValue,l=this.target._logValue):(o=this.start.value,l=this.target.value);var d=this.current.time>=this.target.time?l:o+(l-o)*r(this.springStiffness,(this.current.time-this.start.time)/(this.target.time-this.start.time)),h=this.current.value;return this._exponential?this.current.value=Math.exp(d):this.current.value=d,h!==this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}};function r(o,l){return(1-Math.exp(o*-l))/(1-Math.exp(-o))}}(n),function(t){t.ImageJob=function(o){t.extend(!0,this,{timeout:t.DEFAULT_SETTINGS.timeout,jobId:null,tries:0},o),this.data=null,this.userData={},this.errorMsg=null},t.ImageJob.prototype={start:function(){this.tries++;var o=this,l=this.abort;this.jobId=window.setTimeout(function(){o.finish(null,null,"Image load exceeded timeout ("+o.timeout+" ms)")},this.timeout),this.abort=function(){o.source.downloadTileAbort(o),typeof l=="function"&&l()},this.source.downloadTileStart(this)},finish:function(o,l,d){this.data=o,this.request=l,this.errorMsg=d,this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},t.ImageLoader=function(o){t.extend(!0,this,{jobLimit:t.DEFAULT_SETTINGS.imageLoaderLimit,timeout:t.DEFAULT_SETTINGS.timeout,jobQueue:[],failedTiles:[],jobsInProgress:0},o)},t.ImageLoader.prototype={addJob:function(o){if(!o.source){t.console.error("ImageLoader.prototype.addJob() requires [options.source]. TileSource since new API defines how images are fetched. Creating a dummy TileSource.");var l=t.TileSource.prototype;o.source={downloadTileStart:l.downloadTileStart,downloadTileAbort:l.downloadTileAbort}}var d=this,h=function(g){r(d,g,o.callback)},f={src:o.src,tile:o.tile||{},source:o.source,loadWithAjax:o.loadWithAjax,ajaxHeaders:o.loadWithAjax?o.ajaxHeaders:null,crossOriginPolicy:o.crossOriginPolicy,ajaxWithCredentials:o.ajaxWithCredentials,postData:o.postData,callback:h,abort:o.abort,timeout:this.timeout},m=new t.ImageJob(f);!this.jobLimit||this.jobsInProgress<this.jobLimit?(m.start(),this.jobsInProgress++):this.jobQueue.push(m)},clear:function(){for(var o=0;o<this.jobQueue.length;o++){var l=this.jobQueue[o];typeof l.abort=="function"&&l.abort()}this.jobQueue=[]}};function r(o,l,d){l.errorMsg!==""&&(l.data===null||l.data===void 0)&&l.tries<1+o.tileRetryMax&&o.failedTiles.push(l);var h;o.jobsInProgress--,(!o.jobLimit||o.jobsInProgress<o.jobLimit)&&o.jobQueue.length>0&&(h=o.jobQueue.shift(),h.start(),o.jobsInProgress++),o.tileRetryMax>0&&o.jobQueue.length===0&&(!o.jobLimit||o.jobsInProgress<o.jobLimit)&&o.failedTiles.length>0&&(h=o.failedTiles.shift(),setTimeout(function(){h.start()},o.tileRetryDelay),o.jobsInProgress++),d(l.data,l.errorMsg,l.request)}}(n),function(t){t.Tile=function(r,o,l,d,h,f,m,g,w,x,T,P){this.level=r,this.x=o,this.y=l,this.bounds=d,this.sourceBounds=x,this.exists=h,this._url=f,this.postData=T,this.context2D=m,this.loadWithAjax=g,this.ajaxHeaders=w,P===void 0&&(t.console.warn("Tile constructor needs 'cacheKey' variable: creation tile cache in Tile class is deprecated. TileSource.prototype.getTileHashKey will be used."),P=t.TileSource.prototype.getTileHashKey(r,o,l,f,w,T)),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},t.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(r){if(!this.cacheImageRecord){t.console.warn("[Tile.drawHTML] attempting to draw tile %s when it's not cached",this.toString());return}if(!this.loaded){t.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());return}if(!this.element){var o=this.getImage();if(!o)return;this.element=t.makeNeutralElement("div"),this.imgElement=o.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!==r&&r.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)"),t.setElementOpacity(this.element,this.opacity)},get image(){return t.console.error("[Tile.image] property has been deprecated. Use [Tile.prototype.getImage] instead."),this.getImage()},get url(){return t.console.error("[Tile.url] property has been deprecated. Use [Tile.prototype.getUrl] instead."),this.getUrl()},getImage:function(){return this.cacheImageRecord.getImage()},getUrl:function(){return typeof this._url=="function"?this._url():this._url},getCanvasContext:function(){return this.context2D||this.cacheImageRecord.getRenderedContext()},drawCanvas:function(r,o,l,d,h,f){var m=this.position.times(t.pixelDensityRatio),g=this.size.times(t.pixelDensityRatio),w;if(!this.context2D&&!this.cacheImageRecord){t.console.warn("[Tile.drawCanvas] attempting to draw tile %s when it's not cached",this.toString());return}if(w=this.getCanvasContext(),!this.loaded||!w){t.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());return}r.save(),r.globalAlpha=this.opacity,typeof l=="number"&&l!==1&&(m=m.times(l),g=g.times(l)),d instanceof t.Point&&(m=m.plus(d)),r.globalAlpha===1&&this.hasTransparency&&(h&&(m.x=Math.round(m.x),m.y=Math.round(m.y),g.x=Math.round(g.x),g.y=Math.round(g.y)),r.clearRect(m.x,m.y,g.x,g.y)),o({context:r,tile:this,rendered:w});var x,T;this.sourceBounds?(x=Math.min(this.sourceBounds.width,w.canvas.width),T=Math.min(this.sourceBounds.height,w.canvas.height)):(x=w.canvas.width,T=w.canvas.height),r.translate(m.x+g.x/2,0),this.flipped&&r.scale(-1,1),r.drawImage(w.canvas,0,0,x,T,-g.x/2,m.y,g.x,g.y),r.restore()},getScaleForEdgeSmoothing:function(){var r;if(this.cacheImageRecord)r=this.cacheImageRecord.getRenderedContext();else if(this.context2D)r=this.context2D;else return t.console.warn("[Tile.drawCanvas] attempting to get tile scale %s when tile's not cached",this.toString()),1;return r.canvas.width/(this.size.x*t.pixelDensityRatio)},getTranslationForEdgeSmoothing:function(r,o,l){var d=Math.max(1,Math.ceil((l.x-o.x)/2)),h=Math.max(1,Math.ceil((l.y-o.y)/2));return new t.Point(d,h).minus(this.position.times(t.pixelDensityRatio).times(r||1).apply(function(f){return f%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}}}(n),function(t){t.OverlayPlacement=t.Placement,t.OverlayRotationMode=t.freezeObject({NO_ROTATION:1,EXACT:2,BOUNDING_BOX:3}),t.Overlay=function(r,o,l){var d;t.isPlainObject(r)?d=r:d={element:r,location:o,placement:l},this.element=d.element,this.style=d.element.style,this._init(d)},t.Overlay.prototype={_init:function(r){this.location=r.location,this.placement=r.placement===void 0?t.Placement.TOP_LEFT:r.placement,this.onDraw=r.onDraw,this.checkResize=r.checkResize===void 0?!0:r.checkResize,this.width=r.width===void 0?null:r.width,this.height=r.height===void 0?null:r.height,this.rotationMode=r.rotationMode||t.OverlayRotationMode.EXACT,this.location instanceof t.Rect&&(this.width=this.location.width,this.height=this.location.height,this.location=this.location.getTopLeft(),this.placement=t.Placement.TOP_LEFT),this.scales=this.width!==null&&this.height!==null,this.bounds=new t.Rect(this.location.x,this.location.y,this.width,this.height),this.position=this.location},adjust:function(r,o){var l=t.Placement.properties[this.placement];l&&(l.isHorizontallyCentered?r.x-=o.x/2:l.isRight&&(r.x-=o.x),l.isVerticallyCentered?r.y-=o.y/2:l.isBottom&&(r.y-=o.y))},destroy:function(){var r=this.element,o=this.style;r.parentNode&&(r.parentNode.removeChild(r),r.prevElementParent&&(o.display="none",document.body.appendChild(r))),this.onDraw=null,o.top="",o.left="",o.position="",this.width!==null&&(o.width=""),this.height!==null&&(o.height="");var l=t.getCssPropertyWithVendorPrefix("transformOrigin"),d=t.getCssPropertyWithVendorPrefix("transform");l&&d&&(o[l]="",o[d]="")},drawHTML:function(r,o){var l=this.element;l.parentNode!==r&&(l.prevElementParent=l.parentNode,l.prevNextSibling=l.nextSibling,r.appendChild(l),this.style.position="absolute",this.size=t.getElementSize(l));var d=this._getOverlayPositionAndSize(o),h=d.position,f=this.size=d.size,m=d.rotate;if(this.onDraw)this.onDraw(h,f,this.element);else{var g=this.style;g.left=h.x+"px",g.top=h.y+"px",this.width!==null&&(g.width=f.x+"px"),this.height!==null&&(g.height=f.y+"px");var w=t.getCssPropertyWithVendorPrefix("transformOrigin"),x=t.getCssPropertyWithVendorPrefix("transform");w&&x&&(m?(g[w]=this._getTransformOrigin(),g[x]="rotate("+m+"deg)"):(g[w]="",g[x]="")),g.display="block"}},_getOverlayPositionAndSize:function(r){var o=r.pixelFromPoint(this.location,!0),l=this._getSizeInPixels(r);this.adjust(o,l);var d=0;if(r.getRotation(!0)&&this.rotationMode!==t.OverlayRotationMode.NO_ROTATION)if(this.rotationMode===t.OverlayRotationMode.BOUNDING_BOX&&this.width!==null&&this.height!==null){var h=new t.Rect(o.x,o.y,l.x,l.y),f=this._getBoundingBox(h,r.getRotation(!0));o=f.getTopLeft(),l=f.getSize()}else d=r.getRotation(!0);return{position:o,size:l,rotate:d}},_getSizeInPixels:function(r){var o=this.size.x,l=this.size.y;if(this.width!==null||this.height!==null){var d=r.deltaPixelsFromPointsNoRotate(new t.Point(this.width||0,this.height||0),!0);this.width!==null&&(o=d.x),this.height!==null&&(l=d.y)}if(this.checkResize&&(this.width===null||this.height===null)){var h=this.size=t.getElementSize(this.element);this.width===null&&(o=h.x),this.height===null&&(l=h.y)}return new t.Point(o,l)},_getBoundingBox:function(r,o){var l=this._getPlacementPoint(r);return r.rotate(o,l).getBoundingBox()},_getPlacementPoint:function(r){var o=new t.Point(r.x,r.y),l=t.Placement.properties[this.placement];return l&&(l.isHorizontallyCentered?o.x+=r.width/2:l.isRight&&(o.x+=r.width),l.isVerticallyCentered?o.y+=r.height/2:l.isBottom&&(o.y+=r.height)),o},_getTransformOrigin:function(){var r="",o=t.Placement.properties[this.placement];return o&&(o.isLeft?r="left":o.isRight&&(r="right"),o.isTop?r+=" top":o.isBottom&&(r+=" bottom")),r},update:function(r,o){var l=t.isPlainObject(r)?r:{location:r,placement:o};this._init({location:l.location||this.location,placement:l.placement!==void 0?l.placement:this.placement,onDraw:l.onDraw||this.onDraw,checkResize:l.checkResize||this.checkResize,width:l.width!==void 0?l.width:this.width,height:l.height!==void 0?l.height:this.height,rotationMode:l.rotationMode||this.rotationMode})},getBounds:function(r){t.console.assert(r,"A viewport must now be passed to Overlay.getBounds.");var o=this.width,l=this.height;if(o===null||l===null){var d=r.deltaPointsFromPixelsNoRotate(this.size,!0);o===null&&(o=d.x),l===null&&(l=d.y)}var h=this.location.clone();return this.adjust(h,new t.Point(o,l)),this._adjustBoundsForRotation(r,new t.Rect(h.x,h.y,o,l))},_adjustBoundsForRotation:function(r,o){if(!r||r.getRotation(!0)===0||this.rotationMode===t.OverlayRotationMode.EXACT)return o;if(this.rotationMode===t.OverlayRotationMode.BOUNDING_BOX){if(this.width===null||this.height===null)return o;var l=this._getOverlayPositionAndSize(r);return r.viewerElementToViewportRectangle(new t.Rect(l.position.x,l.position.y,l.size.x,l.size.y))}return o.rotate(-r.getRotation(!0),this._getPlacementPoint(o))}}}(n),function(t){t.Drawer=function(r){t.console.assert(r.viewer,"[Drawer] options.viewer is required");var o=arguments;if(t.isPlainObject(r)||(r={source:o[0],viewport:o[1],element:o[2]}),t.console.assert(r.viewport,"[Drawer] options.viewport is required"),t.console.assert(r.element,"[Drawer] options.element is required"),r.source&&t.console.error("[Drawer] options.source is no longer accepted; use TiledImage instead"),this.viewer=r.viewer,this.viewport=r.viewport,this.debugGridColor=typeof r.debugGridColor=="string"?[r.debugGridColor]:r.debugGridColor||t.DEFAULT_SETTINGS.debugGridColor,r.opacity&&t.console.error("[Drawer] options.opacity is no longer accepted; set the opacity on the TiledImage instead"),this.useCanvas=t.supportsCanvas&&(this.viewer?this.viewer.useCanvas:!0),this.container=t.getElement(r.element),this.canvas=t.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 l=this._calculateCanvasSize();this.canvas.width=l.x,this.canvas.height=l.y}this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.position="absolute",t.setElementOpacity(this.canvas,this.opacity,!0),t.setElementPointerEventsNone(this.canvas),t.setElementTouchActionNone(this.canvas),this.container.style.textAlign="left",this.container.appendChild(this.canvas),this._imageSmoothingEnabled=!0},t.Drawer.prototype={addOverlay:function(r,o,l,d){return t.console.error("drawer.addOverlay is deprecated. Use viewer.addOverlay instead."),this.viewer.addOverlay(r,o,l,d),this},updateOverlay:function(r,o,l){return t.console.error("drawer.updateOverlay is deprecated. Use viewer.updateOverlay instead."),this.viewer.updateOverlay(r,o,l),this},removeOverlay:function(r){return t.console.error("drawer.removeOverlay is deprecated. Use viewer.removeOverlay instead."),this.viewer.removeOverlay(r),this},clearOverlays:function(){return t.console.error("drawer.clearOverlays is deprecated. Use viewer.clearOverlays instead."),this.viewer.clearOverlays(),this},viewportCoordToDrawerCoord:function(r){var o=this.viewport.pixelFromPointNoRotate(r,!0);return new t.Point(o.x*t.pixelDensityRatio,o.y*t.pixelDensityRatio)},clipWithPolygons:function(r,o){if(this.useCanvas){var l=this._getContext(o);l.beginPath(),r.forEach(function(d){d.forEach(function(h,f){l[f===0?"moveTo":"lineTo"](h.x,h.y)})}),l.clip()}},setOpacity:function(r){t.console.error("drawer.setOpacity is deprecated. Use tiledImage.setOpacity instead.");for(var o=this.viewer.world,l=0;l<o.getItemCount();l++)o.getItemAt(l).setOpacity(r);return this},getOpacity:function(){t.console.error("drawer.getOpacity is deprecated. Use tiledImage.getOpacity instead.");for(var r=this.viewer.world,o=0,l=0;l<r.getItemCount();l++){var d=r.getItemAt(l).getOpacity();d>o&&(o=d)}return o},needsUpdate:function(){return t.console.error("[Drawer.needsUpdate] this function is deprecated. Use World.needsDraw instead."),this.viewer.world.needsDraw()},numTilesLoaded:function(){return t.console.error("[Drawer.numTilesLoaded] this function is deprecated. Use TileCache.numTilesLoaded instead."),this.viewer.tileCache.numTilesLoaded()},reset:function(){return t.console.error("[Drawer.reset] this function is deprecated. Use World.resetItems instead."),this.viewer.world.resetItems(),this},update:function(){return t.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 r=this._calculateCanvasSize();if((this.canvas.width!==r.x||this.canvas.height!==r.y)&&(this.canvas.width=r.x,this.canvas.height=r.y,this._updateImageSmoothingEnabled(this.context),this.sketchCanvas!==null)){var o=this._calculateSketchCanvasSize();this.sketchCanvas.width=o.x,this.sketchCanvas.height=o.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}},_clear:function(r,o){if(this.useCanvas){var l=this._getContext(r);if(o)l.clearRect(o.x,o.y,o.width,o.height);else{var d=l.canvas;l.clearRect(0,0,d.width,d.height)}}},viewportToDrawerRectangle:function(r){var o=this.viewport.pixelFromPointNoRotate(r.getTopLeft(),!0),l=this.viewport.deltaPixelsFromPointsNoRotate(r.getSize(),!0);return new t.Rect(o.x*t.pixelDensityRatio,o.y*t.pixelDensityRatio,l.x*t.pixelDensityRatio,l.y*t.pixelDensityRatio)},drawTile:function(r,o,l,d,h,f,m){if(t.console.assert(r,"[Drawer.drawTile] tile is required"),t.console.assert(o,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var g=this._getContext(l);d=d||1,r.drawCanvas(g,o,d,h,f,m)}else r.drawHTML(this.canvas)},_getContext:function(r){var o=this.context;if(r){if(this.sketchCanvas===null){this.sketchCanvas=document.createElement("canvas");var l=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=l.x,this.sketchCanvas.height=l.y,this.sketchContext=this.sketchCanvas.getContext("2d"),this.viewport.getRotation()===0){var d=this;this.viewer.addHandler("rotate",function h(){if(d.viewport.getRotation()!==0){d.viewer.removeHandler("rotate",h);var f=d._calculateSketchCanvasSize();d.sketchCanvas.width=f.x,d.sketchCanvas.height=f.y}})}this._updateImageSmoothingEnabled(this.sketchContext)}o=this.sketchContext}return o},saveContext:function(r){this.useCanvas&&this._getContext(r).save()},restoreContext:function(r){this.useCanvas&&this._getContext(r).restore()},setClip:function(r,o){if(this.useCanvas){var l=this._getContext(o);l.beginPath(),l.rect(r.x,r.y,r.width,r.height),l.clip()}},drawRectangle:function(r,o,l){if(this.useCanvas){var d=this._getContext(l);d.save(),d.fillStyle=o,d.fillRect(r.x,r.y,r.width,r.height),d.restore()}},blendSketch:function(r,o,l,d){var h=r;if(t.isPlainObject(h)||(h={opacity:r,scale:o,translate:l,compositeOperation:d}),!(!this.useCanvas||!this.sketchCanvas)){r=h.opacity,d=h.compositeOperation;var f=h.bounds;if(this.context.save(),this.context.globalAlpha=r,d&&(this.context.globalCompositeOperation=d),f)f.x<0&&(f.width+=f.x,f.x=0),f.x+f.width>this.canvas.width&&(f.width=this.canvas.width-f.x),f.y<0&&(f.height+=f.y,f.y=0),f.y+f.height>this.canvas.height&&(f.height=this.canvas.height-f.y),this.context.drawImage(this.sketchCanvas,f.x,f.y,f.width,f.height,f.x,f.y,f.width,f.height);else{o=h.scale||1,l=h.translate;var m=l instanceof t.Point?l:new t.Point(0,0),g=0,w=0;if(l){var x=this.sketchCanvas.width-this.canvas.width,T=this.sketchCanvas.height-this.canvas.height;g=Math.round(x/2),w=Math.round(T/2)}this.context.drawImage(this.sketchCanvas,m.x-g*o,m.y-w*o,(this.canvas.width+2*g)*o,(this.canvas.height+2*w)*o,-g,-w,this.canvas.width+2*g,this.canvas.height+2*w)}this.context.restore()}},drawDebugInfo:function(r,o,l,d){if(this.useCanvas){var h=this.viewer.world.getIndexOfItem(d)%this.debugGridColor.length,f=this.context;f.save(),f.lineWidth=2*t.pixelDensityRatio,f.font="small-caps bold "+13*t.pixelDensityRatio+"px arial",f.strokeStyle=this.debugGridColor[h],f.fillStyle=this.debugGridColor[h],this.viewport.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:this.viewport.getRotation(!0)}),d.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:d.getRotation(!0),point:d.viewport.pixelFromPointNoRotate(d._getRotationPoint(!0),!0)}),d.viewport.getRotation(!0)%360===0&&d.getRotation(!0)%360===0&&d._drawer.viewer.viewport.getFlip()&&d._drawer._flip(),f.strokeRect(r.position.x*t.pixelDensityRatio,r.position.y*t.pixelDensityRatio,r.size.x*t.pixelDensityRatio,r.size.y*t.pixelDensityRatio);var m=(r.position.x+r.size.x/2)*t.pixelDensityRatio,g=(r.position.y+r.size.y/2)*t.pixelDensityRatio;f.translate(m,g),f.rotate(Math.PI/180*-this.viewport.getRotation(!0)),f.translate(-m,-g),r.x===0&&r.y===0&&(f.fillText("Zoom: "+this.viewport.getZoom(),r.position.x*t.pixelDensityRatio,(r.position.y-30)*t.pixelDensityRatio),f.fillText("Pan: "+this.viewport.getBounds().toString(),r.position.x*t.pixelDensityRatio,(r.position.y-20)*t.pixelDensityRatio)),f.fillText("Level: "+r.level,(r.position.x+10)*t.pixelDensityRatio,(r.position.y+20)*t.pixelDensityRatio),f.fillText("Column: "+r.x,(r.position.x+10)*t.pixelDensityRatio,(r.position.y+30)*t.pixelDensityRatio),f.fillText("Row: "+r.y,(r.position.x+10)*t.pixelDensityRatio,(r.position.y+40)*t.pixelDensityRatio),f.fillText("Order: "+l+" of "+o,(r.position.x+10)*t.pixelDensityRatio,(r.position.y+50)*t.pixelDensityRatio),f.fillText("Size: "+r.size.toString(),(r.position.x+10)*t.pixelDensityRatio,(r.position.y+60)*t.pixelDensityRatio),f.fillText("Position: "+r.position.toString(),(r.position.x+10)*t.pixelDensityRatio,(r.position.y+70)*t.pixelDensityRatio),this.viewport.getRotation(!0)%360!==0&&this._restoreRotationChanges(),d.getRotation(!0)%360!==0&&this._restoreRotationChanges(),d.viewport.getRotation(!0)%360===0&&d.getRotation(!0)%360===0&&d._drawer.viewer.viewport.getFlip()&&d._drawer._flip(),f.restore()}},debugRect:function(r){if(this.useCanvas){var o=this.context;o.save(),o.lineWidth=2*t.pixelDensityRatio,o.strokeStyle=this.debugGridColor[0],o.fillStyle=this.debugGridColor[0],o.strokeRect(r.x*t.pixelDensityRatio,r.y*t.pixelDensityRatio,r.width*t.pixelDensityRatio,r.height*t.pixelDensityRatio),o.restore()}},setImageSmoothingEnabled:function(r){this.useCanvas&&(this._imageSmoothingEnabled=r,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw())},_updateImageSmoothingEnabled:function(r){r.msImageSmoothingEnabled=this._imageSmoothingEnabled,r.imageSmoothingEnabled=this._imageSmoothingEnabled},getCanvasSize:function(r){var o=this._getContext(r).canvas;return new t.Point(o.width,o.height)},getCanvasCenter:function(){return new t.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(r){var o=r.point?r.point.times(t.pixelDensityRatio):this.getCanvasCenter(),l=this._getContext(r.useSketch);l.save(),l.translate(o.x,o.y),this.viewer.viewport.flipped?(l.rotate(Math.PI/180*-r.degrees),l.scale(-1,1)):l.rotate(Math.PI/180*r.degrees),l.translate(-o.x,-o.y)},_flip:function(r){r=r||{};var o=r.point?r.point.times(t.pixelDensityRatio):this.getCanvasCenter(),l=this._getContext(r.useSketch);l.translate(o.x,0),l.scale(-1,1),l.translate(-o.x,0)},_restoreRotationChanges:function(r){var o=this._getContext(r);o.restore()},_calculateCanvasSize:function(){var r=t.pixelDensityRatio,o=this.viewport.getContainerSize();return{x:Math.round(o.x*r),y:Math.round(o.y*r)}},_calculateSketchCanvasSize:function(){var r=this._calculateCanvasSize();if(this.viewport.getRotation()===0)return r;var o=Math.ceil(Math.sqrt(r.x*r.x+r.y*r.y));return{x:o,y:o}}}}(n),function(t){t.Viewport=function(r){var o=arguments;o.length&&o[0]instanceof t.Point&&(r={containerSize:o[0],contentSize:o[1],config:o[2]}),r.config&&(t.extend(!0,r,r.config),delete r.config),this._margins=t.extend({left:0,top:0,right:0,bottom:0},r.margins||{}),delete r.margins,r.initialDegrees=r.degrees,delete r.degrees,t.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,rotationPivot:null,viewer:null,springStiffness:t.DEFAULT_SETTINGS.springStiffness,animationTime:t.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:t.DEFAULT_SETTINGS.minZoomImageRatio,maxZoomPixelRatio:t.DEFAULT_SETTINGS.maxZoomPixelRatio,visibilityRatio:t.DEFAULT_SETTINGS.visibilityRatio,wrapHorizontal:t.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:t.DEFAULT_SETTINGS.wrapVertical,defaultZoomLevel:t.DEFAULT_SETTINGS.defaultZoomLevel,minZoomLevel:t.DEFAULT_SETTINGS.minZoomLevel,maxZoomLevel:t.DEFAULT_SETTINGS.maxZoomLevel,initialDegrees:t.DEFAULT_SETTINGS.degrees,flipped:t.DEFAULT_SETTINGS.flipped,homeFillsViewer:t.DEFAULT_SETTINGS.homeFillsViewer,silenceMultiImageWarnings:t.DEFAULT_SETTINGS.silenceMultiImageWarnings},r),this._updateContainerInnerSize(),this.centerSpringX=new t.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.centerSpringY=new t.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.zoomSpring=new t.Spring({exponential:!0,initial:1,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.degreesSpring=new t.Spring({initial:r.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 t.Rect(0,0,1,1),1),this.goHome(!0),this.update()},t.Viewport.prototype={get degrees(){return t.console.warn("Accessing [Viewport.degrees] is deprecated. Use viewport.getRotation instead."),this.getRotation()},set degrees(r){t.console.warn("Setting [Viewport.degrees] is deprecated. Use viewport.rotateTo, viewport.rotateBy, or viewport.setRotation instead."),this.rotateTo(r)},resetContentSize:function(r){return t.console.assert(r,"[Viewport.resetContentSize] contentSize is required"),t.console.assert(r instanceof t.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),t.console.assert(r.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),t.console.assert(r.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new t.Rect(0,0,1,r.y/r.x),r.x),this},setHomeBounds:function(r,o){t.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(r,o)},_setContentBounds:function(r,o){t.console.assert(r,"[Viewport._setContentBounds] bounds is required"),t.console.assert(r instanceof t.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),t.console.assert(r.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),t.console.assert(r.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=r.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(o),this._contentBounds=r.rotate(this.getRotation()).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(o),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:o,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var r=this._contentAspectRatio/this.getAspectRatio(),o;return this.homeFillsViewer?o=r>=1?r:1:o=r>=1?1:r,o/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var r=this._contentBounds.getCenter(),o=1/this.getHomeZoom(),l=o/this.getAspectRatio();return new t.Rect(r.x-o/2,r.y-l/2,o,l)},goHome:function(r){return this.viewer&&this.viewer.raiseEvent("home",{immediately:r}),this.fitBounds(this.getHomeBounds(),r)},getMinZoom:function(){var r=this.getHomeZoom(),o=this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*r;return o},getMaxZoom:function(){var r=this.maxZoomLevel;return r||(r=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,r/=this._contentBounds.width),Math.max(r,this.getHomeZoom())},getAspectRatio:function(){return this._containerInnerSize.x/this._containerInnerSize.y},getContainerSize:function(){return new t.Point(this.containerSize.x,this.containerSize.y)},getMargins:function(){return t.extend({},this._margins)},setMargins:function(r){t.console.assert(t.type(r)==="object","[Viewport.setMargins] margins must be an object"),this._margins=t.extend({left:0,top:0,right:0,bottom:0},r),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(r){return this.getBoundsNoRotate(r).rotate(-this.getRotation(r))},getBoundsNoRotate:function(r){var o=this.getCenter(r),l=1/this.getZoom(r),d=l/this.getAspectRatio();return new t.Rect(o.x-l/2,o.y-d/2,l,d)},getBoundsWithMargins:function(r){return this.getBoundsNoRotateWithMargins(r).rotate(-this.getRotation(r),this.getCenter(r))},getBoundsNoRotateWithMargins:function(r){var o=this.getBoundsNoRotate(r),l=this._containerInnerSize.x*this.getZoom(r);return o.x-=this._margins.left/l,o.y-=this._margins.top/l,o.width+=(this._margins.left+this._margins.right)/l,o.height+=(this._margins.top+this._margins.bottom)/l,o},getCenter:function(r){var o=new t.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),l=new t.Point(this.centerSpringX.target.value,this.centerSpringY.target.value),d,h,f,m,g,w,x,T;return r?o:this.zoomPoint?(d=this.pixelFromPoint(this.zoomPoint,!0),h=this.getZoom(),f=1/h,m=f/this.getAspectRatio(),g=new t.Rect(o.x-f/2,o.y-m/2,f,m),w=this._pixelFromPoint(this.zoomPoint,g),x=w.minus(d).rotate(-this.getRotation(!0)),T=x.divide(this._containerInnerSize.x*h),l.plus(T)):l},getZoom:function(r){return r?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(r){return Math.max(Math.min(r,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(r){var o=this.viewportToViewerElementRectangle(r).getBoundingBox(),l=this.viewportToViewerElementRectangle(this._contentBoundsNoRotate).getBoundingBox(),d=!1,h=!1;if(!this.wrapHorizontal){var f=o.x+o.width,m=l.x+l.width,g,w,x;o.width>l.width?g=this.visibilityRatio*l.width:g=this.visibilityRatio*o.width,w=l.x-f+g,x=m-o.x-g,g>l.width?(o.x+=(w+x)/2,d=!0):x<0?(o.x+=x,d=!0):w>0&&(o.x+=w,d=!0)}if(!this.wrapVertical){var T=o.y+o.height,P=l.y+l.height,C,_,k;o.height>l.height?C=this.visibilityRatio*l.height:C=this.visibilityRatio*o.height,_=l.y-T+C,k=P-o.y-C,C>l.height?(o.y+=(_+k)/2,h=!0):k<0?(o.y+=k,h=!0):_>0&&(o.y+=_,h=!0)}var V=d||h,j=V?this.viewerElementToViewportRectangle(o):r.clone();return j.xConstrained=d,j.yConstrained=h,j.constraintApplied=V,j},_raiseConstraintsEvent:function(r){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:r})},applyConstraints:function(r){var o=this.getZoom(),l=this._applyZoomConstraints(o);o!==l&&this.zoomTo(l,this.zoomPoint,r);var d=this.getConstrainedBounds(!1);return d.constraintApplied&&(this.fitBounds(d,r),this._raiseConstraintsEvent(r)),this},ensureVisible:function(r){return this.applyConstraints(r)},_fitBounds:function(r,o){o=o||{};var l=o.immediately||!1,d=o.constraints||!1,h=this.getAspectRatio(),f=r.getCenter(),m=new t.Rect(r.x,r.y,r.width,r.height,r.degrees+this.getRotation()).getBoundingBox();m.getAspectRatio()>=h?m.height=m.width/h:m.width=m.height*h,m.x=f.x-m.width/2,m.y=f.y-m.height/2;var g=1/m.width;if(l)return this.panTo(f,!0),this.zoomTo(g,null,!0),d&&this.applyConstraints(!0),this;var w=this.getCenter(!0),x=this.getZoom(!0);this.panTo(w,!0),this.zoomTo(x,null,!0);var T=this.getBounds(),P=this.getZoom();if(P===0||Math.abs(g/P-1)<1e-8)return this.zoomTo(g,null,!0),this.panTo(f,l),d&&this.applyConstraints(!1),this;if(d){this.panTo(f,!1),g=this._applyZoomConstraints(g),this.zoomTo(g,null,!1);var C=this.getConstrainedBounds();this.panTo(w,!0),this.zoomTo(x,null,!0),this.fitBounds(C)}else{var _=m.rotate(-this.getRotation()),k=_.getTopLeft().times(g).minus(T.getTopLeft().times(P)).divide(g-P);this.zoomTo(g,k,l)}return this},fitBounds:function(r,o){return this._fitBounds(r,{immediately:o,constraints:!1})},fitBoundsWithConstraints:function(r,o){return this._fitBounds(r,{immediately:o,constraints:!0})},fitVertically:function(r){var o=new t.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(o,r)},fitHorizontally:function(r){var o=new t.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(o,r)},getConstrainedBounds:function(r){var o,l;return o=this.getBounds(r),l=this._applyBoundaryConstraints(o),l},panBy:function(r,o){var l=new t.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(l.plus(r),o)},panTo:function(r,o){return o?(this.centerSpringX.resetTo(r.x),this.centerSpringY.resetTo(r.y)):(this.centerSpringX.springTo(r.x),this.centerSpringY.springTo(r.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:r,immediately:o}),this},zoomBy:function(r,o,l){return this.zoomTo(this.zoomSpring.target.value*r,o,l)},zoomTo:function(r,o,l){var d=this;return this.zoomPoint=o instanceof t.Point&&!isNaN(o.x)&&!isNaN(o.y)?o:null,l?this._adjustCenterSpringsForZoomPoint(function(){d.zoomSpring.resetTo(r)}):this.zoomSpring.springTo(r),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:r,refPoint:o,immediately:l}),this},setRotation:function(r,o){return this.rotateTo(r,null,o)},getRotation:function(r){return r?this.degreesSpring.current.value:this.degreesSpring.target.value},setRotationWithPivot:function(r,o,l){return this.rotateTo(r,o,l)},rotateTo:function(r,o,l){if(!this.viewer||!this.viewer.drawer.canRotate())return this;if(this.degreesSpring.target.value===r&&this.degreesSpring.isAtTargetValue())return this;if(this.rotationPivot=o instanceof t.Point&&!isNaN(o.x)&&!isNaN(o.y)?o:null,l)if(this.rotationPivot){var d=r-this._oldDegrees;if(!d)return this.rotationPivot=null,this;this._rotateAboutPivot(r)}else this.degreesSpring.resetTo(r);else{var h=t.positiveModulo(this.degreesSpring.current.value,360),f=t.positiveModulo(r,360),m=f-h;m>180?f-=360:m<-180&&(f+=360);var g=h-f;this.degreesSpring.resetTo(r+g),this.degreesSpring.springTo(r)}return this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:r,immediately:!!l,pivot:this.rotationPivot||this.getCenter()}),this},rotateBy:function(r,o,l){return this.rotateTo(this.degreesSpring.target.value+r,o,l)},resize:function(r,o){var l=this.getBoundsNoRotate(),d=l,h;this.containerSize.x=r.x,this.containerSize.y=r.y,this._updateContainerInnerSize(),o&&(h=r.x/this.containerSize.x,d.width=l.width*h,d.height=d.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:r,maintain:o});var f=this.fitBounds(d,!0);return this.viewer&&this.viewer.raiseEvent("after-resize",{newContainerSize:r,maintain:o}),f},_updateContainerInnerSize:function(){this._containerInnerSize=new t.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 r=this;this._adjustCenterSpringsForZoomPoint(function(){r.zoomSpring.update()}),this.degreesSpring.isAtTargetValue()&&(this.rotationPivot=null),this.centerSpringX.update(),this.centerSpringY.update(),this.rotationPivot?this._rotateAboutPivot(!0):this.degreesSpring.update();var o=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,o},_rotateAboutPivot:function(r){var o=r===!0,l=this.rotationPivot.minus(this.getCenter());this.centerSpringX.shiftBy(l.x),this.centerSpringY.shiftBy(l.y),o?this.degreesSpring.update():this.degreesSpring.resetTo(r);var d=this.degreesSpring.current.value-this._oldDegrees,h=l.rotate(d*-1).times(-1);this.centerSpringX.shiftBy(h.x),this.centerSpringY.shiftBy(h.y)},_adjustCenterSpringsForZoomPoint:function(r){if(this.zoomPoint){var o=this.pixelFromPoint(this.zoomPoint,!0);r();var l=this.pixelFromPoint(this.zoomPoint,!0),d=l.minus(o),h=this.deltaPointsFromPixels(d,!0);this.centerSpringX.shiftBy(h.x),this.centerSpringY.shiftBy(h.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else r()},deltaPixelsFromPointsNoRotate:function(r,o){return r.times(this._containerInnerSize.x*this.getZoom(o))},deltaPixelsFromPoints:function(r,o){return this.deltaPixelsFromPointsNoRotate(r.rotate(this.getRotation(o)),o)},deltaPointsFromPixelsNoRotate:function(r,o){return r.divide(this._containerInnerSize.x*this.getZoom(o))},deltaPointsFromPixels:function(r,o){return this.deltaPointsFromPixelsNoRotate(r,o).rotate(-this.getRotation(o))},pixelFromPointNoRotate:function(r,o){return this._pixelFromPointNoRotate(r,this.getBoundsNoRotate(o))},pixelFromPoint:function(r,o){return this._pixelFromPoint(r,this.getBoundsNoRotate(o))},_pixelFromPointNoRotate:function(r,o){return r.minus(o.getTopLeft()).times(this._containerInnerSize.x/o.width).plus(new t.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(r,o){return this._pixelFromPointNoRotate(r.rotate(this.getRotation(!0),this.getCenter(!0)),o)},pointFromPixelNoRotate:function(r,o){var l=this.getBoundsNoRotate(o);return r.minus(new t.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/l.width).plus(l.getTopLeft())},pointFromPixel:function(r,o){return this.pointFromPixelNoRotate(r,o).rotate(-this.getRotation(o),this.getCenter(o))},_viewportToImageDelta:function(r,o){var l=this._contentBoundsNoRotate.width;return new t.Point(r*this._contentSizeNoRotate.x/l,o*this._contentSizeNoRotate.x/l)},viewportToImageCoordinates:function(r,o){if(r instanceof t.Point)return this.viewportToImageCoordinates(r.x,r.y);if(this.viewer){var l=this.viewer.world.getItemCount();if(l>1)this.silenceMultiImageWarnings||t.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(l===1){var d=this.viewer.world.getItemAt(0);return d.viewportToImageCoordinates(r,o,!0)}}return this._viewportToImageDelta(r-this._contentBoundsNoRotate.x,o-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(r,o){var l=this._contentBoundsNoRotate.width;return new t.Point(r/this._contentSizeNoRotate.x*l,o/this._contentSizeNoRotate.x*l)},imageToViewportCoordinates:function(r,o){if(r instanceof t.Point)return this.imageToViewportCoordinates(r.x,r.y);if(this.viewer){var l=this.viewer.world.getItemCount();if(l>1)this.silenceMultiImageWarnings||t.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(l===1){var d=this.viewer.world.getItemAt(0);return d.imageToViewportCoordinates(r,o,!0)}}var h=this._imageToViewportDelta(r,o);return h.x+=this._contentBoundsNoRotate.x,h.y+=this._contentBoundsNoRotate.y,h},imageToViewportRectangle:function(r,o,l,d){var h=r;if(h instanceof t.Rect||(h=new t.Rect(r,o,l,d)),this.viewer){var f=this.viewer.world.getItemCount();if(f>1)this.silenceMultiImageWarnings||t.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(f===1){var m=this.viewer.world.getItemAt(0);return m.imageToViewportRectangle(r,o,l,d,!0)}}var g=this.imageToViewportCoordinates(h.x,h.y),w=this._imageToViewportDelta(h.width,h.height);return new t.Rect(g.x,g.y,w.x,w.y,h.degrees)},viewportToImageRectangle:function(r,o,l,d){var h=r;if(h instanceof t.Rect||(h=new t.Rect(r,o,l,d)),this.viewer){var f=this.viewer.world.getItemCount();if(f>1)this.silenceMultiImageWarnings||t.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(f===1){var m=this.viewer.world.getItemAt(0);return m.viewportToImageRectangle(r,o,l,d,!0)}}var g=this.viewportToImageCoordinates(h.x,h.y),w=this._viewportToImageDelta(h.width,h.height);return new t.Rect(g.x,g.y,w.x,w.y,h.degrees)},viewerElementToImageCoordinates:function(r){var o=this.pointFromPixel(r,!0);return this.viewportToImageCoordinates(o)},imageToViewerElementCoordinates:function(r){var o=this.imageToViewportCoordinates(r);return this.pixelFromPoint(o,!0)},windowToImageCoordinates:function(r){t.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var o=r.minus(t.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(o)},imageToWindowCoordinates:function(r){t.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer.");var o=this.imageToViewerElementCoordinates(r);return o.plus(t.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(r){return this.pointFromPixel(r,!0)},viewportToViewerElementCoordinates:function(r){return this.pixelFromPoint(r,!0)},viewerElementToViewportRectangle:function(r){return t.Rect.fromSummits(this.pointFromPixel(r.getTopLeft(),!0),this.pointFromPixel(r.getTopRight(),!0),this.pointFromPixel(r.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(r){return t.Rect.fromSummits(this.pixelFromPoint(r.getTopLeft(),!0),this.pixelFromPoint(r.getTopRight(),!0),this.pixelFromPoint(r.getBottomLeft(),!0))},windowToViewportCoordinates:function(r){t.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var o=r.minus(t.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(o)},viewportToWindowCoordinates:function(r){t.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer.");var o=this.viewportToViewerElementCoordinates(r);return o.plus(t.getElementPosition(this.viewer.element))},viewportToImageZoom:function(r){if(this.viewer){var o=this.viewer.world.getItemCount();if(o>1)this.silenceMultiImageWarnings||t.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(o===1){var l=this.viewer.world.getItemAt(0);return l.viewportToImageZoom(r)}}var d=this._contentSizeNoRotate.x,h=this._containerInnerSize.x,f=this._contentBoundsNoRotate.width,m=h/d*f;return r*m},imageToViewportZoom:function(r){if(this.viewer){var o=this.viewer.world.getItemCount();if(o>1)this.silenceMultiImageWarnings||t.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(o===1){var l=this.viewer.world.getItemAt(0);return l.imageToViewportZoom(r)}}var d=this._contentSizeNoRotate.x,h=this._containerInnerSize.x,f=this._contentBoundsNoRotate.width,m=d/h/f;return r*m},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(r){return this.flipped===r?this:(this.flipped=r,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:r}),this)}}}(n),function(t){t.TiledImage=function(h){var f=this;t.console.assert(h.tileCache,"[TiledImage] options.tileCache is required"),t.console.assert(h.drawer,"[TiledImage] options.drawer is required"),t.console.assert(h.viewer,"[TiledImage] options.viewer is required"),t.console.assert(h.imageLoader,"[TiledImage] options.imageLoader is required"),t.console.assert(h.source,"[TiledImage] options.source is required"),t.console.assert(!h.clip||h.clip instanceof t.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),t.EventSource.call(this),this._tileCache=h.tileCache,delete h.tileCache,this._drawer=h.drawer,delete h.drawer,this._imageLoader=h.imageLoader,delete h.imageLoader,h.clip instanceof t.Rect&&(this._clip=h.clip.clone()),delete h.clip;var m=h.x||0;delete h.x;var g=h.y||0;delete h.y,this.normHeight=h.source.dimensions.y/h.source.dimensions.x,this.contentAspectX=h.source.dimensions.x/h.source.dimensions.y;var w=1;h.width?(w=h.width,delete h.width,h.height&&(t.console.error("specifying both width and height to a tiledImage is not supported"),delete h.height)):h.height&&(w=h.height/this.normHeight,delete h.height);var x=h.fitBounds;delete h.fitBounds;var T=h.fitBoundsPlacement||n.Placement.CENTER;delete h.fitBoundsPlacement;var P=h.degrees||0;delete h.degrees;var C=h.ajaxHeaders;delete h.ajaxHeaders,t.extend(!0,this,{viewer:null,tilesMatrix:{},coverage:{},loadingCoverage:{},lastDrawn:[],lastResetTime:0,_midDraw:!1,_needsDraw:!0,_hasOpaqueTile:!1,_tilesLoading:0,springStiffness:t.DEFAULT_SETTINGS.springStiffness,animationTime:t.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:t.DEFAULT_SETTINGS.minZoomImageRatio,wrapHorizontal:t.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:t.DEFAULT_SETTINGS.wrapVertical,immediateRender:t.DEFAULT_SETTINGS.immediateRender,blendTime:t.DEFAULT_SETTINGS.blendTime,alwaysBlend:t.DEFAULT_SETTINGS.alwaysBlend,minPixelRatio:t.DEFAULT_SETTINGS.minPixelRatio,smoothTileEdgesMinZoom:t.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,iOSDevice:t.DEFAULT_SETTINGS.iOSDevice,debugMode:t.DEFAULT_SETTINGS.debugMode,crossOriginPolicy:t.DEFAULT_SETTINGS.crossOriginPolicy,ajaxWithCredentials:t.DEFAULT_SETTINGS.ajaxWithCredentials,placeholderFillStyle:t.DEFAULT_SETTINGS.placeholderFillStyle,opacity:t.DEFAULT_SETTINGS.opacity,preload:t.DEFAULT_SETTINGS.preload,compositeOperation:t.DEFAULT_SETTINGS.compositeOperation,subPixelRoundingForTransparency:t.DEFAULT_SETTINGS.subPixelRoundingForTransparency},h),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new t.Spring({initial:m,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new t.Spring({initial:g,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new t.Spring({initial:w,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new t.Spring({initial:P,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),x&&this.fitBounds(x,T,!0),this._drawingHandler=function(_){f.viewer.raiseEvent("tile-drawing",t.extend({tiledImage:f},_))},this._ownAjaxHeaders={},this.setAjaxHeaders(C,!1)},t.extend(t.TiledImage.prototype,t.EventSource.prototype,{needsDraw:function(){return this._needsDraw},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(h){h!==this._fullyLoaded&&(this._fullyLoaded=h,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=t.now(),this._needsDraw=!0},update:function(){var h=this._xSpring.update(),f=this._ySpring.update(),m=this._scaleSpring.update(),g=this._degreesSpring.update();return h||f||m||g?(this._updateForScale(),this._needsDraw=!0,!0):!1},draw:function(){this.opacity!==0||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(h){return this.getBoundsNoRotate(h).rotate(this.getRotation(h),this._getRotationPoint(h))},getBoundsNoRotate:function(h){return h?new t.Rect(this._xSpring.current.value,this._ySpring.current.value,this._worldWidthCurrent,this._worldHeightCurrent):new t.Rect(this._xSpring.target.value,this._ySpring.target.value,this._worldWidthTarget,this._worldHeightTarget)},getWorldBounds:function(){return t.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"),this.getBounds()},getClippedBounds:function(h){var f=this.getBoundsNoRotate(h);if(this._clip){var m=h?this._worldWidthCurrent:this._worldWidthTarget,g=m/this.source.dimensions.x,w=this._clip.times(g);f=new t.Rect(f.x+w.x,f.y+w.y,w.width,w.height)}return f.rotate(this.getRotation(h),this._getRotationPoint(h))},getTileBounds:function(h,f,m){var g=this.source.getNumTiles(h),w=(g.x+f%g.x)%g.x,x=(g.y+m%g.y)%g.y,T=this.source.getTileBounds(h,w,x);return this.getFlip()&&(T.x=1-T.x-T.width),T.x+=(f-w)/g.x,T.y+=this._worldHeightCurrent/this._worldWidthCurrent*((m-x)/g.y),T},getContentSize:function(){return new t.Point(this.source.dimensions.x,this.source.dimensions.y)},getSizeInWindowCoordinates:function(){var h=this.imageToWindowCoordinates(new t.Point(0,0)),f=this.imageToWindowCoordinates(this.getContentSize());return new t.Point(f.x-h.x,f.y-h.y)},_viewportToImageDelta:function(h,f,m){var g=m?this._scaleSpring.current.value:this._scaleSpring.target.value;return new t.Point(h*(this.source.dimensions.x/g),f*(this.source.dimensions.y*this.contentAspectX/g))},viewportToImageCoordinates:function(h,f,m){var g;return h instanceof t.Point?(m=f,g=h):g=new t.Point(h,f),g=g.rotate(-this.getRotation(m),this._getRotationPoint(m)),m?this._viewportToImageDelta(g.x-this._xSpring.current.value,g.y-this._ySpring.current.value):this._viewportToImageDelta(g.x-this._xSpring.target.value,g.y-this._ySpring.target.value)},_imageToViewportDelta:function(h,f,m){var g=m?this._scaleSpring.current.value:this._scaleSpring.target.value;return new t.Point(h/this.source.dimensions.x*g,f/this.source.dimensions.y/this.contentAspectX*g)},imageToViewportCoordinates:function(h,f,m){h instanceof t.Point&&(m=f,f=h.y,h=h.x);var g=this._imageToViewportDelta(h,f);return m?(g.x+=this._xSpring.current.value,g.y+=this._ySpring.current.value):(g.x+=this._xSpring.target.value,g.y+=this._ySpring.target.value),g.rotate(this.getRotation(m),this._getRotationPoint(m))},imageToViewportRectangle:function(h,f,m,g,w){var x=h;x instanceof t.Rect?w=f:x=new t.Rect(h,f,m,g);var T=this.imageToViewportCoordinates(x.getTopLeft(),w),P=this._imageToViewportDelta(x.width,x.height,w);return new t.Rect(T.x,T.y,P.x,P.y,x.degrees+this.getRotation(w))},viewportToImageRectangle:function(h,f,m,g,w){var x=h;h instanceof t.Rect?w=f:x=new t.Rect(h,f,m,g);var T=this.viewportToImageCoordinates(x.getTopLeft(),w),P=this._viewportToImageDelta(x.width,x.height,w);return new t.Rect(T.x,T.y,P.x,P.y,x.degrees-this.getRotation(w))},viewerElementToImageCoordinates:function(h){var f=this.viewport.pointFromPixel(h,!0);return this.viewportToImageCoordinates(f)},imageToViewerElementCoordinates:function(h){var f=this.imageToViewportCoordinates(h);return this.viewport.pixelFromPoint(f,!0)},windowToImageCoordinates:function(h){var f=h.minus(n.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(f)},imageToWindowCoordinates:function(h){var f=this.imageToViewerElementCoordinates(h);return f.plus(n.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(h){var f=this._scaleSpring.current.value;return h=h.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new t.Rect((h.x-this._xSpring.current.value)/f,(h.y-this._ySpring.current.value)/f,h.width/f,h.height/f,h.degrees)},viewportToImageZoom:function(h){var f=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return f*h},imageToViewportZoom:function(h){var f=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return h/f},setPosition:function(h,f){var m=this._xSpring.target.value===h.x&&this._ySpring.target.value===h.y;if(f){if(m&&this._xSpring.current.value===h.x&&this._ySpring.current.value===h.y)return;this._xSpring.resetTo(h.x),this._ySpring.resetTo(h.y),this._needsDraw=!0}else{if(m)return;this._xSpring.springTo(h.x),this._ySpring.springTo(h.y),this._needsDraw=!0}m||this._raiseBoundsChange()},setWidth:function(h,f){this._setScale(h,f)},setHeight:function(h,f){this._setScale(h/this.normHeight,f)},setCroppingPolygons:function(h){var f=function(g){return g instanceof t.Point||typeof g.x=="number"&&typeof g.y=="number"},m=function(g){return g.map(function(w){try{if(f(w))return{x:w.x,y:w.y};throw new Error}catch{throw new Error("A Provided cropping polygon point is not supported")}})};try{if(!t.isArray(h))throw new Error("Provided cropping polygon is not an array");this._croppingPolygons=h.map(function(g){return m(g)})}catch(g){t.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),t.console.error(g),this._croppingPolygons=null}},resetCroppingPolygons:function(){this._croppingPolygons=null},fitBounds:function(h,f,m){f=f||t.Placement.CENTER;var g=t.Placement.properties[f],w=this.contentAspectX,x=0,T=0,P=1,C=1;if(this._clip&&(w=this._clip.getAspectRatio(),P=this._clip.width/this.source.dimensions.x,C=this._clip.height/this.source.dimensions.y,h.getAspectRatio()>w?(x=this._clip.x/this._clip.height*h.height,T=this._clip.y/this._clip.height*h.height):(x=this._clip.x/this._clip.width*h.width,T=this._clip.y/this._clip.width*h.width)),h.getAspectRatio()>w){var _=h.height/C,k=0;g.isHorizontallyCentered?k=(h.width-h.height*w)/2:g.isRight&&(k=h.width-h.height*w),this.setPosition(new t.Point(h.x-x+k,h.y-T),m),this.setHeight(_,m)}else{var V=h.width/P,j=0;g.isVerticallyCentered?j=(h.height-h.width/w)/2:g.isBottom&&(j=h.height-h.width/w),this.setPosition(new t.Point(h.x-x,h.y-T+j),m),this.setWidth(V,m)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(h){t.console.assert(!h||h instanceof t.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),h instanceof t.Rect?this._clip=h.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getFlip:function(){return!!this.flipped},setFlip:function(h){this.flipped=!!h,this._needsDraw=!0,this._raiseBoundsChange()},getOpacity:function(){return this.opacity},setOpacity:function(h){h!==this.opacity&&(this.opacity=h,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(h){this._preload=!!h,this._needsDraw=!0},getRotation:function(h){return h?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(h,f){this._degreesSpring.target.value===h&&this._degreesSpring.isAtTargetValue()||(f?this._degreesSpring.resetTo(h):this._degreesSpring.springTo(h),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(h){return this.getBoundsNoRotate(h).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(h){h!==this.compositeOperation&&(this.compositeOperation=h,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},setAjaxHeaders:function(h,f){if(h===null&&(h={}),!t.isPlainObject(h)){console.error("[TiledImage.setAjaxHeaders] Ignoring invalid headers, must be a plain object");return}this._ownAjaxHeaders=h,this._updateAjaxHeaders(f)},_updateAjaxHeaders:function(h){if(h===void 0&&(h=!0),t.isPlainObject(this.viewer.ajaxHeaders)?this.ajaxHeaders=t.extend({},this.viewer.ajaxHeaders,this._ownAjaxHeaders):this.ajaxHeaders=this._ownAjaxHeaders,h){var f,m,g,w;for(var x in this.tilesMatrix){f=this.source.getNumTiles(x);for(var T in this.tilesMatrix[x]){m=(f.x+T%f.x)%f.x;for(var P in this.tilesMatrix[x][T])if(g=(f.y+P%f.y)%f.y,w=this.tilesMatrix[x][T][P],w.loadWithAjax=this.loadTilesWithAjax,w.loadWithAjax){var C=this.source.getTileAjaxHeaders(x,m,g);w.ajaxHeaders=t.extend({},this.ajaxHeaders,C)}else w.ajaxHeaders=null}}for(var _=0;_<this._imageLoader.jobQueue.length;_++){var k=this._imageLoader.jobQueue[_];k.loadWithAjax=k.tile.loadWithAjax,k.ajaxHeaders=k.tile.loadWithAjax?k.tile.ajaxHeaders:null}}},_setScale:function(h,f){var m=this._scaleSpring.target.value===h;if(f){if(m&&this._scaleSpring.current.value===h)return;this._scaleSpring.resetTo(h),this._updateForScale(),this._needsDraw=!0}else{if(m)return;this._scaleSpring.springTo(h),this._updateForScale(),this._needsDraw=!0}m||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 h=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),f=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,m=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(f/this.minPixelRatio)/Math.log(2))));return m=Math.max(m,this.source.minLevel||0),h=Math.min(h,m),{lowestLevel:h,highestLevel:m}},_updateViewport:function(){for(this._needsDraw=!1,this._tilesLoading=0,this.loadingCoverage={};this.lastDrawn.length>0;){var h=this.lastDrawn.pop();h.beingDrawn=!1}var f=this.viewport,m=this._viewportToTiledImageRectangle(f.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var g=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(m=m.intersection(g),m===null)return}for(var w=this._getLevelsInterval(),x=w.lowestLevel,T=w.highestLevel,P=null,C=!1,_=t.now(),k=T;k>=x;k--){var V=!1,j=f.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(k),!0).x*this._scaleSpring.current.value;if(k===x||!C&&j>=this.minPixelRatio)V=!0,C=!0;else if(!C)continue;var Z=f.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(k),!1).x*this._scaleSpring.current.value,B=f.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,Y=this.immediateRender?1:B,ie=Math.min(1,(j-.5)/.5),ae=Y/Math.abs(Y-Z);if(P=this._updateLevel(C,V,k,ie,ae,m,_,P),this._providesCoverage(this.coverage,k))break}this._drawTiles(this.lastDrawn),P&&!P.context2D?(this._loadTile(P,_),this._needsDraw=!0,this._setFullyLoaded(!1)):this._setFullyLoaded(this._tilesLoading===0)},_getCornerTiles:function(h,f,m){var g,w;this.wrapHorizontal?(g=t.positiveModulo(f.x,1),w=t.positiveModulo(m.x,1)):(g=Math.max(0,f.x),w=Math.min(1,m.x));var x,T,P=1/this.source.aspectRatio;this.wrapVertical?(x=t.positiveModulo(f.y,P),T=t.positiveModulo(m.y,P)):(x=Math.max(0,f.y),T=Math.min(P,m.y));var C=this.source.getTileAtPoint(h,new t.Point(g,x)),_=this.source.getTileAtPoint(h,new t.Point(w,T)),k=this.source.getNumTiles(h);return this.wrapHorizontal&&(C.x+=k.x*Math.floor(f.x),_.x+=k.x*Math.floor(m.x)),this.wrapVertical&&(C.y+=k.y*Math.floor(f.y/P),_.y+=k.y*Math.floor(m.y/P)),{topLeft:C,bottomRight:_}},_updateLevel:function(h,f,m,g,w,x,T,P){var C=x.getBoundingBox().getTopLeft(),_=x.getBoundingBox().getBottomRight();this.viewer&&this.viewer.raiseEvent("update-level",{tiledImage:this,havedrawn:h,level:m,opacity:g,visibility:w,drawArea:x,topleft:C,bottomright:_,currenttime:T,best:P}),this._resetCoverage(this.coverage,m),this._resetCoverage(this.loadingCoverage,m);var k=this._getCornerTiles(m,C,_),V=k.topLeft,j=k.bottomRight,Z=this.source.getNumTiles(m),B=this.viewport.pixelFromPoint(this.viewport.getCenter());this.getFlip()&&(j.x+=1,this.wrapHorizontal||(j.x=Math.min(j.x,Z.x-1)));for(var Y=V.x;Y<=j.x;Y++)for(var ie=V.y;ie<=j.y;ie++){var ae;if(this.getFlip()){var le=(Z.x+Y%Z.x)%Z.x;ae=Y+Z.x-le-le-1}else ae=Y;x.intersection(this.getTileBounds(m,ae,ie))!==null&&(P=this._updateTile(f,h,ae,ie,m,g,w,B,Z,T,P))}return P},_updateTile:function(h,f,m,g,w,x,T,P,C,_,k){var V=this._getTile(m,g,w,_,C,this._worldWidthCurrent,this._worldHeightCurrent),j=f;this.viewer&&this.viewer.raiseEvent("update-tile",{tiledImage:this,tile:V}),this._setCoverage(this.coverage,w,m,g,!1);var Z=V.loaded||V.loading||this._isCovered(this.loadingCoverage,w,m,g);if(this._setCoverage(this.loadingCoverage,w,m,g,Z),!V.exists||(h&&!j&&(this._isCovered(this.coverage,w,m,g)?this._setCoverage(this.coverage,w,m,g,!0):j=!0),!j))return k;if(this._positionTile(V,this.source.tileOverlap,this.viewport,P,T),!V.loaded)if(V.context2D)this._setTileLoaded(V);else{var B=this._tileCache.getImageRecord(V.cacheKey);B&&this._setTileLoaded(V,B.getData())}if(V.loaded){var Y=this._blendTile(V,m,g,w,x,_);Y&&(this._needsDraw=!0)}else V.loading?this._tilesLoading++:Z||(k=this._compareTiles(k,V));return k},_getTile:function(h,f,m,g,w,x,T){var P,C,_,k,V,j,Z,B,Y,ie,ae=this.tilesMatrix,le=this.source;return ae[m]||(ae[m]={}),ae[m][h]||(ae[m][h]={}),(!ae[m][h][f]||!ae[m][h][f].flipped!=!this.flipped)&&(P=(w.x+h%w.x)%w.x,C=(w.y+f%w.y)%w.y,_=this.getTileBounds(m,h,f),k=le.getTileBounds(m,P,C,!0),V=le.tileExists(m,P,C),j=le.getTileUrl(m,P,C),Z=le.getTilePostData(m,P,C),this.loadTilesWithAjax?(B=le.getTileAjaxHeaders(m,P,C),t.isPlainObject(this.ajaxHeaders)&&(B=t.extend({},this.ajaxHeaders,B))):B=null,Y=le.getContext2D?le.getContext2D(m,P,C):void 0,ie=new t.Tile(m,h,f,_,V,j,Y,this.loadTilesWithAjax,B,k,Z,le.getTileHashKey(m,P,C,j,B,Z)),this.getFlip()?P===0&&(ie.isRightMost=!0):P===w.x-1&&(ie.isRightMost=!0),C===w.y-1&&(ie.isBottomMost=!0),ie.flipped=this.flipped,ae[m][h][f]=ie),ie=ae[m][h][f],ie.lastTouchTime=g,ie},_loadTile:function(h,f){var m=this;h.loading=!0,this._imageLoader.addJob({src:h.getUrl(),tile:h,source:this.source,postData:h.postData,loadWithAjax:h.loadWithAjax,ajaxHeaders:h.ajaxHeaders,crossOriginPolicy:this.crossOriginPolicy,ajaxWithCredentials:this.ajaxWithCredentials,callback:function(g,w,x){m._onTileLoad(h,f,g,w,x)},abort:function(){h.loading=!1}})},_onTileLoad:function(h,f,m,g,w){if(m)h.exists=!0;else{t.console.error("Tile %s failed to load: %s - error: %s",h,h.getUrl(),g),this.viewer.raiseEvent("tile-load-failed",{tile:h,tiledImage:this,time:f,message:g,tileRequest:w}),h.loading=!1,h.exists=!1;return}if(f<this.lastResetTime){t.console.warn("Ignoring tile %s loaded before reset: %s",h,h.getUrl()),h.loading=!1;return}var x=this,T=function(){var P=x.source,C=P.getClosestLevel();x._setTileLoaded(h,m,C,w)};this._midDraw?window.setTimeout(T,1):T()},_setTileLoaded:function(h,f,m,g){var w=0,x=!1,T=this;function P(){return x&&t.console.error("Event 'tile-loaded' argument getCompletionCallback must be called synchronously. Its return value should be called asynchronously."),w++,C}function C(){w--,w===0&&(h.loading=!1,h.loaded=!0,h.hasTransparency=T.source.hasTransparency(h.context2D,h.getUrl(),h.ajaxHeaders,h.postData),h.context2D||T._tileCache.cacheTile({data:f,tile:h,cutoff:m,tiledImage:T}),T._needsDraw=!0)}var _=P();this.viewer.raiseEvent("tile-loaded",{tile:h,tiledImage:this,tileRequest:g,get image(){return t.console.error("[tile-loaded] event 'image' has been deprecated. Use 'data' property instead."),f},data:f,getCompletionCallback:P}),x=!0,_()},_positionTile:function(h,f,m,g,w){var x=h.bounds.getTopLeft();x.x*=this._scaleSpring.current.value,x.y*=this._scaleSpring.current.value,x.x+=this._xSpring.current.value,x.y+=this._ySpring.current.value;var T=h.bounds.getSize();T.x*=this._scaleSpring.current.value,T.y*=this._scaleSpring.current.value;var P=m.pixelFromPointNoRotate(x,!0),C=m.pixelFromPointNoRotate(x,!1),_=m.deltaPixelsFromPointsNoRotate(T,!0),k=m.deltaPixelsFromPointsNoRotate(T,!1),V=C.plus(k.divide(2)),j=g.squaredDistanceTo(V);f||(_=_.plus(new t.Point(1,1))),h.isRightMost&&this.wrapHorizontal&&(_.x+=.75),h.isBottomMost&&this.wrapVertical&&(_.y+=.75),h.position=P,h.size=_,h.squaredDistance=j,h.visibility=w},_blendTile:function(h,f,m,g,w,x){var T=1e3*this.blendTime,P,C;if(h.blendStart||(h.blendStart=x),P=x-h.blendStart,C=T?Math.min(1,P/T):1,this.alwaysBlend&&(C*=w),h.opacity=C,this.lastDrawn.push(h),C===1)this._setCoverage(this.coverage,g,f,m,!0),this._hasOpaqueTile=!0;else if(P<T)return!0;return!1},_compareTiles:function(h,f){return!h||f.visibility>h.visibility||f.visibility===h.visibility&&f.squaredDistance<h.squaredDistance?f:h},_drawTiles:function(h){if(!(this.opacity===0||h.length===0&&!this.placeholderFillStyle)){var f=h[0],m;f&&(m=this.opacity<1||this.compositeOperation&&this.compositeOperation!=="source-over"||!this._isBottomItem()&&this.source.hasTransparency(f.context2D,f.getUrl(),f.ajaxHeaders,f.postData));var g,w,x=this.viewport.getZoom(!0),T=this.viewportToImageZoom(x);h.length>1&&T>this.smoothTileEdgesMinZoom&&!this.iOSDevice&&this.getRotation(!0)%360===0&&t.supportsCanvas&&this.viewer.useCanvas&&(m=!0,g=f.getScaleForEdgeSmoothing(),w=f.getTranslationForEdgeSmoothing(g,this._drawer.getCanvasSize(!1),this._drawer.getCanvasSize(!0)));var P;m&&(g||(P=this.viewport.viewportToViewerElementRectangle(this.getClippedBounds(!0)).getIntegerBoundingBox(),this._drawer.viewer.viewport.getFlip()&&(this.viewport.getRotation(!0)%360!==0||this.getRotation(!0)%360!==0)&&(P.x=this._drawer.viewer.container.clientWidth-(P.x+P.width)),P=P.times(t.pixelDensityRatio)),this._drawer._clear(!0,P)),g||(this.viewport.getRotation(!0)%360!==0&&this._drawer._offsetForRotation({degrees:this.viewport.getRotation(!0),useSketch:m}),this.getRotation(!0)%360!==0&&this._drawer._offsetForRotation({degrees:this.getRotation(!0),point:this.viewport.pixelFromPointNoRotate(this._getRotationPoint(!0),!0),useSketch:m}),this.viewport.getRotation(!0)%360===0&&this.getRotation(!0)%360===0&&this._drawer.viewer.viewport.getFlip()&&this._drawer._flip());var C=!1;if(this._clip){this._drawer.saveContext(m);var _=this.imageToViewportRectangle(this._clip,!0);_=_.rotate(-this.getRotation(!0),this._getRotationPoint(!0));var k=this._drawer.viewportToDrawerRectangle(_);g&&(k=k.times(g)),w&&(k=k.translate(w)),this._drawer.setClip(k,m),C=!0}if(this._croppingPolygons){var V=this;this._drawer.saveContext(m);try{var j=this._croppingPolygons.map(function(_e){return _e.map(function(fe){var de=V.imageToViewportCoordinates(fe.x,fe.y,!0).rotate(-V.getRotation(!0),V._getRotationPoint(!0)),ve=V._drawer.viewportCoordToDrawerCoord(de);return g&&(ve=ve.times(g)),w&&(ve=ve.plus(w)),ve})});this._drawer.clipWithPolygons(j,m)}catch(_e){t.console.error(_e)}C=!0}if(this.placeholderFillStyle&&this._hasOpaqueTile===!1){var Z=this._drawer.viewportToDrawerRectangle(this.getBounds(!0));g&&(Z=Z.times(g)),w&&(Z=Z.translate(w));var B=null;typeof this.placeholderFillStyle=="function"?B=this.placeholderFillStyle(this,this._drawer.context):B=this.placeholderFillStyle,this._drawer.drawRectangle(Z,B,m)}var Y=d(this.subPixelRoundingForTransparency),ie=!1;if(Y===t.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS)ie=!0;else if(Y===t.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST){var ae=this.viewer&&this.viewer.isAnimating();ie=!ae}for(var le=h.length-1;le>=0;le--)f=h[le],this._drawer.drawTile(f,this._drawingHandler,m,g,w,ie,this.source),f.beingDrawn=!0,this.viewer&&this.viewer.raiseEvent("tile-drawn",{tiledImage:this,tile:f});C&&this._drawer.restoreContext(m),g||(this.getRotation(!0)%360!==0&&this._drawer._restoreRotationChanges(m),this.viewport.getRotation(!0)%360!==0&&this._drawer._restoreRotationChanges(m)),m&&(g&&(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:g,translate:w,compositeOperation:this.compositeOperation,bounds:P}),g&&(this.getRotation(!0)%360!==0&&this._drawer._restoreRotationChanges(!1),this.viewport.getRotation(!0)%360!==0&&this._drawer._restoreRotationChanges(!1))),g||this.viewport.getRotation(!0)%360===0&&this.getRotation(!0)%360===0&&this._drawer.viewer.viewport.getFlip()&&this._drawer._flip(),this._drawDebugInfo(h)}},_drawDebugInfo:function(h){if(this.debugMode)for(var f=h.length-1;f>=0;f--){var m=h[f];try{this._drawer.drawDebugInfo(m,h.length,f,this)}catch(g){t.console.error(g)}}},_providesCoverage:function(h,f,m,g){var w,x,T,P;if(!h[f])return!1;if(m===void 0||g===void 0){w=h[f];for(T in w)if(Object.prototype.hasOwnProperty.call(w,T)){x=w[T];for(P in x)if(Object.prototype.hasOwnProperty.call(x,P)&&!x[P])return!1}return!0}return h[f][m]===void 0||h[f][m][g]===void 0||h[f][m][g]===!0},_isCovered:function(h,f,m,g){return m===void 0||g===void 0?this._providesCoverage(h,f+1):this._providesCoverage(h,f+1,2*m,2*g)&&this._providesCoverage(h,f+1,2*m,2*g+1)&&this._providesCoverage(h,f+1,2*m+1,2*g)&&this._providesCoverage(h,f+1,2*m+1,2*g+1)},_setCoverage:function(h,f,m,g,w){if(!h[f]){t.console.warn("Setting coverage for a tile before its level's coverage has been reset: %s",f);return}h[f][m]||(h[f][m]={}),h[f][m][g]=w},_resetCoverage:function(h,f){h[f]={}}});var r=t.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER;function o(h){return h!==t.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS&&h!==t.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST&&h!==t.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER}function l(h){return o(h)?r:h}function d(h){if(typeof h=="number")return l(h);if(!h||!t.Browser)return r;var f=h[t.Browser.vendor];return o(f)&&(f=h["*"]),l(f)}}(n),function(t){var r=function(l){t.console.assert(l,"[TileCache.cacheTile] options is required"),t.console.assert(l.tile,"[TileCache.cacheTile] options.tile is required"),t.console.assert(l.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=l.tile,this.tiledImage=l.tiledImage},o=function(l){t.console.assert(l,"[ImageRecord] options is required"),t.console.assert(l.data,"[ImageRecord] options.data is required"),this._tiles=[],l.create.apply(null,[this,l.data,l.ownerTile]),this._destroyImplementation=l.destroy.bind(null,this),this.getImage=l.getImage.bind(null,this),this.getData=l.getData.bind(null,this),this.getRenderedContext=l.getRenderedContext.bind(null,this)};o.prototype={destroy:function(){this._destroyImplementation(),this._tiles=null},addTile:function(l){t.console.assert(l,"[ImageRecord.addTile] tile is required"),this._tiles.push(l)},removeTile:function(l){for(var d=0;d<this._tiles.length;d++)if(this._tiles[d]===l){this._tiles.splice(d,1);return}t.console.warn("[ImageRecord.removeTile] trying to remove unknown tile",l)},getTileCount:function(){return this._tiles.length}},t.TileCache=function(l){l=l||{},this._maxImageCacheCount=l.maxImageCacheCount||t.DEFAULT_SETTINGS.maxImageCacheCount,this._tilesLoaded=[],this._imagesLoaded=[],this._imagesLoadedCount=0},t.TileCache.prototype={numTilesLoaded:function(){return this._tilesLoaded.length},cacheTile:function(l){t.console.assert(l,"[TileCache.cacheTile] options is required"),t.console.assert(l.tile,"[TileCache.cacheTile] options.tile is required"),t.console.assert(l.tile.cacheKey,"[TileCache.cacheTile] options.tile.cacheKey is required"),t.console.assert(l.tiledImage,"[TileCache.cacheTile] options.tiledImage is required");var d=l.cutoff||0,h=this._tilesLoaded.length,f=this._imagesLoaded[l.tile.cacheKey];if(f||(l.data||(t.console.error("[TileCache.cacheTile] options.image was renamed to options.data. '.image' attribute has been deprecated and will be removed in the future."),l.data=l.image),t.console.assert(l.data,"[TileCache.cacheTile] options.data is required to create an ImageRecord"),f=this._imagesLoaded[l.tile.cacheKey]=new o({data:l.data,ownerTile:l.tile,create:l.tiledImage.source.createTileCache,destroy:l.tiledImage.source.destroyTileCache,getImage:l.tiledImage.source.getTileCacheDataAsImage,getData:l.tiledImage.source.getTileCacheData,getRenderedContext:l.tiledImage.source.getTileCacheDataAsContext2D}),this._imagesLoadedCount++),f.addTile(l.tile),l.tile.cacheImageRecord=f,this._imagesLoadedCount>this._maxImageCacheCount){for(var m=null,g=-1,w=null,x,T,P,C,_,k,V=this._tilesLoaded.length-1;V>=0;V--)if(k=this._tilesLoaded[V],x=k.tile,!(x.level<=d||x.beingDrawn)){if(!m){m=x,g=V,w=k;continue}C=x.lastTouchTime,T=m.lastTouchTime,_=x.level,P=m.level,(C<T||C===T&&_>P)&&(m=x,g=V,w=k)}m&&g>=0&&(this._unloadTile(w),h=g)}this._tilesLoaded[h]=new r({tile:l.tile,tiledImage:l.tiledImage})},clearTilesFor:function(l){t.console.assert(l,"[TileCache.clearTilesFor] tiledImage is required");for(var d,h=0;h<this._tilesLoaded.length;++h)d=this._tilesLoaded[h],d.tiledImage===l&&(this._unloadTile(d),this._tilesLoaded.splice(h,1),h--)},getImageRecord:function(l){return t.console.assert(l,"[TileCache.getImageRecord] cacheKey is required"),this._imagesLoaded[l]},_unloadTile:function(l){t.console.assert(l,"[TileCache._unloadTile] tileRecord is required");var d=l.tile,h=l.tiledImage;d.unload(),d.cacheImageRecord=null;var f=this._imagesLoaded[d.cacheKey];f.removeTile(d),f.getTileCount()||(f.destroy(),delete this._imagesLoaded[d.cacheKey],this._imagesLoadedCount--),h.viewer.raiseEvent("tile-unloaded",{tile:d,tiledImage:h})}}}(n),function(t){t.World=function(r){var o=this;t.console.assert(r.viewer,"[World] options.viewer is required"),t.EventSource.call(this),this.viewer=r.viewer,this._items=[],this._needsDraw=!1,this._autoRefigureSizes=!0,this._needsSizesFigured=!1,this._delegatedFigureSizes=function(l){o._autoRefigureSizes?o._figureSizes():o._needsSizesFigured=!0},this._figureSizes()},t.extend(t.World.prototype,t.EventSource.prototype,{addItem:function(r,o){if(t.console.assert(r,"[World.addItem] item is required"),t.console.assert(r instanceof t.TiledImage,"[World.addItem] only TiledImages supported at this time"),o=o||{},o.index!==void 0){var l=Math.max(0,Math.min(this._items.length,o.index));this._items.splice(l,0,r)}else this._items.push(r);this._autoRefigureSizes?this._figureSizes():this._needsSizesFigured=!0,this._needsDraw=!0,r.addHandler("bounds-change",this._delegatedFigureSizes),r.addHandler("clip-change",this._delegatedFigureSizes),this.raiseEvent("add-item",{item:r})},getItemAt:function(r){return t.console.assert(r!==void 0,"[World.getItemAt] index is required"),this._items[r]},getIndexOfItem:function(r){return t.console.assert(r,"[World.getIndexOfItem] item is required"),t.indexOf(this._items,r)},getItemCount:function(){return this._items.length},setItemIndex:function(r,o){t.console.assert(r,"[World.setItemIndex] item is required"),t.console.assert(o!==void 0,"[World.setItemIndex] index is required");var l=this.getIndexOfItem(r);if(o>=this._items.length)throw new Error("Index bigger than number of layers.");o===l||l===-1||(this._items.splice(l,1),this._items.splice(o,0,r),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:r,previousIndex:l,newIndex:o}))},removeItem:function(r){t.console.assert(r,"[World.removeItem] item is required");var o=t.indexOf(this._items,r);o!==-1&&(r.removeHandler("bounds-change",this._delegatedFigureSizes),r.removeHandler("clip-change",this._delegatedFigureSizes),r.destroy(),this._items.splice(o,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(r))},removeAll:function(){this.viewer._cancelPendingImages();var r,o;for(o=0;o<this._items.length;o++)r=this._items[o],r.removeHandler("bounds-change",this._delegatedFigureSizes),r.removeHandler("clip-change",this._delegatedFigureSizes),r.destroy();var l=this._items;for(this._items=[],this._figureSizes(),this._needsDraw=!0,o=0;o<l.length;o++)r=l[o],this._raiseRemoveItem(r)},resetItems:function(){for(var r=0;r<this._items.length;r++)this._items[r].reset()},update:function(){for(var r=!1,o=0;o<this._items.length;o++)r=this._items[o].update()||r;return r},draw:function(){for(var r=0;r<this._items.length;r++)this._items[r].draw();this._needsDraw=!1},needsDraw:function(){for(var r=0;r<this._items.length;r++)if(this._items[r].needsDraw())return!0;return this._needsDraw},getHomeBounds:function(){return this._homeBounds.clone()},getContentFactor:function(){return this._contentFactor},setAutoRefigureSizes:function(r){this._autoRefigureSizes=r,r&this._needsSizesFigured&&(this._figureSizes(),this._needsSizesFigured=!1)},arrange:function(r){r=r||{};var o=r.immediately||!1,l=r.layout||t.DEFAULT_SETTINGS.collectionLayout,d=r.rows||t.DEFAULT_SETTINGS.collectionRows,h=r.columns||t.DEFAULT_SETTINGS.collectionColumns,f=r.tileSize||t.DEFAULT_SETTINGS.collectionTileSize,m=r.tileMargin||t.DEFAULT_SETTINGS.collectionTileMargin,g=f+m,w;!r.rows&&h?w=h:w=Math.ceil(this._items.length/d);var x=0,T=0,P,C,_,k,V;this.setAutoRefigureSizes(!1);for(var j=0;j<this._items.length;j++)j&&j%w===0&&(l==="horizontal"?(T+=g,x=0):(x+=g,T=0)),P=this._items[j],C=P.getBounds(),C.width>C.height?_=f:_=f*(C.width/C.height),k=_*(C.height/C.width),V=new t.Point(x+(f-_)/2,T+(f-k)/2),P.setPosition(V,o),P.setWidth(_,o),l==="horizontal"?x+=g:T+=g;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var r=this._homeBounds?this._homeBounds.clone():null,o=this._contentSize?this._contentSize.clone():null,l=this._contentFactor||0;if(!this._items.length)this._homeBounds=new t.Rect(0,0,1,1),this._contentSize=new t.Point(1,1),this._contentFactor=1;else{var d=this._items[0],h=d.getBounds();this._contentFactor=d.getContentSize().x/h.width;for(var f=d.getClippedBounds().getBoundingBox(),m=f.x,g=f.y,w=f.x+f.width,x=f.y+f.height,T=1;T<this._items.length;T++)d=this._items[T],h=d.getBounds(),this._contentFactor=Math.max(this._contentFactor,d.getContentSize().x/h.width),f=d.getClippedBounds().getBoundingBox(),m=Math.min(m,f.x),g=Math.min(g,f.y),w=Math.max(w,f.x+f.width),x=Math.max(x,f.y+f.height);this._homeBounds=new t.Rect(m,g,w-m,x-g),this._contentSize=new t.Point(this._homeBounds.width*this._contentFactor,this._homeBounds.height*this._contentFactor)}(this._contentFactor!==l||!this._homeBounds.equals(r)||!this._contentSize.equals(o))&&this.raiseEvent("metrics-change",{})},_raiseRemoveItem:function(r){this.raiseEvent("remove-item",{item:r})}})}(n)})(lw);var gI=lw.exports;const gd=hi(gI);function uw(e){return JSON.parse(JSON.stringify(e))}const cw={middle:!1,top:!1,"left-middle":!1,"right-middle":!1,bottom:!1,"left-top":!1,"right-top":!1,"left-bottom":!1,"right-bottom":!1},vI=["tall","extra-tall","wide","full"];function yI(e){return bI(e,[[".",".","."],[".",".","."],[".",".","."]],wI)}function wI(e,n,t,r){switch(e){case"top":n[0][1]=r.id,t==="wide"&&(n[0][2]=r.id),t==="full"&&(n[0][0]=r.id,n[0][2]=r.id);break;case"left-middle":n[1][0]=r.id,t==="tall"?n[2][0]=r.id:t==="wide"&&(n[1][1]=r.id,n[1][2]=r.id);break;case"right-middle":n[1][2]=r.id,t==="tall"&&(n[2][2]=r.id);break;case"bottom":n[2][1]=r.id,t==="wide"&&(n[2][2]=r.id),t==="full"&&(n[2][0]=r.id,n[2][2]=r.id);break;case"left-top":n[0][0]=r.id,t==="tall"?n[1][0]=r.id:t==="wide"&&(n[0][1]=r.id,n[0][2]=r.id);break;case"right-top":n[0][2]=r.id,t==="tall"&&(n[1][2]=r.id);break;case"left-bottom":n[2][0]=r.id,t==="wide"&&(n[2][1]=r.id,n[2][2]=r.id);break;case"right-bottom":n[2][2]=r.id;break;default:n[1][1]=r.id,n[1][2]=r.id,t==="full"&&(n[1][0]=r.id)}}function bI(e,n,t){const r=document.createElement("div");r.innerHTML=e;let o;r.getElementsByTagName("tei-surface").length>0?o=[r.getElementsByTagName("tei-surface")[0]]:o=r.getElementsByTagName("tei-body")[0].children;const l=function(T){const P=T.getAttribute("rend");return Object.keys(cw).includes(P)?P:"middle"};function d(x){const T=x.getAttribute("style");return vI.includes(T)?T:null}const h=[];let f="",m=0,g=0;try{for(const x of o){const T=uw(n),P=uw(cw),C=x.id,_=x.children,k=x.getAttribute("facs");for(const V of _){const j=l(V),Z=d(V);V.setAttribute("data-entry-id",C),P[j]?(V.id=P[j][0].id,P[j].push(V)):(m++,V.id=`z${m}`,P[j]=[V]),t(j,T,Z,V)}for(const V of Object.values(P))V&&(f=f.concat(xI(V,k)));h[g]=vd(T[0],h[g]),h[g+1]=vd(T[1],h[g+1]),h[g+2]=vd(T[2],h[g+2]),g+=1}}catch(x){console.log(x)}const w=EI(h);return{html:f,layout:w}}function EI(e){const n=[...e];e[0]&&e[0][0]==="."&&e[0][1]==="."&&n.shift();let t="";for(const r of n){const o=r.join(" ");t+=` '${o}'`}return t}function xI(e,n){const t=e[0],r=t.id,o=t.attributes["data-entry-id"].value;let l="";for(let h=0;h<t.classList.length;h++)l=`${l} ${t.classList.item(h)}`;let d=`<div id="${r}" className="${l}" data-entry-id="${o}" data-facs="${n||""}">`;for(const h of e)h.getAttribute("facs")&&h.setAttribute("data-facs",h.getAttribute("facs")),h.setAttribute("className","block"),h.name==="div"?d=d.concat(`${h.innerHTML} <br/>`):d=d.concat(`${h.outerHTML}`);return d.concat("</div>")}function vd(e,n){if(n){const t=[];for(let r=0;r<4;r++)e[r]!=="."?t[r]=e[r]:t[r]=n[r];return t}return e}async function SI(e){if(e.loading)return e;e.loading=!0;const n={...e},t=Object.keys(n.annotationURLs),r=Object.fromEntries(t.map(l=>[l,!1]));if(n.image_zoom_url.endsWith(".json")){const d=await(await fetch(n.image_zoom_url)).json();n.tileSource=new gd.IIIFTileSource(d)}else n.tileSource=new gd.ImageTileSource({type:"image",url:n.image_zoom_url});if(t.length>0){for await(const l of t){const{htmlURL:d,xmlURL:h}=n.annotationURLs[l];n.transcription||(n.transcription={}),n.transcription[l]={};try{const f=await fetch(d),m=await fetch(h),g=await f.text(),w=await m.text(),x=TI(g,w);if(x)n.transcription[l]=x,n.loading=!1,r[l]=!0;else throw new Error(`Unable to load transcription: ${d}`)}catch(f){throw e.loading=!1,f}}if(Object.values(r).filter(l=>!l).length===0)return n}return n.loading=!1,n}function TI(e,n){return{...yI(e),xml:n}}const hw=e=>e.document,_I=e=>e.glossary;function*CI(e){const{pathname:n}=e.payload.params[0],t=n.split("/");if(t.length>1)switch(t[1]){case"ec":{yield PI(),yield OI(),yield RI(t);break}}}function*PI(){const e=yield sd(hw);if(!e.loaded){if(e.variorum){const r={};for(const l of Object.keys(e.manifestURL)){const d=yield fetch(e.manifestURL[l]);r[l]=yield d.json()}const o={type:"variorum",documentData:r};return yield bl("DocumentActions.loadDocument",o),o}const t=yield(yield fetch(e.manifestURL)).json();return yield bl("DocumentActions.loadDocument",t),t}return null}function*RI(e){const n=yield sd(hw);if(n.loaded){let t,r,o;e.length>2&&(t=e[2],e.length>4&&(r=e[4],e.length>6&&(o=e[6])));const l=[];l.push(t),r&&r!==t&&l.push(r),o&&o!==t&&o!==r&&l.push(o);for(const d of l){const h=n.folioIndex[d];if(h&&!h.loading){const f=yield SI(h);yield bl("DocumentActions.loadFolio",f)}}}}function*OI(){const e=yield sd(_I);if(!e.loaded&&e.URL){const t=yield(yield fetch(e.URL)).json();yield bl("GlossaryActions.loadGlossary",t)}}function*kI(){yield iw("RouteListenerSaga.userNavigatation",CI)}function*AI(){yield gD([kI()])}function DI(e){const n=eI(),t=my(mI(e),window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__(),MA(n));return n.run(AI),t}function yd(e,n,...t){e.dispatch({type:n,payload:{params:t,dispatcher:{dispatch:e.dispatch}}})}function*bl(e,...n){return yield mD({type:e,payload:{params:n}})}function II(e,n,t){const r=t.payload&&t.payload.params?t.payload.params:[];return n(e,...r,t.payload.dispatcher)}function MI(e,n){const t=e.split(".");return n[t[1]]}function wd(e,n,t){const r=[];for(const l of Object.keys(n))r.push(`${e}.${l}`);function o(l=t,d,h=r,f=n){return h.includes(d.type)?II(l,MI(d.type,f),d):{...l}}return o}function gi(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"Material-UI: capitalize(string) expects a string argument.":Do(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Ya(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return n.reduce(function(r,o){return o==null?r:(process.env.NODE_ENV!=="production"&&typeof o!="function"&&console.error("Material-UI: Invalid Argument Type, must only provide functions, undefined, or null."),function(){for(var d=arguments.length,h=new Array(d),f=0;f<d;f++)h[f]=arguments[f];r.apply(this,h),o.apply(this,h)})},function(){})}var NI=function(n){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:n.typography.pxToRem(24),transition:n.transitions.create("fill",{duration:n.transitions.duration.shorter})},colorPrimary:{color:n.palette.primary.main},colorSecondary:{color:n.palette.secondary.main},colorAction:{color:n.palette.action.active},colorError:{color:n.palette.error.main},colorDisabled:{color:n.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:n.typography.pxToRem(20)},fontSizeLarge:{fontSize:n.typography.pxToRem(35)}}},bd=G.forwardRef(function(n,t){var r=n.children,o=n.classes,l=n.className,d=n.color,h=d===void 0?"inherit":d,f=n.component,m=f===void 0?"svg":f,g=n.fontSize,w=g===void 0?"medium":g,x=n.htmlColor,T=n.titleAccess,P=n.viewBox,C=P===void 0?"0 0 24 24":P,_=zt(n,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return G.createElement(m,Me({className:Sn(o.root,l,h!=="inherit"&&o["color".concat(gi(h))],w!=="default"&&w!=="medium"&&o["fontSize".concat(gi(w))]),focusable:"false",viewBox:C,color:x,"aria-hidden":T?void 0:!0,role:T?"img":void 0,ref:t},_),r,T?G.createElement("title",null,T):null)});process.env.NODE_ENV!=="production"&&(bd.propTypes={children:R.node,classes:R.object,className:R.string,color:R.oneOf(["action","disabled","error","inherit","primary","secondary"]),component:R.elementType,fontSize:di(R.oneOf(["default","inherit","large","medium","small"]),function(e){var n=e.fontSize;if(n==="default")throw new Error('Material-UI: `fontSize="default"` is deprecated. Use `fontSize="medium"` instead.');return null}),htmlColor:R.string,shapeRendering:R.string,titleAccess:R.string,viewBox:R.string}),bd.muiName="SvgIcon";const dw=qn(NI,{name:"MuiSvgIcon"})(bd);function LI(e,n){var t=function(o,l){return Te.createElement(dw,Me({ref:l},o),e)};return process.env.NODE_ENV!=="production"&&(t.displayName="".concat(n,"Icon")),t.muiName=dw.muiName,Te.memo(Te.forwardRef(t))}function fw(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:166,t;function r(){for(var o=arguments.length,l=new Array(o),d=0;d<o;d++)l[d]=arguments[d];var h=this,f=function(){e.apply(h,l)};clearTimeout(t),t=setTimeout(f,n)}return r.clear=function(){clearTimeout(t)},r}function Bn(e,n){return process.env.NODE_ENV==="production"?function(){return null}:function(t,r,o,l,d){var h=o||"<<anonymous>>",f=d||r;return typeof t[r]<"u"?new Error("The ".concat(l," `").concat(f,"` of ")+"`".concat(h,"` is deprecated. ").concat(n)):null}}function pw(e,n){return G.isValidElement(e)&&n.indexOf(e.type.muiName)!==-1}function vi(e){return e&&e.ownerDocument||document}function mw(e){var n=vi(e);return n.defaultView||window}function Wo(e,n){typeof e=="function"?e(n):e&&(e.current=n)}function FI(e){var n=e.controlled,t=e.default,r=e.name,o=e.state,l=o===void 0?"value":o,d=G.useRef(n!==void 0),h=d.current,f=G.useState(t),m=f[0],g=f[1],w=h?n:m;if(process.env.NODE_ENV!=="production"){G.useEffect(function(){h!==(n!==void 0)&&console.error(["Material-UI: A component is changing the ".concat(h?"":"un","controlled ").concat(l," state of ").concat(r," to be ").concat(h?"un":"","controlled."),"Elements should not switch from uncontrolled to controlled (or vice versa).","Decide between using a controlled or uncontrolled ".concat(r," ")+"element for the lifetime of the component.","The nature of the state is determined during the first render, it's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
227
|
-
`))},[n]);var x=G.useRef(t),T=x.current;G.useEffect(function(){!h&&T!==t&&console.error(["Material-UI: A component is changing the default ".concat(l," state of an uncontrolled ").concat(r," after being initialized. ")+"To suppress this warning opt to use a controlled ".concat(r,".")].join(`
|
|
228
|
-
`))},[JSON.stringify(t)])}var P=G.useCallback(function(C){h||g(C)},[]);return[w,P]}var BI=typeof window<"u"?G.useLayoutEffect:G.useEffect;function so(e){var n=G.useRef(e);return BI(function(){n.current=e}),G.useCallback(function(){return n.current.apply(void 0,arguments)},[])}function Un(e,n){return G.useMemo(function(){return e==null&&n==null?null:function(t){Wo(e,t),Wo(n,t)}},[e,n])}var El=!0,Ed=!1,gw=null,jI={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 HI(e){var n=e.type,t=e.tagName;return!!(t==="INPUT"&&jI[n]&&!e.readOnly||t==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function zI(e){e.metaKey||e.altKey||e.ctrlKey||(El=!0)}function xd(){El=!1}function VI(){this.visibilityState==="hidden"&&Ed&&(El=!0)}function UI(e){e.addEventListener("keydown",zI,!0),e.addEventListener("mousedown",xd,!0),e.addEventListener("pointerdown",xd,!0),e.addEventListener("touchstart",xd,!0),e.addEventListener("visibilitychange",VI,!0)}function vw(e){var n=e.target;try{return n.matches(":focus-visible")}catch{}return El||HI(n)}function WI(){Ed=!0,window.clearTimeout(gw),gw=window.setTimeout(function(){Ed=!1},100)}function GI(){var e=G.useCallback(function(n){var t=Kr.findDOMNode(n);t!=null&&UI(t.ownerDocument)},[]);return process.env.NODE_ENV!=="production"&&G.useDebugValue(vw),{isFocusVisible:vw,onBlurVisible:WI,ref:e}}const yw={disabled:!1};var qI=process.env.NODE_ENV!=="production"?R.oneOfType([R.number,R.shape({enter:R.number,exit:R.number,appear:R.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&R.oneOfType([R.string,R.shape({enter:R.string,exit:R.string,active:R.string}),R.shape({enter:R.string,enterDone:R.string,enterActive:R.string,exit:R.string,exitDone:R.string,exitActive:R.string})]);const xl=Te.createContext(null);var YI=function(n){return n.scrollTop},Xa="unmounted",lo="exited",uo="entering",Go="entered",Sd="exiting",Qr=function(e){Zs(n,e);function n(r,o){var l;l=e.call(this,r,o)||this;var d=o,h=d&&!d.isMounting?r.enter:r.appear,f;return l.appearStatus=null,r.in?h?(f=lo,l.appearStatus=uo):f=Go:r.unmountOnExit||r.mountOnEnter?f=Xa:f=lo,l.state={status:f},l.nextCallback=null,l}n.getDerivedStateFromProps=function(o,l){var d=o.in;return d&&l.status===Xa?{status:lo}:null};var t=n.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(o){var l=null;if(o!==this.props){var d=this.state.status;this.props.in?d!==uo&&d!==Go&&(l=uo):(d===uo||d===Go)&&(l=Sd)}this.updateStatus(!1,l)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var o=this.props.timeout,l,d,h;return l=d=h=o,o!=null&&typeof o!="number"&&(l=o.exit,d=o.enter,h=o.appear!==void 0?o.appear:d),{exit:l,enter:d,appear:h}},t.updateStatus=function(o,l){if(o===void 0&&(o=!1),l!==null)if(this.cancelNextCallback(),l===uo){if(this.props.unmountOnExit||this.props.mountOnEnter){var d=this.props.nodeRef?this.props.nodeRef.current:zn.findDOMNode(this);d&&YI(d)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===lo&&this.setState({status:Xa})},t.performEnter=function(o){var l=this,d=this.props.enter,h=this.context?this.context.isMounting:o,f=this.props.nodeRef?[h]:[zn.findDOMNode(this),h],m=f[0],g=f[1],w=this.getTimeouts(),x=h?w.appear:w.enter;if(!o&&!d||yw.disabled){this.safeSetState({status:Go},function(){l.props.onEntered(m)});return}this.props.onEnter(m,g),this.safeSetState({status:uo},function(){l.props.onEntering(m,g),l.onTransitionEnd(x,function(){l.safeSetState({status:Go},function(){l.props.onEntered(m,g)})})})},t.performExit=function(){var o=this,l=this.props.exit,d=this.getTimeouts(),h=this.props.nodeRef?void 0:zn.findDOMNode(this);if(!l||yw.disabled){this.safeSetState({status:lo},function(){o.props.onExited(h)});return}this.props.onExit(h),this.safeSetState({status:Sd},function(){o.props.onExiting(h),o.onTransitionEnd(d.exit,function(){o.safeSetState({status:lo},function(){o.props.onExited(h)})})})},t.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(o,l){l=this.setNextCallback(l),this.setState(o,l)},t.setNextCallback=function(o){var l=this,d=!0;return this.nextCallback=function(h){d&&(d=!1,l.nextCallback=null,o(h))},this.nextCallback.cancel=function(){d=!1},this.nextCallback},t.onTransitionEnd=function(o,l){this.setNextCallback(l);var d=this.props.nodeRef?this.props.nodeRef.current:zn.findDOMNode(this),h=o==null&&!this.props.addEndListener;if(!d||h){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var f=this.props.nodeRef?[this.nextCallback]:[d,this.nextCallback],m=f[0],g=f[1];this.props.addEndListener(m,g)}o!=null&&setTimeout(this.nextCallback,o)},t.render=function(){var o=this.state.status;if(o===Xa)return null;var l=this.props,d=l.children;l.in,l.mountOnEnter,l.unmountOnExit,l.appear,l.enter,l.exit,l.timeout,l.addEndListener,l.onEnter,l.onEntering,l.onEntered,l.onExit,l.onExiting,l.onExited,l.nodeRef;var h=Ji(l,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Te.createElement(xl.Provider,{value:null},typeof d=="function"?d(o,h):Te.cloneElement(Te.Children.only(d),h))},n}(Te.Component);Qr.contextType=xl,Qr.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:R.shape({current:typeof Element>"u"?R.any:function(e,n,t,r,o,l){var d=e[n];return R.instanceOf(d&&"ownerDocument"in d?d.ownerDocument.defaultView.Element:Element)(e,n,t,r,o,l)}}),children:R.oneOfType([R.func.isRequired,R.element.isRequired]).isRequired,in:R.bool,mountOnEnter:R.bool,unmountOnExit:R.bool,appear:R.bool,enter:R.bool,exit:R.bool,timeout:function(n){var t=qI;n.addEndListener||(t=t.isRequired);for(var r=arguments.length,o=new Array(r>1?r-1:0),l=1;l<r;l++)o[l-1]=arguments[l];return t.apply(void 0,[n].concat(o))},addEndListener:R.func,onEnter:R.func,onEntering:R.func,onEntered:R.func,onExit:R.func,onExiting:R.func,onExited:R.func}:{};function qo(){}Qr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:qo,onEntering:qo,onEntered:qo,onExit:qo,onExiting:qo,onExited:qo},Qr.UNMOUNTED=Xa,Qr.EXITED=lo,Qr.ENTERING=uo,Qr.ENTERED=Go,Qr.EXITING=Sd;function Td(e,n){var t=function(l){return n&&Te.isValidElement(l)?n(l):l},r=Object.create(null);return e&&Te.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=t(o)}),r}function XI(e,n){e=e||{},n=n||{};function t(g){return g in n?n[g]:e[g]}var r=Object.create(null),o=[];for(var l in e)l in n?o.length&&(r[l]=o,o=[]):o.push(l);var d,h={};for(var f in n){if(r[f])for(d=0;d<r[f].length;d++){var m=r[f][d];h[r[f][d]]=t(m)}h[f]=t(f)}for(d=0;d<o.length;d++)h[o[d]]=t(o[d]);return h}function co(e,n,t){return t[n]!=null?t[n]:e.props[n]}function ZI(e,n){return Td(e.children,function(t){return Te.cloneElement(t,{onExited:n.bind(null,t),in:!0,appear:co(t,"appear",e),enter:co(t,"enter",e),exit:co(t,"exit",e)})})}function KI(e,n,t){var r=Td(e.children),o=XI(n,r);return Object.keys(o).forEach(function(l){var d=o[l];if(Te.isValidElement(d)){var h=l in n,f=l in r,m=n[l],g=Te.isValidElement(m)&&!m.props.in;f&&(!h||g)?o[l]=Te.cloneElement(d,{onExited:t.bind(null,d),in:!0,exit:co(d,"exit",e),enter:co(d,"enter",e)}):!f&&h&&!g?o[l]=Te.cloneElement(d,{in:!1}):f&&h&&Te.isValidElement(m)&&(o[l]=Te.cloneElement(d,{onExited:t.bind(null,d),in:m.props.in,exit:co(d,"exit",e),enter:co(d,"enter",e)}))}}),o}var JI=Object.values||function(e){return Object.keys(e).map(function(n){return e[n]})},QI={component:"div",childFactory:function(n){return n}},_d=function(e){Zs(n,e);function n(r,o){var l;l=e.call(this,r,o)||this;var d=l.handleExited.bind($c(l));return l.state={contextValue:{isMounting:!0},handleExited:d,firstRender:!0},l}var t=n.prototype;return t.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},t.componentWillUnmount=function(){this.mounted=!1},n.getDerivedStateFromProps=function(o,l){var d=l.children,h=l.handleExited,f=l.firstRender;return{children:f?ZI(o,h):KI(o,d,h),firstRender:!1}},t.handleExited=function(o,l){var d=Td(this.props.children);o.key in d||(o.props.onExited&&o.props.onExited(l),this.mounted&&this.setState(function(h){var f=Me({},h.children);return delete f[o.key],{children:f}}))},t.render=function(){var o=this.props,l=o.component,d=o.childFactory,h=Ji(o,["component","childFactory"]),f=this.state.contextValue,m=JI(this.state.children).map(d);return delete h.appear,delete h.enter,delete h.exit,l===null?Te.createElement(xl.Provider,{value:f},m):Te.createElement(xl.Provider,{value:f},Te.createElement(l,h,m))},n}(Te.Component);_d.propTypes=process.env.NODE_ENV!=="production"?{component:R.any,children:R.node,appear:R.bool,enter:R.bool,exit:R.bool,childFactory:R.func}:{},_d.defaultProps=QI;var ww=function(n){return n.scrollTop};function Sl(e,n){var t=e.timeout,r=e.style,o=r===void 0?{}:r;return{duration:o.transitionDuration||typeof t=="number"?t:t[n.mode]||0,delay:o.transitionDelay}}var $I=function(n){var t={};return n.shadows.forEach(function(r,o){t["elevation".concat(o)]={boxShadow:r}}),Me({root:{backgroundColor:n.palette.background.paper,color:n.palette.text.primary,transition:n.transitions.create("box-shadow")},rounded:{borderRadius:n.shape.borderRadius},outlined:{border:"1px solid ".concat(n.palette.divider)}},t)},bw=G.forwardRef(function(n,t){var r=n.classes,o=n.className,l=n.component,d=l===void 0?"div":l,h=n.square,f=h===void 0?!1:h,m=n.elevation,g=m===void 0?1:m,w=n.variant,x=w===void 0?"elevation":w,T=zt(n,["classes","className","component","square","elevation","variant"]);return G.createElement(d,Me({className:Sn(r.root,o,x==="outlined"?r.outlined:r["elevation".concat(g)],!f&&r.rounded),ref:t},T))});process.env.NODE_ENV!=="production"&&(bw.propTypes={children:R.node,classes:R.object,className:R.string,component:R.elementType,elevation:di(R.number,function(e){var n=e.classes,t=e.elevation;return n===void 0?null:t!=null&&n["elevation".concat(t)]===void 0?new Error("Material-UI: This elevation `".concat(t,"` is not implemented.")):null}),square:R.bool,variant:R.oneOf(["elevation","outlined"])});const Cd=qn($I,{name:"MuiPaper"})(bw);var eM=typeof window>"u"?G.useEffect:G.useLayoutEffect;function Ew(e){var n=e.classes,t=e.pulsate,r=t===void 0?!1:t,o=e.rippleX,l=e.rippleY,d=e.rippleSize,h=e.in,f=e.onExited,m=f===void 0?function(){}:f,g=e.timeout,w=G.useState(!1),x=w[0],T=w[1],P=Sn(n.ripple,n.rippleVisible,r&&n.ripplePulsate),C={width:d,height:d,top:-(d/2)+l,left:-(d/2)+o},_=Sn(n.child,x&&n.childLeaving,r&&n.childPulsate),k=so(m);return eM(function(){if(!h){T(!0);var V=setTimeout(k,g);return function(){clearTimeout(V)}}},[k,h,g]),G.createElement("span",{className:P,style:C},G.createElement("span",{className:_}))}process.env.NODE_ENV!=="production"&&(Ew.propTypes={classes:R.object.isRequired,in:R.bool,onExited:R.func,pulsate:R.bool,rippleSize:R.number,rippleX:R.number,rippleY:R.number,timeout:R.number.isRequired});var Pd=550,tM=80,nM=function(n){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(Pd,"ms ").concat(n.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(n.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(Pd,"ms ").concat(n.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(n.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)"}}}},xw=G.forwardRef(function(n,t){var r=n.center,o=r===void 0?!1:r,l=n.classes,d=n.className,h=zt(n,["center","classes","className"]),f=G.useState([]),m=f[0],g=f[1],w=G.useRef(0),x=G.useRef(null);G.useEffect(function(){x.current&&(x.current(),x.current=null)},[m]);var T=G.useRef(!1),P=G.useRef(null),C=G.useRef(null),_=G.useRef(null);G.useEffect(function(){return function(){clearTimeout(P.current)}},[]);var k=G.useCallback(function(B){var Y=B.pulsate,ie=B.rippleX,ae=B.rippleY,le=B.rippleSize,_e=B.cb;g(function(fe){return[].concat(Zc(fe),[G.createElement(Ew,{key:w.current,classes:l,timeout:Pd,pulsate:Y,rippleX:ie,rippleY:ae,rippleSize:le})])}),w.current+=1,x.current=_e},[l]),V=G.useCallback(function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=arguments.length>2?arguments[2]:void 0,ae=Y.pulsate,le=ae===void 0?!1:ae,_e=Y.center,fe=_e===void 0?o||Y.pulsate:_e,de=Y.fakeElement,ve=de===void 0?!1:de;if(B.type==="mousedown"&&T.current){T.current=!1;return}B.type==="touchstart"&&(T.current=!0);var Ae=ve?null:_.current,ke=Ae?Ae.getBoundingClientRect():{width:0,height:0,left:0,top:0},me,be,Ee;if(fe||B.clientX===0&&B.clientY===0||!B.clientX&&!B.touches)me=Math.round(ke.width/2),be=Math.round(ke.height/2);else{var Oe=B.touches?B.touches[0]:B,F=Oe.clientX,we=Oe.clientY;me=Math.round(F-ke.left),be=Math.round(we-ke.top)}if(fe)Ee=Math.sqrt((2*Math.pow(ke.width,2)+Math.pow(ke.height,2))/3),Ee%2===0&&(Ee+=1);else{var Ne=Math.max(Math.abs((Ae?Ae.clientWidth:0)-me),me)*2+2,X=Math.max(Math.abs((Ae?Ae.clientHeight:0)-be),be)*2+2;Ee=Math.sqrt(Math.pow(Ne,2)+Math.pow(X,2))}B.touches?C.current===null&&(C.current=function(){k({pulsate:le,rippleX:me,rippleY:be,rippleSize:Ee,cb:ie})},P.current=setTimeout(function(){C.current&&(C.current(),C.current=null)},tM)):k({pulsate:le,rippleX:me,rippleY:be,rippleSize:Ee,cb:ie})},[o,k]),j=G.useCallback(function(){V({},{pulsate:!0})},[V]),Z=G.useCallback(function(B,Y){if(clearTimeout(P.current),B.type==="touchend"&&C.current){B.persist(),C.current(),C.current=null,P.current=setTimeout(function(){Z(B,Y)});return}C.current=null,g(function(ie){return ie.length>0?ie.slice(1):ie}),x.current=Y},[]);return G.useImperativeHandle(t,function(){return{pulsate:j,start:V,stop:Z}},[j,V,Z]),G.createElement("span",Me({className:Sn(l.root,d),ref:_},h),G.createElement(_d,{component:null,exit:!0},m))});process.env.NODE_ENV!=="production"&&(xw.propTypes={center:R.bool,classes:R.object.isRequired,className:R.string});const rM=qn(nM,{flip:!1,name:"MuiTouchRipple"})(G.memo(xw));var iM={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:{}},Sw=G.forwardRef(function(n,t){var r=n.action,o=n.buttonRef,l=n.centerRipple,d=l===void 0?!1:l,h=n.children,f=n.classes,m=n.className,g=n.component,w=g===void 0?"button":g,x=n.disabled,T=x===void 0?!1:x,P=n.disableRipple,C=P===void 0?!1:P,_=n.disableTouchRipple,k=_===void 0?!1:_,V=n.focusRipple,j=V===void 0?!1:V,Z=n.focusVisibleClassName,B=n.onBlur,Y=n.onClick,ie=n.onFocus,ae=n.onFocusVisible,le=n.onKeyDown,_e=n.onKeyUp,fe=n.onMouseDown,de=n.onMouseLeave,ve=n.onMouseUp,Ae=n.onTouchEnd,ke=n.onTouchMove,me=n.onTouchStart,be=n.onDragLeave,Ee=n.tabIndex,Oe=Ee===void 0?0:Ee,F=n.TouchRippleProps,we=n.type,Ne=we===void 0?"button":we,X=zt(n,["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"]),Be=G.useRef(null);function Je(){return Kr.findDOMNode(Be.current)}var He=G.useRef(null),Ze=G.useState(!1),Qe=Ze[0],it=Ze[1];T&&Qe&&it(!1);var Ke=GI(),Le=Ke.isFocusVisible,pe=Ke.onBlurVisible,mt=Ke.ref;G.useImperativeHandle(r,function(){return{focusVisible:function(){it(!0),Be.current.focus()}}},[]),G.useEffect(function(){Qe&&j&&!C&&He.current.pulsate()},[C,j,Qe]);function Ce(je,fn){var Vt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:k;return so(function(fr){fn&&fn(fr);var yi=Vt;return!yi&&He.current&&He.current[je](fr),!0})}var Pt=Ce("start",fe),wt=Ce("stop",be),D=Ce("stop",ve),K=Ce("stop",function(je){Qe&&je.preventDefault(),de&&de(je)}),xe=Ce("start",me),ze=Ce("stop",Ae),Ve=Ce("stop",ke),ut=Ce("stop",function(je){Qe&&(pe(je),it(!1)),B&&B(je)},!1),Ye=so(function(je){Be.current||(Be.current=je.currentTarget),Le(je)&&(it(!0),ae&&ae(je)),ie&&ie(je)}),gt=function(){var fn=Je();return w&&w!=="button"&&!(fn.tagName==="A"&&fn.href)},Ct=G.useRef(!1),St=so(function(je){j&&!Ct.current&&Qe&&He.current&&je.key===" "&&(Ct.current=!0,je.persist(),He.current.stop(je,function(){He.current.start(je)})),je.target===je.currentTarget&>()&&je.key===" "&&je.preventDefault(),le&&le(je),je.target===je.currentTarget&>()&&je.key==="Enter"&&!T&&(je.preventDefault(),Y&&Y(je))}),ge=so(function(je){j&&je.key===" "&&He.current&&Qe&&!je.defaultPrevented&&(Ct.current=!1,je.persist(),He.current.stop(je,function(){He.current.pulsate(je)})),_e&&_e(je),Y&&je.target===je.currentTarget&>()&&je.key===" "&&!je.defaultPrevented&&Y(je)}),Ie=w;Ie==="button"&&X.href&&(Ie="a");var M={};Ie==="button"?(M.type=Ne,M.disabled=T):((Ie!=="a"||!X.href)&&(M.role="button"),M["aria-disabled"]=T);var L=Un(o,t),q=Un(mt,Be),J=Un(L,q),ye=G.useState(!1),Re=ye[0],ot=ye[1];G.useEffect(function(){ot(!0)},[]);var bt=Re&&!C&&!T;return process.env.NODE_ENV!=="production"&&G.useEffect(function(){bt&&!He.current&&console.error(["Material-UI: The `component` prop provided to ButtonBase is invalid.","Please make sure the children prop is rendered in this custom component."].join(`
|
|
229
|
-
`))},[bt]),G.createElement(Ie,Me({className:Sn(f.root,m,Qe&&[f.focusVisible,Z],T&&f.disabled),onBlur:ut,onClick:Y,onFocus:Ye,onKeyDown:St,onKeyUp:ge,onMouseDown:Pt,onMouseLeave:K,onMouseUp:D,onDragLeave:wt,onTouchEnd:ze,onTouchMove:Ve,onTouchStart:xe,ref:J,tabIndex:T?-1:Oe},M,X),h,bt?G.createElement(rM,Me({ref:He,center:d},F)):null)});process.env.NODE_ENV!=="production"&&(Sw.propTypes={action:Jr,buttonRef:Bn(Jr,"Use `ref` instead."),centerRipple:R.bool,children:R.node,classes:R.object,className:R.string,component:Tg,disabled:R.bool,disableRipple:R.bool,disableTouchRipple:R.bool,focusRipple:R.bool,focusVisibleClassName:R.string,href:R.string,onBlur:R.func,onClick:R.func,onDragLeave:R.func,onFocus:R.func,onFocusVisible:R.func,onKeyDown:R.func,onKeyUp:R.func,onMouseDown:R.func,onMouseLeave:R.func,onMouseUp:R.func,onTouchEnd:R.func,onTouchMove:R.func,onTouchStart:R.func,tabIndex:R.oneOfType([R.number,R.string]),TouchRippleProps:R.object,type:R.oneOfType([R.oneOf(["button","reset","submit"]),R.string])});const oM=qn(iM,{name:"MuiButtonBase"})(Sw);var aM={entering:{opacity:1},entered:{opacity:1}},sM={enter:Ys.enteringScreen,exit:Ys.leavingScreen},Rd=G.forwardRef(function(n,t){var r=n.children,o=n.disableStrictModeCompat,l=o===void 0?!1:o,d=n.in,h=n.onEnter,f=n.onEntered,m=n.onEntering,g=n.onExit,w=n.onExited,x=n.onExiting,T=n.style,P=n.TransitionComponent,C=P===void 0?Qr:P,_=n.timeout,k=_===void 0?sM:_,V=zt(n,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),j=jo(),Z=j.unstable_strictMode&&!l,B=G.useRef(null),Y=Un(r.ref,t),ie=Un(Z?B:void 0,Y),ae=function(me){return function(be,Ee){if(me){var Oe=Z?[B.current,be]:[be,Ee],F=Kc(Oe,2),we=F[0],Ne=F[1];Ne===void 0?me(we):me(we,Ne)}}},le=ae(m),_e=ae(function(ke,me){ww(ke);var be=Sl({style:T,timeout:k},{mode:"enter"});ke.style.webkitTransition=j.transitions.create("opacity",be),ke.style.transition=j.transitions.create("opacity",be),h&&h(ke,me)}),fe=ae(f),de=ae(x),ve=ae(function(ke){var me=Sl({style:T,timeout:k},{mode:"exit"});ke.style.webkitTransition=j.transitions.create("opacity",me),ke.style.transition=j.transitions.create("opacity",me),g&&g(ke)}),Ae=ae(w);return G.createElement(C,Me({appear:!0,in:d,nodeRef:Z?B:void 0,onEnter:_e,onEntered:fe,onEntering:le,onExit:ve,onExited:Ae,onExiting:de,timeout:k},V),function(ke,me){return G.cloneElement(r,Me({style:Me({opacity:0,visibility:ke==="exited"&&!d?"hidden":void 0},aM[ke],T,r.props.style),ref:ie},me))})});process.env.NODE_ENV!=="production"&&(Rd.propTypes={children:R.element,disableStrictModeCompat:R.bool,in:R.bool,onEnter:R.func,onEntered:R.func,onEntering:R.func,onExit:R.func,onExited:R.func,onExiting:R.func,style:R.object,timeout:R.oneOfType([R.number,R.shape({appear:R.number,enter:R.number,exit:R.number})])});var lM=function(n){return{root:{margin:0},body2:n.typography.body2,body1:n.typography.body1,caption:n.typography.caption,button:n.typography.button,h1:n.typography.h1,h2:n.typography.h2,h3:n.typography.h3,h4:n.typography.h4,h5:n.typography.h5,h6:n.typography.h6,subtitle1:n.typography.subtitle1,subtitle2:n.typography.subtitle2,overline:n.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:n.palette.primary.main},colorSecondary:{color:n.palette.secondary.main},colorTextPrimary:{color:n.palette.text.primary},colorTextSecondary:{color:n.palette.text.secondary},colorError:{color:n.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}},Tw={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},_w=G.forwardRef(function(n,t){var r=n.align,o=r===void 0?"inherit":r,l=n.classes,d=n.className,h=n.color,f=h===void 0?"initial":h,m=n.component,g=n.display,w=g===void 0?"initial":g,x=n.gutterBottom,T=x===void 0?!1:x,P=n.noWrap,C=P===void 0?!1:P,_=n.paragraph,k=_===void 0?!1:_,V=n.variant,j=V===void 0?"body1":V,Z=n.variantMapping,B=Z===void 0?Tw:Z,Y=zt(n,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),ie=m||(k?"p":B[j]||Tw[j])||"span";return G.createElement(ie,Me({className:Sn(l.root,d,j!=="inherit"&&l[j],f!=="initial"&&l["color".concat(gi(f))],C&&l.noWrap,T&&l.gutterBottom,k&&l.paragraph,o!=="inherit"&&l["align".concat(gi(o))],w!=="initial"&&l["display".concat(gi(w))]),ref:t},Y))});process.env.NODE_ENV!=="production"&&(_w.propTypes={align:R.oneOf(["inherit","left","center","right","justify"]),children:R.node,classes:R.object.isRequired,className:R.string,color:R.oneOf(["initial","inherit","primary","secondary","textPrimary","textSecondary","error"]),component:R.elementType,display:R.oneOf(["initial","block","inline"]),gutterBottom:R.bool,noWrap:R.bool,paragraph:R.bool,variant:R.oneOf(["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline","srOnly","inherit"]),variantMapping:R.object});const Yn=qn(lM,{name:"MuiTypography"})(_w);var Tl=G.createContext();process.env.NODE_ENV!=="production"&&(Tl.displayName="FormControlContext");function uM(){return G.useContext(Tl)}function Cw(){return G.useContext(Tl)}function cM(e){return e=typeof e=="function"?e():e,Kr.findDOMNode(e)}var Od=typeof window<"u"?G.useLayoutEffect:G.useEffect,Za=G.forwardRef(function(n,t){var r=n.children,o=n.container,l=n.disablePortal,d=l===void 0?!1:l,h=n.onRendered,f=G.useState(null),m=f[0],g=f[1],w=Un(G.isValidElement(r)?r.ref:null,t);return Od(function(){d||g(cM(o)||document.body)},[o,d]),Od(function(){if(m&&!d)return Wo(t,m),function(){Wo(t,null)}},[t,m,d]),Od(function(){h&&(m||d)&&h()},[h,m,d]),d?G.isValidElement(r)?G.cloneElement(r,{ref:w}):r:m&&Kr.createPortal(r,m)});process.env.NODE_ENV!=="production"&&(Za.propTypes={children:R.node,container:R.oneOfType([Ki,R.instanceOf(G.Component),R.func]),disablePortal:R.bool,onRendered:Bn(R.func,"Use the ref instead.")}),process.env.NODE_ENV!=="production"&&(Za.propTypes=Gs(Za.propTypes));function Pw(){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 n=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),n}function hM(e){var n=vi(e);return n.body===e?mw(n).innerWidth>n.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Ka(e,n){n?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Rw(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function Ow(e,n,t){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0,l=[n,t].concat(Zc(r)),d=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,function(h){h.nodeType===1&&l.indexOf(h)===-1&&d.indexOf(h.tagName)===-1&&Ka(h,o)})}function kd(e,n){var t=-1;return e.some(function(r,o){return n(r)?(t=o,!0):!1}),t}function dM(e,n){var t=[],r=[],o=e.container,l;if(!n.disableScrollLock){if(hM(o)){var d=Pw();t.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(Rw(o)+d,"px"),l=vi(o).querySelectorAll(".mui-fixed"),[].forEach.call(l,function(g){r.push(g.style.paddingRight),g.style.paddingRight="".concat(Rw(g)+d,"px")})}var h=o.parentElement,f=h.nodeName==="HTML"&&window.getComputedStyle(h)["overflow-y"]==="scroll"?h:o;t.push({value:f.style.overflow,key:"overflow",el:f}),f.style.overflow="hidden"}var m=function(){l&&[].forEach.call(l,function(w,x){r[x]?w.style.paddingRight=r[x]:w.style.removeProperty("padding-right")}),t.forEach(function(w){var x=w.value,T=w.el,P=w.key;x?T.style.setProperty(P,x):T.style.removeProperty(P)})};return m}function fM(e){var n=[];return[].forEach.call(e.children,function(t){t.getAttribute&&t.getAttribute("aria-hidden")==="true"&&n.push(t)}),n}var pM=function(){function e(){mO(this,e),this.modals=[],this.containers=[]}return Jc(e,[{key:"add",value:function(t,r){var o=this.modals.indexOf(t);if(o!==-1)return o;o=this.modals.length,this.modals.push(t),t.modalRef&&Ka(t.modalRef,!1);var l=fM(r);Ow(r,t.mountNode,t.modalRef,l,!0);var d=kd(this.containers,function(h){return h.container===r});return d!==-1?(this.containers[d].modals.push(t),o):(this.containers.push({modals:[t],container:r,restore:null,hiddenSiblingNodes:l}),o)}},{key:"mount",value:function(t,r){var o=kd(this.containers,function(d){return d.modals.indexOf(t)!==-1}),l=this.containers[o];l.restore||(l.restore=dM(l,r))}},{key:"remove",value:function(t){var r=this.modals.indexOf(t);if(r===-1)return r;var o=kd(this.containers,function(h){return h.modals.indexOf(t)!==-1}),l=this.containers[o];if(l.modals.splice(l.modals.indexOf(t),1),this.modals.splice(r,1),l.modals.length===0)l.restore&&l.restore(),t.modalRef&&Ka(t.modalRef,!0),Ow(l.container,t.mountNode,t.modalRef,l.hiddenSiblingNodes,!1),this.containers.splice(o,1);else{var d=l.modals[l.modals.length-1];d.modalRef&&Ka(d.modalRef,!1)}return r}},{key:"isTopModal",value:function(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}]),e}();function _l(e){var n=e.children,t=e.disableAutoFocus,r=t===void 0?!1:t,o=e.disableEnforceFocus,l=o===void 0?!1:o,d=e.disableRestoreFocus,h=d===void 0?!1:d,f=e.getDoc,m=e.isEnabled,g=e.open,w=G.useRef(),x=G.useRef(null),T=G.useRef(null),P=G.useRef(),C=G.useRef(null),_=G.useCallback(function(j){C.current=Kr.findDOMNode(j)},[]),k=Un(n.ref,_),V=G.useRef();return G.useEffect(function(){V.current=g},[g]),!V.current&&g&&typeof window<"u"&&(P.current=f().activeElement),G.useEffect(function(){if(g){var j=vi(C.current);!r&&C.current&&!C.current.contains(j.activeElement)&&(C.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["Material-UI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
|
|
230
|
-
`)),C.current.setAttribute("tabIndex",-1)),C.current.focus());var Z=function(){var ae=C.current;if(ae!==null){if(!j.hasFocus()||l||!m()||w.current){w.current=!1;return}C.current&&!C.current.contains(j.activeElement)&&C.current.focus()}},B=function(ae){l||!m()||ae.keyCode!==9||j.activeElement===C.current&&(w.current=!0,ae.shiftKey?T.current.focus():x.current.focus())};j.addEventListener("focus",Z,!0),j.addEventListener("keydown",B,!0);var Y=setInterval(function(){Z()},50);return function(){clearInterval(Y),j.removeEventListener("focus",Z,!0),j.removeEventListener("keydown",B,!0),h||(P.current&&P.current.focus&&P.current.focus(),P.current=null)}}},[r,l,h,m,g]),G.createElement(G.Fragment,null,G.createElement("div",{tabIndex:0,ref:x,"data-test":"sentinelStart"}),G.cloneElement(n,{ref:k}),G.createElement("div",{tabIndex:0,ref:T,"data-test":"sentinelEnd"}))}process.env.NODE_ENV!=="production"&&(_l.propTypes={children:R.node,disableAutoFocus:R.bool,disableEnforceFocus:R.bool,disableRestoreFocus:R.bool,getDoc:R.func.isRequired,isEnabled:R.func.isRequired,open:R.bool.isRequired}),process.env.NODE_ENV!=="production"&&(_l.propTypes=Gs(_l.propTypes));var kw={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"}},Aw=G.forwardRef(function(n,t){var r=n.invisible,o=r===void 0?!1:r,l=n.open,d=zt(n,["invisible","open"]);return l?G.createElement("div",Me({"aria-hidden":!0,ref:t},d,{style:Me({},kw.root,o?kw.invisible:{},d.style)})):null});process.env.NODE_ENV!=="production"&&(Aw.propTypes={invisible:R.bool,open:R.bool.isRequired});function mM(e){return e=typeof e=="function"?e():e,Kr.findDOMNode(e)}function gM(e){return e.children?e.children.props.hasOwnProperty("in"):!1}var vM=new pM,yM=function(n){return{root:{position:"fixed",zIndex:n.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}},Dw=G.forwardRef(function(n,t){var r=eo(),o=Xs({name:"MuiModal",props:Me({},n),theme:r}),l=o.BackdropComponent,d=l===void 0?Aw:l,h=o.BackdropProps,f=o.children,m=o.closeAfterTransition,g=m===void 0?!1:m,w=o.container,x=o.disableAutoFocus,T=x===void 0?!1:x,P=o.disableBackdropClick,C=P===void 0?!1:P,_=o.disableEnforceFocus,k=_===void 0?!1:_,V=o.disableEscapeKeyDown,j=V===void 0?!1:V,Z=o.disablePortal,B=Z===void 0?!1:Z,Y=o.disableRestoreFocus,ie=Y===void 0?!1:Y,ae=o.disableScrollLock,le=ae===void 0?!1:ae,_e=o.hideBackdrop,fe=_e===void 0?!1:_e,de=o.keepMounted,ve=de===void 0?!1:de,Ae=o.manager,ke=Ae===void 0?vM:Ae,me=o.onBackdropClick,be=o.onClose,Ee=o.onEscapeKeyDown,Oe=o.onRendered,F=o.open,we=zt(o,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),Ne=G.useState(!0),X=Ne[0],Be=Ne[1],Je=G.useRef({}),He=G.useRef(null),Ze=G.useRef(null),Qe=Un(Ze,t),it=gM(o),Ke=function(){return vi(He.current)},Le=function(){return Je.current.modalRef=Ze.current,Je.current.mountNode=He.current,Je.current},pe=function(){ke.mount(Le(),{disableScrollLock:le}),Ze.current.scrollTop=0},mt=so(function(){var Ye=mM(w)||Ke().body;ke.add(Le(),Ye),Ze.current&&pe()}),Ce=G.useCallback(function(){return ke.isTopModal(Le())},[ke]),Pt=so(function(Ye){He.current=Ye,Ye&&(Oe&&Oe(),F&&Ce()?pe():Ka(Ze.current,!0))}),wt=G.useCallback(function(){ke.remove(Le())},[ke]);if(G.useEffect(function(){return function(){wt()}},[wt]),G.useEffect(function(){F?mt():(!it||!g)&&wt()},[F,wt,it,g,mt]),!ve&&!F&&(!it||X))return null;var D=function(){Be(!1)},K=function(){Be(!0),g&&wt()},xe=function(gt){gt.target===gt.currentTarget&&(me&&me(gt),!C&&be&&be(gt,"backdropClick"))},ze=function(gt){gt.key!=="Escape"||!Ce()||(Ee&&Ee(gt),j||(gt.stopPropagation(),be&&be(gt,"escapeKeyDown")))},Ve=yM(r||{zIndex:Ug}),ut={};return f.props.tabIndex===void 0&&(ut.tabIndex=f.props.tabIndex||"-1"),it&&(ut.onEnter=Ya(D,f.props.onEnter),ut.onExited=Ya(K,f.props.onExited)),G.createElement(Za,{ref:Pt,container:w,disablePortal:B},G.createElement("div",Me({ref:Qe,onKeyDown:ze,role:"presentation"},we,{style:Me({},Ve.root,!F&&X?Ve.hidden:{},we.style)}),fe?null:G.createElement(d,Me({open:F,onClick:xe},h)),G.createElement(_l,{disableEnforceFocus:k,disableAutoFocus:T,disableRestoreFocus:ie,getDoc:Ke,isEnabled:Ce,open:F},G.cloneElement(f,ut))))});process.env.NODE_ENV!=="production"&&(Dw.propTypes={BackdropComponent:R.elementType,BackdropProps:R.object,children:Sg.isRequired,closeAfterTransition:R.bool,container:R.oneOfType([Ki,R.instanceOf(G.Component),R.func]),disableAutoFocus:R.bool,disableBackdropClick:Bn(R.bool,"Use the onClose prop with the `reason` argument to filter the `backdropClick` events."),disableEnforceFocus:R.bool,disableEscapeKeyDown:R.bool,disablePortal:R.bool,disableRestoreFocus:R.bool,disableScrollLock:R.bool,hideBackdrop:R.bool,keepMounted:R.bool,manager:R.object,onBackdropClick:Bn(R.func,"Use the onClose prop with the `reason` argument to handle the `backdropClick` events."),onClose:R.func,onEscapeKeyDown:Bn(R.func,"Use the onClose prop with the `reason` argument to handle the `escapeKeyDown` events."),onRendered:Bn(R.func,"Use the ref instead."),open:R.bool.isRequired});function Ad(e){var n=e.props,t=e.states,r=e.muiFormControl;return t.reduce(function(o,l){return o[l]=n[l],r&&typeof n[l]>"u"&&(o[l]=r[l]),o},{})}function Cl(e,n){return parseInt(e[n],10)||0}var wM=typeof window<"u"?G.useLayoutEffect:G.useEffect,bM={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}},Iw=G.forwardRef(function(n,t){var r=n.onChange,o=n.rows,l=n.rowsMax,d=n.rowsMin,h=n.maxRows,f=n.minRows,m=f===void 0?1:f,g=n.style,w=n.value,x=zt(n,["onChange","rows","rowsMax","rowsMin","maxRows","minRows","style","value"]),T=h||l,P=o||d||m,C=G.useRef(w!=null),_=C.current,k=G.useRef(null),V=Un(t,k),j=G.useRef(null),Z=G.useRef(0),B=G.useState({}),Y=B[0],ie=B[1],ae=G.useCallback(function(){var _e=k.current,fe=window.getComputedStyle(_e),de=j.current;de.style.width=fe.width,de.value=_e.value||n.placeholder||"x",de.value.slice(-1)===`
|
|
231
|
-
`&&(de.value+=" ");var ve=fe["box-sizing"],Ae=Cl(fe,"padding-bottom")+Cl(fe,"padding-top"),ke=Cl(fe,"border-bottom-width")+Cl(fe,"border-top-width"),me=de.scrollHeight-Ae;de.value="x";var be=de.scrollHeight-Ae,Ee=me;P&&(Ee=Math.max(Number(P)*be,Ee)),T&&(Ee=Math.min(Number(T)*be,Ee)),Ee=Math.max(Ee,be);var Oe=Ee+(ve==="border-box"?Ae+ke:0),F=Math.abs(Ee-me)<=1;ie(function(we){return Z.current<20&&(Oe>0&&Math.abs((we.outerHeightStyle||0)-Oe)>1||we.overflow!==F)?(Z.current+=1,{overflow:F,outerHeightStyle:Oe}):(process.env.NODE_ENV!=="production"&&Z.current===20&&console.error(["Material-UI: Too many re-renders. The layout is unstable.","TextareaAutosize limits the number of renders to prevent an infinite loop."].join(`
|
|
232
|
-
`)),we)})},[T,P,n.placeholder]);G.useEffect(function(){var _e=fw(function(){Z.current=0,ae()});return window.addEventListener("resize",_e),function(){_e.clear(),window.removeEventListener("resize",_e)}},[ae]),wM(function(){ae()}),G.useEffect(function(){Z.current=0},[w]);var le=function(fe){Z.current=0,_||ae(),r&&r(fe)};return G.createElement(G.Fragment,null,G.createElement("textarea",Me({value:w,onChange:le,ref:V,rows:P,style:Me({height:Y.outerHeightStyle,overflow:Y.overflow?"hidden":null},g)},x)),G.createElement("textarea",{"aria-hidden":!0,className:n.className,readOnly:!0,ref:j,tabIndex:-1,style:Me({},bM.shadow,g)}))});process.env.NODE_ENV!=="production"&&(Iw.propTypes={className:R.string,maxRows:R.oneOfType([R.number,R.string]),minRows:R.oneOfType([R.number,R.string]),onChange:R.func,placeholder:R.string,rows:Bn(R.oneOfType([R.number,R.string]),"Use `minRows` instead."),rowsMax:Bn(R.oneOfType([R.number,R.string]),"Use `maxRows` instead."),rowsMin:Bn(R.oneOfType([R.number,R.string]),"Use `minRows` instead."),style:R.object,value:R.oneOfType([R.arrayOf(R.string),R.number,R.string])});function Mw(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Nw(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return e&&(Mw(e.value)&&e.value!==""||n&&Mw(e.defaultValue)&&e.defaultValue!=="")}var EM=function(n){var t=n.palette.type==="light",r={color:"currentColor",opacity:t?.42:.5,transition:n.transitions.create("opacity",{duration:n.transitions.duration.shorter})},o={opacity:"0 !important"},l={opacity:t?.42:.5};return{"@global":{"@keyframes mui-auto-fill":{},"@keyframes mui-auto-fill-cancel":{}},root:Me({},n.typography.body1,{color:n.palette.text.primary,lineHeight:"1.1876em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center","&$disabled":{color:n.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":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{"-webkit-appearance":"none"},"label[data-shrink=false] + $formControl &":{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":l,"&:focus::-moz-placeholder":l,"&:focus:-ms-input-placeholder":l,"&:focus::-ms-input-placeholder":l},"&$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:{}}},xM=typeof window>"u"?G.useEffect:G.useLayoutEffect,Lw=G.forwardRef(function(n,t){var r=n["aria-describedby"],o=n.autoComplete,l=n.autoFocus,d=n.classes,h=n.className;n.color;var f=n.defaultValue,m=n.disabled,g=n.endAdornment;n.error;var w=n.fullWidth,x=w===void 0?!1:w,T=n.id,P=n.inputComponent,C=P===void 0?"input":P,_=n.inputProps,k=_===void 0?{}:_,V=n.inputRef;n.margin;var j=n.multiline,Z=j===void 0?!1:j,B=n.name,Y=n.onBlur,ie=n.onChange,ae=n.onClick,le=n.onFocus,_e=n.onKeyDown,fe=n.onKeyUp,de=n.placeholder,ve=n.readOnly,Ae=n.renderSuffix,ke=n.rows,me=n.rowsMax,be=n.rowsMin,Ee=n.maxRows,Oe=n.minRows,F=n.startAdornment,we=n.type,Ne=we===void 0?"text":we,X=n.value,Be=zt(n,["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"]),Je=k.value!=null?k.value:X,He=G.useRef(Je!=null),Ze=He.current,Qe=G.useRef(),it=G.useCallback(function(Ie){process.env.NODE_ENV!=="production"&&Ie&&Ie.nodeName!=="INPUT"&&!Ie.focus&&console.error(["Material-UI: You have provided a `inputComponent` to the input component","that does not correctly handle the `inputRef` prop.","Make sure the `inputRef` prop is called with a HTMLInputElement."].join(`
|
|
233
|
-
`))},[]),Ke=Un(k.ref,it),Le=Un(V,Ke),pe=Un(Qe,Le),mt=G.useState(!1),Ce=mt[0],Pt=mt[1],wt=uM();process.env.NODE_ENV!=="production"&&G.useEffect(function(){if(wt)return wt.registerEffect()},[wt]);var D=Ad({props:n,muiFormControl:wt,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});D.focused=wt?wt.focused:Ce,G.useEffect(function(){!wt&&m&&Ce&&(Pt(!1),Y&&Y())},[wt,m,Ce,Y]);var K=wt&&wt.onFilled,xe=wt&&wt.onEmpty,ze=G.useCallback(function(Ie){Nw(Ie)?K&&K():xe&&xe()},[K,xe]);xM(function(){Ze&&ze({value:Je})},[Je,ze,Ze]);var Ve=function(M){if(D.disabled){M.stopPropagation();return}le&&le(M),k.onFocus&&k.onFocus(M),wt&&wt.onFocus?wt.onFocus(M):Pt(!0)},ut=function(M){Y&&Y(M),k.onBlur&&k.onBlur(M),wt&&wt.onBlur?wt.onBlur(M):Pt(!1)},Ye=function(M){if(!Ze){var L=M.target||Qe.current;if(L==null)throw new Error(process.env.NODE_ENV!=="production"?"Material-UI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":Do(1));ze({value:L.value})}for(var q=arguments.length,J=new Array(q>1?q-1:0),ye=1;ye<q;ye++)J[ye-1]=arguments[ye];k.onChange&&k.onChange.apply(k,[M].concat(J)),ie&&ie.apply(void 0,[M].concat(J))};G.useEffect(function(){ze(Qe.current)},[]);var gt=function(M){Qe.current&&M.currentTarget===M.target&&Qe.current.focus(),ae&&ae(M)},Ct=C,St=Me({},k,{ref:pe});typeof Ct!="string"?St=Me({inputRef:pe,type:Ne},St,{ref:null}):Z?ke&&!Ee&&!Oe&&!me&&!be?Ct="textarea":(St=Me({minRows:ke||Oe,rowsMax:me,maxRows:Ee},St),Ct=Iw):St=Me({type:Ne},St);var ge=function(M){ze(M.animationName==="mui-auto-fill-cancel"?Qe.current:{value:"x"})};return G.useEffect(function(){wt&&wt.setAdornedStart(!!F)},[wt,F]),G.createElement("div",Me({className:Sn(d.root,d["color".concat(gi(D.color||"primary"))],h,D.disabled&&d.disabled,D.error&&d.error,x&&d.fullWidth,D.focused&&d.focused,wt&&d.formControl,Z&&d.multiline,F&&d.adornedStart,g&&d.adornedEnd,D.margin==="dense"&&d.marginDense),onClick:gt,ref:t},Be),F,G.createElement(Tl.Provider,{value:null},G.createElement(Ct,Me({"aria-invalid":D.error,"aria-describedby":r,autoComplete:o,autoFocus:l,defaultValue:f,disabled:D.disabled,id:T,onAnimationStart:ge,name:B,placeholder:de,readOnly:ve,required:D.required,rows:ke,value:Je,onKeyDown:_e,onKeyUp:fe},St,{className:Sn(d.input,k.className,D.disabled&&d.disabled,Z&&d.inputMultiline,D.hiddenLabel&&d.inputHiddenLabel,F&&d.inputAdornedStart,g&&d.inputAdornedEnd,Ne==="search"&&d.inputTypeSearch,D.margin==="dense"&&d.inputMarginDense),onBlur:ut,onChange:Ye,onFocus:Ve}))),g,Ae?Ae(Me({},D,{startAdornment:F})):null)});process.env.NODE_ENV!=="production"&&(Lw.propTypes={"aria-describedby":R.string,autoComplete:R.string,autoFocus:R.bool,classes:R.object,className:R.string,color:R.oneOf(["primary","secondary"]),defaultValue:R.any,disabled:R.bool,endAdornment:R.node,error:R.bool,fullWidth:R.bool,id:R.string,inputComponent:R.elementType,inputProps:R.object,inputRef:Jr,margin:R.oneOf(["dense","none"]),maxRows:R.oneOfType([R.number,R.string]),minRows:R.oneOfType([R.number,R.string]),multiline:R.bool,name:R.string,onBlur:R.func,onChange:R.func,onClick:R.func,onFocus:R.func,onKeyDown:R.func,onKeyUp:R.func,placeholder:R.string,readOnly:R.bool,renderSuffix:R.func,required:R.bool,rows:R.oneOfType([R.number,R.string]),rowsMax:R.oneOfType([R.number,R.string]),rowsMin:R.oneOfType([R.number,R.string]),startAdornment:R.node,type:R.string,value:R.any});const Dd=qn(EM,{name:"MuiInputBase"})(Lw);var SM=function(n){var t=n.palette.type==="light",r=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:o,borderTopLeftRadius:n.shape.borderRadius,borderTopRightRadius:n.shape.borderRadius,transition:n.transitions.create("background-color",{duration:n.transitions.duration.shorter,easing:n.transitions.easing.easeOut}),"&:hover":{backgroundColor:t?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:o}},"&$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:n.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(n.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:n.transitions.create("transform",{duration:n.transitions.duration.shorter,easing:n.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:n.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(r),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:n.transitions.create("border-bottom-color",{duration:n.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:before":{borderBottom:"1px solid ".concat(n.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:n.palette.type==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:n.palette.type==="light"?null:"#fff",caretColor:n.palette.type==="light"?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}}},Id=G.forwardRef(function(n,t){var r=n.disableUnderline,o=n.classes,l=n.fullWidth,d=l===void 0?!1:l,h=n.inputComponent,f=h===void 0?"input":h,m=n.multiline,g=m===void 0?!1:m,w=n.type,x=w===void 0?"text":w,T=zt(n,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return G.createElement(Dd,Me({classes:Me({},o,{root:Sn(o.root,!r&&o.underline),underline:null}),fullWidth:d,inputComponent:f,multiline:g,ref:t,type:x},T))});process.env.NODE_ENV!=="production"&&(Id.propTypes={autoComplete:R.string,autoFocus:R.bool,classes:R.object,color:R.oneOf(["primary","secondary"]),defaultValue:R.any,disabled:R.bool,disableUnderline:R.bool,endAdornment:R.node,error:R.bool,fullWidth:R.bool,id:R.string,inputComponent:R.elementType,inputProps:R.object,inputRef:Jr,margin:R.oneOf(["dense","none"]),maxRows:R.oneOfType([R.number,R.string]),multiline:R.bool,name:R.string,onChange:R.func,placeholder:R.string,readOnly:R.bool,required:R.bool,rows:R.oneOfType([R.number,R.string]),startAdornment:R.node,type:R.string,value:R.any}),Id.muiName="Input";const TM=qn(SM,{name:"MuiFilledInput"})(Id);function Md(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var _M={entering:{opacity:1,transform:Md(1)},entered:{opacity:1,transform:"none"}},Nd=G.forwardRef(function(n,t){var r=n.children,o=n.disableStrictModeCompat,l=o===void 0?!1:o,d=n.in,h=n.onEnter,f=n.onEntered,m=n.onEntering,g=n.onExit,w=n.onExited,x=n.onExiting,T=n.style,P=n.timeout,C=P===void 0?"auto":P,_=n.TransitionComponent,k=_===void 0?Qr:_,V=zt(n,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),j=G.useRef(),Z=G.useRef(),B=jo(),Y=B.unstable_strictMode&&!l,ie=G.useRef(null),ae=Un(r.ref,t),le=Un(Y?ie:void 0,ae),_e=function(Oe){return function(F,we){if(Oe){var Ne=Y?[ie.current,F]:[F,we],X=Kc(Ne,2),Be=X[0],Je=X[1];Je===void 0?Oe(Be):Oe(Be,Je)}}},fe=_e(m),de=_e(function(Ee,Oe){ww(Ee);var F=Sl({style:T,timeout:C},{mode:"enter"}),we=F.duration,Ne=F.delay,X;C==="auto"?(X=B.transitions.getAutoHeightDuration(Ee.clientHeight),Z.current=X):X=we,Ee.style.transition=[B.transitions.create("opacity",{duration:X,delay:Ne}),B.transitions.create("transform",{duration:X*.666,delay:Ne})].join(","),h&&h(Ee,Oe)}),ve=_e(f),Ae=_e(x),ke=_e(function(Ee){var Oe=Sl({style:T,timeout:C},{mode:"exit"}),F=Oe.duration,we=Oe.delay,Ne;C==="auto"?(Ne=B.transitions.getAutoHeightDuration(Ee.clientHeight),Z.current=Ne):Ne=F,Ee.style.transition=[B.transitions.create("opacity",{duration:Ne,delay:we}),B.transitions.create("transform",{duration:Ne*.666,delay:we||Ne*.333})].join(","),Ee.style.opacity="0",Ee.style.transform=Md(.75),g&&g(Ee)}),me=_e(w),be=function(Oe,F){var we=Y?Oe:F;C==="auto"&&(j.current=setTimeout(we,Z.current||0))};return G.useEffect(function(){return function(){clearTimeout(j.current)}},[]),G.createElement(k,Me({appear:!0,in:d,nodeRef:Y?ie:void 0,onEnter:de,onEntered:ve,onEntering:fe,onExit:ke,onExited:me,onExiting:Ae,addEndListener:be,timeout:C==="auto"?null:C},V),function(Ee,Oe){return G.cloneElement(r,Me({style:Me({opacity:0,transform:Md(.75),visibility:Ee==="exited"&&!d?"hidden":void 0},_M[Ee],T,r.props.style),ref:le},Oe))})});process.env.NODE_ENV!=="production"&&(Nd.propTypes={children:R.element,disableStrictModeCompat:R.bool,in:R.bool,onEnter:R.func,onEntered:R.func,onEntering:R.func,onExit:R.func,onExited:R.func,onExiting:R.func,style:R.object,timeout:R.oneOfType([R.oneOf(["auto"]),R.number,R.shape({appear:R.number,enter:R.number,exit:R.number})])}),Nd.muiSupportAuto=!0;var CM=function(n){var t=n.palette.type==="light",r=t?"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:n.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(n.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:n.transitions.create("transform",{duration:n.transitions.duration.shorter,easing:n.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:n.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(r),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:n.transitions.create("border-bottom-color",{duration:n.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(n.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(r)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}},Ld=G.forwardRef(function(n,t){var r=n.disableUnderline,o=n.classes,l=n.fullWidth,d=l===void 0?!1:l,h=n.inputComponent,f=h===void 0?"input":h,m=n.multiline,g=m===void 0?!1:m,w=n.type,x=w===void 0?"text":w,T=zt(n,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return G.createElement(Dd,Me({classes:Me({},o,{root:Sn(o.root,!r&&o.underline),underline:null}),fullWidth:d,inputComponent:f,multiline:g,ref:t,type:x},T))});process.env.NODE_ENV!=="production"&&(Ld.propTypes={autoComplete:R.string,autoFocus:R.bool,classes:R.object,color:R.oneOf(["primary","secondary"]),defaultValue:R.any,disabled:R.bool,disableUnderline:R.bool,endAdornment:R.node,error:R.bool,fullWidth:R.bool,id:R.string,inputComponent:R.elementType,inputProps:R.object,inputRef:Jr,margin:R.oneOf(["dense","none"]),maxRows:R.oneOfType([R.number,R.string]),multiline:R.bool,name:R.string,onChange:R.func,placeholder:R.string,readOnly:R.bool,required:R.bool,rows:R.oneOfType([R.number,R.string]),startAdornment:R.node,type:R.string,value:R.any}),Ld.muiName="Input";const Fw=qn(CM,{name:"MuiInput"})(Ld);var Yo=G.createContext({});process.env.NODE_ENV!=="production"&&(Yo.displayName="ListContext");var PM={root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},Bw=G.forwardRef(function(n,t){var r=n.children,o=n.classes,l=n.className,d=n.component,h=d===void 0?"ul":d,f=n.dense,m=f===void 0?!1:f,g=n.disablePadding,w=g===void 0?!1:g,x=n.subheader,T=zt(n,["children","classes","className","component","dense","disablePadding","subheader"]),P=G.useMemo(function(){return{dense:m}},[m]);return G.createElement(Yo.Provider,{value:P},G.createElement(h,Me({className:Sn(o.root,l,m&&o.dense,!w&&o.padding,x&&o.subheader),ref:t},T),x,r))});process.env.NODE_ENV!=="production"&&(Bw.propTypes={children:R.node,classes:R.object.isRequired,className:R.string,component:R.elementType,dense:R.bool,disablePadding:R.bool,subheader:R.node});const jw=qn(PM,{name:"MuiList"})(Bw);var RM=function(n){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:n.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:n.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(n.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:n.transitions.create("background-color",{duration:n.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:n.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}},OM=typeof window>"u"?G.useEffect:G.useLayoutEffect,Hw=G.forwardRef(function(n,t){var r=n.alignItems,o=r===void 0?"center":r,l=n.autoFocus,d=l===void 0?!1:l,h=n.button,f=h===void 0?!1:h,m=n.children,g=n.classes,w=n.className,x=n.component,T=n.ContainerComponent,P=T===void 0?"li":T,C=n.ContainerProps;C=C===void 0?{}:C;var _=C.className,k=zt(C,["className"]),V=n.dense,j=V===void 0?!1:V,Z=n.disabled,B=Z===void 0?!1:Z,Y=n.disableGutters,ie=Y===void 0?!1:Y,ae=n.divider,le=ae===void 0?!1:ae,_e=n.focusVisibleClassName,fe=n.selected,de=fe===void 0?!1:fe,ve=zt(n,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),Ae=G.useContext(Yo),ke={dense:j||Ae.dense||!1,alignItems:o},me=G.useRef(null);OM(function(){d&&(me.current?me.current.focus():process.env.NODE_ENV!=="production"&&console.error("Material-UI: Unable to set focus to a ListItem whose component has not been rendered."))},[d]);var be=G.Children.toArray(m),Ee=be.length&&pw(be[be.length-1],["ListItemSecondaryAction"]),Oe=G.useCallback(function(X){me.current=Kr.findDOMNode(X)},[]),F=Un(Oe,t),we=Me({className:Sn(g.root,w,ke.dense&&g.dense,!ie&&g.gutters,le&&g.divider,B&&g.disabled,f&&g.button,o!=="center"&&g.alignItemsFlexStart,Ee&&g.secondaryAction,de&&g.selected),disabled:B},ve),Ne=x||"li";return f&&(we.component=x||"div",we.focusVisibleClassName=Sn(g.focusVisible,_e),Ne=oM),Ee?(Ne=!we.component&&!x?"div":Ne,P==="li"&&(Ne==="li"?Ne="div":we.component==="li"&&(we.component="div")),G.createElement(Yo.Provider,{value:ke},G.createElement(P,Me({className:Sn(g.container,_),ref:F},k),G.createElement(Ne,we,be),be.pop()))):G.createElement(Yo.Provider,{value:ke},G.createElement(Ne,Me({ref:F},we),be))});process.env.NODE_ENV!=="production"&&(Hw.propTypes={alignItems:R.oneOf(["flex-start","center"]),autoFocus:R.bool,button:R.bool,children:di(R.node,function(e){for(var n=G.Children.toArray(e.children),t=-1,r=n.length-1;r>=0;r-=1){var o=n[r];if(pw(o,["ListItemSecondaryAction"])){t=r;break}}return t!==-1&&t!==n.length-1?new Error("Material-UI: You used an element after ListItemSecondaryAction. For ListItem to detect that it has a secondary action you must pass it as the last child to ListItem."):null}),classes:R.object.isRequired,className:R.string,component:R.elementType,ContainerComponent:R.elementType,ContainerProps:R.object,dense:R.bool,disabled:R.bool,disableGutters:R.bool,divider:R.bool,focusVisibleClassName:R.string,selected:R.bool});const Xo=qn(RM,{name:"MuiListItem"})(Hw);var kM={root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},zw=G.forwardRef(function(n,t){var r=n.children,o=n.classes,l=n.className,d=n.disableTypography,h=d===void 0?!1:d,f=n.inset,m=f===void 0?!1:f,g=n.primary,w=n.primaryTypographyProps,x=n.secondary,T=n.secondaryTypographyProps,P=zt(n,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),C=G.useContext(Yo),_=C.dense,k=g??r;k!=null&&k.type!==Yn&&!h&&(k=G.createElement(Yn,Me({variant:_?"body2":"body1",className:o.primary,component:"span",display:"block"},w),k));var V=x;return V!=null&&V.type!==Yn&&!h&&(V=G.createElement(Yn,Me({variant:"body2",className:o.secondary,color:"textSecondary",display:"block"},T),V)),G.createElement("div",Me({className:Sn(o.root,l,_&&o.dense,m&&o.inset,k&&V&&o.multiline),ref:t},P),k,V)});process.env.NODE_ENV!=="production"&&(zw.propTypes={children:R.node,classes:R.object,className:R.string,disableTypography:R.bool,inset:R.bool,primary:R.node,primaryTypographyProps:R.object,secondary:R.node,secondaryTypographyProps:R.object});const Ja=qn(kM,{name:"MuiListItemText"})(zw);function Vw(e,n){var t=0;return typeof n=="number"?t=n:n==="center"?t=e.height/2:n==="bottom"&&(t=e.height),t}function Uw(e,n){var t=0;return typeof n=="number"?t=n:n==="center"?t=e.width/2:n==="right"&&(t=e.width),t}function Ww(e){return[e.horizontal,e.vertical].map(function(n){return typeof n=="number"?"".concat(n,"px"):n}).join(" ")}function AM(e,n){for(var t=n,r=0;t&&t!==e;)t=t.parentElement,r+=t.scrollTop;return r}function Pl(e){return typeof e=="function"?e():e}var DM={root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},Gw=G.forwardRef(function(n,t){var r=n.action,o=n.anchorEl,l=n.anchorOrigin,d=l===void 0?{vertical:"top",horizontal:"left"}:l,h=n.anchorPosition,f=n.anchorReference,m=f===void 0?"anchorEl":f,g=n.children,w=n.classes,x=n.className,T=n.container,P=n.elevation,C=P===void 0?8:P,_=n.getContentAnchorEl,k=n.marginThreshold,V=k===void 0?16:k,j=n.onEnter,Z=n.onEntered,B=n.onEntering,Y=n.onExit,ie=n.onExited,ae=n.onExiting,le=n.open,_e=n.PaperProps,fe=_e===void 0?{}:_e,de=n.transformOrigin,ve=de===void 0?{vertical:"top",horizontal:"left"}:de,Ae=n.TransitionComponent,ke=Ae===void 0?Nd:Ae,me=n.transitionDuration,be=me===void 0?"auto":me,Ee=n.TransitionProps,Oe=Ee===void 0?{}:Ee,F=zt(n,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),we=G.useRef(),Ne=G.useCallback(function(Le){if(m==="anchorPosition")return process.env.NODE_ENV!=="production"&&(h||console.error('Material-UI: You need to provide a `anchorPosition` prop when using <Popover anchorReference="anchorPosition" />.')),h;var pe=Pl(o),mt=pe&&pe.nodeType===1?pe:vi(we.current).body,Ce=mt.getBoundingClientRect();if(process.env.NODE_ENV!=="production"){var Pt=mt.getBoundingClientRect();process.env.NODE_ENV!=="test"&&Pt.top===0&&Pt.left===0&&Pt.right===0&&Pt.bottom===0&&console.warn(["Material-UI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
234
|
-
`))}var wt=Le===0?d.vertical:"center";return{top:Ce.top+Vw(Ce,wt),left:Ce.left+Uw(Ce,d.horizontal)}},[o,d.horizontal,d.vertical,h,m]),X=G.useCallback(function(Le){var pe=0;if(_&&m==="anchorEl"){var mt=_(Le);if(mt&&Le.contains(mt)){var Ce=AM(Le,mt);pe=mt.offsetTop+mt.clientHeight/2-Ce||0}process.env.NODE_ENV!=="production"&&d.vertical!=="top"&&console.error(["Material-UI: You can not change the default `anchorOrigin.vertical` value ","when also providing the `getContentAnchorEl` prop to the popover component.","Only use one of the two props.","Set `getContentAnchorEl` to `null | undefined` or leave `anchorOrigin.vertical` unchanged."].join(`
|
|
235
|
-
`))}return pe},[d.vertical,m,_]),Be=G.useCallback(function(Le){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return{vertical:Vw(Le,ve.vertical)+pe,horizontal:Uw(Le,ve.horizontal)}},[ve.horizontal,ve.vertical]),Je=G.useCallback(function(Le){var pe=X(Le),mt={width:Le.offsetWidth,height:Le.offsetHeight},Ce=Be(mt,pe);if(m==="none")return{top:null,left:null,transformOrigin:Ww(Ce)};var Pt=Ne(pe),wt=Pt.top-Ce.vertical,D=Pt.left-Ce.horizontal,K=wt+mt.height,xe=D+mt.width,ze=mw(Pl(o)),Ve=ze.innerHeight-V,ut=ze.innerWidth-V;if(wt<V){var Ye=wt-V;wt-=Ye,Ce.vertical+=Ye}else if(K>Ve){var gt=K-Ve;wt-=gt,Ce.vertical+=gt}if(process.env.NODE_ENV!=="production"&&mt.height>Ve&&mt.height&&Ve&&console.error(["Material-UI: The popover component is too tall.","Some part of it can not be seen on the screen (".concat(mt.height-Ve,"px)."),"Please consider adding a `max-height` to improve the user-experience."].join(`
|
|
236
|
-
`)),D<V){var Ct=D-V;D-=Ct,Ce.horizontal+=Ct}else if(xe>ut){var St=xe-ut;D-=St,Ce.horizontal+=St}return{top:"".concat(Math.round(wt),"px"),left:"".concat(Math.round(D),"px"),transformOrigin:Ww(Ce)}},[o,m,Ne,X,Be,V]),He=G.useCallback(function(){var Le=we.current;if(Le){var pe=Je(Le);pe.top!==null&&(Le.style.top=pe.top),pe.left!==null&&(Le.style.left=pe.left),Le.style.transformOrigin=pe.transformOrigin}},[Je]),Ze=function(pe,mt){B&&B(pe,mt),He()},Qe=G.useCallback(function(Le){we.current=Kr.findDOMNode(Le)},[]);G.useEffect(function(){le&&He()}),G.useImperativeHandle(r,function(){return le?{updatePosition:function(){He()}}:null},[le,He]),G.useEffect(function(){if(le){var Le=fw(function(){He()});return window.addEventListener("resize",Le),function(){Le.clear(),window.removeEventListener("resize",Le)}}},[le,He]);var it=be;be==="auto"&&!ke.muiSupportAuto&&(it=void 0);var Ke=T||(o?vi(Pl(o)).body:void 0);return G.createElement(Dw,Me({container:Ke,open:le,ref:t,BackdropProps:{invisible:!0},className:Sn(w.root,x)},F),G.createElement(ke,Me({appear:!0,in:le,onEnter:j,onEntered:Z,onExit:Y,onExited:ie,onExiting:ae,timeout:it},Oe,{onEntering:Ya(Ze,Oe.onEntering)}),G.createElement(Cd,Me({elevation:C,ref:Qe},fe,{className:Sn(w.paper,fe.className)}),g)))});process.env.NODE_ENV!=="production"&&(Gw.propTypes={action:Jr,anchorEl:di(R.oneOfType([Ki,R.func]),function(e){if(e.open&&(!e.anchorReference||e.anchorReference==="anchorEl")){var n=Pl(e.anchorEl);if(n&&n.nodeType===1){var t=n.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&t.top===0&&t.left===0&&t.right===0&&t.bottom===0)return new Error(["Material-UI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
237
|
-
`))}else return new Error(["Material-UI: The `anchorEl` prop provided to the component is invalid.","It should be an Element instance but it's `".concat(n,"` instead.")].join(`
|
|
238
|
-
`))}return null}),anchorOrigin:R.shape({horizontal:R.oneOfType([R.oneOf(["center","left","right"]),R.number]).isRequired,vertical:R.oneOfType([R.oneOf(["bottom","center","top"]),R.number]).isRequired}),anchorPosition:R.shape({left:R.number.isRequired,top:R.number.isRequired}),anchorReference:R.oneOf(["anchorEl","anchorPosition","none"]),children:R.node,classes:R.object,className:R.string,container:R.oneOfType([Ki,R.instanceOf(G.Component),R.func]),elevation:R.number,getContentAnchorEl:R.func,marginThreshold:R.number,onClose:R.func,onEnter:Bn(R.func,"Use the `TransitionProps` prop instead."),onEntered:Bn(R.func,"Use the `TransitionProps` prop instead."),onEntering:Bn(R.func,"Use the `TransitionProps` prop instead."),onExit:Bn(R.func,"Use the `TransitionProps` prop instead."),onExited:Bn(R.func,"Use the `TransitionProps` prop instead."),onExiting:Bn(R.func,"Use the `TransitionProps` prop instead."),open:R.bool.isRequired,PaperProps:R.shape({component:Tg}),transformOrigin:R.shape({horizontal:R.oneOfType([R.oneOf(["center","left","right"]),R.number]).isRequired,vertical:R.oneOfType([R.oneOf(["bottom","center","top"]),R.number]).isRequired}),TransitionComponent:R.elementType,transitionDuration:R.oneOfType([R.oneOf(["auto"]),R.number,R.shape({appear:R.number,enter:R.number,exit:R.number})]),TransitionProps:R.object});const qw=qn(DM,{name:"MuiPopover"})(Gw);function Fd(e,n,t){return e===n?e.firstChild:n&&n.nextElementSibling?n.nextElementSibling:t?null:e.firstChild}function Yw(e,n,t){return e===n?t?e.firstChild:e.lastChild:n&&n.previousElementSibling?n.previousElementSibling:t?null:e.lastChild}function Xw(e,n){if(n===void 0)return!0;var t=e.innerText;return t===void 0&&(t=e.textContent),t=t.trim().toLowerCase(),t.length===0?!1:n.repeating?t[0]===n.keys[0]:t.indexOf(n.keys.join(""))===0}function Qa(e,n,t,r,o,l){for(var d=!1,h=o(e,n,n?t:!1);h;){if(h===e.firstChild){if(d)return;d=!0}var f=r?!1:h.disabled||h.getAttribute("aria-disabled")==="true";if(!h.hasAttribute("tabindex")||!Xw(h,l)||f)h=o(e,h,t);else{h.focus();return}}}var IM=typeof window>"u"?G.useEffect:G.useLayoutEffect,Zw=G.forwardRef(function(n,t){var r=n.actions,o=n.autoFocus,l=o===void 0?!1:o,d=n.autoFocusItem,h=d===void 0?!1:d,f=n.children,m=n.className,g=n.disabledItemsFocusable,w=g===void 0?!1:g,x=n.disableListWrap,T=x===void 0?!1:x,P=n.onKeyDown,C=n.variant,_=C===void 0?"selectedMenu":C,k=zt(n,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),V=G.useRef(null),j=G.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});IM(function(){l&&V.current.focus()},[l]),G.useImperativeHandle(r,function(){return{adjustStyleForScrollbar:function(_e,fe){var de=!V.current.style.width;if(_e.clientHeight<V.current.clientHeight&&de){var ve="".concat(Pw(),"px");V.current.style[fe.direction==="rtl"?"paddingLeft":"paddingRight"]=ve,V.current.style.width="calc(100% + ".concat(ve,")")}return V.current}}},[]);var Z=function(_e){var fe=V.current,de=_e.key,ve=vi(fe).activeElement;if(de==="ArrowDown")_e.preventDefault(),Qa(fe,ve,T,w,Fd);else if(de==="ArrowUp")_e.preventDefault(),Qa(fe,ve,T,w,Yw);else if(de==="Home")_e.preventDefault(),Qa(fe,null,T,w,Fd);else if(de==="End")_e.preventDefault(),Qa(fe,null,T,w,Yw);else if(de.length===1){var Ae=j.current,ke=de.toLowerCase(),me=performance.now();Ae.keys.length>0&&(me-Ae.lastTime>500?(Ae.keys=[],Ae.repeating=!0,Ae.previousKeyMatched=!0):Ae.repeating&&ke!==Ae.keys[0]&&(Ae.repeating=!1)),Ae.lastTime=me,Ae.keys.push(ke);var be=ve&&!Ae.repeating&&Xw(ve,Ae);Ae.previousKeyMatched&&(be||Qa(fe,ve,!1,w,Fd,Ae))?_e.preventDefault():Ae.previousKeyMatched=!1}P&&P(_e)},B=G.useCallback(function(le){V.current=Kr.findDOMNode(le)},[]),Y=Un(B,t),ie=-1;G.Children.forEach(f,function(le,_e){G.isValidElement(le)&&(process.env.NODE_ENV!=="production"&&ka.isFragment(le)&&console.error(["Material-UI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
239
|
-
`)),le.props.disabled||(_==="selectedMenu"&&le.props.selected||ie===-1)&&(ie=_e))});var ae=G.Children.map(f,function(le,_e){if(_e===ie){var fe={};return h&&(fe.autoFocus=!0),le.props.tabIndex===void 0&&_==="selectedMenu"&&(fe.tabIndex=0),G.cloneElement(le,fe)}return le});return G.createElement(jw,Me({role:"menu",ref:Y,className:m,onKeyDown:Z,tabIndex:l?0:-1},k),ae)});process.env.NODE_ENV!=="production"&&(Zw.propTypes={autoFocus:R.bool,autoFocusItem:R.bool,children:R.node,className:R.string,disabledItemsFocusable:R.bool,disableListWrap:R.bool,onKeyDown:R.func,variant:R.oneOf(["menu","selectedMenu"])});var Kw={vertical:"top",horizontal:"right"},Jw={vertical:"top",horizontal:"left"},MM={paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},Qw=G.forwardRef(function(n,t){var r=n.autoFocus,o=r===void 0?!0:r,l=n.children,d=n.classes,h=n.disableAutoFocusItem,f=h===void 0?!1:h,m=n.MenuListProps,g=m===void 0?{}:m,w=n.onClose,x=n.onEntering,T=n.open,P=n.PaperProps,C=P===void 0?{}:P,_=n.PopoverClasses,k=n.transitionDuration,V=k===void 0?"auto":k,j=n.TransitionProps;j=j===void 0?{}:j;var Z=j.onEntering,B=zt(j,["onEntering"]),Y=n.variant,ie=Y===void 0?"selectedMenu":Y,ae=zt(n,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"]),le=jo(),_e=o&&!f&&T,fe=G.useRef(null),de=G.useRef(null),ve=function(){return de.current},Ae=function(Oe,F){fe.current&&fe.current.adjustStyleForScrollbar(Oe,le),x&&x(Oe,F),Z&&Z(Oe,F)},ke=function(Oe){Oe.key==="Tab"&&(Oe.preventDefault(),w&&w(Oe,"tabKeyDown"))},me=-1;G.Children.map(l,function(Ee,Oe){G.isValidElement(Ee)&&(process.env.NODE_ENV!=="production"&&ka.isFragment(Ee)&&console.error(["Material-UI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
240
|
-
`)),Ee.props.disabled||(ie!=="menu"&&Ee.props.selected||me===-1)&&(me=Oe))});var be=G.Children.map(l,function(Ee,Oe){return Oe===me?G.cloneElement(Ee,{ref:function(we){de.current=Kr.findDOMNode(we),Wo(Ee.ref,we)}}):Ee});return G.createElement(qw,Me({getContentAnchorEl:ve,classes:_,onClose:w,TransitionProps:Me({onEntering:Ae},B),anchorOrigin:le.direction==="rtl"?Kw:Jw,transformOrigin:le.direction==="rtl"?Kw:Jw,PaperProps:Me({},C,{classes:Me({},C.classes,{root:d.paper})}),open:T,ref:t,transitionDuration:V},ae),G.createElement(Zw,Me({onKeyDown:ke,actions:fe,autoFocus:o&&(me===-1||f),autoFocusItem:_e,variant:ie},g,{className:Sn(d.list,g.className)}),be))});process.env.NODE_ENV!=="production"&&(Qw.propTypes={anchorEl:R.oneOfType([Ki,R.func]),autoFocus:R.bool,children:R.node,classes:R.object,disableAutoFocusItem:R.bool,MenuListProps:R.object,onClose:R.func,onEnter:Bn(R.func,"Use the `TransitionProps` prop instead."),onEntered:Bn(R.func,"Use the `TransitionProps` prop instead."),onEntering:Bn(R.func,"Use the `TransitionProps` prop instead."),onExit:Bn(R.func,"Use the `TransitionProps` prop instead."),onExited:Bn(R.func,"Use the `TransitionProps` prop instead."),onExiting:Bn(R.func,"Use the `TransitionProps` prop instead."),open:R.bool.isRequired,PaperProps:R.object,PopoverClasses:R.object,transitionDuration:R.oneOfType([R.oneOf(["auto"]),R.number,R.shape({appear:R.number,enter:R.number,exit:R.number})]),TransitionProps:R.object,variant:R.oneOf(["menu","selectedMenu"])});const NM=qn(MM,{name:"MuiMenu"})(Qw);var LM=function(n){return{root:Me({},n.typography.body1,_i({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},n.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:Me({},n.typography.body2,{minHeight:"auto"})}},$w=G.forwardRef(function(n,t){var r=n.classes,o=n.className,l=n.component,d=l===void 0?"li":l,h=n.disableGutters,f=h===void 0?!1:h,m=n.ListItemClasses,g=n.role,w=g===void 0?"menuitem":g,x=n.selected,T=n.tabIndex,P=zt(n,["classes","className","component","disableGutters","ListItemClasses","role","selected","tabIndex"]),C;return n.disabled||(C=T!==void 0?T:-1),G.createElement(Xo,Me({button:!0,role:w,tabIndex:C,component:d,selected:x,disableGutters:f,classes:Me({dense:r.dense},m),className:Sn(r.root,o,x&&r.selected,!f&&r.gutters),ref:t},P))});process.env.NODE_ENV!=="production"&&($w.propTypes={children:R.node,classes:R.object.isRequired,className:R.string,component:R.elementType,dense:R.bool,disabled:R.bool,disableGutters:R.bool,ListItemClasses:R.object,role:R.string,selected:R.bool,tabIndex:R.number});const ho=qn(LM,{name:"MuiMenuItem"})($w);var Bd=G.forwardRef(function(n,t){var r=n.classes,o=n.className,l=n.disabled,d=n.IconComponent,h=n.inputRef,f=n.variant,m=f===void 0?"standard":f,g=zt(n,["classes","className","disabled","IconComponent","inputRef","variant"]);return G.createElement(G.Fragment,null,G.createElement("select",Me({className:Sn(r.root,r.select,r[m],o,l&&r.disabled),disabled:l,ref:h||t},g)),n.multiple?null:G.createElement(d,{className:Sn(r.icon,r["icon".concat(gi(m))],l&&r.disabled)}))});process.env.NODE_ENV!=="production"&&(Bd.propTypes={children:R.node,classes:R.object.isRequired,className:R.string,disabled:R.bool,IconComponent:R.elementType.isRequired,inputRef:Jr,multiple:R.bool,name:R.string,onChange:R.func,value:R.any,variant:R.oneOf(["standard","outlined","filled"])});const eb=LI(G.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");var tb=function(n){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:n.palette.type==="light"?"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:n.palette.background.paper},"&&":{paddingRight:24}},filled:{"&&":{paddingRight:32}},outlined:{borderRadius:n.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:n.palette.action.active,"&$disabled":{color:n.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%"}}},FM=G.createElement(Fw,null),jd=G.forwardRef(function(n,t){var r=n.children,o=n.classes,l=n.IconComponent,d=l===void 0?eb:l,h=n.input,f=h===void 0?FM:h,m=n.inputProps;n.variant;var g=zt(n,["children","classes","IconComponent","input","inputProps","variant"]),w=Cw(),x=Ad({props:n,muiFormControl:w,states:["variant"]});return G.cloneElement(f,Me({inputComponent:Bd,inputProps:Me({children:r,classes:o,IconComponent:d,variant:x.variant,type:void 0},m,f?f.props.inputProps:{}),ref:t},g))});process.env.NODE_ENV!=="production"&&(jd.propTypes={children:R.node,classes:R.object,IconComponent:R.elementType,input:R.element,inputProps:R.object,onChange:R.func,value:R.any,variant:R.oneOf(["filled","outlined","standard"])}),jd.muiName="Select",qn(tb,{name:"MuiNativeSelect"})(jd);var BM=function(n){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:n.transitions.create("width",{duration:150,easing:n.transitions.easing.easeOut})},legendLabelled:{display:"block",width:"auto",textAlign:"left",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:n.transitions.create("max-width",{duration:50,easing:n.transitions.easing.easeOut}),"& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},legendNotched:{maxWidth:1e3,transition:n.transitions.create("max-width",{duration:100,easing:n.transitions.easing.easeOut,delay:50})}}},nb=G.forwardRef(function(n,t){n.children;var r=n.classes,o=n.className,l=n.label,d=n.labelWidth,h=n.notched,f=n.style,m=zt(n,["children","classes","className","label","labelWidth","notched","style"]),g=jo(),w=g.direction==="rtl"?"right":"left";if(l!==void 0)return G.createElement("fieldset",Me({"aria-hidden":!0,className:Sn(r.root,o),ref:t,style:f},m),G.createElement("legend",{className:Sn(r.legendLabelled,h&&r.legendNotched)},l?G.createElement("span",null,l):G.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}})));var x=d>0?d*.75+8:.01;return G.createElement("fieldset",Me({"aria-hidden":!0,style:Me(_i({},"padding".concat(gi(w)),8),f),className:Sn(r.root,o),ref:t},m),G.createElement("legend",{className:r.legend,style:{width:h?x:.01}},G.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}})))});process.env.NODE_ENV!=="production"&&(nb.propTypes={children:R.node,classes:R.object,className:R.string,label:R.node,labelWidth:R.number.isRequired,notched:R.bool.isRequired,style:R.object});const jM=qn(BM,{name:"PrivateNotchedOutline"})(nb);var HM=function(n){var t=n.palette.type==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative",borderRadius:n.shape.borderRadius,"&:hover $notchedOutline":{borderColor:n.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:t}},"&$focused $notchedOutline":{borderColor:n.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:n.palette.error.main},"&$disabled $notchedOutline":{borderColor:n.palette.action.disabled}},colorSecondary:{"&$focused $notchedOutline":{borderColor:n.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:n.palette.type==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:n.palette.type==="light"?null:"#fff",caretColor:n.palette.type==="light"?null:"#fff",borderRadius:"inherit"}},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}},Hd=G.forwardRef(function(n,t){var r=n.classes,o=n.fullWidth,l=o===void 0?!1:o,d=n.inputComponent,h=d===void 0?"input":d,f=n.label,m=n.labelWidth,g=m===void 0?0:m,w=n.multiline,x=w===void 0?!1:w,T=n.notched,P=n.type,C=P===void 0?"text":P,_=zt(n,["classes","fullWidth","inputComponent","label","labelWidth","multiline","notched","type"]);return G.createElement(Dd,Me({renderSuffix:function(V){return G.createElement(jM,{className:r.notchedOutline,label:f,labelWidth:g,notched:typeof T<"u"?T:!!(V.startAdornment||V.filled||V.focused)})},classes:Me({},r,{root:Sn(r.root,r.underline),notchedOutline:null}),fullWidth:l,inputComponent:h,multiline:x,ref:t,type:C},_))});process.env.NODE_ENV!=="production"&&(Hd.propTypes={autoComplete:R.string,autoFocus:R.bool,classes:R.object,color:R.oneOf(["primary","secondary"]),defaultValue:R.any,disabled:R.bool,endAdornment:R.node,error:R.bool,fullWidth:R.bool,id:R.string,inputComponent:R.elementType,inputProps:R.object,inputRef:Jr,label:R.node,labelWidth:R.number,margin:R.oneOf(["dense","none"]),maxRows:R.oneOfType([R.number,R.string]),multiline:R.bool,name:R.string,notched:R.bool,onChange:R.func,placeholder:R.string,readOnly:R.bool,required:R.bool,rows:R.oneOfType([R.number,R.string]),startAdornment:R.node,type:R.string,value:R.any}),Hd.muiName="Input";const zM=qn(HM,{name:"MuiOutlinedInput"})(Hd);/**!
|
|
241
|
-
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
242
|
-
* @version 1.16.1-lts
|
|
243
|
-
* @license
|
|
244
|
-
* Copyright (c) 2016 Federico Zivolo and contributors
|
|
245
|
-
*
|
|
246
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
247
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
248
|
-
* in the Software without restriction, including without limitation the rights
|
|
249
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
250
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
251
|
-
* furnished to do so, subject to the following conditions:
|
|
252
|
-
*
|
|
253
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
254
|
-
* copies or substantial portions of the Software.
|
|
255
|
-
*
|
|
256
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
257
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
258
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
259
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
260
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
261
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
262
|
-
* SOFTWARE.
|
|
263
|
-
*/var $a=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",VM=function(){for(var e=["Edge","Trident","Firefox"],n=0;n<e.length;n+=1)if($a&&navigator.userAgent.indexOf(e[n])>=0)return 1;return 0}();function UM(e){var n=!1;return function(){n||(n=!0,window.Promise.resolve().then(function(){n=!1,e()}))}}function WM(e){var n=!1;return function(){n||(n=!0,setTimeout(function(){n=!1,e()},VM))}}var GM=$a&&window.Promise,qM=GM?UM:WM;function rb(e){var n={};return e&&n.toString.call(e)==="[object Function]"}function fo(e,n){if(e.nodeType!==1)return[];var t=e.ownerDocument.defaultView,r=t.getComputedStyle(e,null);return n?r[n]:r}function zd(e){return e.nodeName==="HTML"?e:e.parentNode||e.host}function es(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var n=fo(e),t=n.overflow,r=n.overflowX,o=n.overflowY;return/(auto|scroll|overlay)/.test(t+o+r)?e:es(zd(e))}function ib(e){return e&&e.referenceNode?e.referenceNode:e}var ob=$a&&!!(window.MSInputMethodContext&&document.documentMode),ab=$a&&/MSIE 10/.test(navigator.userAgent);function Zo(e){return e===11?ob:e===10?ab:ob||ab}function Ko(e){if(!e)return document.documentElement;for(var n=Zo(10)?document.body:null,t=e.offsetParent||null;t===n&&e.nextElementSibling;)t=(e=e.nextElementSibling).offsetParent;var r=t&&t.nodeName;return!r||r==="BODY"||r==="HTML"?e?e.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(t.nodeName)!==-1&&fo(t,"position")==="static"?Ko(t):t}function YM(e){var n=e.nodeName;return n==="BODY"?!1:n==="HTML"||Ko(e.firstElementChild)===e}function Vd(e){return e.parentNode!==null?Vd(e.parentNode):e}function Rl(e,n){if(!e||!e.nodeType||!n||!n.nodeType)return document.documentElement;var t=e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING,r=t?e:n,o=t?n:e,l=document.createRange();l.setStart(r,0),l.setEnd(o,0);var d=l.commonAncestorContainer;if(e!==d&&n!==d||r.contains(o))return YM(d)?d:Ko(d);var h=Vd(e);return h.host?Rl(h.host,n):Rl(e,Vd(n).host)}function Jo(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",t=n==="top"?"scrollTop":"scrollLeft",r=e.nodeName;if(r==="BODY"||r==="HTML"){var o=e.ownerDocument.documentElement,l=e.ownerDocument.scrollingElement||o;return l[t]}return e[t]}function XM(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=Jo(n,"top"),o=Jo(n,"left"),l=t?-1:1;return e.top+=r*l,e.bottom+=r*l,e.left+=o*l,e.right+=o*l,e}function sb(e,n){var t=n==="x"?"Left":"Top",r=t==="Left"?"Right":"Bottom";return parseFloat(e["border"+t+"Width"])+parseFloat(e["border"+r+"Width"])}function lb(e,n,t,r){return Math.max(n["offset"+e],n["scroll"+e],t["client"+e],t["offset"+e],t["scroll"+e],Zo(10)?parseInt(t["offset"+e])+parseInt(r["margin"+(e==="Height"?"Top":"Left")])+parseInt(r["margin"+(e==="Height"?"Bottom":"Right")]):0)}function ub(e){var n=e.body,t=e.documentElement,r=Zo(10)&&getComputedStyle(t);return{height:lb("Height",n,t,r),width:lb("Width",n,t,r)}}var ZM=function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")},KM=function(){function e(n,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,o.key,o)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),Qo=function(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e},Nr=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e};function Ai(e){return Nr({},e,{right:e.left+e.width,bottom:e.top+e.height})}function Ud(e){var n={};try{if(Zo(10)){n=e.getBoundingClientRect();var t=Jo(e,"top"),r=Jo(e,"left");n.top+=t,n.left+=r,n.bottom+=t,n.right+=r}else n=e.getBoundingClientRect()}catch{}var o={left:n.left,top:n.top,width:n.right-n.left,height:n.bottom-n.top},l=e.nodeName==="HTML"?ub(e.ownerDocument):{},d=l.width||e.clientWidth||o.width,h=l.height||e.clientHeight||o.height,f=e.offsetWidth-d,m=e.offsetHeight-h;if(f||m){var g=fo(e);f-=sb(g,"x"),m-=sb(g,"y"),o.width-=f,o.height-=m}return Ai(o)}function Wd(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=Zo(10),o=n.nodeName==="HTML",l=Ud(e),d=Ud(n),h=es(e),f=fo(n),m=parseFloat(f.borderTopWidth),g=parseFloat(f.borderLeftWidth);t&&o&&(d.top=Math.max(d.top,0),d.left=Math.max(d.left,0));var w=Ai({top:l.top-d.top-m,left:l.left-d.left-g,width:l.width,height:l.height});if(w.marginTop=0,w.marginLeft=0,!r&&o){var x=parseFloat(f.marginTop),T=parseFloat(f.marginLeft);w.top-=m-x,w.bottom-=m-x,w.left-=g-T,w.right-=g-T,w.marginTop=x,w.marginLeft=T}return(r&&!t?n.contains(h):n===h&&h.nodeName!=="BODY")&&(w=XM(w,n)),w}function JM(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=e.ownerDocument.documentElement,r=Wd(e,t),o=Math.max(t.clientWidth,window.innerWidth||0),l=Math.max(t.clientHeight,window.innerHeight||0),d=n?0:Jo(t),h=n?0:Jo(t,"left"),f={top:d-r.top+r.marginTop,left:h-r.left+r.marginLeft,width:o,height:l};return Ai(f)}function cb(e){var n=e.nodeName;if(n==="BODY"||n==="HTML")return!1;if(fo(e,"position")==="fixed")return!0;var t=zd(e);return t?cb(t):!1}function hb(e){if(!e||!e.parentElement||Zo())return document.documentElement;for(var n=e.parentElement;n&&fo(n,"transform")==="none";)n=n.parentElement;return n||document.documentElement}function Gd(e,n,t,r){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,l={top:0,left:0},d=o?hb(e):Rl(e,ib(n));if(r==="viewport")l=JM(d,o);else{var h=void 0;r==="scrollParent"?(h=es(zd(n)),h.nodeName==="BODY"&&(h=e.ownerDocument.documentElement)):r==="window"?h=e.ownerDocument.documentElement:h=r;var f=Wd(h,d,o);if(h.nodeName==="HTML"&&!cb(d)){var m=ub(e.ownerDocument),g=m.height,w=m.width;l.top+=f.top-f.marginTop,l.bottom=g+f.top,l.left+=f.left-f.marginLeft,l.right=w+f.left}else l=f}t=t||0;var x=typeof t=="number";return l.left+=x?t:t.left||0,l.top+=x?t:t.top||0,l.right-=x?t:t.right||0,l.bottom-=x?t:t.bottom||0,l}function QM(e){var n=e.width,t=e.height;return n*t}function db(e,n,t,r,o){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var d=Gd(t,r,l,o),h={top:{width:d.width,height:n.top-d.top},right:{width:d.right-n.right,height:d.height},bottom:{width:d.width,height:d.bottom-n.bottom},left:{width:n.left-d.left,height:d.height}},f=Object.keys(h).map(function(x){return Nr({key:x},h[x],{area:QM(h[x])})}).sort(function(x,T){return T.area-x.area}),m=f.filter(function(x){var T=x.width,P=x.height;return T>=t.clientWidth&&P>=t.clientHeight}),g=m.length>0?m[0].key:f[0].key,w=e.split("-")[1];return g+(w?"-"+w:"")}function fb(e,n,t){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,o=r?hb(n):Rl(n,ib(t));return Wd(t,o,r)}function pb(e){var n=e.ownerDocument.defaultView,t=n.getComputedStyle(e),r=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),o=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0),l={width:e.offsetWidth+o,height:e.offsetHeight+r};return l}function Ol(e){var n={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(t){return n[t]})}function mb(e,n,t){t=t.split("-")[0];var r=pb(e),o={width:r.width,height:r.height},l=["right","left"].indexOf(t)!==-1,d=l?"top":"left",h=l?"left":"top",f=l?"height":"width",m=l?"width":"height";return o[d]=n[d]+n[f]/2-r[f]/2,t===h?o[h]=n[h]-r[m]:o[h]=n[Ol(h)],o}function ts(e,n){return Array.prototype.find?e.find(n):e.filter(n)[0]}function $M(e,n,t){if(Array.prototype.findIndex)return e.findIndex(function(o){return o[n]===t});var r=ts(e,function(o){return o[n]===t});return e.indexOf(r)}function gb(e,n,t){var r=t===void 0?e:e.slice(0,$M(e,"name",t));return r.forEach(function(o){o.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var l=o.function||o.fn;o.enabled&&rb(l)&&(n.offsets.popper=Ai(n.offsets.popper),n.offsets.reference=Ai(n.offsets.reference),n=l(n,o))}),n}function eN(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=fb(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=db(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=mb(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=gb(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function vb(e,n){return e.some(function(t){var r=t.name,o=t.enabled;return o&&r===n})}function qd(e){for(var n=[!1,"ms","Webkit","Moz","O"],t=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<n.length;r++){var o=n[r],l=o?""+o+t:e;if(typeof document.body.style[l]<"u")return l}return null}function tN(){return this.state.isDestroyed=!0,vb(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[qd("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function yb(e){var n=e.ownerDocument;return n?n.defaultView:window}function wb(e,n,t,r){var o=e.nodeName==="BODY",l=o?e.ownerDocument.defaultView:e;l.addEventListener(n,t,{passive:!0}),o||wb(es(l.parentNode),n,t,r),r.push(l)}function nN(e,n,t,r){t.updateBound=r,yb(e).addEventListener("resize",t.updateBound,{passive:!0});var o=es(e);return wb(o,"scroll",t.updateBound,t.scrollParents),t.scrollElement=o,t.eventsEnabled=!0,t}function rN(){this.state.eventsEnabled||(this.state=nN(this.reference,this.options,this.state,this.scheduleUpdate))}function iN(e,n){return yb(e).removeEventListener("resize",n.updateBound),n.scrollParents.forEach(function(t){t.removeEventListener("scroll",n.updateBound)}),n.updateBound=null,n.scrollParents=[],n.scrollElement=null,n.eventsEnabled=!1,n}function oN(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=iN(this.reference,this.state))}function Yd(e){return e!==""&&!isNaN(parseFloat(e))&&isFinite(e)}function Xd(e,n){Object.keys(n).forEach(function(t){var r="";["width","height","top","right","bottom","left"].indexOf(t)!==-1&&Yd(n[t])&&(r="px"),e.style[t]=n[t]+r})}function aN(e,n){Object.keys(n).forEach(function(t){var r=n[t];r!==!1?e.setAttribute(t,n[t]):e.removeAttribute(t)})}function sN(e){return Xd(e.instance.popper,e.styles),aN(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&Xd(e.arrowElement,e.arrowStyles),e}function lN(e,n,t,r,o){var l=fb(o,n,e,t.positionFixed),d=db(t.placement,l,n,e,t.modifiers.flip.boundariesElement,t.modifiers.flip.padding);return n.setAttribute("x-placement",d),Xd(n,{position:t.positionFixed?"fixed":"absolute"}),t}function uN(e,n){var t=e.offsets,r=t.popper,o=t.reference,l=Math.round,d=Math.floor,h=function(k){return k},f=l(o.width),m=l(r.width),g=["left","right"].indexOf(e.placement)!==-1,w=e.placement.indexOf("-")!==-1,x=f%2===m%2,T=f%2===1&&m%2===1,P=n?g||w||x?l:d:h,C=n?l:h;return{left:P(T&&!w&&n?r.left-1:r.left),top:C(r.top),bottom:C(r.bottom),right:P(r.right)}}var cN=$a&&/Firefox/i.test(navigator.userAgent);function hN(e,n){var t=n.x,r=n.y,o=e.offsets.popper,l=ts(e.instance.modifiers,function(j){return j.name==="applyStyle"}).gpuAcceleration;l!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var d=l!==void 0?l:n.gpuAcceleration,h=Ko(e.instance.popper),f=Ud(h),m={position:o.position},g=uN(e,window.devicePixelRatio<2||!cN),w=t==="bottom"?"top":"bottom",x=r==="right"?"left":"right",T=qd("transform"),P=void 0,C=void 0;if(w==="bottom"?h.nodeName==="HTML"?C=-h.clientHeight+g.bottom:C=-f.height+g.bottom:C=g.top,x==="right"?h.nodeName==="HTML"?P=-h.clientWidth+g.right:P=-f.width+g.right:P=g.left,d&&T)m[T]="translate3d("+P+"px, "+C+"px, 0)",m[w]=0,m[x]=0,m.willChange="transform";else{var _=w==="bottom"?-1:1,k=x==="right"?-1:1;m[w]=C*_,m[x]=P*k,m.willChange=w+", "+x}var V={"x-placement":e.placement};return e.attributes=Nr({},V,e.attributes),e.styles=Nr({},m,e.styles),e.arrowStyles=Nr({},e.offsets.arrow,e.arrowStyles),e}function bb(e,n,t){var r=ts(e,function(h){var f=h.name;return f===n}),o=!!r&&e.some(function(h){return h.name===t&&h.enabled&&h.order<r.order});if(!o){var l="`"+n+"`",d="`"+t+"`";console.warn(d+" modifier is required by "+l+" modifier in order to work, be sure to include it before "+l+"!")}return o}function dN(e,n){var t;if(!bb(e.instance.modifiers,"arrow","keepTogether"))return e;var r=n.element;if(typeof r=="string"){if(r=e.instance.popper.querySelector(r),!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 o=e.placement.split("-")[0],l=e.offsets,d=l.popper,h=l.reference,f=["left","right"].indexOf(o)!==-1,m=f?"height":"width",g=f?"Top":"Left",w=g.toLowerCase(),x=f?"left":"top",T=f?"bottom":"right",P=pb(r)[m];h[T]-P<d[w]&&(e.offsets.popper[w]-=d[w]-(h[T]-P)),h[w]+P>d[T]&&(e.offsets.popper[w]+=h[w]+P-d[T]),e.offsets.popper=Ai(e.offsets.popper);var C=h[w]+h[m]/2-P/2,_=fo(e.instance.popper),k=parseFloat(_["margin"+g]),V=parseFloat(_["border"+g+"Width"]),j=C-e.offsets.popper[w]-k-V;return j=Math.max(Math.min(d[m]-P,j),0),e.arrowElement=r,e.offsets.arrow=(t={},Qo(t,w,Math.round(j)),Qo(t,x,""),t),e}function fN(e){return e==="end"?"start":e==="start"?"end":e}var Eb=["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"],Zd=Eb.slice(3);function xb(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=Zd.indexOf(e),r=Zd.slice(t+1).concat(Zd.slice(0,t));return n?r.reverse():r}var Kd={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function pN(e,n){if(vb(e.instance.modifiers,"inner")||e.flipped&&e.placement===e.originalPlacement)return e;var t=Gd(e.instance.popper,e.instance.reference,n.padding,n.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],o=Ol(r),l=e.placement.split("-")[1]||"",d=[];switch(n.behavior){case Kd.FLIP:d=[r,o];break;case Kd.CLOCKWISE:d=xb(r);break;case Kd.COUNTERCLOCKWISE:d=xb(r,!0);break;default:d=n.behavior}return d.forEach(function(h,f){if(r!==h||d.length===f+1)return e;r=e.placement.split("-")[0],o=Ol(r);var m=e.offsets.popper,g=e.offsets.reference,w=Math.floor,x=r==="left"&&w(m.right)>w(g.left)||r==="right"&&w(m.left)<w(g.right)||r==="top"&&w(m.bottom)>w(g.top)||r==="bottom"&&w(m.top)<w(g.bottom),T=w(m.left)<w(t.left),P=w(m.right)>w(t.right),C=w(m.top)<w(t.top),_=w(m.bottom)>w(t.bottom),k=r==="left"&&T||r==="right"&&P||r==="top"&&C||r==="bottom"&&_,V=["top","bottom"].indexOf(r)!==-1,j=!!n.flipVariations&&(V&&l==="start"&&T||V&&l==="end"&&P||!V&&l==="start"&&C||!V&&l==="end"&&_),Z=!!n.flipVariationsByContent&&(V&&l==="start"&&P||V&&l==="end"&&T||!V&&l==="start"&&_||!V&&l==="end"&&C),B=j||Z;(x||k||B)&&(e.flipped=!0,(x||k)&&(r=d[f+1]),B&&(l=fN(l)),e.placement=r+(l?"-"+l:""),e.offsets.popper=Nr({},e.offsets.popper,mb(e.instance.popper,e.offsets.reference,e.placement)),e=gb(e.instance.modifiers,e,"flip"))}),e}function mN(e){var n=e.offsets,t=n.popper,r=n.reference,o=e.placement.split("-")[0],l=Math.floor,d=["top","bottom"].indexOf(o)!==-1,h=d?"right":"bottom",f=d?"left":"top",m=d?"width":"height";return t[h]<l(r[f])&&(e.offsets.popper[f]=l(r[f])-t[m]),t[f]>l(r[h])&&(e.offsets.popper[f]=l(r[h])),e}function gN(e,n,t,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),l=+o[1],d=o[2];if(!l)return e;if(d.indexOf("%")===0){var h=void 0;switch(d){case"%p":h=t;break;case"%":case"%r":default:h=r}var f=Ai(h);return f[n]/100*l}else if(d==="vh"||d==="vw"){var m=void 0;return d==="vh"?m=Math.max(document.documentElement.clientHeight,window.innerHeight||0):m=Math.max(document.documentElement.clientWidth,window.innerWidth||0),m/100*l}else return l}function vN(e,n,t,r){var o=[0,0],l=["right","left"].indexOf(r)!==-1,d=e.split(/(\+|\-)/).map(function(g){return g.trim()}),h=d.indexOf(ts(d,function(g){return g.search(/,|\s/)!==-1}));d[h]&&d[h].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var f=/\s*,\s*|\s+/,m=h!==-1?[d.slice(0,h).concat([d[h].split(f)[0]]),[d[h].split(f)[1]].concat(d.slice(h+1))]:[d];return m=m.map(function(g,w){var x=(w===1?!l:l)?"height":"width",T=!1;return g.reduce(function(P,C){return P[P.length-1]===""&&["+","-"].indexOf(C)!==-1?(P[P.length-1]=C,T=!0,P):T?(P[P.length-1]+=C,T=!1,P):P.concat(C)},[]).map(function(P){return gN(P,x,n,t)})}),m.forEach(function(g,w){g.forEach(function(x,T){Yd(x)&&(o[w]+=x*(g[T-1]==="-"?-1:1))})}),o}function yN(e,n){var t=n.offset,r=e.placement,o=e.offsets,l=o.popper,d=o.reference,h=r.split("-")[0],f=void 0;return Yd(+t)?f=[+t,0]:f=vN(t,l,d,h),h==="left"?(l.top+=f[0],l.left-=f[1]):h==="right"?(l.top+=f[0],l.left+=f[1]):h==="top"?(l.left+=f[0],l.top-=f[1]):h==="bottom"&&(l.left+=f[0],l.top+=f[1]),e.popper=l,e}function wN(e,n){var t=n.boundariesElement||Ko(e.instance.popper);e.instance.reference===t&&(t=Ko(t));var r=qd("transform"),o=e.instance.popper.style,l=o.top,d=o.left,h=o[r];o.top="",o.left="",o[r]="";var f=Gd(e.instance.popper,e.instance.reference,n.padding,t,e.positionFixed);o.top=l,o.left=d,o[r]=h,n.boundaries=f;var m=n.priority,g=e.offsets.popper,w={primary:function(T){var P=g[T];return g[T]<f[T]&&!n.escapeWithReference&&(P=Math.max(g[T],f[T])),Qo({},T,P)},secondary:function(T){var P=T==="right"?"left":"top",C=g[P];return g[T]>f[T]&&!n.escapeWithReference&&(C=Math.min(g[P],f[T]-(T==="right"?g.width:g.height))),Qo({},P,C)}};return m.forEach(function(x){var T=["left","top"].indexOf(x)!==-1?"primary":"secondary";g=Nr({},g,w[T](x))}),e.offsets.popper=g,e}function bN(e){var n=e.placement,t=n.split("-")[0],r=n.split("-")[1];if(r){var o=e.offsets,l=o.reference,d=o.popper,h=["bottom","top"].indexOf(t)!==-1,f=h?"left":"top",m=h?"width":"height",g={start:Qo({},f,l[f]),end:Qo({},f,l[f]+l[m]-d[m])};e.offsets.popper=Nr({},d,g[r])}return e}function EN(e){if(!bb(e.instance.modifiers,"hide","preventOverflow"))return e;var n=e.offsets.reference,t=ts(e.instance.modifiers,function(r){return r.name==="preventOverflow"}).boundaries;if(n.bottom<t.top||n.left>t.right||n.top>t.bottom||n.right<t.left){if(e.hide===!0)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(e.hide===!1)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function xN(e){var n=e.placement,t=n.split("-")[0],r=e.offsets,o=r.popper,l=r.reference,d=["left","right"].indexOf(t)!==-1,h=["top","left"].indexOf(t)===-1;return o[d?"left":"top"]=l[t]-(h?o[d?"width":"height"]:0),e.placement=Ol(n),e.offsets.popper=Ai(o),e}var SN={shift:{order:100,enabled:!0,fn:bN},offset:{order:200,enabled:!0,fn:yN,offset:0},preventOverflow:{order:300,enabled:!0,fn:wN,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:mN},arrow:{order:500,enabled:!0,fn:dN,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:pN,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:xN},hide:{order:800,enabled:!0,fn:EN},computeStyle:{order:850,enabled:!0,fn:hN,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:sN,onLoad:lN,gpuAcceleration:void 0}},TN={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:SN},kl=function(){function e(n,t){var r=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};ZM(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=qM(this.update.bind(this)),this.options=Nr({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=n&&n.jquery?n[0]:n,this.popper=t&&t.jquery?t[0]:t,this.options.modifiers={},Object.keys(Nr({},e.Defaults.modifiers,o.modifiers)).forEach(function(d){r.options.modifiers[d]=Nr({},e.Defaults.modifiers[d]||{},o.modifiers?o.modifiers[d]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(d){return Nr({name:d},r.options.modifiers[d])}).sort(function(d,h){return d.order-h.order}),this.modifiers.forEach(function(d){d.enabled&&rb(d.onLoad)&&d.onLoad(r.reference,r.popper,r.options,d,r.state)}),this.update();var l=this.options.eventsEnabled;l&&this.enableEventListeners(),this.state.eventsEnabled=l}return KM(e,[{key:"update",value:function(){return eN.call(this)}},{key:"destroy",value:function(){return tN.call(this)}},{key:"enableEventListeners",value:function(){return rN.call(this)}},{key:"disableEventListeners",value:function(){return oN.call(this)}}]),e}();kl.Utils=(typeof window<"u"?window:global).PopperUtils,kl.placements=Eb,kl.Defaults=TN;function _N(e,n){var t=n&&n.direction||"ltr";if(t==="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}}function Jd(e){return typeof e=="function"?e():e}var CN=typeof window<"u"?G.useLayoutEffect:G.useEffect,PN={},Qd=G.forwardRef(function(n,t){var r=n.anchorEl,o=n.children,l=n.container,d=n.disablePortal,h=d===void 0?!1:d,f=n.keepMounted,m=f===void 0?!1:f,g=n.modifiers,w=n.open,x=n.placement,T=x===void 0?"bottom":x,P=n.popperOptions,C=P===void 0?PN:P,_=n.popperRef,k=n.style,V=n.transition,j=V===void 0?!1:V,Z=zt(n,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition"]),B=G.useRef(null),Y=Un(B,t),ie=G.useRef(null),ae=Un(ie,_),le=G.useRef(ae);CN(function(){le.current=ae},[ae]),G.useImperativeHandle(_,function(){return ie.current},[]);var _e=G.useState(!0),fe=_e[0],de=_e[1],ve=eo(),Ae=_N(T,ve),ke=G.useState(Ae),me=ke[0],be=ke[1];G.useEffect(function(){ie.current&&ie.current.update()});var Ee=G.useCallback(function(){if(!(!B.current||!r||!w)){ie.current&&(ie.current.destroy(),le.current(null));var Be=function(it){be(it.placement)},Je=Jd(r);if(process.env.NODE_ENV!=="production"&&Je&&Je.nodeType===1){var He=Je.getBoundingClientRect();process.env.NODE_ENV!=="test"&&He.top===0&&He.left===0&&He.right===0&&He.bottom===0&&console.warn(["Material-UI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
264
|
-
`))}var Ze=new kl(Jd(r),B.current,Me({placement:Ae},C,{modifiers:Me({},h?{}:{preventOverflow:{boundariesElement:"window"}},g,C.modifiers),onCreate:Ya(Be,C.onCreate),onUpdate:Ya(Be,C.onUpdate)}));le.current(Ze)}},[r,h,g,w,Ae,C]),Oe=G.useCallback(function(Be){Wo(Y,Be),Ee()},[Y,Ee]),F=function(){de(!1)},we=function(){ie.current&&(ie.current.destroy(),le.current(null))},Ne=function(){de(!0),we()};if(G.useEffect(function(){return function(){we()}},[]),G.useEffect(function(){!w&&!j&&we()},[w,j]),!m&&!w&&(!j||fe))return null;var X={placement:me};return j&&(X.TransitionProps={in:w,onEnter:F,onExited:Ne}),G.createElement(Za,{disablePortal:h,container:l},G.createElement("div",Me({ref:Oe,role:"tooltip"},Z,{style:Me({position:"fixed",top:0,left:0,display:!w&&m&&!j?"none":null},k)}),typeof o=="function"?o(X):o))});process.env.NODE_ENV!=="production"&&(Qd.propTypes={anchorEl:di(R.oneOfType([Ki,R.object,R.func]),function(e){if(e.open){var n=Jd(e.anchorEl);if(n&&n.nodeType===1){var t=n.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&t.top===0&&t.left===0&&t.right===0&&t.bottom===0)return new Error(["Material-UI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
265
|
-
`))}else if(!n||typeof n.clientWidth!="number"||typeof n.clientHeight!="number"||typeof n.getBoundingClientRect!="function")return new Error(["Material-UI: The `anchorEl` prop provided to the component is invalid.","It should be an HTML element instance or a referenceObject ","(https://popper.js.org/docs/v1/#referenceObject)."].join(`
|
|
266
|
-
`))}return null}),children:R.oneOfType([R.node,R.func]).isRequired,container:R.oneOfType([Ki,R.instanceOf(G.Component),R.func]),disablePortal:R.bool,keepMounted:R.bool,modifiers:R.object,open:R.bool.isRequired,placement:R.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:R.object,popperRef:Jr,style:R.object,transition:R.bool});function Sb(e,n){return fi(n)==="object"&&n!==null?e===n:String(e)===String(n)}function RN(e){return e==null||typeof e=="string"&&!e.trim()}var Tb=G.forwardRef(function(n,t){var r=n["aria-label"],o=n.autoFocus,l=n.autoWidth,d=n.children,h=n.classes,f=n.className,m=n.defaultValue,g=n.disabled,w=n.displayEmpty,x=n.IconComponent,T=n.inputRef,P=n.labelId,C=n.MenuProps,_=C===void 0?{}:C,k=n.multiple,V=n.name,j=n.onBlur,Z=n.onChange,B=n.onClose,Y=n.onFocus,ie=n.onOpen,ae=n.open,le=n.readOnly,_e=n.renderValue,fe=n.SelectDisplayProps,de=fe===void 0?{}:fe,ve=n.tabIndex;n.type;var Ae=n.value,ke=n.variant,me=ke===void 0?"standard":ke,be=zt(n,["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"]),Ee=FI({controlled:Ae,default:m,name:"Select"}),Oe=Kc(Ee,2),F=Oe[0],we=Oe[1],Ne=G.useRef(null),X=G.useState(null),Be=X[0],Je=X[1],He=G.useRef(ae!=null),Ze=He.current,Qe=G.useState(),it=Qe[0],Ke=Qe[1],Le=G.useState(!1),pe=Le[0],mt=Le[1],Ce=Un(t,T);G.useImperativeHandle(Ce,function(){return{focus:function(){Be.focus()},node:Ne.current,value:F}},[Be,F]),G.useEffect(function(){o&&Be&&Be.focus()},[o,Be]),G.useEffect(function(){if(Be){var ye=vi(Be).getElementById(P);if(ye){var Re=function(){getSelection().isCollapsed&&Be.focus()};return ye.addEventListener("click",Re),function(){ye.removeEventListener("click",Re)}}}},[P,Be]);var Pt=function(Re,ot){Re?ie&&ie(ot):B&&B(ot),Ze||(Ke(l?null:Be.clientWidth),mt(Re))},wt=function(Re){Re.button===0&&(Re.preventDefault(),Be.focus(),Pt(!0,Re))},D=function(Re){Pt(!1,Re)},K=G.Children.toArray(d),xe=function(Re){var ot=K.map(function(je){return je.props.value}).indexOf(Re.target.value);if(ot!==-1){var bt=K[ot];we(bt.props.value),Z&&Z(Re,bt)}},ze=function(Re){return function(ot){k||Pt(!1,ot);var bt;if(k){bt=Array.isArray(F)?F.slice():[];var je=F.indexOf(Re.props.value);je===-1?bt.push(Re.props.value):bt.splice(je,1)}else bt=Re.props.value;Re.props.onClick&&Re.props.onClick(ot),F!==bt&&(we(bt),Z&&(ot.persist(),Object.defineProperty(ot,"target",{writable:!0,value:{value:bt,name:V}}),Z(ot,Re)))}},Ve=function(Re){if(!le){var ot=[" ","ArrowUp","ArrowDown","Enter"];ot.indexOf(Re.key)!==-1&&(Re.preventDefault(),Pt(!0,Re))}},ut=Be!==null&&(Ze?ae:pe),Ye=function(Re){!ut&&j&&(Re.persist(),Object.defineProperty(Re,"target",{writable:!0,value:{value:F,name:V}}),j(Re))};delete be["aria-invalid"];var gt,Ct,St=[],ge=!1,Ie=!1;(Nw({value:F})||w)&&(_e?gt=_e(F):ge=!0);var M=K.map(function(ye){if(!G.isValidElement(ye))return null;process.env.NODE_ENV!=="production"&&ka.isFragment(ye)&&console.error(["Material-UI: The Select component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
267
|
-
`));var Re;if(k){if(!Array.isArray(F))throw new Error(process.env.NODE_ENV!=="production"?"Material-UI: The `value` prop must be an array when using the `Select` component with `multiple`.":Do(2));Re=F.some(function(ot){return Sb(ot,ye.props.value)}),Re&&ge&&St.push(ye.props.children)}else Re=Sb(F,ye.props.value),Re&&ge&&(Ct=ye.props.children);return Re&&(Ie=!0),G.cloneElement(ye,{"aria-selected":Re?"true":void 0,onClick:ze(ye),onKeyUp:function(bt){bt.key===" "&&bt.preventDefault(),ye.props.onKeyUp&&ye.props.onKeyUp(bt)},role:"option",selected:Re,value:void 0,"data-value":ye.props.value})});process.env.NODE_ENV!=="production"&&G.useEffect(function(){if(!Ie&&!k&&F!==""){var ye=K.map(function(Re){return Re.props.value});console.warn(["Material-UI: You have provided an out-of-range value `".concat(F,"` for the select ").concat(V?'(name="'.concat(V,'") '):"","component."),"Consider providing a value that matches one of the available options or ''.","The available values are ".concat(ye.filter(function(Re){return Re!=null}).map(function(Re){return"`".concat(Re,"`")}).join(", ")||'""',".")].join(`
|
|
268
|
-
`))}},[Ie,K,k,V,F]),ge&&(gt=k?St.join(", "):Ct);var L=it;!l&&Ze&&Be&&(L=Be.clientWidth);var q;typeof ve<"u"?q=ve:q=g?null:0;var J=de.id||(V?"mui-component-select-".concat(V):void 0);return G.createElement(G.Fragment,null,G.createElement("div",Me({className:Sn(h.root,h.select,h.selectMenu,h[me],f,g&&h.disabled),ref:Je,tabIndex:q,role:"button","aria-disabled":g?"true":void 0,"aria-expanded":ut?"true":void 0,"aria-haspopup":"listbox","aria-label":r,"aria-labelledby":[P,J].filter(Boolean).join(" ")||void 0,onKeyDown:Ve,onMouseDown:g||le?null:wt,onBlur:Ye,onFocus:Y},de,{id:J}),RN(gt)?G.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):gt),G.createElement("input",Me({value:Array.isArray(F)?F.join(","):F,name:V,ref:Ne,"aria-hidden":!0,onChange:xe,tabIndex:-1,className:h.nativeInput,autoFocus:o},be)),G.createElement(x,{className:Sn(h.icon,h["icon".concat(gi(me))],ut&&h.iconOpen,g&&h.disabled)}),G.createElement(NM,Me({id:"menu-".concat(V||""),anchorEl:Be,open:ut,onClose:D},_,{MenuListProps:Me({"aria-labelledby":P,role:"listbox",disableListWrap:!0},_.MenuListProps),PaperProps:Me({},_.PaperProps,{style:Me({minWidth:L},_.PaperProps!=null?_.PaperProps.style:null)})}),M))});process.env.NODE_ENV!=="production"&&(Tb.propTypes={"aria-label":R.string,autoFocus:R.bool,autoWidth:R.bool,children:R.node,classes:R.object.isRequired,className:R.string,defaultValue:R.any,disabled:R.bool,displayEmpty:R.bool,IconComponent:R.elementType.isRequired,inputRef:Jr,labelId:R.string,MenuProps:R.object,multiple:R.bool,name:R.string,onBlur:R.func,onChange:R.func,onClose:R.func,onFocus:R.func,onOpen:R.func,open:R.bool,readOnly:R.bool,renderValue:R.func,SelectDisplayProps:R.object,tabIndex:R.oneOfType([R.number,R.string]),type:R.any,value:R.any,variant:R.oneOf(["standard","outlined","filled"])});var ON=tb,kN=G.createElement(Fw,null),AN=G.createElement(TM,null),$d=G.forwardRef(function e(n,t){var r=n.autoWidth,o=r===void 0?!1:r,l=n.children,d=n.classes,h=n.displayEmpty,f=h===void 0?!1:h,m=n.IconComponent,g=m===void 0?eb:m,w=n.id,x=n.input,T=n.inputProps,P=n.label,C=n.labelId,_=n.labelWidth,k=_===void 0?0:_,V=n.MenuProps,j=n.multiple,Z=j===void 0?!1:j,B=n.native,Y=B===void 0?!1:B,ie=n.onClose,ae=n.onOpen,le=n.open,_e=n.renderValue,fe=n.SelectDisplayProps,de=n.variant,ve=de===void 0?"standard":de,Ae=zt(n,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","label","labelId","labelWidth","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"]),ke=Y?Bd:Tb,me=Cw(),be=Ad({props:n,muiFormControl:me,states:["variant"]}),Ee=be.variant||ve,Oe=x||{standard:kN,outlined:G.createElement(zM,{label:P,labelWidth:k}),filled:AN}[Ee];return G.cloneElement(Oe,Me({inputComponent:ke,inputProps:Me({children:l,IconComponent:g,variant:Ee,type:void 0,multiple:Z},Y?{id:w}:{autoWidth:o,displayEmpty:f,labelId:C,MenuProps:V,onClose:ie,onOpen:ae,open:le,renderValue:_e,SelectDisplayProps:Me({id:w},fe)},T,{classes:T?Th({baseClasses:d,newClasses:T.classes,Component:e}):d},x?x.props.inputProps:{}),ref:t},Ae))});process.env.NODE_ENV!=="production"&&($d.propTypes={autoWidth:R.bool,children:R.node,classes:R.object,defaultValue:R.any,displayEmpty:R.bool,IconComponent:R.elementType,id:R.string,input:R.element,inputProps:R.object,label:R.node,labelId:R.string,labelWidth:R.number,MenuProps:R.object,multiple:R.bool,native:R.bool,onChange:R.func,onClose:R.func,onOpen:R.func,open:R.bool,renderValue:R.func,SelectDisplayProps:R.object,value:R.any,variant:R.oneOf(["filled","outlined","standard"])}),$d.muiName="Select";const ef=qn(ON,{name:"MuiSelect"})($d);var tf={},nf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var n;(function(r){r.Root="root",r.Text="text",r.Directive="directive",r.Comment="comment",r.Script="script",r.Style="style",r.Tag="tag",r.CDATA="cdata",r.Doctype="doctype"})(n=e.ElementType||(e.ElementType={}));function t(r){return r.type===n.Tag||r.type===n.Script||r.type===n.Style}e.isTag=t,e.Root=n.Root,e.Text=n.Text,e.Directive=n.Directive,e.Comment=n.Comment,e.Script=n.Script,e.Style=n.Style,e.Tag=n.Tag,e.CDATA=n.CDATA,e.Doctype=n.Doctype})(nf);var Ut={},Di=Gn&&Gn.__extends||function(){var e=function(n,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(r[l]=o[l])},e(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");e(n,t);function r(){this.constructor=n}n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),ns=Gn&&Gn.__assign||function(){return ns=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++){n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},ns.apply(this,arguments)};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.cloneNode=Ut.hasChildren=Ut.isDocument=Ut.isDirective=Ut.isComment=Ut.isText=Ut.isCDATA=Ut.isTag=Ut.Element=Ut.Document=Ut.CDATA=Ut.NodeWithChildren=Ut.ProcessingInstruction=Ut.Comment=Ut.Text=Ut.DataNode=Ut.Node=void 0;var pr=nf,rf=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(n){this.parent=n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(n){this.prev=n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(n){this.next=n},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(n){return n===void 0&&(n=!1),of(this,n)},e}();Ut.Node=rf;var Al=function(e){Di(n,e);function n(t){var r=e.call(this)||this;return r.data=t,r}return Object.defineProperty(n.prototype,"nodeValue",{get:function(){return this.data},set:function(t){this.data=t},enumerable:!1,configurable:!0}),n}(rf);Ut.DataNode=Al;var _b=function(e){Di(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=pr.ElementType.Text,t}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),n}(Al);Ut.Text=_b;var Cb=function(e){Di(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=pr.ElementType.Comment,t}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),n}(Al);Ut.Comment=Cb;var Pb=function(e){Di(n,e);function n(t,r){var o=e.call(this,r)||this;return o.name=t,o.type=pr.ElementType.Directive,o}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),n}(Al);Ut.ProcessingInstruction=Pb;var Dl=function(e){Di(n,e);function n(t){var r=e.call(this)||this;return r.children=t,r}return Object.defineProperty(n.prototype,"firstChild",{get:function(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"childNodes",{get:function(){return this.children},set:function(t){this.children=t},enumerable:!1,configurable:!0}),n}(rf);Ut.NodeWithChildren=Dl;var Rb=function(e){Di(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=pr.ElementType.CDATA,t}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),n}(Dl);Ut.CDATA=Rb;var Ob=function(e){Di(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=pr.ElementType.Root,t}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),n}(Dl);Ut.Document=Ob;var kb=function(e){Di(n,e);function n(t,r,o,l){o===void 0&&(o=[]),l===void 0&&(l=t==="script"?pr.ElementType.Script:t==="style"?pr.ElementType.Style:pr.ElementType.Tag);var d=e.call(this,o)||this;return d.name=t,d.attribs=r,d.type=l,d}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tagName",{get:function(){return this.name},set:function(t){this.name=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"attributes",{get:function(){var t=this;return Object.keys(this.attribs).map(function(r){var o,l;return{name:r,value:t.attribs[r],namespace:(o=t["x-attribsNamespace"])===null||o===void 0?void 0:o[r],prefix:(l=t["x-attribsPrefix"])===null||l===void 0?void 0:l[r]}})},enumerable:!1,configurable:!0}),n}(Dl);Ut.Element=kb;function Ab(e){return(0,pr.isTag)(e)}Ut.isTag=Ab;function Db(e){return e.type===pr.ElementType.CDATA}Ut.isCDATA=Db;function Ib(e){return e.type===pr.ElementType.Text}Ut.isText=Ib;function Mb(e){return e.type===pr.ElementType.Comment}Ut.isComment=Mb;function Nb(e){return e.type===pr.ElementType.Directive}Ut.isDirective=Nb;function Lb(e){return e.type===pr.ElementType.Root}Ut.isDocument=Lb;function DN(e){return Object.prototype.hasOwnProperty.call(e,"children")}Ut.hasChildren=DN;function of(e,n){n===void 0&&(n=!1);var t;if(Ib(e))t=new _b(e.data);else if(Mb(e))t=new Cb(e.data);else if(Ab(e)){var r=n?af(e.children):[],o=new kb(e.name,ns({},e.attribs),r);r.forEach(function(f){return f.parent=o}),e.namespace!=null&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=ns({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=ns({},e["x-attribsPrefix"])),t=o}else if(Db(e)){var r=n?af(e.children):[],l=new Rb(r);r.forEach(function(m){return m.parent=l}),t=l}else if(Lb(e)){var r=n?af(e.children):[],d=new Ob(r);r.forEach(function(m){return m.parent=d}),e["x-mode"]&&(d["x-mode"]=e["x-mode"]),t=d}else if(Nb(e)){var h=new Pb(e.name,e.data);e["x-name"]!=null&&(h["x-name"]=e["x-name"],h["x-publicId"]=e["x-publicId"],h["x-systemId"]=e["x-systemId"]),t=h}else throw new Error("Not implemented yet: ".concat(e.type));return t.startIndex=e.startIndex,t.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(t.sourceCodeLocation=e.sourceCodeLocation),t}Ut.cloneNode=of;function af(e){for(var n=e.map(function(r){return of(r,!0)}),t=1;t<n.length;t++)n[t].prev=n[t-1],n[t-1].next=n[t];return n}(function(e){var n=Gn&&Gn.__createBinding||(Object.create?function(h,f,m,g){g===void 0&&(g=m);var w=Object.getOwnPropertyDescriptor(f,m);(!w||("get"in w?!f.__esModule:w.writable||w.configurable))&&(w={enumerable:!0,get:function(){return f[m]}}),Object.defineProperty(h,g,w)}:function(h,f,m,g){g===void 0&&(g=m),h[g]=f[m]}),t=Gn&&Gn.__exportStar||function(h,f){for(var m in h)m!=="default"&&!Object.prototype.hasOwnProperty.call(f,m)&&n(f,h,m)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var r=nf,o=Ut;t(Ut,e);var l={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},d=function(){function h(f,m,g){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof m=="function"&&(g=m,m=l),typeof f=="object"&&(m=f,f=void 0),this.callback=f??null,this.options=m??l,this.elementCB=g??null}return h.prototype.onparserinit=function(f){this.parser=f},h.prototype.onreset=function(){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},h.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},h.prototype.onerror=function(f){this.handleCallback(f)},h.prototype.onclosetag=function(){this.lastNode=null;var f=this.tagStack.pop();this.options.withEndIndices&&(f.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(f)},h.prototype.onopentag=function(f,m){var g=this.options.xmlMode?r.ElementType.Tag:void 0,w=new o.Element(f,m,void 0,g);this.addNode(w),this.tagStack.push(w)},h.prototype.ontext=function(f){var m=this.lastNode;if(m&&m.type===r.ElementType.Text)m.data+=f,this.options.withEndIndices&&(m.endIndex=this.parser.endIndex);else{var g=new o.Text(f);this.addNode(g),this.lastNode=g}},h.prototype.oncomment=function(f){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment){this.lastNode.data+=f;return}var m=new o.Comment(f);this.addNode(m),this.lastNode=m},h.prototype.oncommentend=function(){this.lastNode=null},h.prototype.oncdatastart=function(){var f=new o.Text(""),m=new o.CDATA([f]);this.addNode(m),f.parent=m,this.lastNode=f},h.prototype.oncdataend=function(){this.lastNode=null},h.prototype.onprocessinginstruction=function(f,m){var g=new o.ProcessingInstruction(f,m);this.addNode(g)},h.prototype.handleCallback=function(f){if(typeof this.callback=="function")this.callback(f,this.dom);else if(f)throw f},h.prototype.addNode=function(f){var m=this.tagStack[this.tagStack.length-1],g=m.children[m.children.length-1];this.options.withStartIndices&&(f.startIndex=this.parser.startIndex),this.options.withEndIndices&&(f.endIndex=this.parser.endIndex),m.children.push(f),g&&(f.prev=g,g.next=f),f.parent=m,this.lastNode=null},h}();e.DomHandler=d,e.default=d})(tf);var Fb="html",Bb="head",Il="body",IN=/<([a-zA-Z]+[0-9]?)/,jb=/<head[^]*>/i,Hb=/<body[^]*>/i,Ml=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},sf=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},zb=typeof window=="object"&&window.DOMParser;if(typeof zb=="function"){var MN=new zb,NN="text/html";sf=function(e,n){return n&&(e="<"+n+">"+e+"</"+n+">"),MN.parseFromString(e,NN)},Ml=sf}if(typeof document=="object"&&document.implementation){var Nl=document.implementation.createHTMLDocument();Ml=function(e,n){if(n){var t=Nl.documentElement.querySelector(n);return t.innerHTML=e,Nl}return Nl.documentElement.innerHTML=e,Nl}}var lf=typeof document=="object"?document.createElement("template"):{},uf;lf.content&&(uf=function(e){return lf.innerHTML=e,lf.content.childNodes});function LN(e){var n,t=e.match(IN);t&&t[1]&&(n=t[1].toLowerCase());var r,o,l;switch(n){case Fb:return r=sf(e),jb.test(e)||(o=r.querySelector(Bb),o&&o.parentNode.removeChild(o)),Hb.test(e)||(o=r.querySelector(Il),o&&o.parentNode.removeChild(o)),r.querySelectorAll(Fb);case Bb:case Il:return r=Ml(e),l=r.querySelectorAll(n),Hb.test(e)&&jb.test(e)?l[0].parentNode.childNodes:l;default:return uf?uf(e):(o=Ml(e,Il).querySelector(Il),o.childNodes)}}var FN=LN,cf={},Vb={};Vb.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"];for(var Ll=tf,BN=Vb,Ub=BN.CASE_SENSITIVE_TAG_NAMES,jN=Ll.Comment,HN=Ll.Element,zN=Ll.ProcessingInstruction,VN=Ll.Text,Wb={},hf,df=0,UN=Ub.length;df<UN;df++)hf=Ub[df],Wb[hf.toLowerCase()]=hf;function WN(e){return Wb[e]}function Gb(e){for(var n={},t,r=0,o=e.length;r<o;r++)t=e[r],n[t.name]=t.value;return n}function GN(e){e=e.toLowerCase();var n=WN(e);return n||e}function qb(e,n,t){n=n||null;for(var r=[],o,l=0,d=e.length;l<d;l++){var h=e[l],f;switch(h.nodeType){case 1:o=GN(h.nodeName),f=new HN(o,Gb(h.attributes)),f.children=qb(o==="template"?h.content.childNodes:h.childNodes,f);break;case 3:f=new VN(h.nodeValue);break;case 8:f=new jN(h.nodeValue);break;default:continue}var m=r[l-1]||null;m&&(m.next=f),f.parent=n,f.prev=m,f.next=null,r.push(f)}return t&&(f=new zN(t.substring(0,t.indexOf(" ")).toLowerCase(),t),f.next=r[0]||null,f.parent=n,r.unshift(f),r[1]&&(r[1].prev=r[0])),r}cf.formatAttributes=Gb,cf.formatDOM=qb;var qN=FN,YN=cf,XN=YN.formatDOM,ZN=/<(![a-zA-Z\s]+)>/;function KN(e){if(typeof e!="string")throw new TypeError("First argument must be a string");if(e==="")return[];var n=e.match(ZN),t;return n&&n[1]&&(t=n[1]),XN(qN(e),null,t)}var JN=KN,Lr={},Fl={},QN=0;Fl.SAME=QN;var $N=1;Fl.CAMELCASE=$N,Fl.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},Object.defineProperty(Lr,"__esModule",{value:!0});function eL(e,n){return tL(e)||nL(e,n)||rL(e,n)||iL()}function tL(e){if(Array.isArray(e))return e}function nL(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r=[],o=!0,l=!1,d,h;try{for(t=t.call(e);!(o=(d=t.next()).done)&&(r.push(d.value),!(n&&r.length===n));o=!0);}catch(f){l=!0,h=f}finally{try{!o&&t.return!=null&&t.return()}finally{if(l)throw h}}return r}}function rL(e,n){if(e){if(typeof e=="string")return Yb(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Yb(e,n)}}function Yb(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function iL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
269
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Xb=0,Ii=1,Bl=2,jl=3,ff=4,Zb=5,Kb=6;function oL(e){return $n.hasOwnProperty(e)?$n[e]:null}function dr(e,n,t,r,o,l,d){this.acceptsBooleans=n===Bl||n===jl||n===ff,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=l,this.removeEmptyString=d}var $n={},aL=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];aL.forEach(function(e){$n[e]=new dr(e,Xb,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=eL(e,2),t=n[0],r=n[1];$n[t]=new dr(t,Ii,!1,r,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){$n[e]=new dr(e,Bl,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){$n[e]=new dr(e,Bl,!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){$n[e]=new dr(e,jl,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){$n[e]=new dr(e,jl,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){$n[e]=new dr(e,ff,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){$n[e]=new dr(e,Kb,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){$n[e]=new dr(e,Zb,!1,e.toLowerCase(),null,!1,!1)});var pf=/[\-\:]([a-z])/g,mf=function(n){return n[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 n=e.replace(pf,mf);$n[n]=new dr(n,Ii,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var n=e.replace(pf,mf);$n[n]=new dr(n,Ii,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(pf,mf);$n[n]=new dr(n,Ii,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){$n[e]=new dr(e,Ii,!1,e.toLowerCase(),null,!1,!1)});var sL="xlinkHref";$n[sL]=new dr("xlinkHref",Ii,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){$n[e]=new dr(e,Ii,!1,e.toLowerCase(),null,!0,!0)});var gf=Fl,lL=gf.CAMELCASE,uL=gf.SAME,Jb=gf.possibleStandardNames,cL=":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",hL=cL+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",dL=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+hL+"]*$")),fL=Object.keys(Jb).reduce(function(e,n){var t=Jb[n];return t===uL?e[n]=n:t===lL?e[n.toLowerCase()]=n:e[n]=t,e},{});Lr.BOOLEAN=jl,Lr.BOOLEANISH_STRING=Bl,Lr.NUMERIC=Zb,Lr.OVERLOADED_BOOLEAN=ff,Lr.POSITIVE_NUMERIC=Kb,Lr.RESERVED=Xb,Lr.STRING=Ii,Lr.getPropertyInfo=oL,Lr.isCustomAttribute=dL,Lr.possibleStandardNames=fL;var vf={},yf={exports:{}},Qb=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,pL=/\n/g,mL=/^\s*/,gL=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,vL=/^:\s*/,yL=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,wL=/^[;\s]*/,bL=/^\s+|\s+$/g,EL=`
|
|
270
|
-
`,$b="/",e0="*",po="",xL="comment",SL="declaration",TL=function(e,n){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];n=n||{};var t=1,r=1;function o(P){var C=P.match(pL);C&&(t+=C.length);var _=P.lastIndexOf(EL);r=~_?P.length-_:r+P.length}function l(){var P={line:t,column:r};return function(C){return C.position=new d(P),m(),C}}function d(P){this.start=P,this.end={line:t,column:r},this.source=n.source}d.prototype.content=e;function h(P){var C=new Error(n.source+":"+t+":"+r+": "+P);if(C.reason=P,C.filename=n.source,C.line=t,C.column=r,C.source=e,!n.silent)throw C}function f(P){var C=P.exec(e);if(C){var _=C[0];return o(_),e=e.slice(_.length),C}}function m(){f(mL)}function g(P){var C;for(P=P||[];C=w();)C!==!1&&P.push(C);return P}function w(){var P=l();if(!($b!=e.charAt(0)||e0!=e.charAt(1))){for(var C=2;po!=e.charAt(C)&&(e0!=e.charAt(C)||$b!=e.charAt(C+1));)++C;if(C+=2,po===e.charAt(C-1))return h("End of comment missing");var _=e.slice(2,C-2);return r+=2,o(_),e=e.slice(C),r+=2,P({type:xL,comment:_})}}function x(){var P=l(),C=f(gL);if(C){if(w(),!f(vL))return h("property missing ':'");var _=f(yL),k=P({type:SL,property:t0(C[0].replace(Qb,po)),value:_?t0(_[0].replace(Qb,po)):po});return f(wL),k}}function T(){var P=[];g(P);for(var C;C=x();)C!==!1&&(P.push(C),g(P));return P}return m(),T()};function t0(e){return e?e.replace(bL,po):po}var _L=TL;function n0(e,n){var t=null;if(!e||typeof e!="string")return t;for(var r,o=_L(e),l=typeof n=="function",d,h,f=0,m=o.length;f<m;f++)r=o[f],d=r.property,h=r.value,l?n(d,h,r):h&&(t||(t={}),t[d]=h);return t}yf.exports=n0,yf.exports.default=n0;var CL=yf.exports;const r0=hi(CL),PL=OP(Object.freeze(Object.defineProperty({__proto__:null,default:r0},Symbol.toStringTag,{value:"Module"})));var Hl={};Object.defineProperty(Hl,"__esModule",{value:!0}),Hl.camelCase=void 0;var RL=/^--[a-zA-Z0-9-]+$/,OL=/-([a-z])/g,kL=/^[^-]+$/,AL=/^-(webkit|moz|ms|o|khtml)-/,DL=/^-(ms)-/,IL=function(e){return!e||kL.test(e)||RL.test(e)},ML=function(e,n){return n.toUpperCase()},i0=function(e,n){return"".concat(n,"-")},NL=function(e,n){return n===void 0&&(n={}),IL(e)?e:(e=e.toLowerCase(),n.reactCompat?e=e.replace(DL,i0):e=e.replace(AL,i0),e.replace(OL,ML))};Hl.camelCase=NL;var LL=Gn&&Gn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vf,"__esModule",{value:!0});var FL=LL(PL),BL=Hl;function jL(e,n){var t={};return!e||typeof e!="string"||(0,FL.default)(e,function(r,o){r&&o&&(t[(0,BL.camelCase)(r,n)]=o)}),t}vf.default=jL;var HL=Te,zL=vf.default;function VL(e,n){if(!e||typeof e!="object")throw new TypeError("First argument must be an object");var t=typeof n=="function",r={},o={};for(var l in e){var d=e[l];if(t&&(r=n(l,d),r&&r.length===2)){o[r[0]]=r[1];continue}typeof d=="string"&&(o[d]=l)}return o}var UL=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function WL(e,n){return e.indexOf("-")===-1?n&&typeof n.is=="string":!UL.has(e)}var GL={reactCompat:!0};function qL(e,n){if(e!=null)try{n.style=zL(e,GL)}catch{n.style={}}}var YL=HL.version.split(".")[0]>=16,o0=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);function XL(e){return!o0.has(e.name)}function ZL(e){return e}var a0={PRESERVE_CUSTOM_ATTRIBUTES:YL,ELEMENTS_WITH_NO_TEXT_CHILDREN:o0,invertObject:VL,isCustomComponent:WL,setStyleProp:qL,canTextBeChildOfNode:XL,returnFirstArg:ZL},rs=Lr,s0=a0,KL=["checked","value"],JL=["input","select","textarea"],QL={reset:!0,submit:!0},l0=function(n,t){n=n||{};var r,o,l,d,h,f={},m=n.type&&QL[n.type];for(r in n){if(l=n[r],rs.isCustomAttribute(r)){f[r]=l;continue}if(o=r.toLowerCase(),d=u0(o),d){switch(h=rs.getPropertyInfo(d),KL.indexOf(d)!==-1&&JL.indexOf(t)!==-1&&!m&&(d=u0("default"+o)),f[d]=l,h&&h.type){case rs.BOOLEAN:f[d]=!0;break;case rs.OVERLOADED_BOOLEAN:l===""&&(f[d]=!0);break}continue}s0.PRESERVE_CUSTOM_ATTRIBUTES&&(f[r]=l)}return s0.setStyleProp(n.style,f),f};function u0(e){return rs.possibleStandardNames[e]}var $L=Te,eF=l0,is=a0,tF=is.setStyleProp,nF=is.canTextBeChildOfNode;function c0(e,n){n=n||{};for(var t=n.library||$L,r=t.cloneElement,o=t.createElement,l=t.isValidElement,d=[],h,f,m=typeof n.replace=="function",g=n.transform||is.returnFirstArg,w,x,T,P=n.trim,C=0,_=e.length;C<_;C++){if(h=e[C],m&&(w=n.replace(h),l(w))){_>1&&(w=r(w,{key:w.key||C})),d.push(g(w,h,C));continue}if(h.type==="text"){if(f=!h.data.trim().length,f&&h.parent&&!nF(h.parent)||P&&f)continue;d.push(g(h.data,h,C));continue}switch(x=h.attribs,rF(h)?tF(x.style,x):x&&(x=eF(x,h.name)),T=null,h.type){case"script":case"style":h.children[0]&&(x.dangerouslySetInnerHTML={__html:h.children[0].data});break;case"tag":h.name==="textarea"&&h.children[0]?x.defaultValue=h.children[0].data:h.children&&h.children.length&&(T=c0(h.children,n));break;default:continue}_>1&&(x.key=C),d.push(g(o(h.name,x,T),h,C))}return d.length===1?d[0]:d}function rF(e){return is.PRESERVE_CUSTOM_ATTRIBUTES&&e.type==="tag"&&is.isCustomComponent(e.name,e.attribs)}var iF=c0,zl=tf,$o=JN,oF=l0,h0=iF;$o=typeof $o.default=="function"?$o.default:$o;var aF={lowerCaseAttributeNames:!1};function $r(e,n){if(typeof e!="string")throw new TypeError("First argument must be a string");return e===""?[]:(n=n||{},h0($o(e,n.htmlparser2||aF),n))}$r.domToReact=h0,$r.htmlToDOM=$o,$r.attributesToProps=oF,$r.Comment=zl.Comment,$r.Element=zl.Element,$r.ProcessingInstruction=zl.ProcessingInstruction,$r.Text=zl.Text;var sF=$r;$r.default=$r;const Er=hi(sF);Er.domToReact,Er.htmlToDOM,Er.attributesToProps,Er.Comment,Er.Element,Er.ProcessingInstruction,Er.Text;const d0=["http","https","mailto","tel"];function lF(e){const n=(e||"").trim(),t=n.charAt(0);if(t==="#"||t==="/")return n;const r=n.indexOf(":");if(r===-1)return n;let o=-1;for(;++o<d0.length;){const l=d0[o];if(r===l.length&&n.slice(0,l.length).toLowerCase()===l)return n}return o=n.indexOf("?"),o!==-1&&r>o||(o=n.indexOf("#"),o!==-1&&r>o)?n:"javascript:void(0)"}/*!
|
|
271
|
-
* Determine if an object is a Buffer
|
|
272
|
-
*
|
|
273
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
274
|
-
* @license MIT
|
|
275
|
-
*/var uF=function(n){return n!=null&&n.constructor!=null&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)};const f0=hi(uF);function os(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?p0(e.position):"start"in e||"end"in e?p0(e):"line"in e||"column"in e?wf(e):""}function wf(e){return m0(e&&e.line)+":"+m0(e&&e.column)}function p0(e){return wf(e&&e.start)+"-"+wf(e&&e.end)}function m0(e){return e&&typeof e=="number"?e:1}class Fr extends Error{constructor(n,t,r){const o=[null,null];let l={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof t=="string"&&(r=t,t=void 0),typeof r=="string"){const d=r.indexOf(":");d===-1?o[1]=r:(o[0]=r.slice(0,d),o[1]=r.slice(d+1))}t&&("type"in t||"position"in t?t.position&&(l=t.position):"start"in t||"end"in t?l=t:("line"in t||"column"in t)&&(l.start=t)),this.name=os(t)||"1:1",this.message=typeof n=="object"?n.message:n,this.stack="",typeof n=="object"&&n.stack&&(this.stack=n.stack),this.reason=this.message,this.fatal,this.line=l.start.line,this.column=l.start.column,this.position=l,this.source=o[0],this.ruleId=o[1],this.file,this.actual,this.expected,this.url,this.note}}Fr.prototype.file="",Fr.prototype.name="",Fr.prototype.reason="",Fr.prototype.message="",Fr.prototype.stack="",Fr.prototype.fatal=null,Fr.prototype.column=null,Fr.prototype.line=null,Fr.prototype.source=null,Fr.prototype.ruleId=null,Fr.prototype.position=null;const ei={basename:cF,dirname:hF,extname:dF,join:fF,sep:"/"};function cF(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');as(e);let t=0,r=-1,o=e.length,l;if(n===void 0||n.length===0||n.length>e.length){for(;o--;)if(e.charCodeAt(o)===47){if(l){t=o+1;break}}else r<0&&(l=!0,r=o+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let d=-1,h=n.length-1;for(;o--;)if(e.charCodeAt(o)===47){if(l){t=o+1;break}}else d<0&&(l=!0,d=o+1),h>-1&&(e.charCodeAt(o)===n.charCodeAt(h--)?h<0&&(r=o):(h=-1,r=d));return t===r?r=d:r<0&&(r=e.length),e.slice(t,r)}function hF(e){if(as(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.charCodeAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.charCodeAt(0)===47?"/":".":n===1&&e.charCodeAt(0)===47?"//":e.slice(0,n)}function dF(e){as(e);let n=e.length,t=-1,r=0,o=-1,l=0,d;for(;n--;){const h=e.charCodeAt(n);if(h===47){if(d){r=n+1;break}continue}t<0&&(d=!0,t=n+1),h===46?o<0?o=n:l!==1&&(l=1):o>-1&&(l=-1)}return o<0||t<0||l===0||l===1&&o===t-1&&o===r+1?"":e.slice(o,t)}function fF(...e){let n=-1,t;for(;++n<e.length;)as(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":pF(t)}function pF(e){as(e);const n=e.charCodeAt(0)===47;let t=mF(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.charCodeAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function mF(e,n){let t="",r=0,o=-1,l=0,d=-1,h,f;for(;++d<=e.length;){if(d<e.length)h=e.charCodeAt(d);else{if(h===47)break;h=47}if(h===47){if(!(o===d-1||l===1))if(o!==d-1&&l===2){if(t.length<2||r!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){if(f=t.lastIndexOf("/"),f!==t.length-1){f<0?(t="",r=0):(t=t.slice(0,f),r=t.length-1-t.lastIndexOf("/")),o=d,l=0;continue}}else if(t.length>0){t="",r=0,o=d,l=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(o+1,d):t=e.slice(o+1,d),r=d-o-1;o=d,l=0}else h===46&&l>-1?l++:l=-1}return t}function as(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const gF={cwd:vF};function vF(){return"/"}function bf(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function yF(e){if(typeof e=="string")e=new URL(e);else if(!bf(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return wF(e)}function wF(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t<n.length;)if(n.charCodeAt(t)===37&&n.charCodeAt(t+1)===50){const r=n.charCodeAt(t+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(n)}const Ef=["history","path","basename","stem","extname","dirname"];class g0{constructor(n){let t;n?typeof n=="string"||bF(n)?t={value:n}:bf(n)?t={path:n}:t=n:t={},this.data={},this.messages=[],this.history=[],this.cwd=gF.cwd(),this.value,this.stored,this.result,this.map;let r=-1;for(;++r<Ef.length;){const l=Ef[r];l in t&&t[l]!==void 0&&t[l]!==null&&(this[l]=l==="history"?[...t[l]]:t[l])}let o;for(o in t)Ef.includes(o)||(this[o]=t[o])}get path(){return this.history[this.history.length-1]}set path(n){bf(n)&&(n=yF(n)),Sf(n,"path"),this.path!==n&&this.history.push(n)}get dirname(){return typeof this.path=="string"?ei.dirname(this.path):void 0}set dirname(n){v0(this.basename,"dirname"),this.path=ei.join(n||"",this.basename)}get basename(){return typeof this.path=="string"?ei.basename(this.path):void 0}set basename(n){Sf(n,"basename"),xf(n,"basename"),this.path=ei.join(this.dirname||"",n)}get extname(){return typeof this.path=="string"?ei.extname(this.path):void 0}set extname(n){if(xf(n,"extname"),v0(this.dirname,"extname"),n){if(n.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ei.join(this.dirname,this.stem+(n||""))}get stem(){return typeof this.path=="string"?ei.basename(this.path,this.extname):void 0}set stem(n){Sf(n,"stem"),xf(n,"stem"),this.path=ei.join(this.dirname||"",n+(this.extname||""))}toString(n){return(this.value||"").toString(n||void 0)}message(n,t,r){const o=new Fr(n,t,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}info(n,t,r){const o=this.message(n,t,r);return o.fatal=null,o}fail(n,t,r){const o=this.message(n,t,r);throw o.fatal=!0,o}}function xf(e,n){if(e&&e.includes(ei.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ei.sep+"`")}function Sf(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function v0(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function bF(e){return f0(e)}function y0(e){if(e)throw e}var Vl=Object.prototype.hasOwnProperty,w0=Object.prototype.toString,b0=Object.defineProperty,E0=Object.getOwnPropertyDescriptor,x0=function(n){return typeof Array.isArray=="function"?Array.isArray(n):w0.call(n)==="[object Array]"},S0=function(n){if(!n||w0.call(n)!=="[object Object]")return!1;var t=Vl.call(n,"constructor"),r=n.constructor&&n.constructor.prototype&&Vl.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!t&&!r)return!1;var o;for(o in n);return typeof o>"u"||Vl.call(n,o)},T0=function(n,t){b0&&t.name==="__proto__"?b0(n,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):n[t.name]=t.newValue},_0=function(n,t){if(t==="__proto__")if(Vl.call(n,t)){if(E0)return E0(n,t).value}else return;return n[t]},EF=function e(){var n,t,r,o,l,d,h=arguments[0],f=1,m=arguments.length,g=!1;for(typeof h=="boolean"&&(g=h,h=arguments[1]||{},f=2),(h==null||typeof h!="object"&&typeof h!="function")&&(h={});f<m;++f)if(n=arguments[f],n!=null)for(t in n)r=_0(h,t),o=_0(n,t),h!==o&&(g&&o&&(S0(o)||(l=x0(o)))?(l?(l=!1,d=r&&x0(r)?r:[]):d=r&&S0(r)?r:{},T0(h,{name:t,newValue:e(g,d,o)})):typeof o<"u"&&T0(h,{name:t,newValue:o}));return h};const C0=hi(EF);function Tf(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function xF(){const e=[],n={run:t,use:r};return n;function t(...o){let l=-1;const d=o.pop();if(typeof d!="function")throw new TypeError("Expected function as last argument, not "+d);h(null,...o);function h(f,...m){const g=e[++l];let w=-1;if(f){d(f);return}for(;++w<o.length;)(m[w]===null||m[w]===void 0)&&(m[w]=o[w]);o=m,g?SF(g,h)(...m):d(null,...m)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),n}}function SF(e,n){let t;return r;function r(...d){const h=e.length>d.length;let f;h&&d.push(o);try{f=e.apply(this,d)}catch(m){const g=m;if(h&&t)throw g;return o(g)}h||(f&&f.then&&typeof f.then=="function"?f.then(l,o):f instanceof Error?o(f):l(f))}function o(d,...h){t||(t=!0,n(d,...h))}function l(d){o(null,d)}}const TF=R0().freeze(),P0={}.hasOwnProperty;function R0(){const e=xF(),n=[];let t={},r,o=-1;return l.data=d,l.Parser=void 0,l.Compiler=void 0,l.freeze=h,l.attachers=n,l.use=f,l.parse=m,l.stringify=g,l.run=w,l.runSync=x,l.process=T,l.processSync=P,l;function l(){const C=R0();let _=-1;for(;++_<n.length;)C.use(...n[_]);return C.data(C0(!0,{},t)),C}function d(C,_){return typeof C=="string"?arguments.length===2?(Pf("data",r),t[C]=_,l):P0.call(t,C)&&t[C]||null:C?(Pf("data",r),t=C,l):t}function h(){if(r)return l;for(;++o<n.length;){const[C,..._]=n[o];if(_[0]===!1)continue;_[0]===!0&&(_[0]=void 0);const k=C.call(l,..._);typeof k=="function"&&e.use(k)}return r=!0,o=Number.POSITIVE_INFINITY,l}function f(C,..._){let k;if(Pf("use",r),C!=null)if(typeof C=="function")B(C,..._);else if(typeof C=="object")Array.isArray(C)?Z(C):j(C);else throw new TypeError("Expected usable value, not `"+C+"`");return k&&(t.settings=Object.assign(t.settings||{},k)),l;function V(Y){if(typeof Y=="function")B(Y);else if(typeof Y=="object")if(Array.isArray(Y)){const[ie,...ae]=Y;B(ie,...ae)}else j(Y);else throw new TypeError("Expected usable value, not `"+Y+"`")}function j(Y){Z(Y.plugins),Y.settings&&(k=Object.assign(k||{},Y.settings))}function Z(Y){let ie=-1;if(Y!=null)if(Array.isArray(Y))for(;++ie<Y.length;){const ae=Y[ie];V(ae)}else throw new TypeError("Expected a list of plugins, not `"+Y+"`")}function B(Y,ie){let ae=-1,le;for(;++ae<n.length;)if(n[ae][0]===Y){le=n[ae];break}le?(Tf(le[1])&&Tf(ie)&&(ie=C0(!0,le[1],ie)),le[1]=ie):n.push([...arguments])}}function m(C){l.freeze();const _=ss(C),k=l.Parser;return _f("parse",k),O0(k,"parse")?new k(String(_),_).parse():k(String(_),_)}function g(C,_){l.freeze();const k=ss(_),V=l.Compiler;return Cf("stringify",V),k0(C),O0(V,"compile")?new V(C,k).compile():V(C,k)}function w(C,_,k){if(k0(C),l.freeze(),!k&&typeof _=="function"&&(k=_,_=void 0),!k)return new Promise(V);V(null,k);function V(j,Z){e.run(C,ss(_),B);function B(Y,ie,ae){ie=ie||C,Y?Z(Y):j?j(ie):k(null,ie,ae)}}}function x(C,_){let k,V;return l.run(C,_,j),A0("runSync","run",V),k;function j(Z,B){y0(Z),k=B,V=!0}}function T(C,_){if(l.freeze(),_f("process",l.Parser),Cf("process",l.Compiler),!_)return new Promise(k);k(null,_);function k(V,j){const Z=ss(C);l.run(l.parse(Z),Z,(Y,ie,ae)=>{if(Y||!ie||!ae)B(Y);else{const le=l.stringify(ie,ae);le==null||(PF(le)?ae.value=le:ae.result=le),B(Y,ae)}});function B(Y,ie){Y||!ie?j(Y):V?V(ie):_(null,ie)}}}function P(C){let _;l.freeze(),_f("processSync",l.Parser),Cf("processSync",l.Compiler);const k=ss(C);return l.process(k,V),A0("processSync","process",_),k;function V(j){_=!0,y0(j)}}}function O0(e,n){return typeof e=="function"&&e.prototype&&(_F(e.prototype)||n in e.prototype)}function _F(e){let n;for(n in e)if(P0.call(e,n))return!0;return!1}function _f(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function Cf(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function Pf(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function k0(e){if(!Tf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function A0(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function ss(e){return CF(e)?e:new g0(e)}function CF(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function PF(e){return typeof e=="string"||f0(e)}const RF={};function OF(e,n){const t=RF,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,o=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return D0(e,r,o)}function D0(e,n,t){if(kF(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return I0(e.children,n,t)}return Array.isArray(e)?I0(e,n,t):""}function I0(e,n,t){const r=[];let o=-1;for(;++o<e.length;)r[o]=D0(e[o],n,t);return r.join("")}function kF(e){return!!(e&&typeof e=="object")}function ti(e,n,t,r){const o=e.length;let l=0,d;if(n<0?n=-n>o?0:o+n:n=n>o?o:n,t=t>0?t:0,r.length<1e4)d=Array.from(r),d.unshift(n,t),e.splice(...d);else for(t&&e.splice(n,t);l<r.length;)d=r.slice(l,l+1e4),d.unshift(n,0),e.splice(...d),l+=1e4,n+=1e4}function Br(e,n){return e.length>0?(ti(e,e.length,0,n),e):n}const M0={}.hasOwnProperty;function AF(e){const n={};let t=-1;for(;++t<e.length;)DF(n,e[t]);return n}function DF(e,n){let t;for(t in n){const o=(M0.call(e,t)?e[t]:void 0)||(e[t]={}),l=n[t];let d;if(l)for(d in l){M0.call(o,d)||(o[d]=[]);const h=l[d];IF(o[d],Array.isArray(h)?h:h?[h]:[])}}}function IF(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);ti(e,0,0,r)}const MF=/[!-\/:-@\[-`\{-~\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]/,ni=Mi(/[A-Za-z]/),xr=Mi(/[\dA-Za-z]/),NF=Mi(/[#-'*+\--9=?A-Z^-~]/);function Rf(e){return e!==null&&(e<32||e===127)}const Of=Mi(/\d/),LF=Mi(/[\dA-Fa-f]/),FF=Mi(/[!-/:-@[-`{-~]/);function It(e){return e!==null&&e<-2}function mr(e){return e!==null&&(e<0||e===32)}function tn(e){return e===-2||e===-1||e===32}const BF=Mi(MF),jF=Mi(/\s/);function Mi(e){return n;function n(t){return t!==null&&e.test(String.fromCharCode(t))}}function Tn(e,n,t,r){const o=r?r-1:Number.POSITIVE_INFINITY;let l=0;return d;function d(f){return tn(f)?(e.enter(t),h(f)):n(f)}function h(f){return tn(f)&&l++<o?(e.consume(f),h):(e.exit(t),n(f))}}const HF={tokenize:zF};function zF(e){const n=e.attempt(this.parser.constructs.contentInitial,r,o);let t;return n;function r(h){if(h===null){e.consume(h);return}return e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Tn(e,n,"linePrefix")}function o(h){return e.enter("paragraph"),l(h)}function l(h){const f=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=f),t=f,d(h)}function d(h){if(h===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(h);return}return It(h)?(e.consume(h),e.exit("chunkText"),l):(e.consume(h),d)}}const VF={tokenize:UF},N0={tokenize:WF};function UF(e){const n=this,t=[];let r=0,o,l,d;return h;function h(j){if(r<t.length){const Z=t[r];return n.containerState=Z[1],e.attempt(Z[0].continuation,f,m)(j)}return m(j)}function f(j){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,o&&V();const Z=n.events.length;let B=Z,Y;for(;B--;)if(n.events[B][0]==="exit"&&n.events[B][1].type==="chunkFlow"){Y=n.events[B][1].end;break}k(r);let ie=Z;for(;ie<n.events.length;)n.events[ie][1].end=Object.assign({},Y),ie++;return ti(n.events,B+1,0,n.events.slice(Z)),n.events.length=ie,m(j)}return h(j)}function m(j){if(r===t.length){if(!o)return x(j);if(o.currentConstruct&&o.currentConstruct.concrete)return P(j);n.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(N0,g,w)(j)}function g(j){return o&&V(),k(r),x(j)}function w(j){return n.parser.lazy[n.now().line]=r!==t.length,d=n.now().offset,P(j)}function x(j){return n.containerState={},e.attempt(N0,T,P)(j)}function T(j){return r++,t.push([n.currentConstruct,n.containerState]),x(j)}function P(j){if(j===null){o&&V(),k(0),e.consume(j);return}return o=o||n.parser.flow(n.now()),e.enter("chunkFlow",{contentType:"flow",previous:l,_tokenizer:o}),C(j)}function C(j){if(j===null){_(e.exit("chunkFlow"),!0),k(0),e.consume(j);return}return It(j)?(e.consume(j),_(e.exit("chunkFlow")),r=0,n.interrupt=void 0,h):(e.consume(j),C)}function _(j,Z){const B=n.sliceStream(j);if(Z&&B.push(null),j.previous=l,l&&(l.next=j),l=j,o.defineSkip(j.start),o.write(B),n.parser.lazy[j.start.line]){let Y=o.events.length;for(;Y--;)if(o.events[Y][1].start.offset<d&&(!o.events[Y][1].end||o.events[Y][1].end.offset>d))return;const ie=n.events.length;let ae=ie,le,_e;for(;ae--;)if(n.events[ae][0]==="exit"&&n.events[ae][1].type==="chunkFlow"){if(le){_e=n.events[ae][1].end;break}le=!0}for(k(r),Y=ie;Y<n.events.length;)n.events[Y][1].end=Object.assign({},_e),Y++;ti(n.events,ae+1,0,n.events.slice(ie)),n.events.length=Y}}function k(j){let Z=t.length;for(;Z-- >j;){const B=t[Z];n.containerState=B[1],B[0].exit.call(n,e)}t.length=j}function V(){o.write([null]),l=void 0,o=void 0,n.containerState._closeFlow=void 0}}function WF(e,n,t){return Tn(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function L0(e){if(e===null||mr(e)||jF(e))return 1;if(BF(e))return 2}function kf(e,n,t){const r=[];let o=-1;for(;++o<e.length;){const l=e[o].resolveAll;l&&!r.includes(l)&&(n=l(n,t),r.push(l))}return n}const Af={name:"attention",tokenize:qF,resolveAll:GF};function GF(e,n){let t=-1,r,o,l,d,h,f,m,g;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;f=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const w=Object.assign({},e[r][1].end),x=Object.assign({},e[t][1].start);F0(w,-f),F0(x,f),d={type:f>1?"strongSequence":"emphasisSequence",start:w,end:Object.assign({},e[r][1].end)},h={type:f>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[t][1].start),end:x},l={type:f>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[t][1].start)},o={type:f>1?"strong":"emphasis",start:Object.assign({},d.start),end:Object.assign({},h.end)},e[r][1].end=Object.assign({},d.start),e[t][1].start=Object.assign({},h.end),m=[],e[r][1].end.offset-e[r][1].start.offset&&(m=Br(m,[["enter",e[r][1],n],["exit",e[r][1],n]])),m=Br(m,[["enter",o,n],["enter",d,n],["exit",d,n],["enter",l,n]]),m=Br(m,kf(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),m=Br(m,[["exit",l,n],["enter",h,n],["exit",h,n],["exit",o,n]]),e[t][1].end.offset-e[t][1].start.offset?(g=2,m=Br(m,[["enter",e[t][1],n],["exit",e[t][1],n]])):g=0,ti(e,r-1,t-r+3,m),t=r+m.length-g-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function qF(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,o=L0(r);let l;return d;function d(f){return l=f,e.enter("attentionSequence"),h(f)}function h(f){if(f===l)return e.consume(f),h;const m=e.exit("attentionSequence"),g=L0(f),w=!g||g===2&&o||t.includes(f),x=!o||o===2&&g||t.includes(r);return m._open=!!(l===42?w:w&&(o||!x)),m._close=!!(l===42?x:x&&(g||!w)),n(f)}}function F0(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const YF={name:"autolink",tokenize:XF};function XF(e,n,t){let r=0;return o;function o(T){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(T){return ni(T)?(e.consume(T),d):m(T)}function d(T){return T===43||T===45||T===46||xr(T)?(r=1,h(T)):m(T)}function h(T){return T===58?(e.consume(T),r=0,f):(T===43||T===45||T===46||xr(T))&&r++<32?(e.consume(T),h):(r=0,m(T))}function f(T){return T===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),n):T===null||T===32||T===60||Rf(T)?t(T):(e.consume(T),f)}function m(T){return T===64?(e.consume(T),g):NF(T)?(e.consume(T),m):t(T)}function g(T){return xr(T)?w(T):t(T)}function w(T){return T===46?(e.consume(T),r=0,g):T===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),n):x(T)}function x(T){if((T===45||xr(T))&&r++<63){const P=T===45?x:w;return e.consume(T),P}return t(T)}}const Ul={tokenize:ZF,partial:!0};function ZF(e,n,t){return r;function r(l){return tn(l)?Tn(e,o,"linePrefix")(l):o(l)}function o(l){return l===null||It(l)?n(l):t(l)}}const B0={name:"blockQuote",tokenize:KF,continuation:{tokenize:JF},exit:QF};function KF(e,n,t){const r=this;return o;function o(d){if(d===62){const h=r.containerState;return h.open||(e.enter("blockQuote",{_container:!0}),h.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(d),e.exit("blockQuoteMarker"),l}return t(d)}function l(d){return tn(d)?(e.enter("blockQuotePrefixWhitespace"),e.consume(d),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(d))}}function JF(e,n,t){const r=this;return o;function o(d){return tn(d)?Tn(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):l(d)}function l(d){return e.attempt(B0,n,t)(d)}}function QF(e){e.exit("blockQuote")}const j0={name:"characterEscape",tokenize:$F};function $F(e,n,t){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),o}function o(l){return FF(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(l)}}const H0=document.createElement("i");function Df(e){const n="&"+e+";";H0.innerHTML=n;const t=H0.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}const z0={name:"characterReference",tokenize:eB};function eB(e,n,t){const r=this;let o=0,l,d;return h;function h(w){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(w),e.exit("characterReferenceMarker"),f}function f(w){return w===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(w),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),l=31,d=xr,g(w))}function m(w){return w===88||w===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(w),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,d=LF,g):(e.enter("characterReferenceValue"),l=7,d=Of,g(w))}function g(w){if(w===59&&o){const x=e.exit("characterReferenceValue");return d===xr&&!Df(r.sliceSerialize(x))?t(w):(e.enter("characterReferenceMarker"),e.consume(w),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return d(w)&&o++<l?(e.consume(w),g):t(w)}}const V0={tokenize:nB,partial:!0},U0={name:"codeFenced",tokenize:tB,concrete:!0};function tB(e,n,t){const r=this,o={tokenize:B,partial:!0};let l=0,d=0,h;return f;function f(Y){return m(Y)}function m(Y){const ie=r.events[r.events.length-1];return l=ie&&ie[1].type==="linePrefix"?ie[2].sliceSerialize(ie[1],!0).length:0,h=Y,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(Y)}function g(Y){return Y===h?(d++,e.consume(Y),g):d<3?t(Y):(e.exit("codeFencedFenceSequence"),tn(Y)?Tn(e,w,"whitespace")(Y):w(Y))}function w(Y){return Y===null||It(Y)?(e.exit("codeFencedFence"),r.interrupt?n(Y):e.check(V0,C,Z)(Y)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(Y))}function x(Y){return Y===null||It(Y)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),w(Y)):tn(Y)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Tn(e,T,"whitespace")(Y)):Y===96&&Y===h?t(Y):(e.consume(Y),x)}function T(Y){return Y===null||It(Y)?w(Y):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),P(Y))}function P(Y){return Y===null||It(Y)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),w(Y)):Y===96&&Y===h?t(Y):(e.consume(Y),P)}function C(Y){return e.attempt(o,Z,_)(Y)}function _(Y){return e.enter("lineEnding"),e.consume(Y),e.exit("lineEnding"),k}function k(Y){return l>0&&tn(Y)?Tn(e,V,"linePrefix",l+1)(Y):V(Y)}function V(Y){return Y===null||It(Y)?e.check(V0,C,Z)(Y):(e.enter("codeFlowValue"),j(Y))}function j(Y){return Y===null||It(Y)?(e.exit("codeFlowValue"),V(Y)):(e.consume(Y),j)}function Z(Y){return e.exit("codeFenced"),n(Y)}function B(Y,ie,ae){let le=0;return _e;function _e(ke){return Y.enter("lineEnding"),Y.consume(ke),Y.exit("lineEnding"),fe}function fe(ke){return Y.enter("codeFencedFence"),tn(ke)?Tn(Y,de,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ke):de(ke)}function de(ke){return ke===h?(Y.enter("codeFencedFenceSequence"),ve(ke)):ae(ke)}function ve(ke){return ke===h?(le++,Y.consume(ke),ve):le>=d?(Y.exit("codeFencedFenceSequence"),tn(ke)?Tn(Y,Ae,"whitespace")(ke):Ae(ke)):ae(ke)}function Ae(ke){return ke===null||It(ke)?(Y.exit("codeFencedFence"),ie(ke)):ae(ke)}}}function nB(e,n,t){const r=this;return o;function o(d){return d===null?t(d):(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l)}function l(d){return r.parser.lazy[r.now().line]?t(d):n(d)}}const If={name:"codeIndented",tokenize:iB},rB={tokenize:oB,partial:!0};function iB(e,n,t){const r=this;return o;function o(m){return e.enter("codeIndented"),Tn(e,l,"linePrefix",5)(m)}function l(m){const g=r.events[r.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?d(m):t(m)}function d(m){return m===null?f(m):It(m)?e.attempt(rB,d,f)(m):(e.enter("codeFlowValue"),h(m))}function h(m){return m===null||It(m)?(e.exit("codeFlowValue"),d(m)):(e.consume(m),h)}function f(m){return e.exit("codeIndented"),n(m)}}function oB(e,n,t){const r=this;return o;function o(d){return r.parser.lazy[r.now().line]?t(d):It(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o):Tn(e,l,"linePrefix",5)(d)}function l(d){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?n(d):It(d)?o(d):t(d)}}const aB={name:"codeText",tokenize:uB,resolve:sB,previous:lB};function sB(e){let n=e.length-4,t=3,r,o;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)o===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(o=r):(r===n||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),n-=r-o-2,r=o+2),o=void 0);return e}function lB(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function uB(e,n,t){let r=0,o,l;return d;function d(w){return e.enter("codeText"),e.enter("codeTextSequence"),h(w)}function h(w){return w===96?(e.consume(w),r++,h):(e.exit("codeTextSequence"),f(w))}function f(w){return w===null?t(w):w===32?(e.enter("space"),e.consume(w),e.exit("space"),f):w===96?(l=e.enter("codeTextSequence"),o=0,g(w)):It(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),f):(e.enter("codeTextData"),m(w))}function m(w){return w===null||w===32||w===96||It(w)?(e.exit("codeTextData"),f(w)):(e.consume(w),m)}function g(w){return w===96?(e.consume(w),o++,g):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(w)):(l.type="codeTextData",m(w))}}function W0(e){const n={};let t=-1,r,o,l,d,h,f,m;for(;++t<e.length;){for(;t in n;)t=n[t];if(r=e[t],t&&r[1].type==="chunkFlow"&&e[t-1][1].type==="listItemPrefix"&&(f=r[1]._tokenizer.events,l=0,l<f.length&&f[l][1].type==="lineEndingBlank"&&(l+=2),l<f.length&&f[l][1].type==="content"))for(;++l<f.length&&f[l][1].type!=="content";)f[l][1].type==="chunkText"&&(f[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,cB(e,t)),t=n[t],m=!0);else if(r[1]._container){for(l=t,o=void 0;l--&&(d=e[l],d[1].type==="lineEnding"||d[1].type==="lineEndingBlank");)d[0]==="enter"&&(o&&(e[o][1].type="lineEndingBlank"),d[1].type="lineEnding",o=l);o&&(r[1].end=Object.assign({},e[o][1].start),h=e.slice(o,t),h.unshift(r),ti(e,o,t-o+1,h))}}return!m}function cB(e,n){const t=e[n][1],r=e[n][2];let o=n-1;const l=[],d=t._tokenizer||r.parser[t.contentType](t.start),h=d.events,f=[],m={};let g,w,x=-1,T=t,P=0,C=0;const _=[C];for(;T;){for(;e[++o][1]!==T;);l.push(o),T._tokenizer||(g=r.sliceStream(T),T.next||g.push(null),w&&d.defineSkip(T.start),T._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(g),T._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),w=T,T=T.next}for(T=t;++x<h.length;)h[x][0]==="exit"&&h[x-1][0]==="enter"&&h[x][1].type===h[x-1][1].type&&h[x][1].start.line!==h[x][1].end.line&&(C=x+1,_.push(C),T._tokenizer=void 0,T.previous=void 0,T=T.next);for(d.events=[],T?(T._tokenizer=void 0,T.previous=void 0):_.pop(),x=_.length;x--;){const k=h.slice(_[x],_[x+1]),V=l.pop();f.unshift([V,V+k.length-1]),ti(e,V,2,k)}for(x=-1;++x<f.length;)m[P+f[x][0]]=P+f[x][1],P+=f[x][1]-f[x][0]-1;return m}const hB={tokenize:pB,resolve:fB},dB={tokenize:mB,partial:!0};function fB(e){return W0(e),e}function pB(e,n){let t;return r;function r(h){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),o(h)}function o(h){return h===null?l(h):It(h)?e.check(dB,d,l)(h):(e.consume(h),o)}function l(h){return e.exit("chunkContent"),e.exit("content"),n(h)}function d(h){return e.consume(h),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,o}}function mB(e,n,t){const r=this;return o;function o(d){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Tn(e,l,"linePrefix")}function l(d){if(d===null||It(d))return t(d);const h=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?n(d):e.interrupt(r.parser.constructs.flow,t,n)(d)}}function G0(e,n,t,r,o,l,d,h,f){const m=f||Number.POSITIVE_INFINITY;let g=0;return w;function w(k){return k===60?(e.enter(r),e.enter(o),e.enter(l),e.consume(k),e.exit(l),x):k===null||k===32||k===41||Rf(k)?t(k):(e.enter(r),e.enter(d),e.enter(h),e.enter("chunkString",{contentType:"string"}),C(k))}function x(k){return k===62?(e.enter(l),e.consume(k),e.exit(l),e.exit(o),e.exit(r),n):(e.enter(h),e.enter("chunkString",{contentType:"string"}),T(k))}function T(k){return k===62?(e.exit("chunkString"),e.exit(h),x(k)):k===null||k===60||It(k)?t(k):(e.consume(k),k===92?P:T)}function P(k){return k===60||k===62||k===92?(e.consume(k),T):T(k)}function C(k){return!g&&(k===null||k===41||mr(k))?(e.exit("chunkString"),e.exit(h),e.exit(d),e.exit(r),n(k)):g<m&&k===40?(e.consume(k),g++,C):k===41?(e.consume(k),g--,C):k===null||k===32||k===40||Rf(k)?t(k):(e.consume(k),k===92?_:C)}function _(k){return k===40||k===41||k===92?(e.consume(k),C):C(k)}}function q0(e,n,t,r,o,l){const d=this;let h=0,f;return m;function m(T){return e.enter(r),e.enter(o),e.consume(T),e.exit(o),e.enter(l),g}function g(T){return h>999||T===null||T===91||T===93&&!f||T===94&&!h&&"_hiddenFootnoteSupport"in d.parser.constructs?t(T):T===93?(e.exit(l),e.enter(o),e.consume(T),e.exit(o),e.exit(r),n):It(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),w(T))}function w(T){return T===null||T===91||T===93||It(T)||h++>999?(e.exit("chunkString"),g(T)):(e.consume(T),f||(f=!tn(T)),T===92?x:w)}function x(T){return T===91||T===92||T===93?(e.consume(T),h++,w):w(T)}}function Y0(e,n,t,r,o,l){let d;return h;function h(x){return x===34||x===39||x===40?(e.enter(r),e.enter(o),e.consume(x),e.exit(o),d=x===40?41:x,f):t(x)}function f(x){return x===d?(e.enter(o),e.consume(x),e.exit(o),e.exit(r),n):(e.enter(l),m(x))}function m(x){return x===d?(e.exit(l),f(d)):x===null?t(x):It(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Tn(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===d||x===null||It(x)?(e.exit("chunkString"),m(x)):(e.consume(x),x===92?w:g)}function w(x){return x===d||x===92?(e.consume(x),g):g(x)}}function ls(e,n){let t;return r;function r(o){return It(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t=!0,r):tn(o)?Tn(e,r,t?"linePrefix":"lineSuffix")(o):n(o)}}function ea(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const gB={name:"definition",tokenize:yB},vB={tokenize:wB,partial:!0};function yB(e,n,t){const r=this;let o;return l;function l(T){return e.enter("definition"),d(T)}function d(T){return q0.call(r,e,h,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(T)}function h(T){return o=ea(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),f):t(T)}function f(T){return mr(T)?ls(e,m)(T):m(T)}function m(T){return G0(e,g,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(T)}function g(T){return e.attempt(vB,w,w)(T)}function w(T){return tn(T)?Tn(e,x,"whitespace")(T):x(T)}function x(T){return T===null||It(T)?(e.exit("definition"),r.parser.defined.push(o),n(T)):t(T)}}function wB(e,n,t){return r;function r(h){return mr(h)?ls(e,o)(h):t(h)}function o(h){return Y0(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function l(h){return tn(h)?Tn(e,d,"whitespace")(h):d(h)}function d(h){return h===null||It(h)?n(h):t(h)}}const bB={name:"hardBreakEscape",tokenize:EB};function EB(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),o}function o(l){return It(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const xB={name:"headingAtx",tokenize:TB,resolve:SB};function SB(e,n){let t=e.length-2,r=3,o,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},ti(e,r,t-r+1,[["enter",o,n],["enter",l,n],["exit",l,n],["exit",o,n]])),e}function TB(e,n,t){let r=0;return o;function o(g){return e.enter("atxHeading"),l(g)}function l(g){return e.enter("atxHeadingSequence"),d(g)}function d(g){return g===35&&r++<6?(e.consume(g),d):g===null||mr(g)?(e.exit("atxHeadingSequence"),h(g)):t(g)}function h(g){return g===35?(e.enter("atxHeadingSequence"),f(g)):g===null||It(g)?(e.exit("atxHeading"),n(g)):tn(g)?Tn(e,h,"whitespace")(g):(e.enter("atxHeadingText"),m(g))}function f(g){return g===35?(e.consume(g),f):(e.exit("atxHeadingSequence"),h(g))}function m(g){return g===null||g===35||mr(g)?(e.exit("atxHeadingText"),h(g)):(e.consume(g),m)}}const _B=["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"],X0=["pre","script","style","textarea"],CB={name:"htmlFlow",tokenize:kB,resolveTo:OB,concrete:!0},PB={tokenize:DB,partial:!0},RB={tokenize:AB,partial:!0};function OB(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function kB(e,n,t){const r=this;let o,l,d,h,f;return m;function m(X){return g(X)}function g(X){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(X),w}function w(X){return X===33?(e.consume(X),x):X===47?(e.consume(X),l=!0,C):X===63?(e.consume(X),o=3,r.interrupt?n:F):ni(X)?(e.consume(X),d=String.fromCharCode(X),_):t(X)}function x(X){return X===45?(e.consume(X),o=2,T):X===91?(e.consume(X),o=5,h=0,P):ni(X)?(e.consume(X),o=4,r.interrupt?n:F):t(X)}function T(X){return X===45?(e.consume(X),r.interrupt?n:F):t(X)}function P(X){const Be="CDATA[";return X===Be.charCodeAt(h++)?(e.consume(X),h===Be.length?r.interrupt?n:de:P):t(X)}function C(X){return ni(X)?(e.consume(X),d=String.fromCharCode(X),_):t(X)}function _(X){if(X===null||X===47||X===62||mr(X)){const Be=X===47,Je=d.toLowerCase();return!Be&&!l&&X0.includes(Je)?(o=1,r.interrupt?n(X):de(X)):_B.includes(d.toLowerCase())?(o=6,Be?(e.consume(X),k):r.interrupt?n(X):de(X)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(X):l?V(X):j(X))}return X===45||xr(X)?(e.consume(X),d+=String.fromCharCode(X),_):t(X)}function k(X){return X===62?(e.consume(X),r.interrupt?n:de):t(X)}function V(X){return tn(X)?(e.consume(X),V):_e(X)}function j(X){return X===47?(e.consume(X),_e):X===58||X===95||ni(X)?(e.consume(X),Z):tn(X)?(e.consume(X),j):_e(X)}function Z(X){return X===45||X===46||X===58||X===95||xr(X)?(e.consume(X),Z):B(X)}function B(X){return X===61?(e.consume(X),Y):tn(X)?(e.consume(X),B):j(X)}function Y(X){return X===null||X===60||X===61||X===62||X===96?t(X):X===34||X===39?(e.consume(X),f=X,ie):tn(X)?(e.consume(X),Y):ae(X)}function ie(X){return X===f?(e.consume(X),f=null,le):X===null||It(X)?t(X):(e.consume(X),ie)}function ae(X){return X===null||X===34||X===39||X===47||X===60||X===61||X===62||X===96||mr(X)?B(X):(e.consume(X),ae)}function le(X){return X===47||X===62||tn(X)?j(X):t(X)}function _e(X){return X===62?(e.consume(X),fe):t(X)}function fe(X){return X===null||It(X)?de(X):tn(X)?(e.consume(X),fe):t(X)}function de(X){return X===45&&o===2?(e.consume(X),me):X===60&&o===1?(e.consume(X),be):X===62&&o===4?(e.consume(X),we):X===63&&o===3?(e.consume(X),F):X===93&&o===5?(e.consume(X),Oe):It(X)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(PB,Ne,ve)(X)):X===null||It(X)?(e.exit("htmlFlowData"),ve(X)):(e.consume(X),de)}function ve(X){return e.check(RB,Ae,Ne)(X)}function Ae(X){return e.enter("lineEnding"),e.consume(X),e.exit("lineEnding"),ke}function ke(X){return X===null||It(X)?ve(X):(e.enter("htmlFlowData"),de(X))}function me(X){return X===45?(e.consume(X),F):de(X)}function be(X){return X===47?(e.consume(X),d="",Ee):de(X)}function Ee(X){if(X===62){const Be=d.toLowerCase();return X0.includes(Be)?(e.consume(X),we):de(X)}return ni(X)&&d.length<8?(e.consume(X),d+=String.fromCharCode(X),Ee):de(X)}function Oe(X){return X===93?(e.consume(X),F):de(X)}function F(X){return X===62?(e.consume(X),we):X===45&&o===2?(e.consume(X),F):de(X)}function we(X){return X===null||It(X)?(e.exit("htmlFlowData"),Ne(X)):(e.consume(X),we)}function Ne(X){return e.exit("htmlFlow"),n(X)}}function AB(e,n,t){const r=this;return o;function o(d){return It(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):t(d)}function l(d){return r.parser.lazy[r.now().line]?t(d):n(d)}}function DB(e,n,t){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ul,n,t)}}const IB={name:"htmlText",tokenize:MB};function MB(e,n,t){const r=this;let o,l,d;return h;function h(F){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(F),f}function f(F){return F===33?(e.consume(F),m):F===47?(e.consume(F),B):F===63?(e.consume(F),j):ni(F)?(e.consume(F),ae):t(F)}function m(F){return F===45?(e.consume(F),g):F===91?(e.consume(F),l=0,P):ni(F)?(e.consume(F),V):t(F)}function g(F){return F===45?(e.consume(F),T):t(F)}function w(F){return F===null?t(F):F===45?(e.consume(F),x):It(F)?(d=w,be(F)):(e.consume(F),w)}function x(F){return F===45?(e.consume(F),T):w(F)}function T(F){return F===62?me(F):F===45?x(F):w(F)}function P(F){const we="CDATA[";return F===we.charCodeAt(l++)?(e.consume(F),l===we.length?C:P):t(F)}function C(F){return F===null?t(F):F===93?(e.consume(F),_):It(F)?(d=C,be(F)):(e.consume(F),C)}function _(F){return F===93?(e.consume(F),k):C(F)}function k(F){return F===62?me(F):F===93?(e.consume(F),k):C(F)}function V(F){return F===null||F===62?me(F):It(F)?(d=V,be(F)):(e.consume(F),V)}function j(F){return F===null?t(F):F===63?(e.consume(F),Z):It(F)?(d=j,be(F)):(e.consume(F),j)}function Z(F){return F===62?me(F):j(F)}function B(F){return ni(F)?(e.consume(F),Y):t(F)}function Y(F){return F===45||xr(F)?(e.consume(F),Y):ie(F)}function ie(F){return It(F)?(d=ie,be(F)):tn(F)?(e.consume(F),ie):me(F)}function ae(F){return F===45||xr(F)?(e.consume(F),ae):F===47||F===62||mr(F)?le(F):t(F)}function le(F){return F===47?(e.consume(F),me):F===58||F===95||ni(F)?(e.consume(F),_e):It(F)?(d=le,be(F)):tn(F)?(e.consume(F),le):me(F)}function _e(F){return F===45||F===46||F===58||F===95||xr(F)?(e.consume(F),_e):fe(F)}function fe(F){return F===61?(e.consume(F),de):It(F)?(d=fe,be(F)):tn(F)?(e.consume(F),fe):le(F)}function de(F){return F===null||F===60||F===61||F===62||F===96?t(F):F===34||F===39?(e.consume(F),o=F,ve):It(F)?(d=de,be(F)):tn(F)?(e.consume(F),de):(e.consume(F),Ae)}function ve(F){return F===o?(e.consume(F),o=void 0,ke):F===null?t(F):It(F)?(d=ve,be(F)):(e.consume(F),ve)}function Ae(F){return F===null||F===34||F===39||F===60||F===61||F===96?t(F):F===47||F===62||mr(F)?le(F):(e.consume(F),Ae)}function ke(F){return F===47||F===62||mr(F)?le(F):t(F)}function me(F){return F===62?(e.consume(F),e.exit("htmlTextData"),e.exit("htmlText"),n):t(F)}function be(F){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),Ee}function Ee(F){return tn(F)?Tn(e,Oe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):Oe(F)}function Oe(F){return e.enter("htmlTextData"),d(F)}}const Mf={name:"labelEnd",tokenize:HB,resolveTo:jB,resolveAll:BB},NB={tokenize:zB},LB={tokenize:VB},FB={tokenize:UB};function BB(e){let n=-1;for(;++n<e.length;){const t=e[n][1];(t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd")&&(e.splice(n+1,t.type==="labelImage"?4:2),t.type="data",n++)}return e}function jB(e,n){let t=e.length,r=0,o,l,d,h;for(;t--;)if(o=e[t][1],l){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[t][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(d){if(e[t][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(l=t,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(d=t);const f={type:e[l][1].type==="labelLink"?"link":"image",start:Object.assign({},e[l][1].start),end:Object.assign({},e[e.length-1][1].end)},m={type:"label",start:Object.assign({},e[l][1].start),end:Object.assign({},e[d][1].end)},g={type:"labelText",start:Object.assign({},e[l+r+2][1].end),end:Object.assign({},e[d-2][1].start)};return h=[["enter",f,n],["enter",m,n]],h=Br(h,e.slice(l+1,l+r+3)),h=Br(h,[["enter",g,n]]),h=Br(h,kf(n.parser.constructs.insideSpan.null,e.slice(l+r+4,d-3),n)),h=Br(h,[["exit",g,n],e[d-2],e[d-1],["exit",m,n]]),h=Br(h,e.slice(d+1)),h=Br(h,[["exit",f,n]]),ti(e,l,e.length,h),e}function HB(e,n,t){const r=this;let o=r.events.length,l,d;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){l=r.events[o][1];break}return h;function h(x){return l?l._inactive?w(x):(d=r.parser.defined.includes(ea(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),f):t(x)}function f(x){return x===40?e.attempt(NB,g,d?g:w)(x):x===91?e.attempt(LB,g,d?m:w)(x):d?g(x):w(x)}function m(x){return e.attempt(FB,g,w)(x)}function g(x){return n(x)}function w(x){return l._balanced=!0,t(x)}}function zB(e,n,t){return r;function r(w){return e.enter("resource"),e.enter("resourceMarker"),e.consume(w),e.exit("resourceMarker"),o}function o(w){return mr(w)?ls(e,l)(w):l(w)}function l(w){return w===41?g(w):G0(e,d,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(w)}function d(w){return mr(w)?ls(e,f)(w):g(w)}function h(w){return t(w)}function f(w){return w===34||w===39||w===40?Y0(e,m,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(w):g(w)}function m(w){return mr(w)?ls(e,g)(w):g(w)}function g(w){return w===41?(e.enter("resourceMarker"),e.consume(w),e.exit("resourceMarker"),e.exit("resource"),n):t(w)}}function VB(e,n,t){const r=this;return o;function o(h){return q0.call(r,e,l,d,"reference","referenceMarker","referenceString")(h)}function l(h){return r.parser.defined.includes(ea(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(h):t(h)}function d(h){return t(h)}}function UB(e,n,t){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),o}function o(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),n):t(l)}}const WB={name:"labelStartImage",tokenize:GB,resolveAll:Mf.resolveAll};function GB(e,n,t){const r=this;return o;function o(h){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(h),e.exit("labelImageMarker"),l}function l(h){return h===91?(e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelImage"),d):t(h)}function d(h){return h===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(h):n(h)}}const qB={name:"labelStartLink",tokenize:YB,resolveAll:Mf.resolveAll};function YB(e,n,t){const r=this;return o;function o(d){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelLink"),l}function l(d){return d===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(d):n(d)}}const Nf={name:"lineEnding",tokenize:XB};function XB(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Tn(e,n,"linePrefix")}}const Wl={name:"thematicBreak",tokenize:ZB};function ZB(e,n,t){let r=0,o;return l;function l(m){return e.enter("thematicBreak"),d(m)}function d(m){return o=m,h(m)}function h(m){return m===o?(e.enter("thematicBreakSequence"),f(m)):r>=3&&(m===null||It(m))?(e.exit("thematicBreak"),n(m)):t(m)}function f(m){return m===o?(e.consume(m),r++,f):(e.exit("thematicBreakSequence"),tn(m)?Tn(e,h,"whitespace")(m):h(m))}}const gr={name:"list",tokenize:QB,continuation:{tokenize:$B},exit:tj},KB={tokenize:nj,partial:!0},JB={tokenize:ej,partial:!0};function QB(e,n,t){const r=this,o=r.events[r.events.length-1];let l=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,d=0;return h;function h(T){const P=r.containerState.type||(T===42||T===43||T===45?"listUnordered":"listOrdered");if(P==="listUnordered"?!r.containerState.marker||T===r.containerState.marker:Of(T)){if(r.containerState.type||(r.containerState.type=P,e.enter(P,{_container:!0})),P==="listUnordered")return e.enter("listItemPrefix"),T===42||T===45?e.check(Wl,t,m)(T):m(T);if(!r.interrupt||T===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(T)}return t(T)}function f(T){return Of(T)&&++d<10?(e.consume(T),f):(!r.interrupt||d<2)&&(r.containerState.marker?T===r.containerState.marker:T===41||T===46)?(e.exit("listItemValue"),m(T)):t(T)}function m(T){return e.enter("listItemMarker"),e.consume(T),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||T,e.check(Ul,r.interrupt?t:g,e.attempt(KB,x,w))}function g(T){return r.containerState.initialBlankLine=!0,l++,x(T)}function w(T){return tn(T)?(e.enter("listItemPrefixWhitespace"),e.consume(T),e.exit("listItemPrefixWhitespace"),x):t(T)}function x(T){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(T)}}function $B(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Ul,o,l);function o(h){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Tn(e,n,"listItemIndent",r.containerState.size+1)(h)}function l(h){return r.containerState.furtherBlankLines||!tn(h)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,d(h)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(JB,n,d)(h))}function d(h){return r.containerState._closeFlow=!0,r.interrupt=void 0,Tn(e,e.attempt(gr,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function ej(e,n,t){const r=this;return Tn(e,o,"listItemIndent",r.containerState.size+1);function o(l){const d=r.events[r.events.length-1];return d&&d[1].type==="listItemIndent"&&d[2].sliceSerialize(d[1],!0).length===r.containerState.size?n(l):t(l)}}function tj(e){e.exit(this.containerState.type)}function nj(e,n,t){const r=this;return Tn(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(l){const d=r.events[r.events.length-1];return!tn(l)&&d&&d[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const Z0={name:"setextUnderline",tokenize:ij,resolveTo:rj};function rj(e,n){let t=e.length,r,o,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(o=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const d={type:"setextHeading",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",l?(e.splice(o,0,["enter",d,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end=Object.assign({},e[l][1].end)):e[r][1]=d,e.push(["exit",d,n]),e}function ij(e,n,t){const r=this;let o;return l;function l(m){let g=r.events.length,w;for(;g--;)if(r.events[g][1].type!=="lineEnding"&&r.events[g][1].type!=="linePrefix"&&r.events[g][1].type!=="content"){w=r.events[g][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||w)?(e.enter("setextHeadingLine"),o=m,d(m)):t(m)}function d(m){return e.enter("setextHeadingLineSequence"),h(m)}function h(m){return m===o?(e.consume(m),h):(e.exit("setextHeadingLineSequence"),tn(m)?Tn(e,f,"lineSuffix")(m):f(m))}function f(m){return m===null||It(m)?(e.exit("setextHeadingLine"),n(m)):t(m)}}const oj={tokenize:aj};function aj(e){const n=this,t=e.attempt(Ul,r,e.attempt(this.parser.constructs.flowInitial,o,Tn(e,e.attempt(this.parser.constructs.flow,o,e.attempt(hB,o)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function o(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const sj={resolveAll:J0()},lj=K0("string"),uj=K0("text");function K0(e){return{tokenize:n,resolveAll:J0(e==="text"?cj:void 0)};function n(t){const r=this,o=this.parser.constructs[e],l=t.attempt(o,d,h);return d;function d(g){return m(g)?l(g):h(g)}function h(g){if(g===null){t.consume(g);return}return t.enter("data"),t.consume(g),f}function f(g){return m(g)?(t.exit("data"),l(g)):(t.consume(g),f)}function m(g){if(g===null)return!0;const w=o[g];let x=-1;if(w)for(;++x<w.length;){const T=w[x];if(!T.previous||T.previous.call(r,r.previous))return!0}return!1}}}function J0(e){return n;function n(t,r){let o=-1,l;for(;++o<=t.length;)l===void 0?t[o]&&t[o][1].type==="data"&&(l=o,o++):(!t[o]||t[o][1].type!=="data")&&(o!==l+2&&(t[l][1].end=t[o-1][1].end,t.splice(l+2,o-l-2),o=l+2),l=void 0);return e?e(t,r):t}}function cj(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],o=n.sliceStream(r);let l=o.length,d=-1,h=0,f;for(;l--;){const m=o[l];if(typeof m=="string"){for(d=m.length;m.charCodeAt(d-1)===32;)h++,d--;if(d)break;d=-1}else if(m===-2)f=!0,h++;else if(m!==-1){l++;break}}if(h){const m={type:t===e.length||f||h<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-h,offset:r.end.offset-h,_index:r.start._index+l,_bufferIndex:l?d:r.start._bufferIndex+d},end:Object.assign({},r.end)};r.end=Object.assign({},m.start),r.start.offset===r.end.offset?Object.assign(r,m):(e.splice(t,0,["enter",m,n],["exit",m,n]),t+=2)}t++}return e}function hj(e,n,t){let r=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const o={},l=[];let d=[],h=[];const f={consume:V,enter:j,exit:Z,attempt:ie(B),check:ie(Y),interrupt:ie(Y,{interrupt:!0})},m={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:T,sliceSerialize:x,now:P,defineSkip:C,write:w};let g=n.tokenize.call(m,f);return n.resolveAll&&l.push(n),m;function w(fe){return d=Br(d,fe),_(),d[d.length-1]!==null?[]:(ae(n,0),m.events=kf(l,m.events,m),m.events)}function x(fe,de){return fj(T(fe),de)}function T(fe){return dj(d,fe)}function P(){const{line:fe,column:de,offset:ve,_index:Ae,_bufferIndex:ke}=r;return{line:fe,column:de,offset:ve,_index:Ae,_bufferIndex:ke}}function C(fe){o[fe.line]=fe.column,_e()}function _(){let fe;for(;r._index<d.length;){const de=d[r._index];if(typeof de=="string")for(fe=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===fe&&r._bufferIndex<de.length;)k(de.charCodeAt(r._bufferIndex));else k(de)}}function k(fe){g=g(fe)}function V(fe){It(fe)?(r.line++,r.column=1,r.offset+=fe===-3?2:1,_e()):fe!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===d[r._index].length&&(r._bufferIndex=-1,r._index++)),m.previous=fe}function j(fe,de){const ve=de||{};return ve.type=fe,ve.start=P(),m.events.push(["enter",ve,m]),h.push(ve),ve}function Z(fe){const de=h.pop();return de.end=P(),m.events.push(["exit",de,m]),de}function B(fe,de){ae(fe,de.from)}function Y(fe,de){de.restore()}function ie(fe,de){return ve;function ve(Ae,ke,me){let be,Ee,Oe,F;return Array.isArray(Ae)?Ne(Ae):"tokenize"in Ae?Ne([Ae]):we(Ae);function we(He){return Ze;function Ze(Qe){const it=Qe!==null&&He[Qe],Ke=Qe!==null&&He.null,Le=[...Array.isArray(it)?it:it?[it]:[],...Array.isArray(Ke)?Ke:Ke?[Ke]:[]];return Ne(Le)(Qe)}}function Ne(He){return be=He,Ee=0,He.length===0?me:X(He[Ee])}function X(He){return Ze;function Ze(Qe){return F=le(),Oe=He,He.partial||(m.currentConstruct=He),He.name&&m.parser.constructs.disable.null.includes(He.name)?Je():He.tokenize.call(de?Object.assign(Object.create(m),de):m,f,Be,Je)(Qe)}}function Be(He){return fe(Oe,F),ke}function Je(He){return F.restore(),++Ee<be.length?X(be[Ee]):me}}}function ae(fe,de){fe.resolveAll&&!l.includes(fe)&&l.push(fe),fe.resolve&&ti(m.events,de,m.events.length-de,fe.resolve(m.events.slice(de),m)),fe.resolveTo&&(m.events=fe.resolveTo(m.events,m))}function le(){const fe=P(),de=m.previous,ve=m.currentConstruct,Ae=m.events.length,ke=Array.from(h);return{restore:me,from:Ae};function me(){r=fe,m.previous=de,m.currentConstruct=ve,m.events.length=Ae,h=ke,_e()}}function _e(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function dj(e,n){const t=n.start._index,r=n.start._bufferIndex,o=n.end._index,l=n.end._bufferIndex;let d;if(t===o)d=[e[t].slice(r,l)];else{if(d=e.slice(t,o),r>-1){const h=d[0];typeof h=="string"?d[0]=h.slice(r):d.shift()}l>0&&d.push(e[o].slice(0,l))}return d}function fj(e,n){let t=-1;const r=[];let o;for(;++t<e.length;){const l=e[t];let d;if(typeof l=="string")d=l;else switch(l){case-5:{d="\r";break}case-4:{d=`
|
|
276
|
-
`;break}case-3:{d=`\r
|
|
277
|
-
`;break}case-2:{d=n?" ":" ";break}case-1:{if(!n&&o)continue;d=" ";break}default:d=String.fromCharCode(l)}o=l===-2,r.push(d)}return r.join("")}const pj=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:gB},disable:{null:[]},document:{42:gr,43:gr,45:gr,48:gr,49:gr,50:gr,51:gr,52:gr,53:gr,54:gr,55:gr,56:gr,57:gr,62:B0},flow:{35:xB,42:Wl,45:[Z0,Wl],60:CB,61:Z0,95:Wl,96:U0,126:U0},flowInitial:{[-2]:If,[-1]:If,32:If},insideSpan:{null:[Af,sj]},string:{38:z0,92:j0},text:{[-5]:Nf,[-4]:Nf,[-3]:Nf,33:WB,38:z0,42:Af,60:[YF,IB],91:qB,92:[bB,j0],93:Mf,95:Af,96:aB}},Symbol.toStringTag,{value:"Module"}));function mj(e){const t=AF([pj,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:t,content:o(HF),document:o(VF),flow:o(oj),string:o(lj),text:o(uj)};return r;function o(l){return d;function d(h){return hj(r,l,h)}}}const Q0=/[\0\t\n\r]/g;function gj(){let e=1,n="",t=!0,r;return o;function o(l,d,h){const f=[];let m,g,w,x,T;for(l=n+l.toString(d),w=0,n="",t&&(l.charCodeAt(0)===65279&&w++,t=void 0);w<l.length;){if(Q0.lastIndex=w,m=Q0.exec(l),x=m&&m.index!==void 0?m.index:l.length,T=l.charCodeAt(x),!m){n=l.slice(w);break}if(T===10&&w===x&&r)f.push(-3),r=void 0;else switch(r&&(f.push(-5),r=void 0),w<x&&(f.push(l.slice(w,x)),e+=x-w),T){case 0:{f.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,f.push(-2);e++<g;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:r=!0,e=1}w=x+1}return h&&(r&&f.push(-5),n&&f.push(n),f.push(null)),f}}function vj(e){for(;!W0(e););return e}function $0(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCharCode(t)}const yj=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function wj(e){return e.replace(yj,bj)}function bj(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const o=t.charCodeAt(1),l=o===120||o===88;return $0(t.slice(l?2:1),l?16:10)}return Df(t)||e}const eE={}.hasOwnProperty,Ej=function(e,n,t){return typeof n!="string"&&(t=n,n=void 0),xj(t)(vj(mj(t).document().write(gj()(e,n,!0))))};function xj(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:h(ze),autolinkProtocol:fe,autolinkEmail:fe,atxHeading:h(wt),blockQuote:h(Le),characterEscape:fe,characterReference:fe,codeFenced:h(pe),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:h(pe,f),codeText:h(mt,f),codeTextData:fe,data:fe,codeFlowValue:fe,definition:h(Ce),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:h(Pt),hardBreakEscape:h(D),hardBreakTrailing:h(D),htmlFlow:h(K,f),htmlFlowData:fe,htmlText:h(K,f),htmlTextData:fe,image:h(xe),label:f,link:h(ze),listItem:h(ut),listItemValue:P,listOrdered:h(Ve,T),listUnordered:h(Ve),paragraph:h(Ye),reference:Je,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:h(wt),strong:h(gt),thematicBreak:h(St)},exit:{atxHeading:g(),atxHeadingSequence:ie,autolink:g(),autolinkEmail:Ke,autolinkProtocol:it,blockQuote:g(),characterEscapeValue:de,characterReferenceMarkerHexadecimal:Ze,characterReferenceMarkerNumeric:Ze,characterReferenceValue:Qe,codeFenced:g(V),codeFencedFence:k,codeFencedFenceInfo:C,codeFencedFenceMeta:_,codeFlowValue:de,codeIndented:g(j),codeText:g(be),codeTextData:de,data:de,definition:g(),definitionDestinationString:Y,definitionLabelString:Z,definitionTitleString:B,emphasis:g(),hardBreakEscape:g(Ae),hardBreakTrailing:g(Ae),htmlFlow:g(ke),htmlFlowData:de,htmlText:g(me),htmlTextData:de,image:g(Oe),label:we,labelText:F,lineEnding:ve,link:g(Ee),listItem:g(),listOrdered:g(),listUnordered:g(),paragraph:g(),referenceString:He,resourceDestinationString:Ne,resourceTitleString:X,resource:Be,setextHeading:g(_e),setextHeadingLineSequence:le,setextHeadingText:ae,strong:g(),thematicBreak:g()}};tE(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(ge){let Ie={type:"root",children:[]};const M={stack:[Ie],tokenStack:[],config:n,enter:m,exit:w,buffer:f,resume:x,setData:l,getData:d},L=[];let q=-1;for(;++q<ge.length;)if(ge[q][1].type==="listOrdered"||ge[q][1].type==="listUnordered")if(ge[q][0]==="enter")L.push(q);else{const J=L.pop();q=o(ge,J,q)}for(q=-1;++q<ge.length;){const J=n[ge[q][0]];eE.call(J,ge[q][1].type)&&J[ge[q][1].type].call(Object.assign({sliceSerialize:ge[q][2].sliceSerialize},M),ge[q][1])}if(M.tokenStack.length>0){const J=M.tokenStack[M.tokenStack.length-1];(J[1]||nE).call(M,void 0,J[0])}for(Ie.position={start:Ni(ge.length>0?ge[0][1].start:{line:1,column:1,offset:0}),end:Ni(ge.length>0?ge[ge.length-2][1].end:{line:1,column:1,offset:0})},q=-1;++q<n.transforms.length;)Ie=n.transforms[q](Ie)||Ie;return Ie}function o(ge,Ie,M){let L=Ie-1,q=-1,J=!1,ye,Re,ot,bt;for(;++L<=M;){const je=ge[L];if(je[1].type==="listUnordered"||je[1].type==="listOrdered"||je[1].type==="blockQuote"?(je[0]==="enter"?q++:q--,bt=void 0):je[1].type==="lineEndingBlank"?je[0]==="enter"&&(ye&&!bt&&!q&&!ot&&(ot=L),bt=void 0):je[1].type==="linePrefix"||je[1].type==="listItemValue"||je[1].type==="listItemMarker"||je[1].type==="listItemPrefix"||je[1].type==="listItemPrefixWhitespace"||(bt=void 0),!q&&je[0]==="enter"&&je[1].type==="listItemPrefix"||q===-1&&je[0]==="exit"&&(je[1].type==="listUnordered"||je[1].type==="listOrdered")){if(ye){let fn=L;for(Re=void 0;fn--;){const Vt=ge[fn];if(Vt[1].type==="lineEnding"||Vt[1].type==="lineEndingBlank"){if(Vt[0]==="exit")continue;Re&&(ge[Re][1].type="lineEndingBlank",J=!0),Vt[1].type="lineEnding",Re=fn}else if(!(Vt[1].type==="linePrefix"||Vt[1].type==="blockQuotePrefix"||Vt[1].type==="blockQuotePrefixWhitespace"||Vt[1].type==="blockQuoteMarker"||Vt[1].type==="listItemIndent"))break}ot&&(!Re||ot<Re)&&(ye._spread=!0),ye.end=Object.assign({},Re?ge[Re][1].start:je[1].end),ge.splice(Re||L,0,["exit",ye,je[2]]),L++,M++}je[1].type==="listItemPrefix"&&(ye={type:"listItem",_spread:!1,start:Object.assign({},je[1].start),end:void 0},ge.splice(L,0,["enter",ye,je[2]]),L++,M++,ot=void 0,bt=!0)}}return ge[Ie][1]._spread=J,M}function l(ge,Ie){t[ge]=Ie}function d(ge){return t[ge]}function h(ge,Ie){return M;function M(L){m.call(this,ge(L),L),Ie&&Ie.call(this,L)}}function f(){this.stack.push({type:"fragment",children:[]})}function m(ge,Ie,M){return this.stack[this.stack.length-1].children.push(ge),this.stack.push(ge),this.tokenStack.push([Ie,M]),ge.position={start:Ni(Ie.start)},ge}function g(ge){return Ie;function Ie(M){ge&&ge.call(this,M),w.call(this,M)}}function w(ge,Ie){const M=this.stack.pop(),L=this.tokenStack.pop();if(L)L[0].type!==ge.type&&(Ie?Ie.call(this,ge,L[0]):(L[1]||nE).call(this,ge,L[0]));else throw new Error("Cannot close `"+ge.type+"` ("+os({start:ge.start,end:ge.end})+"): it’s not open");return M.position.end=Ni(ge.end),M}function x(){return OF(this.stack.pop())}function T(){l("expectingFirstListItemValue",!0)}function P(ge){if(d("expectingFirstListItemValue")){const Ie=this.stack[this.stack.length-2];Ie.start=Number.parseInt(this.sliceSerialize(ge),10),l("expectingFirstListItemValue")}}function C(){const ge=this.resume(),Ie=this.stack[this.stack.length-1];Ie.lang=ge}function _(){const ge=this.resume(),Ie=this.stack[this.stack.length-1];Ie.meta=ge}function k(){d("flowCodeInside")||(this.buffer(),l("flowCodeInside",!0))}function V(){const ge=this.resume(),Ie=this.stack[this.stack.length-1];Ie.value=ge.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),l("flowCodeInside")}function j(){const ge=this.resume(),Ie=this.stack[this.stack.length-1];Ie.value=ge.replace(/(\r?\n|\r)$/g,"")}function Z(ge){const Ie=this.resume(),M=this.stack[this.stack.length-1];M.label=Ie,M.identifier=ea(this.sliceSerialize(ge)).toLowerCase()}function B(){const ge=this.resume(),Ie=this.stack[this.stack.length-1];Ie.title=ge}function Y(){const ge=this.resume(),Ie=this.stack[this.stack.length-1];Ie.url=ge}function ie(ge){const Ie=this.stack[this.stack.length-1];if(!Ie.depth){const M=this.sliceSerialize(ge).length;Ie.depth=M}}function ae(){l("setextHeadingSlurpLineEnding",!0)}function le(ge){const Ie=this.stack[this.stack.length-1];Ie.depth=this.sliceSerialize(ge).charCodeAt(0)===61?1:2}function _e(){l("setextHeadingSlurpLineEnding")}function fe(ge){const Ie=this.stack[this.stack.length-1];let M=Ie.children[Ie.children.length-1];(!M||M.type!=="text")&&(M=Ct(),M.position={start:Ni(ge.start)},Ie.children.push(M)),this.stack.push(M)}function de(ge){const Ie=this.stack.pop();Ie.value+=this.sliceSerialize(ge),Ie.position.end=Ni(ge.end)}function ve(ge){const Ie=this.stack[this.stack.length-1];if(d("atHardBreak")){const M=Ie.children[Ie.children.length-1];M.position.end=Ni(ge.end),l("atHardBreak");return}!d("setextHeadingSlurpLineEnding")&&n.canContainEols.includes(Ie.type)&&(fe.call(this,ge),de.call(this,ge))}function Ae(){l("atHardBreak",!0)}function ke(){const ge=this.resume(),Ie=this.stack[this.stack.length-1];Ie.value=ge}function me(){const ge=this.resume(),Ie=this.stack[this.stack.length-1];Ie.value=ge}function be(){const ge=this.resume(),Ie=this.stack[this.stack.length-1];Ie.value=ge}function Ee(){const ge=this.stack[this.stack.length-1];if(d("inReference")){const Ie=d("referenceType")||"shortcut";ge.type+="Reference",ge.referenceType=Ie,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;l("referenceType")}function Oe(){const ge=this.stack[this.stack.length-1];if(d("inReference")){const Ie=d("referenceType")||"shortcut";ge.type+="Reference",ge.referenceType=Ie,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;l("referenceType")}function F(ge){const Ie=this.sliceSerialize(ge),M=this.stack[this.stack.length-2];M.label=wj(Ie),M.identifier=ea(Ie).toLowerCase()}function we(){const ge=this.stack[this.stack.length-1],Ie=this.resume(),M=this.stack[this.stack.length-1];if(l("inReference",!0),M.type==="link"){const L=ge.children;M.children=L}else M.alt=Ie}function Ne(){const ge=this.resume(),Ie=this.stack[this.stack.length-1];Ie.url=ge}function X(){const ge=this.resume(),Ie=this.stack[this.stack.length-1];Ie.title=ge}function Be(){l("inReference")}function Je(){l("referenceType","collapsed")}function He(ge){const Ie=this.resume(),M=this.stack[this.stack.length-1];M.label=Ie,M.identifier=ea(this.sliceSerialize(ge)).toLowerCase(),l("referenceType","full")}function Ze(ge){l("characterReferenceType",ge.type)}function Qe(ge){const Ie=this.sliceSerialize(ge),M=d("characterReferenceType");let L;M?(L=$0(Ie,M==="characterReferenceMarkerNumeric"?10:16),l("characterReferenceType")):L=Df(Ie);const q=this.stack.pop();q.value+=L,q.position.end=Ni(ge.end)}function it(ge){de.call(this,ge);const Ie=this.stack[this.stack.length-1];Ie.url=this.sliceSerialize(ge)}function Ke(ge){de.call(this,ge);const Ie=this.stack[this.stack.length-1];Ie.url="mailto:"+this.sliceSerialize(ge)}function Le(){return{type:"blockquote",children:[]}}function pe(){return{type:"code",lang:null,meta:null,value:""}}function mt(){return{type:"inlineCode",value:""}}function Ce(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pt(){return{type:"emphasis",children:[]}}function wt(){return{type:"heading",depth:void 0,children:[]}}function D(){return{type:"break"}}function K(){return{type:"html",value:""}}function xe(){return{type:"image",title:null,url:"",alt:null}}function ze(){return{type:"link",title:null,url:"",children:[]}}function Ve(ge){return{type:"list",ordered:ge.type==="listOrdered",start:null,spread:ge._spread,children:[]}}function ut(ge){return{type:"listItem",spread:ge._spread,checked:null,children:[]}}function Ye(){return{type:"paragraph",children:[]}}function gt(){return{type:"strong",children:[]}}function Ct(){return{type:"text",value:""}}function St(){return{type:"thematicBreak"}}}function Ni(e){return{line:e.line,column:e.column,offset:e.offset}}function tE(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?tE(e,r):Sj(e,r)}}function Sj(e,n){let t;for(t in n)if(eE.call(n,t)){if(t==="canContainEols"){const r=n[t];r&&e[t].push(...r)}else if(t==="transforms"){const r=n[t];r&&e[t].push(...r)}else if(t==="enter"||t==="exit"){const r=n[t];r&&Object.assign(e[t],r)}}}function nE(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+os({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+os({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+os({start:n.start,end:n.end})+") is still open")}function Tj(e){Object.assign(this,{Parser:t=>{const r=this.data("settings");return Ej(t,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function _j(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function Cj(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
|
|
278
|
-
`}]}function Pj(e,n){const t=n.value?n.value+`
|
|
279
|
-
`:"",r=n.lang?n.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,o={};r&&(o.className=["language-"+r]);let l={type:"element",tagName:"code",properties:o,children:[{type:"text",value:t}]};return n.meta&&(l.data={meta:n.meta}),e.patch(n,l),l=e.applyData(n,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(n,l),l}function Rj(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Oj(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ta(e){const n=[];let t=-1,r=0,o=0;for(;++t<e.length;){const l=e.charCodeAt(t);let d="";if(l===37&&xr(e.charCodeAt(t+1))&&xr(e.charCodeAt(t+2)))o=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(d=String.fromCharCode(l));else if(l>55295&&l<57344){const h=e.charCodeAt(t+1);l<56320&&h>56319&&h<57344?(d=String.fromCharCode(l,h),o=1):d="�"}else d=String.fromCharCode(l);d&&(n.push(e.slice(r,t),encodeURIComponent(d)),r=t+o+1,d=""),o&&(t+=o,o=0)}return n.join("")+e.slice(r)}function rE(e,n){const t=String(n.identifier).toUpperCase(),r=ta(t.toLowerCase()),o=e.footnoteOrder.indexOf(t);let l;o===-1?(e.footnoteOrder.push(t),e.footnoteCounts[t]=1,l=e.footnoteOrder.length):(e.footnoteCounts[t]++,l=o+1);const d=e.footnoteCounts[t],h={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(n,h);const f={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(n,f),e.applyData(n,f)}function kj(e,n){const t=e.footnoteById;let r=1;for(;r in t;)r++;const o=String(r);return t[o]={type:"footnoteDefinition",identifier:o,children:[{type:"paragraph",children:n.children}],position:n.position},rE(e,{type:"footnoteReference",identifier:o,position:n.position})}function Aj(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Dj(e,n){if(e.dangerous){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}return null}function iE(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return{type:"text",value:"!["+n.alt+r};const o=e.all(n),l=o[0];l&&l.type==="text"?l.value="["+l.value:o.unshift({type:"text",value:"["});const d=o[o.length-1];return d&&d.type==="text"?d.value+=r:o.push({type:"text",value:r}),o}function Ij(e,n){const t=e.definition(n.identifier);if(!t)return iE(e,n);const r={src:ta(t.url||""),alt:n.alt};t.title!==null&&t.title!==void 0&&(r.title=t.title);const o={type:"element",tagName:"img",properties:r,children:[]};return e.patch(n,o),e.applyData(n,o)}function Mj(e,n){const t={src:ta(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function Nj(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function Lj(e,n){const t=e.definition(n.identifier);if(!t)return iE(e,n);const r={href:ta(t.url||"")};t.title!==null&&t.title!==void 0&&(r.title=t.title);const o={type:"element",tagName:"a",properties:r,children:e.all(n)};return e.patch(n,o),e.applyData(n,o)}function Fj(e,n){const t={href:ta(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Bj(e,n,t){const r=e.all(n),o=t?jj(t):oE(n),l={},d=[];if(typeof n.checked=="boolean"){const g=r[0];let w;g&&g.type==="element"&&g.tagName==="p"?w=g:(w={type:"element",tagName:"p",properties:{},children:[]},r.unshift(w)),w.children.length>0&&w.children.unshift({type:"text",value:" "}),w.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let h=-1;for(;++h<r.length;){const g=r[h];(o||h!==0||g.type!=="element"||g.tagName!=="p")&&d.push({type:"text",value:`
|
|
280
|
-
`}),g.type==="element"&&g.tagName==="p"&&!o?d.push(...g.children):d.push(g)}const f=r[r.length-1];f&&(o||f.type!=="element"||f.tagName!=="p")&&d.push({type:"text",value:`
|
|
281
|
-
`});const m={type:"element",tagName:"li",properties:l,children:d};return e.patch(n,m),e.applyData(n,m)}function jj(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=oE(t[r])}return n}function oE(e){const n=e.spread;return n??e.children.length>1}function Hj(e,n){const t={},r=e.all(n);let o=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++o<r.length;){const d=r[o];if(d.type==="element"&&d.tagName==="li"&&d.properties&&Array.isArray(d.properties.className)&&d.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const l={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,l),e.applyData(n,l)}function zj(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Vj(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function Uj(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const Lf=aE("start"),Ff=aE("end");function Wj(e){return{start:Lf(e),end:Ff(e)}}function aE(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};return{line:r.line||null,column:r.column||null,offset:r.offset>-1?r.offset:null}}}function Gj(e,n){const t=e.all(n),r=t.shift(),o=[];if(r){const d={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],d),o.push(d)}if(t.length>0){const d={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},h=Lf(n.children[1]),f=Ff(n.children[n.children.length-1]);h.line&&f.line&&(d.position={start:h,end:f}),o.push(d)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(n,l),e.applyData(n,l)}function qj(e,n,t){const r=t?t.children:void 0,l=(r?r.indexOf(n):1)===0?"th":"td",d=t&&t.type==="table"?t.align:void 0,h=d?d.length:n.children.length;let f=-1;const m=[];for(;++f<h;){const w=n.children[f],x={},T=d?d[f]:void 0;T&&(x.align=T);let P={type:"element",tagName:l,properties:x,children:[]};w&&(P.children=e.all(w),e.patch(w,P),P=e.applyData(n,P)),m.push(P)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(n,g),e.applyData(n,g)}function Yj(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const sE=9,lE=32;function Xj(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),o=0;const l=[];for(;r;)l.push(uE(n.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=t.exec(n);return l.push(uE(n.slice(o),o>0,!1)),l.join("")}function uE(e,n,t){let r=0,o=e.length;if(n){let l=e.codePointAt(r);for(;l===sE||l===lE;)r++,l=e.codePointAt(r)}if(t){let l=e.codePointAt(o-1);for(;l===sE||l===lE;)o--,l=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function Zj(e,n){const t={type:"text",value:Xj(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Kj(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const Jj={blockquote:_j,break:Cj,code:Pj,delete:Rj,emphasis:Oj,footnoteReference:rE,footnote:kj,heading:Aj,html:Dj,imageReference:Ij,image:Mj,inlineCode:Nj,linkReference:Lj,link:Fj,listItem:Bj,list:Hj,paragraph:zj,root:Vj,strong:Uj,table:Gj,tableCell:Yj,tableRow:qj,text:Zj,thematicBreak:Kj,toml:Gl,yaml:Gl,definition:Gl,footnoteDefinition:Gl};function Gl(){return null}const cE=function(e){if(e==null)return t2;if(typeof e=="string")return e2(e);if(typeof e=="object")return Array.isArray(e)?Qj(e):$j(e);if(typeof e=="function")return ql(e);throw new Error("Expected function, string, or object as test")};function Qj(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=cE(e[t]);return ql(r);function r(...o){let l=-1;for(;++l<n.length;)if(n[l].call(this,...o))return!0;return!1}}function $j(e){return ql(n);function n(t){let r;for(r in e)if(t[r]!==e[r])return!1;return!0}}function e2(e){return ql(n);function n(t){return t&&t.type===e}}function ql(e){return n;function n(t,...r){return!!(t&&typeof t=="object"&&"type"in t&&e.call(this,t,...r))}}function t2(){return!0}function g7(e){return e}const n2=!0,hE=!1,r2="skip",i2=function(e,n,t,r){typeof n=="function"&&typeof t!="function"&&(r=t,t=n,n=null);const o=cE(n),l=r?-1:1;d(e,void 0,[])();function d(h,f,m){const g=h&&typeof h=="object"?h:{};if(typeof g.type=="string"){const x=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(w,"name",{value:"node ("+(h.type+(x?"<"+x+">":""))+")"})}return w;function w(){let x=[],T,P,C;if((!n||o(h,f,m[m.length-1]||null))&&(x=o2(t(h,m)),x[0]===hE))return x;if(h.children&&x[0]!==r2)for(P=(r?h.children.length:-1)+l,C=m.concat(h);P>-1&&P<h.children.length;){if(T=d(h.children[P],P,C)(),T[0]===hE)return T;P=typeof T[1]=="number"?T[1]:P+l}return x}}};function o2(e){return Array.isArray(e)?e:typeof e=="number"?[n2,e]:[e]}const dE=function(e,n,t,r){typeof n=="function"&&typeof t!="function"&&(r=t,t=n,n=null),i2(e,n,o,r);function o(l,d){const h=d[d.length-1];return t(l,h?h.children.indexOf(l):null,h)}};function a2(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}const fE={}.hasOwnProperty;function s2(e){const n=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return dE(e,"definition",r=>{const o=pE(r.identifier);o&&!fE.call(n,o)&&(n[o]=r)}),t;function t(r){const o=pE(r);return o&&fE.call(n,o)?n[o]:null}}function pE(e){return String(e||"").toUpperCase()}const Yl={}.hasOwnProperty;function l2(e,n){const t=n||{},r=t.allowDangerousHtml||!1,o={};return d.dangerous=r,d.clobberPrefix=t.clobberPrefix===void 0||t.clobberPrefix===null?"user-content-":t.clobberPrefix,d.footnoteLabel=t.footnoteLabel||"Footnotes",d.footnoteLabelTagName=t.footnoteLabelTagName||"h2",d.footnoteLabelProperties=t.footnoteLabelProperties||{className:["sr-only"]},d.footnoteBackLabel=t.footnoteBackLabel||"Back to content",d.unknownHandler=t.unknownHandler,d.passThrough=t.passThrough,d.handlers={...Jj,...t.handlers},d.definition=s2(e),d.footnoteById=o,d.footnoteOrder=[],d.footnoteCounts={},d.patch=u2,d.applyData=c2,d.one=h,d.all=f,d.wrap=d2,d.augment=l,dE(e,"footnoteDefinition",m=>{const g=String(m.identifier).toUpperCase();Yl.call(o,g)||(o[g]=m)}),d;function l(m,g){if(m&&"data"in m&&m.data){const w=m.data;w.hName&&(g.type!=="element"&&(g={type:"element",tagName:"",properties:{},children:[]}),g.tagName=w.hName),g.type==="element"&&w.hProperties&&(g.properties={...g.properties,...w.hProperties}),"children"in g&&g.children&&w.hChildren&&(g.children=w.hChildren)}if(m){const w="type"in m?m:{position:m};a2(w)||(g.position={start:Lf(w),end:Ff(w)})}return g}function d(m,g,w,x){return Array.isArray(w)&&(x=w,w={}),l(m,{type:"element",tagName:g,properties:w||{},children:x||[]})}function h(m,g){return mE(d,m,g)}function f(m){return Bf(d,m)}}function u2(e,n){e.position&&(n.position=Wj(e))}function c2(e,n){let t=n;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,l=e.data.hProperties;typeof r=="string"&&(t.type==="element"?t.tagName=r:t={type:"element",tagName:r,properties:{},children:[]}),t.type==="element"&&l&&(t.properties={...t.properties,...l}),"children"in t&&t.children&&o!==null&&o!==void 0&&(t.children=o)}return t}function mE(e,n,t){const r=n&&n.type;if(!r)throw new Error("Expected node, got `"+n+"`");return Yl.call(e.handlers,r)?e.handlers[r](e,n,t):e.passThrough&&e.passThrough.includes(r)?"children"in n?{...n,children:Bf(e,n)}:n:e.unknownHandler?e.unknownHandler(e,n,t):h2(e,n)}function Bf(e,n){const t=[];if("children"in n){const r=n.children;let o=-1;for(;++o<r.length;){const l=mE(e,r[o],n);if(l){if(o&&r[o-1].type==="break"&&(!Array.isArray(l)&&l.type==="text"&&(l.value=l.value.replace(/^\s+/,"")),!Array.isArray(l)&&l.type==="element")){const d=l.children[0];d&&d.type==="text"&&(d.value=d.value.replace(/^\s+/,""))}Array.isArray(l)?t.push(...l):t.push(l)}}}return t}function h2(e,n){const t=n.data||{},r="value"in n&&!(Yl.call(t,"hProperties")||Yl.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:Bf(e,n)};return e.patch(n,r),e.applyData(n,r)}function d2(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
|
|
282
|
-
`});++r<e.length;)r&&t.push({type:"text",value:`
|
|
283
|
-
`}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
|
|
284
|
-
`}),t}function f2(e){const n=[];let t=-1;for(;++t<e.footnoteOrder.length;){const r=e.footnoteById[e.footnoteOrder[t]];if(!r)continue;const o=e.all(r),l=String(r.identifier).toUpperCase(),d=ta(l.toLowerCase());let h=0;const f=[];for(;++h<=e.footnoteCounts[l];){const w={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fnref-"+d+(h>1?"-"+h:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};h>1&&w.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(h)}]}),f.length>0&&f.push({type:"text",value:" "}),f.push(w)}const m=o[o.length-1];if(m&&m.type==="element"&&m.tagName==="p"){const w=m.children[m.children.length-1];w&&w.type==="text"?w.value+=" ":m.children.push({type:"text",value:" "}),m.children.push(...f)}else o.push(...f);const g={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+d},children:e.wrap(o,!0)};e.patch(r,g),n.push(g)}if(n.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:`
|
|
285
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(n,!0)},{type:"text",value:`
|
|
286
|
-
`}]}}function gE(e,n){const t=l2(e,n),r=t.one(e,null),o=f2(t);return o&&r.children.push({type:"text",value:`
|
|
287
|
-
`},o),Array.isArray(r)?{type:"root",children:r}:r}const p2=function(e,n){return e&&"run"in e?m2(e,n):g2(e||n)};function m2(e,n){return(t,r,o)=>{e.run(gE(t,n),r,l=>{o(l)})}}function g2(e){return n=>gE(n,e)}class us{constructor(n,t,r){this.property=n,this.normal=t,r&&(this.space=r)}}us.prototype.property={},us.prototype.normal={},us.prototype.space=null;function vE(e,n){const t={},r={};let o=-1;for(;++o<e.length;)Object.assign(t,e[o].property),Object.assign(r,e[o].normal);return new us(t,r,n)}function jf(e){return e.toLowerCase()}class jr{constructor(n,t){this.property=n,this.attribute=t}}jr.prototype.space=null,jr.prototype.boolean=!1,jr.prototype.booleanish=!1,jr.prototype.overloadedBoolean=!1,jr.prototype.number=!1,jr.prototype.commaSeparated=!1,jr.prototype.spaceSeparated=!1,jr.prototype.commaOrSpaceSeparated=!1,jr.prototype.mustUseProperty=!1,jr.prototype.defined=!1;let v2=0;const jt=mo(),jn=mo(),yE=mo(),nt=mo(),_n=mo(),na=mo(),Sr=mo();function mo(){return 2**++v2}const Hf=Object.freeze(Object.defineProperty({__proto__:null,boolean:jt,booleanish:jn,commaOrSpaceSeparated:Sr,commaSeparated:na,number:nt,overloadedBoolean:yE,spaceSeparated:_n},Symbol.toStringTag,{value:"Module"})),zf=Object.keys(Hf);class Vf extends jr{constructor(n,t,r,o){let l=-1;if(super(n,t),wE(this,"space",o),typeof r=="number")for(;++l<zf.length;){const d=zf[l];wE(this,zf[l],(r&Hf[d])===Hf[d])}}}Vf.prototype.defined=!0;function wE(e,n,t){t&&(e[n]=t)}const y2={}.hasOwnProperty;function ra(e){const n={},t={};let r;for(r in e.properties)if(y2.call(e.properties,r)){const o=e.properties[r],l=new Vf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),n[r]=l,t[jf(r)]=r,t[jf(l.attribute)]=r}return new us(n,t,e.space)}const bE=ra({space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),EE=ra({space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function xE(e,n){return n in e?e[n]:n}function SE(e,n){return xE(e,n.toLowerCase())}const TE=ra({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:SE,properties:{xmlns:null,xmlnsXLink:null}}),_E=ra({transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:jn,ariaAutoComplete:null,ariaBusy:jn,ariaChecked:jn,ariaColCount:nt,ariaColIndex:nt,ariaColSpan:nt,ariaControls:_n,ariaCurrent:null,ariaDescribedBy:_n,ariaDetails:null,ariaDisabled:jn,ariaDropEffect:_n,ariaErrorMessage:null,ariaExpanded:jn,ariaFlowTo:_n,ariaGrabbed:jn,ariaHasPopup:null,ariaHidden:jn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_n,ariaLevel:nt,ariaLive:null,ariaModal:jn,ariaMultiLine:jn,ariaMultiSelectable:jn,ariaOrientation:null,ariaOwns:_n,ariaPlaceholder:null,ariaPosInSet:nt,ariaPressed:jn,ariaReadOnly:jn,ariaRelevant:null,ariaRequired:jn,ariaRoleDescription:_n,ariaRowCount:nt,ariaRowIndex:nt,ariaRowSpan:nt,ariaSelected:jn,ariaSetSize:nt,ariaSort:null,ariaValueMax:nt,ariaValueMin:nt,ariaValueNow:nt,ariaValueText:null,role:null}}),w2=ra({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:SE,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:na,acceptCharset:_n,accessKey:_n,action:null,allow:null,allowFullScreen:jt,allowPaymentRequest:jt,allowUserMedia:jt,alt:null,as:null,async:jt,autoCapitalize:null,autoComplete:_n,autoFocus:jt,autoPlay:jt,blocking:_n,capture:null,charSet:null,checked:jt,cite:null,className:_n,cols:nt,colSpan:null,content:null,contentEditable:jn,controls:jt,controlsList:_n,coords:nt|na,crossOrigin:null,data:null,dateTime:null,decoding:null,default:jt,defer:jt,dir:null,dirName:null,disabled:jt,download:yE,draggable:jn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:jt,formTarget:null,headers:_n,height:nt,hidden:jt,high:nt,href:null,hrefLang:null,htmlFor:_n,httpEquiv:_n,id:null,imageSizes:null,imageSrcSet:null,inert:jt,inputMode:null,integrity:null,is:null,isMap:jt,itemId:null,itemProp:_n,itemRef:_n,itemScope:jt,itemType:_n,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:jt,low:nt,manifest:null,max:null,maxLength:nt,media:null,method:null,min:null,minLength:nt,multiple:jt,muted:jt,name:null,nonce:null,noModule:jt,noValidate:jt,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:jt,optimum:nt,pattern:null,ping:_n,placeholder:null,playsInline:jt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:jt,referrerPolicy:null,rel:_n,required:jt,reversed:jt,rows:nt,rowSpan:nt,sandbox:_n,scope:null,scoped:jt,seamless:jt,selected:jt,shadowRootClonable:jt,shadowRootDelegatesFocus:jt,shadowRootMode:null,shape:null,size:nt,sizes:null,slot:null,span:nt,spellCheck:jn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:nt,step:null,style:null,tabIndex:nt,target:null,title:null,translate:null,type:null,typeMustMatch:jt,useMap:null,value:jn,width:nt,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_n,axis:null,background:null,bgColor:null,border:nt,borderColor:null,bottomMargin:nt,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:jt,declare:jt,event:null,face:null,frame:null,frameBorder:null,hSpace:nt,leftMargin:nt,link:null,longDesc:null,lowSrc:null,marginHeight:nt,marginWidth:nt,noResize:jt,noHref:jt,noShade:jt,noWrap:jt,object:null,profile:null,prompt:null,rev:null,rightMargin:nt,rules:null,scheme:null,scrolling:jn,standby:null,summary:null,text:null,topMargin:nt,valueType:null,version:null,vAlign:null,vLink:null,vSpace:nt,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:jt,disableRemotePlayback:jt,prefix:null,property:null,results:nt,security:null,unselectable:null}}),b2=ra({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:xE,properties:{about:Sr,accentHeight:nt,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:nt,amplitude:nt,arabicForm:null,ascent:nt,attributeName:null,attributeType:null,azimuth:nt,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:nt,by:null,calcMode:null,capHeight:nt,className:_n,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:nt,diffuseConstant:nt,direction:null,display:null,dur:null,divisor:nt,dominantBaseline:null,download:jt,dx:null,dy:null,edgeMode:null,editable:null,elevation:nt,enableBackground:null,end:null,event:null,exponent:nt,externalResourcesRequired:null,fill:null,fillOpacity:nt,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:na,g2:na,glyphName:na,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:nt,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:nt,horizOriginX:nt,horizOriginY:nt,id:null,ideographic:nt,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:nt,k:nt,k1:nt,k2:nt,k3:nt,k4:nt,kernelMatrix:Sr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:nt,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:nt,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:nt,overlineThickness:nt,paintOrder:null,panose1:null,path:null,pathLength:nt,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_n,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:nt,pointsAtY:nt,pointsAtZ:nt,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Sr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Sr,rev:Sr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Sr,requiredFeatures:Sr,requiredFonts:Sr,requiredFormats:Sr,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:nt,specularExponent:nt,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:nt,strikethroughThickness:nt,string:null,stroke:null,strokeDashArray:Sr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:nt,strokeOpacity:nt,strokeWidth:null,style:null,surfaceScale:nt,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Sr,tabIndex:nt,tableValues:null,target:null,targetX:nt,targetY:nt,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Sr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:nt,underlineThickness:nt,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:nt,values:null,vAlphabetic:nt,vMathematical:nt,vectorEffect:null,vHanging:nt,vIdeographic:nt,version:null,vertAdvY:nt,vertOriginX:nt,vertOriginY:nt,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:nt,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),E2=/^data[-\w.:]+$/i,CE=/-[a-z]/g,x2=/[A-Z]/g;function S2(e,n){const t=jf(n);let r=n,o=jr;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&E2.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(CE,_2);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!CE.test(l)){let d=l.replace(x2,T2);d.charAt(0)!=="-"&&(d="-"+d),n="data"+d}}o=Vf}return new o(r,n)}function T2(e){return"-"+e.toLowerCase()}function _2(e){return e.charAt(1).toUpperCase()}const PE={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"},C2=vE([EE,bE,TE,_E,w2],"html"),P2=vE([EE,bE,TE,_E,b2],"svg"),R2=function(e){return O2(e)};function O2(e){return k2(n);function n(t){return t&&t.type===e}}function k2(e){return n;function n(t,...r){return!!(t&&typeof t=="object"&&"type"in t&&e.call(this,t,...r))}}function v7(e){return e}const A2=!0,RE=!1,D2="skip",I2=function(e,n,t,r){const o=R2(n),l=1;d(e,void 0,[])();function d(h,f,m){const g=h&&typeof h=="object"?h:{};if(typeof g.type=="string"){const x=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(w,"name",{value:"node ("+(h.type+(x?"<"+x+">":""))+")"})}return w;function w(){let x=[],T,P,C;if(o(h,f,m[m.length-1]||null)&&(x=M2(t(h,m)),x[0]===RE))return x;if(h.children&&x[0]!==D2)for(P=-1+l,C=m.concat(h);P>-1&&P<h.children.length;){if(T=d(h.children[P],P,C)(),T[0]===RE)return T;P=typeof T[1]=="number"?T[1]:P+l}return x}}};function M2(e){return Array.isArray(e)?e:typeof e=="number"?[A2,e]:[e]}const N2=function(e,n,t,r){I2(e,n,o);function o(l,d){const h=d[d.length-1];return t(l,h?h.children.indexOf(l):null,h)}};function L2(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 n=>{N2(n,"element",(t,r,o)=>{const l=o;let d;if(e.allowedElements?d=!e.allowedElements.includes(t.tagName):e.disallowedElements&&(d=e.disallowedElements.includes(t.tagName)),!d&&e.allowElement&&typeof r=="number"&&(d=!e.allowElement(t,r,l)),d&&typeof r=="number")return e.unwrapDisallowed&&t.children?l.children.splice(r,1,...t.children):l.children.splice(r,1),r})}}var Uf={exports:{}},hn={},OE;function F2(){if(OE)return hn;OE=1;/**
|
|
288
|
-
* @license React
|
|
289
|
-
* react-is.production.min.js
|
|
290
|
-
*
|
|
291
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
292
|
-
*
|
|
293
|
-
* This source code is licensed under the MIT license found in the
|
|
294
|
-
* LICENSE file in the root directory of this source tree.
|
|
295
|
-
*/var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),d=Symbol.for("react.context"),h=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),P;P=Symbol.for("react.module.reference");function C(_){if(typeof _=="object"&&_!==null){var k=_.$$typeof;switch(k){case e:switch(_=_.type,_){case t:case o:case r:case m:case g:return _;default:switch(_=_&&_.$$typeof,_){case h:case d:case f:case x:case w:case l:return _;default:return k}}case n:return k}}}return hn.ContextConsumer=d,hn.ContextProvider=l,hn.Element=e,hn.ForwardRef=f,hn.Fragment=t,hn.Lazy=x,hn.Memo=w,hn.Portal=n,hn.Profiler=o,hn.StrictMode=r,hn.Suspense=m,hn.SuspenseList=g,hn.isAsyncMode=function(){return!1},hn.isConcurrentMode=function(){return!1},hn.isContextConsumer=function(_){return C(_)===d},hn.isContextProvider=function(_){return C(_)===l},hn.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===e},hn.isForwardRef=function(_){return C(_)===f},hn.isFragment=function(_){return C(_)===t},hn.isLazy=function(_){return C(_)===x},hn.isMemo=function(_){return C(_)===w},hn.isPortal=function(_){return C(_)===n},hn.isProfiler=function(_){return C(_)===o},hn.isStrictMode=function(_){return C(_)===r},hn.isSuspense=function(_){return C(_)===m},hn.isSuspenseList=function(_){return C(_)===g},hn.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===t||_===o||_===r||_===m||_===g||_===T||typeof _=="object"&&_!==null&&(_.$$typeof===x||_.$$typeof===w||_.$$typeof===l||_.$$typeof===d||_.$$typeof===f||_.$$typeof===P||_.getModuleId!==void 0)},hn.typeOf=C,hn}var dn={},kE;function B2(){if(kE)return dn;kE=1;/**
|
|
296
|
-
* @license React
|
|
297
|
-
* react-is.development.js
|
|
298
|
-
*
|
|
299
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
300
|
-
*
|
|
301
|
-
* This source code is licensed under the MIT license found in the
|
|
302
|
-
* LICENSE file in the root directory of this source tree.
|
|
303
|
-
*/return process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),d=Symbol.for("react.context"),h=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),P=!1,C=!1,_=!1,k=!1,V=!1,j;j=Symbol.for("react.module.reference");function Z(Ce){return!!(typeof Ce=="string"||typeof Ce=="function"||Ce===t||Ce===o||V||Ce===r||Ce===m||Ce===g||k||Ce===T||P||C||_||typeof Ce=="object"&&Ce!==null&&(Ce.$$typeof===x||Ce.$$typeof===w||Ce.$$typeof===l||Ce.$$typeof===d||Ce.$$typeof===f||Ce.$$typeof===j||Ce.getModuleId!==void 0))}function B(Ce){if(typeof Ce=="object"&&Ce!==null){var Pt=Ce.$$typeof;switch(Pt){case e:var wt=Ce.type;switch(wt){case t:case o:case r:case m:case g:return wt;default:var D=wt&&wt.$$typeof;switch(D){case h:case d:case f:case x:case w:case l:return D;default:return Pt}}case n:return Pt}}}var Y=d,ie=l,ae=e,le=f,_e=t,fe=x,de=w,ve=n,Ae=o,ke=r,me=m,be=g,Ee=!1,Oe=!1;function F(Ce){return Ee||(Ee=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function we(Ce){return Oe||(Oe=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Ne(Ce){return B(Ce)===d}function X(Ce){return B(Ce)===l}function Be(Ce){return typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===e}function Je(Ce){return B(Ce)===f}function He(Ce){return B(Ce)===t}function Ze(Ce){return B(Ce)===x}function Qe(Ce){return B(Ce)===w}function it(Ce){return B(Ce)===n}function Ke(Ce){return B(Ce)===o}function Le(Ce){return B(Ce)===r}function pe(Ce){return B(Ce)===m}function mt(Ce){return B(Ce)===g}dn.ContextConsumer=Y,dn.ContextProvider=ie,dn.Element=ae,dn.ForwardRef=le,dn.Fragment=_e,dn.Lazy=fe,dn.Memo=de,dn.Portal=ve,dn.Profiler=Ae,dn.StrictMode=ke,dn.Suspense=me,dn.SuspenseList=be,dn.isAsyncMode=F,dn.isConcurrentMode=we,dn.isContextConsumer=Ne,dn.isContextProvider=X,dn.isElement=Be,dn.isForwardRef=Je,dn.isFragment=He,dn.isLazy=Ze,dn.isMemo=Qe,dn.isPortal=it,dn.isProfiler=Ke,dn.isStrictMode=Le,dn.isSuspense=pe,dn.isSuspenseList=mt,dn.isValidElementType=Z,dn.typeOf=B}(),dn}process.env.NODE_ENV==="production"?Uf.exports=F2():Uf.exports=B2();var j2=Uf.exports;const H2=hi(j2);function z2(e){const n=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof n=="string"&&n.replace(/[ \t\n\f\r]/g,"")===""}function V2(e){return e.join(" ").trim()}function U2(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Wf={}.hasOwnProperty,W2=new Set(["table","thead","tbody","tfoot","tr"]);function AE(e,n){const t=[];let r=-1,o;for(;++r<n.children.length;)o=n.children[r],o.type==="element"?t.push(G2(e,o,r,n)):o.type==="text"?(n.type!=="element"||!W2.has(n.tagName)||!z2(o))&&t.push(o.value):o.type==="raw"&&!e.options.skipHtml&&t.push(o.value);return t}function G2(e,n,t,r){const o=e.options,l=o.transformLinkUri===void 0?lF:o.transformLinkUri,d=e.schema,h=n.tagName,f={};let m=d,g;if(d.space==="html"&&h==="svg"&&(m=P2,e.schema=m),n.properties)for(g in n.properties)Wf.call(n.properties,g)&&Y2(f,g,n.properties[g],e);(h==="ol"||h==="ul")&&e.listDepth++;const w=AE(e,n);(h==="ol"||h==="ul")&&e.listDepth--,e.schema=d;const x=n.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},T=o.components&&Wf.call(o.components,h)?o.components[h]:h,P=typeof T=="string"||T===Te.Fragment;if(!H2.isValidElementType(T))throw new TypeError(`Component for name \`${h}\` not defined or is not renderable`);if(f.key=t,h==="a"&&o.linkTarget&&(f.target=typeof o.linkTarget=="function"?o.linkTarget(String(f.href||""),n.children,typeof f.title=="string"?f.title:null):o.linkTarget),h==="a"&&l&&(f.href=l(String(f.href||""),n.children,typeof f.title=="string"?f.title:null)),!P&&h==="code"&&r.type==="element"&&r.tagName!=="pre"&&(f.inline=!0),!P&&(h==="h1"||h==="h2"||h==="h3"||h==="h4"||h==="h5"||h==="h6")&&(f.level=Number.parseInt(h.charAt(1),10)),h==="img"&&o.transformImageUri&&(f.src=o.transformImageUri(String(f.src||""),String(f.alt||""),typeof f.title=="string"?f.title:null)),!P&&h==="li"&&r.type==="element"){const C=q2(n);f.checked=C&&C.properties?!!C.properties.checked:null,f.index=Gf(r,n),f.ordered=r.tagName==="ol"}return!P&&(h==="ol"||h==="ul")&&(f.ordered=h==="ol",f.depth=e.listDepth),(h==="td"||h==="th")&&(f.align&&(f.style||(f.style={}),f.style.textAlign=f.align,delete f.align),P||(f.isHeader=h==="th")),!P&&h==="tr"&&r.type==="element"&&(f.isHeader=r.tagName==="thead"),o.sourcePos&&(f["data-sourcepos"]=K2(x)),!P&&o.rawSourcePos&&(f.sourcePosition=n.position),!P&&o.includeElementIndex&&(f.index=Gf(r,n),f.siblingCount=Gf(r)),P||(f.node=n),w.length>0?Te.createElement(T,f,w):Te.createElement(T,f)}function q2(e){let n=-1;for(;++n<e.children.length;){const t=e.children[n];if(t.type==="element"&&t.tagName==="input")return t}return null}function Gf(e,n){let t=-1,r=0;for(;++t<e.children.length&&e.children[t]!==n;)e.children[t].type==="element"&&r++;return r}function Y2(e,n,t,r){const o=S2(r.schema,n);let l=t;l==null||l!==l||(Array.isArray(l)&&(l=o.commaSeparated?U2(l):V2(l)),o.property==="style"&&typeof l=="string"&&(l=X2(l)),o.space&&o.property?e[Wf.call(PE,o.property)?PE[o.property]:o.property]=l:o.attribute&&(e[o.attribute]=l))}function X2(e){const n={};try{r0(e,t)}catch{}return n;function t(r,o){const l=r.slice(0,4)==="-ms-"?`ms-${r.slice(4)}`:r;n[l.replace(/-([a-z])/g,Z2)]=o}}function Z2(e,n){return n.toUpperCase()}function K2(e){return[e.start.line,":",e.start.column,"-",e.end.line,":",e.end.column].map(String).join("")}const DE={}.hasOwnProperty,J2="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Xl={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 qf(e){for(const l in Xl)if(DE.call(Xl,l)&&DE.call(e,l)){const d=Xl[l];console.warn(`[react-markdown] Warning: please ${d.to?`use \`${d.to}\` instead of`:"remove"} \`${l}\` (see <${J2}#${d.id}> for more info)`),delete Xl[l]}const n=TF().use(Tj).use(e.remarkPlugins||[]).use(p2,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(L2,e),t=new g0;typeof e.children=="string"?t.value=e.children:e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const r=n.runSync(n.parse(t),t);if(r.type!=="root")throw new TypeError("Expected a `root` node");let o=Te.createElement(Te.Fragment,{},AE({options:e,schema:C2,listDepth:0},r));return e.className&&(o=Te.createElement("div",{className:e.className},o)),o}qf.propTypes={children:R.string,className:R.string,allowElement:R.func,allowedElements:R.arrayOf(R.string),disallowedElements:R.arrayOf(R.string),unwrapDisallowed:R.bool,remarkPlugins:R.arrayOf(R.oneOfType([R.object,R.func,R.arrayOf(R.oneOfType([R.bool,R.string,R.object,R.func,R.arrayOf(R.any)]))])),rehypePlugins:R.arrayOf(R.oneOfType([R.object,R.func,R.arrayOf(R.oneOfType([R.bool,R.string,R.object,R.func,R.arrayOf(R.any)]))])),sourcePos:R.bool,rawSourcePos:R.bool,skipHtml:R.bool,includeElementIndex:R.bool,transformLinkUri:R.oneOfType([R.func,R.bool]),linkTarget:R.oneOfType([R.func,R.string]),transformImageUri:R.func,components:R.object};var Mn={},Yf={},cs={},hs={},IE="Expected a function",ME=NaN,Q2="[object Symbol]",$2=/^\s+|\s+$/g,eH=/^[-+]0x[0-9a-f]+$/i,tH=/^0b[01]+$/i,nH=/^0o[0-7]+$/i,rH=parseInt,iH=typeof Gn=="object"&&Gn&&Gn.Object===Object&&Gn,oH=typeof self=="object"&&self&&self.Object===Object&&self,aH=iH||oH||Function("return this")(),sH=Object.prototype,lH=sH.toString,uH=Math.max,cH=Math.min,Xf=function(){return aH.Date.now()};function hH(e,n,t){var r,o,l,d,h,f,m=0,g=!1,w=!1,x=!0;if(typeof e!="function")throw new TypeError(IE);n=NE(n)||0,Zl(t)&&(g=!!t.leading,w="maxWait"in t,l=w?uH(NE(t.maxWait)||0,n):l,x="trailing"in t?!!t.trailing:x);function T(Y){var ie=r,ae=o;return r=o=void 0,m=Y,d=e.apply(ae,ie),d}function P(Y){return m=Y,h=setTimeout(k,n),g?T(Y):d}function C(Y){var ie=Y-f,ae=Y-m,le=n-ie;return w?cH(le,l-ae):le}function _(Y){var ie=Y-f,ae=Y-m;return f===void 0||ie>=n||ie<0||w&&ae>=l}function k(){var Y=Xf();if(_(Y))return V(Y);h=setTimeout(k,C(Y))}function V(Y){return h=void 0,x&&r?T(Y):(r=o=void 0,d)}function j(){h!==void 0&&clearTimeout(h),m=0,r=f=o=h=void 0}function Z(){return h===void 0?d:V(Xf())}function B(){var Y=Xf(),ie=_(Y);if(r=arguments,o=this,f=Y,ie){if(h===void 0)return P(f);if(w)return h=setTimeout(k,n),T(f)}return h===void 0&&(h=setTimeout(k,n)),d}return B.cancel=j,B.flush=Z,B}function dH(e,n,t){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(IE);return Zl(t)&&(r="leading"in t?!!t.leading:r,o="trailing"in t?!!t.trailing:o),hH(e,n,{leading:r,maxWait:n,trailing:o})}function Zl(e){var n=typeof e;return!!e&&(n=="object"||n=="function")}function fH(e){return!!e&&typeof e=="object"}function pH(e){return typeof e=="symbol"||fH(e)&&lH.call(e)==Q2}function NE(e){if(typeof e=="number")return e;if(pH(e))return ME;if(Zl(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=Zl(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=e.replace($2,"");var t=tH.test(e);return t||nH.test(e)?rH(e.slice(2),t?2:8):eH.test(e)?ME:+e}var mH=dH,ds={};Object.defineProperty(ds,"__esModule",{value:!0}),ds.addPassiveEventListener=function(n,t,r){var o=function(){var l=!1;try{var d=Object.defineProperty({},"passive",{get:function(){l=!0}});window.addEventListener("test",null,d)}catch{}return l}();n.addEventListener(t,r,o?{passive:!0}:!1)},ds.removePassiveEventListener=function(n,t,r){n.removeEventListener(t,r)},Object.defineProperty(hs,"__esModule",{value:!0});var gH=mH,vH=wH(gH),yH=ds;function wH(e){return e&&e.__esModule?e:{default:e}}var bH=function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,vH.default)(n,t)},kn={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(n,t){if(n){var r=bH(function(o){kn.scrollHandler(n)},t);kn.scrollSpyContainers.push(n),(0,yH.addPassiveEventListener)(n,"scroll",r)}},isMounted:function(n){return kn.scrollSpyContainers.indexOf(n)!==-1},currentPositionX:function(n){if(n===document){var t=window.pageYOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return t?window.pageXOffset:r?document.documentElement.scrollLeft:document.body.scrollLeft}else return n.scrollLeft},currentPositionY:function(n){if(n===document){var t=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return t?window.pageYOffset:r?document.documentElement.scrollTop:document.body.scrollTop}else return n.scrollTop},scrollHandler:function(n){var t=kn.scrollSpyContainers[kn.scrollSpyContainers.indexOf(n)].spyCallbacks||[];t.forEach(function(r){return r(kn.currentPositionX(n),kn.currentPositionY(n))})},addStateHandler:function(n){kn.spySetState.push(n)},addSpyHandler:function(n,t){var r=kn.scrollSpyContainers[kn.scrollSpyContainers.indexOf(t)];r.spyCallbacks||(r.spyCallbacks=[]),r.spyCallbacks.push(n),n(kn.currentPositionX(t),kn.currentPositionY(t))},updateStates:function(){kn.spySetState.forEach(function(n){return n()})},unmount:function(n,t){kn.scrollSpyContainers.forEach(function(r){return r.spyCallbacks&&r.spyCallbacks.length&&r.spyCallbacks.indexOf(t)>-1&&r.spyCallbacks.splice(r.spyCallbacks.indexOf(t),1)}),kn.spySetState&&kn.spySetState.length&&kn.spySetState.indexOf(n)>-1&&kn.spySetState.splice(kn.spySetState.indexOf(n),1),document.removeEventListener("scroll",kn.scrollHandler)},update:function(){return kn.scrollSpyContainers.forEach(function(n){return kn.scrollHandler(n)})}};hs.default=kn;var ia={},fs={};Object.defineProperty(fs,"__esModule",{value:!0});var EH=function(n,t){var r=n.indexOf("#")===0?n.substring(1):n,o=r?"#"+r:"",l=window&&window.location,d=o?l.pathname+l.search+o:l.pathname+l.search;t?history.pushState(history.state,"",d):history.replaceState(history.state,"",d)},xH=function(){return window.location.hash.replace(/^#/,"")},SH=function(n){return function(t){return n.contains?n!=t&&n.contains(t):!!(n.compareDocumentPosition(t)&16)}},TH=function(n){return getComputedStyle(n).position!=="static"},Zf=function(n,t){for(var r=n.offsetTop,o=n.offsetParent;o&&!t(o);)r+=o.offsetTop,o=o.offsetParent;return{offsetTop:r,offsetParent:o}},_H=function(n,t,r){if(r)return n===document?t.getBoundingClientRect().left+(window.scrollX||window.pageXOffset):getComputedStyle(n).position!=="static"?t.offsetLeft:t.offsetLeft-n.offsetLeft;if(n===document)return t.getBoundingClientRect().top+(window.scrollY||window.pageYOffset);if(TH(n)){if(t.offsetParent!==n){var o=function(g){return g===n||g===document},l=Zf(t,o),d=l.offsetTop,h=l.offsetParent;if(h!==n)throw new Error("Seems containerElement is not an ancestor of the Element");return d}return t.offsetTop}if(t.offsetParent===n.offsetParent)return t.offsetTop-n.offsetTop;var f=function(g){return g===document};return Zf(t,f).offsetTop-Zf(n,f).offsetTop};fs.default={updateHash:EH,getHash:xH,filterElementInContainer:SH,scrollOffset:_H};var Kl={},Kf={};Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.default={defaultEasing:function(n){return n<.5?Math.pow(n*2,2)/2:1-Math.pow((1-n)*2,2)/2},linear:function(n){return n},easeInQuad:function(n){return n*n},easeOutQuad:function(n){return n*(2-n)},easeInOutQuad:function(n){return n<.5?2*n*n:-1+(4-2*n)*n},easeInCubic:function(n){return n*n*n},easeOutCubic:function(n){return--n*n*n+1},easeInOutCubic:function(n){return n<.5?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1},easeInQuart:function(n){return n*n*n*n},easeOutQuart:function(n){return 1- --n*n*n*n},easeInOutQuart:function(n){return n<.5?8*n*n*n*n:1-8*--n*n*n*n},easeInQuint:function(n){return n*n*n*n*n},easeOutQuint:function(n){return 1+--n*n*n*n*n},easeInOutQuint:function(n){return n<.5?16*n*n*n*n*n:1+16*--n*n*n*n*n}};var Jf={};Object.defineProperty(Jf,"__esModule",{value:!0});var CH=ds,PH=["mousedown","mousewheel","touchmove","keydown"];Jf.default={subscribe:function(n){return typeof document<"u"&&PH.forEach(function(t){return(0,CH.addPassiveEventListener)(document,t,n)})}};var ps={};Object.defineProperty(ps,"__esModule",{value:!0});var Qf={registered:{},scrollEvent:{register:function(n,t){Qf.registered[n]=t},remove:function(n){Qf.registered[n]=null}}};ps.default=Qf,Object.defineProperty(Kl,"__esModule",{value:!0});var RH=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},OH=fs;Jl(OH);var kH=Kf,LE=Jl(kH),AH=Jf,DH=Jl(AH),IH=ps,ri=Jl(IH);function Jl(e){return e&&e.__esModule?e:{default:e}}var FE=function(n){return LE.default[n.smooth]||LE.default.defaultEasing},MH=function(n){return typeof n=="function"?n:function(){return n}},NH=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},$f=function(){return NH()||function(e,n,t){window.setTimeout(e,t||1e3/60,new Date().getTime())}}(),BE=function(){return{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}},jE=function(n){var t=n.data.containerElement;if(t&&t!==document&&t!==document.body)return t.scrollLeft;var r=window.pageXOffset!==void 0,o=(document.compatMode||"")==="CSS1Compat";return r?window.pageXOffset:o?document.documentElement.scrollLeft:document.body.scrollLeft},HE=function(n){var t=n.data.containerElement;if(t&&t!==document&&t!==document.body)return t.scrollTop;var r=window.pageXOffset!==void 0,o=(document.compatMode||"")==="CSS1Compat";return r?window.pageYOffset:o?document.documentElement.scrollTop:document.body.scrollTop},LH=function(n){var t=n.data.containerElement;if(t&&t!==document&&t!==document.body)return t.scrollWidth-t.offsetWidth;var r=document.body,o=document.documentElement;return Math.max(r.scrollWidth,r.offsetWidth,o.clientWidth,o.scrollWidth,o.offsetWidth)},FH=function(n){var t=n.data.containerElement;if(t&&t!==document&&t!==document.body)return t.scrollHeight-t.offsetHeight;var r=document.body,o=document.documentElement;return Math.max(r.scrollHeight,r.offsetHeight,o.clientHeight,o.scrollHeight,o.offsetHeight)},BH=function e(n,t,r){var o=t.data;if(!t.ignoreCancelEvents&&o.cancel){ri.default.registered.end&&ri.default.registered.end(o.to,o.target,o.currentPositionY);return}if(o.delta=Math.round(o.targetPosition-o.startPosition),o.start===null&&(o.start=r),o.progress=r-o.start,o.percent=o.progress>=o.duration?1:n(o.progress/o.duration),o.currentPosition=o.startPosition+Math.ceil(o.delta*o.percent),o.containerElement&&o.containerElement!==document&&o.containerElement!==document.body?t.horizontal?o.containerElement.scrollLeft=o.currentPosition:o.containerElement.scrollTop=o.currentPosition:t.horizontal?window.scrollTo(o.currentPosition,0):window.scrollTo(0,o.currentPosition),o.percent<1){var l=e.bind(null,n,t);$f.call(window,l);return}ri.default.registered.end&&ri.default.registered.end(o.to,o.target,o.currentPosition)},ep=function(n){n.data.containerElement=n?n.containerId?document.getElementById(n.containerId):n.container&&n.container.nodeType?n.container:document:null},ms=function(n,t,r,o){if(t.data=t.data||BE(),window.clearTimeout(t.data.delayTimeout),DH.default.subscribe(function(){t.data.cancel=!0}),ep(t),t.data.start=null,t.data.cancel=!1,t.data.startPosition=t.horizontal?jE(t):HE(t),t.data.targetPosition=t.absolute?n:n+t.data.startPosition,t.data.startPosition===t.data.targetPosition){ri.default.registered.end&&ri.default.registered.end(t.data.to,t.data.target,t.data.currentPosition);return}t.data.delta=Math.round(t.data.targetPosition-t.data.startPosition),t.data.duration=MH(t.duration)(t.data.delta),t.data.duration=isNaN(parseFloat(t.data.duration))?1e3:parseFloat(t.data.duration),t.data.to=r,t.data.target=o;var l=FE(t),d=BH.bind(null,l,t);if(t&&t.delay>0){t.data.delayTimeout=window.setTimeout(function(){ri.default.registered.begin&&ri.default.registered.begin(t.data.to,t.data.target),$f.call(window,d)},t.delay);return}ri.default.registered.begin&&ri.default.registered.begin(t.data.to,t.data.target),$f.call(window,d)},Ql=function(n){return n=RH({},n),n.data=n.data||BE(),n.absolute=!0,n},jH=function(n){ms(0,Ql(n))},HH=function(n,t){ms(n,Ql(t))},zH=function(n){n=Ql(n),ep(n),ms(n.horizontal?LH(n):FH(n),n)},VH=function(n,t){t=Ql(t),ep(t);var r=t.horizontal?jE(t):HE(t);ms(n+r,t)};Kl.default={animateTopScroll:ms,getAnimationType:FE,scrollToTop:jH,scrollToBottom:zH,scrollTo:HH,scrollMore:VH},Object.defineProperty(ia,"__esModule",{value:!0});var UH=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},WH=fs,GH=tp(WH),qH=Kl,YH=tp(qH),XH=ps,$l=tp(XH);function tp(e){return e&&e.__esModule?e:{default:e}}var eu={},zE=void 0;ia.default={unmount:function(){eu={}},register:function(n,t){eu[n]=t},unregister:function(n){delete eu[n]},get:function(n){return eu[n]||document.getElementById(n)||document.getElementsByName(n)[0]||document.getElementsByClassName(n)[0]},setActiveLink:function(n){return zE=n},getActiveLink:function(){return zE},scrollTo:function(n,t){var r=this.get(n);if(!r){console.warn("target Element not found");return}t=UH({},t,{absolute:!1});var o=t.containerId,l=t.container,d=void 0;o?d=document.getElementById(o):l&&l.nodeType?d=l:d=document,t.absolute=!0;var h=t.horizontal,f=GH.default.scrollOffset(d,r,h)+(t.offset||0);if(!t.smooth){$l.default.registered.begin&&$l.default.registered.begin(n,r),d===document?t.horizontal?window.scrollTo(f,0):window.scrollTo(0,f):d.scrollTop=f,$l.default.registered.end&&$l.default.registered.end(n,r);return}YH.default.animateTopScroll(f,t,n,r)}};var tu={};Object.defineProperty(tu,"__esModule",{value:!0});var ZH=fs,np=KH(ZH);function KH(e){return e&&e.__esModule?e:{default:e}}var JH={mountFlag:!1,initialized:!1,scroller:null,containers:{},mount:function(n){this.scroller=n,this.handleHashChange=this.handleHashChange.bind(this),window.addEventListener("hashchange",this.handleHashChange),this.initStateFromHash(),this.mountFlag=!0},mapContainer:function(n,t){this.containers[n]=t},isMounted:function(){return this.mountFlag},isInitialized:function(){return this.initialized},initStateFromHash:function(){var n=this,t=this.getHash();t?window.setTimeout(function(){n.scrollTo(t,!0),n.initialized=!0},10):this.initialized=!0},scrollTo:function(n,t){var r=this.scroller,o=r.get(n);if(o&&(t||n!==r.getActiveLink())){var l=this.containers[n]||document;r.scrollTo(n,{container:l})}},getHash:function(){return np.default.getHash()},changeHash:function(n,t){this.isInitialized()&&np.default.getHash()!==n&&np.default.updateHash(n,t)},handleHashChange:function(){this.scrollTo(this.getHash())},unmount:function(){this.scroller=null,this.containers=null,window.removeEventListener("hashchange",this.handleHashChange)}};tu.default=JH,Object.defineProperty(cs,"__esModule",{value:!0});var nu=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},QH=function(){function e(n,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,o.key,o)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),$H=Te,VE=gs($H),ez=hs,ru=gs(ez),tz=ia,nz=gs(tz),rz=Ao,Rn=gs(rz),iz=tu,Li=gs(iz);function gs(e){return e&&e.__esModule?e:{default:e}}function oz(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function az(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n&&(typeof n=="object"||typeof n=="function")?n:e}function sz(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}var UE={to:Rn.default.string.isRequired,containerId:Rn.default.string,container:Rn.default.object,activeClass:Rn.default.string,activeStyle:Rn.default.object,spy:Rn.default.bool,horizontal:Rn.default.bool,smooth:Rn.default.oneOfType([Rn.default.bool,Rn.default.string]),offset:Rn.default.number,delay:Rn.default.number,isDynamic:Rn.default.bool,onClick:Rn.default.func,duration:Rn.default.oneOfType([Rn.default.number,Rn.default.func]),absolute:Rn.default.bool,onSetActive:Rn.default.func,onSetInactive:Rn.default.func,ignoreCancelEvents:Rn.default.bool,hashSpy:Rn.default.bool,saveHashHistory:Rn.default.bool,spyThrottle:Rn.default.number};cs.default=function(e,n){var t=n||nz.default,r=function(l){sz(d,l);function d(h){oz(this,d);var f=az(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,h));return o.call(f),f.state={active:!1},f}return QH(d,[{key:"getScrollSpyContainer",value:function(){var f=this.props.containerId,m=this.props.container;return f&&!m?document.getElementById(f):m&&m.nodeType?m:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var f=this.getScrollSpyContainer();ru.default.isMounted(f)||ru.default.mount(f,this.props.spyThrottle),this.props.hashSpy&&(Li.default.isMounted()||Li.default.mount(t),Li.default.mapContainer(this.props.to,f)),ru.default.addSpyHandler(this.spyHandler,f),this.setState({container:f})}}},{key:"componentWillUnmount",value:function(){ru.default.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var f="";this.state&&this.state.active?f=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():f=this.props.className;var m={};this.state&&this.state.active?m=nu({},this.props.style,this.props.activeStyle):m=nu({},this.props.style);var g=nu({},this.props);for(var w in UE)g.hasOwnProperty(w)&&delete g[w];return g.className=f,g.style=m,g.onClick=this.handleClick,VE.default.createElement(e,g)}}]),d}(VE.default.PureComponent),o=function(){var d=this;this.scrollTo=function(h,f){t.scrollTo(h,nu({},d.state,f))},this.handleClick=function(h){d.props.onClick&&d.props.onClick(h),h.stopPropagation&&h.stopPropagation(),h.preventDefault&&h.preventDefault(),d.scrollTo(d.props.to,d.props)},this.spyHandler=function(h,f){var m=d.getScrollSpyContainer();if(!(Li.default.isMounted()&&!Li.default.isInitialized())){var g=d.props.horizontal,w=d.props.to,x=null,T=void 0,P=void 0;if(g){var C=0,_=0,k=0;if(m.getBoundingClientRect){var V=m.getBoundingClientRect();k=V.left}if(!x||d.props.isDynamic){if(x=t.get(w),!x)return;var j=x.getBoundingClientRect();C=j.left-k+h,_=C+j.width}var Z=h-d.props.offset;T=Z>=Math.floor(C)&&Z<Math.floor(_),P=Z<Math.floor(C)||Z>=Math.floor(_)}else{var B=0,Y=0,ie=0;if(m.getBoundingClientRect){var ae=m.getBoundingClientRect();ie=ae.top}if(!x||d.props.isDynamic){if(x=t.get(w),!x)return;var le=x.getBoundingClientRect();B=le.top-ie+f,Y=B+le.height}var _e=f-d.props.offset;T=_e>=Math.floor(B)&&_e<Math.floor(Y),P=_e<Math.floor(B)||_e>=Math.floor(Y)}var fe=t.getActiveLink();if(P){if(w===fe&&t.setActiveLink(void 0),d.props.hashSpy&&Li.default.getHash()===w){var de=d.props.saveHashHistory,ve=de===void 0?!1:de;Li.default.changeHash("",ve)}d.props.spy&&d.state.active&&(d.setState({active:!1}),d.props.onSetInactive&&d.props.onSetInactive(w,x))}if(T&&(fe!==w||d.state.active===!1)){t.setActiveLink(w);var Ae=d.props.saveHashHistory,ke=Ae===void 0?!1:Ae;d.props.hashSpy&&Li.default.changeHash(w,ke),d.props.spy&&(d.setState({active:!0}),d.props.onSetActive&&d.props.onSetActive(w,x))}}}};return r.propTypes=UE,r.defaultProps={offset:0},r},Object.defineProperty(Yf,"__esModule",{value:!0});var lz=Te,WE=GE(lz),uz=cs,cz=GE(uz);function GE(e){return e&&e.__esModule?e:{default:e}}function hz(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function qE(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n&&(typeof n=="object"||typeof n=="function")?n:e}function dz(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}var fz=function(e){dz(n,e);function n(){var t,r,o,l;hz(this,n);for(var d=arguments.length,h=Array(d),f=0;f<d;f++)h[f]=arguments[f];return l=(r=(o=qE(this,(t=n.__proto__||Object.getPrototypeOf(n)).call.apply(t,[this].concat(h))),o),o.render=function(){return WE.default.createElement("a",o.props,o.props.children)},r),qE(o,l)}return n}(WE.default.Component);Yf.default=(0,cz.default)(fz);var rp={};Object.defineProperty(rp,"__esModule",{value:!0});var pz=function(){function e(n,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,o.key,o)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),mz=Te,YE=XE(mz),gz=cs,vz=XE(gz);function XE(e){return e&&e.__esModule?e:{default:e}}function yz(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function wz(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n&&(typeof n=="object"||typeof n=="function")?n:e}function bz(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}var Ez=function(e){bz(n,e);function n(){return yz(this,n),wz(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return pz(n,[{key:"render",value:function(){return YE.default.createElement("input",this.props,this.props.children)}}]),n}(YE.default.Component);rp.default=(0,vz.default)(Ez);var ip={},iu={};Object.defineProperty(iu,"__esModule",{value:!0});var xz=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Sz=function(){function e(n,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,o.key,o)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),Tz=Te,ZE=ou(Tz),_z=zn;ou(_z);var Cz=ia,KE=ou(Cz),Pz=Ao,JE=ou(Pz);function ou(e){return e&&e.__esModule?e:{default:e}}function Rz(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Oz(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n&&(typeof n=="object"||typeof n=="function")?n:e}function kz(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}iu.default=function(e){var n=function(t){kz(r,t);function r(o){Rz(this,r);var l=Oz(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,o));return l.childBindings={domNode:null},l}return Sz(r,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(l){this.props.name!==l.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;KE.default.unregister(this.props.name)}},{key:"registerElems",value:function(l){KE.default.register(l,this.childBindings.domNode)}},{key:"render",value:function(){return ZE.default.createElement(e,xz({},this.props,{parentBindings:this.childBindings}))}}]),r}(ZE.default.Component);return n.propTypes={name:JE.default.string,id:JE.default.string},n},Object.defineProperty(ip,"__esModule",{value:!0});var QE=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Az=function(){function e(n,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,o.key,o)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),Dz=Te,$E=op(Dz),Iz=iu,Mz=op(Iz),Nz=Ao,ex=op(Nz);function op(e){return e&&e.__esModule?e:{default:e}}function Lz(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Fz(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n&&(typeof n=="object"||typeof n=="function")?n:e}function Bz(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}var tx=function(e){Bz(n,e);function n(){return Lz(this,n),Fz(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return Az(n,[{key:"render",value:function(){var r=this,o=QE({},this.props);return o.parentBindings&&delete o.parentBindings,$E.default.createElement("div",QE({},o,{ref:function(d){r.props.parentBindings.domNode=d}}),this.props.children)}}]),n}($E.default.Component);tx.propTypes={name:ex.default.string,id:ex.default.string},ip.default=(0,Mz.default)(tx);var ap=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},nx=function(){function e(n,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,o.key,o)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}();function rx(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ix(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n&&(typeof n=="object"||typeof n=="function")?n:e}function ox(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}var au=Te,go=hs,sp=ia,An=Ao,Fi=tu,ax={to:An.string.isRequired,containerId:An.string,container:An.object,activeClass:An.string,spy:An.bool,smooth:An.oneOfType([An.bool,An.string]),offset:An.number,delay:An.number,isDynamic:An.bool,onClick:An.func,duration:An.oneOfType([An.number,An.func]),absolute:An.bool,onSetActive:An.func,onSetInactive:An.func,ignoreCancelEvents:An.bool,hashSpy:An.bool,spyThrottle:An.number},jz={Scroll:function(n,t){console.warn("Helpers.Scroll is deprecated since v1.7.0");var r=t||sp,o=function(d){ox(h,d);function h(f){rx(this,h);var m=ix(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,f));return l.call(m),m.state={active:!1},m}return nx(h,[{key:"getScrollSpyContainer",value:function(){var m=this.props.containerId,g=this.props.container;return m?document.getElementById(m):g&&g.nodeType?g:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var m=this.getScrollSpyContainer();go.isMounted(m)||go.mount(m,this.props.spyThrottle),this.props.hashSpy&&(Fi.isMounted()||Fi.mount(r),Fi.mapContainer(this.props.to,m)),this.props.spy&&go.addStateHandler(this.stateHandler),go.addSpyHandler(this.spyHandler,m),this.setState({container:m})}}},{key:"componentWillUnmount",value:function(){go.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var m="";this.state&&this.state.active?m=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():m=this.props.className;var g=ap({},this.props);for(var w in ax)g.hasOwnProperty(w)&&delete g[w];return g.className=m,g.onClick=this.handleClick,au.createElement(n,g)}}]),h}(au.Component),l=function(){var h=this;this.scrollTo=function(f,m){r.scrollTo(f,ap({},h.state,m))},this.handleClick=function(f){h.props.onClick&&h.props.onClick(f),f.stopPropagation&&f.stopPropagation(),f.preventDefault&&f.preventDefault(),h.scrollTo(h.props.to,h.props)},this.stateHandler=function(){r.getActiveLink()!==h.props.to&&(h.state!==null&&h.state.active&&h.props.onSetInactive&&h.props.onSetInactive(),h.setState({active:!1}))},this.spyHandler=function(f){var m=h.getScrollSpyContainer();if(!(Fi.isMounted()&&!Fi.isInitialized())){var g=h.props.to,w=null,x=0,T=0,P=0;if(m.getBoundingClientRect){var C=m.getBoundingClientRect();P=C.top}if(!w||h.props.isDynamic){if(w=r.get(g),!w)return;var _=w.getBoundingClientRect();x=_.top-P+f,T=x+_.height}var k=f-h.props.offset,V=k>=Math.floor(x)&&k<Math.floor(T),j=k<Math.floor(x)||k>=Math.floor(T),Z=r.getActiveLink();if(j)return g===Z&&r.setActiveLink(void 0),h.props.hashSpy&&Fi.getHash()===g&&Fi.changeHash(),h.props.spy&&h.state.active&&(h.setState({active:!1}),h.props.onSetInactive&&h.props.onSetInactive()),go.updateStates();if(V&&Z!==g)return r.setActiveLink(g),h.props.hashSpy&&Fi.changeHash(g),h.props.spy&&(h.setState({active:!0}),h.props.onSetActive&&h.props.onSetActive(g)),go.updateStates()}}};return o.propTypes=ax,o.defaultProps={offset:0},o},Element:function(n){console.warn("Helpers.Element is deprecated since v1.7.0");var t=function(r){ox(o,r);function o(l){rx(this,o);var d=ix(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,l));return d.childBindings={domNode:null},d}return nx(o,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(d){this.props.name!==d.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;sp.unregister(this.props.name)}},{key:"registerElems",value:function(d){sp.register(d,this.childBindings.domNode)}},{key:"render",value:function(){return au.createElement(n,ap({},this.props,{parentBindings:this.childBindings}))}}]),o}(au.Component);return t.propTypes={name:An.string,id:An.string},t}},Hz=jz;Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.Helpers=Mn.ScrollElement=Mn.ScrollLink=Mn.animateScroll=Mn.scrollSpy=Mn.Events=Mn.scroller=Mn.Element=Mn.Button=vx=Mn.Link=void 0;var zz=Yf,sx=ii(zz),Vz=rp,lx=ii(Vz),Uz=ip,ux=ii(Uz),Wz=ia,cx=ii(Wz),Gz=ps,hx=ii(Gz),qz=hs,dx=ii(qz),Yz=Kl,fx=ii(Yz),Xz=cs,px=ii(Xz),Zz=iu,mx=ii(Zz),Kz=Hz,gx=ii(Kz);function ii(e){return e&&e.__esModule?e:{default:e}}var vx=Mn.Link=sx.default;Mn.Button=lx.default,Mn.Element=ux.default,Mn.scroller=cx.default,Mn.Events=hx.default,Mn.scrollSpy=dx.default,Mn.animateScroll=fx.default,Mn.ScrollLink=px.default,Mn.ScrollElement=mx.default,Mn.Helpers=gx.default,Mn.default={Link:sx.default,Button:lx.default,Element:ux.default,scroller:cx.default,Events:hx.default,scrollSpy:dx.default,animateScroll:fx.default,ScrollLink:px.default,ScrollElement:mx.default,Helpers:gx.default};const vs=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","Z"];class yx extends Te.Component{renderAlphaLinks(){const n=[];for(let t=0;t<vs.length;t++){const r=vs[t],o=`alpha-${t}`;n.push(te.jsxs("span",{children:[te.jsx(vx,{to:o,offset:-120,containerId:"glossaryViewInner",smooth:"true",children:r})," "]},`link-${o}`))}return te.jsxs("div",{style:{display:"inline"},children:[te.jsx("input",{id:"glossary-filter",className:"searchBox",placeholder:"Filter by Entry",onChange:this.props.onFilterChange,value:this.props.filterTerm}),te.jsxs("div",{className:"alphaNav",children:[te.jsx("span",{style:{color:"black"},children:"Go to: "}),n]})]})}render(){return te.jsx("div",{className:"glossaryNav",children:this.renderAlphaLinks()})}}var wx={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},bx=Te.createContext&&Te.createContext(wx),Bi=function(){return Bi=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++){n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Bi.apply(this,arguments)},Jz=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]]);return t};function Ex(e){return e&&e.map(function(n,t){return Te.createElement(n.tag,Bi({key:t},n.attr),Ex(n.child))})}function xx(e){return function(n){return Te.createElement(Qz,Bi({attr:Bi({},e.attr)},n),Ex(e.child))}}function Qz(e){var n=function(t){var r=e.attr,o=e.size,l=e.title,d=Jz(e,["attr","size","title"]),h=o||t.size||"1em",f;return t.className&&(f=t.className),e.className&&(f=(f?f+" ":"")+e.className),Te.createElement("svg",Bi({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,d,{className:f,style:Bi(Bi({color:e.color||t.color},t.style),e.style),height:h,width:h,xmlns:"http://www.w3.org/2000/svg"}),l&&Te.createElement("title",null,l),e.children)};return bx!==void 0?Te.createElement(bx.Consumer,null,function(t){return n(t)}):n(wx)}function su(e){return xx({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 lu(e){return xx({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 $z(e){const n=jo();return Ov(n.breakpoints.up(e))}const ys={};ys.transcriptionTypeLabels={f:"Facsimile",glossary:"Glossary"};const eV="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=",tV="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==",nV="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",rV="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==";function Sx(e){return te.jsx(Qd,{anchorEl:e.anchorEl,open:e.open,style:e.marginStyle,children:te.jsx(Rd,{in:e.open,children:te.jsxs(Cd,{className:"helpContainer",children:[te.jsx("div",{onClick:e.onClose,className:"closeX",children:te.jsx("span",{className:"fa fa-window-close"})}),te.jsxs("div",{children:[te.jsx(Yn,{variant:"h6",component:"h2",children:"Toolbar Buttons"}),te.jsxs(jw,{children:[te.jsxs(Xo,{children:[te.jsx("span",{className:"fa fa-lock"}),te.jsx(Ja,{primary:"Toggle Sync Views"})]}),te.jsxs(Xo,{children:[te.jsx("span",{className:"fa fa-book"}),te.jsx(Ja,{primary:"Toggle Book Mode"})]}),te.jsxs(Xo,{children:[te.jsx("span",{className:"fa fa-code"}),te.jsx(Ja,{primary:"Toggle XML Mode"})]}),te.jsxs(Xo,{children:[te.jsxs("span",{className:"horizontal-buttons",children:[te.jsx(su,{}),te.jsx(lu,{})]}),te.jsx(Ja,{primary:"Go Forward / Back"})]}),te.jsxs(Xo,{children:[te.jsx("span",{className:"fa fa-hand-point-right"}),te.jsx(Ja,{primary:"Jump to folio"})]}),te.jsxs("div",{className:"readingGuide",children:[te.jsx(Yn,{variant:"h6",component:"h2",children:"Reading Guide"}),te.jsxs("table",{children:[te.jsx("thead",{children:te.jsxs("tr",{children:[te.jsx("th",{children:te.jsx(Yn,{variant:"overline",component:"span",children:"Syntax"})}),te.jsx("th",{children:te.jsx(Yn,{variant:"overline",component:"span",children:"Meaning"})})]})}),te.jsxs("tbody",{children:[te.jsxs("tr",{children:[te.jsx("td",{children:te.jsx("img",{src:rV,alt:"howtouse-ups"})}),te.jsx("td",{children:te.jsx(Yn,{children:"Text is under the paper strip"})})]}),te.jsxs("tr",{children:[te.jsx("td",{children:te.jsx("img",{src:tV,alt:"howtouse-curly"})}),te.jsx("td",{children:te.jsx(Yn,{children:"Expanded version implied by abbreviation marks"})})]}),te.jsxs("tr",{children:[te.jsx("td",{children:te.jsx("img",{src:nV,alt:"howtouse-square"})}),te.jsx("td",{children:te.jsx(Yn,{children:"Editorial interventions and corrections"})})]}),te.jsxs("tr",{children:[te.jsx("td",{children:te.jsx("img",{src:eV,alt:"howtouse-asterisk"})}),te.jsx("td",{children:te.jsx(Yn,{children:"Editorial Comments"})})]})]})]})]})]}),te.jsxs(Yn,{children:["See ",te.jsx("a",{href:"#/content/how-to-use",children:"How to Use"})," for more information."]})]})]})})})}function iV(e){const[n,t]=Te.useState(""),r=!!e.anchorEl,o=r?`${e.side}_jumpInput`:void 0,l=f=>{f.preventDefault();const g=new FormData(f.target).get("folioID");e.submitHandler(g,e.side),e.blurHandler(),t("")},d=f=>{t(f.target.value)},h=Te.useRef(null);return Te.useEffect(()=>{h.current&&h.current.focus()},[h,r]),te.jsx(qw,{id:o,open:r,anchorEl:e.anchorEl,onClose:e.blurHandler,anchorOrigin:{vertical:"bottom",horizontal:"right"},children:te.jsx("form",{onSubmit:l,children:te.jsx("input",{id:o,name:"folioID",onBlur:e.blurHandler,onChange:d,placeholder:"Page Name (e.g. '3r')",ref:h,type:"text",value:n})})})}const oV={anchorEl:null};function aV(e){var Oe;const[n,t]=Te.useState({...oV}),[r,o]=Te.useState(!1),[l,d]=Te.useState(!1),h=Te.useRef(null),f=Te.useRef(null),m=F=>{t({anchorEl:null})},g=F=>{F.target.value===void 0||F.target.value===0||e.documentViewActions.changeTranscriptionType(e.side,F.target.value)},w=F=>{e.documentViewActions.changeTranscriptionType(e.side,"g")},x=F=>{o(!r)},T=F=>{d(!l)},P=F=>{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)},C=F=>{e.documentViewActions.setXMLMode(e.side,!e.documentView[e.side].isXMLMode)},_=F=>{if(e.documentView.bookMode){P();return}e.documentView.linkedMode===!1&&(e.side==="left"?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)},k=F=>{const{documentViewActions:we,documentView:Ne,side:X}=e;if(typeof F.currentTarget.dataset.id>"u"||F.currentTarget.dataset.id.length===0)return;const Be=F.currentTarget.dataset.id;we.changeCurrentFolio(Be,X,Ne[X].transcriptionType)},V=F=>{t({anchorEl:F.currentTarget})},{side:j,document:Z,documentView:B,documentViewActions:Y,onFilterChange:ie}=e;if($z("md"),!B)return te.jsx("div",{children:"Unknown Transcription Type"});const ae=B[j].transcriptionType==="f"?{color:"white"}:{color:"black"},le=B[j].transcriptionType==="f"?"dark":"light",_e=B[j].transcriptionType==="glossary"?{visibility:"hidden"}:{visibility:"visible"},fe={display:"flex"};let de=B.linkedMode?"fa fa-lock":"fa fa-lock-open";B.bookMode||(de+=" active");const ve=B[j].transcriptionType==="f",Ae=B.bookMode?"fa fa-book active":"fa fa-book",ke=B[j].isXMLMode?"fa fa-code active":"fa fa-code",me=(Oe=Z.folioIndex[B[j].iiifShortID])==null?void 0:Oe.name,be=ve?{color:"white"}:{color:"black"},Ee=j==="left"?{marginRight:"55px"}:{marginRight:"15px"};return te.jsxs(te.Fragment,{children:[te.jsx("div",{className:"navigationComponent",children:te.jsxs("div",{id:"navigation-row",className:"navigationRow",children:[B[j].transcriptionType!=="glossary"?te.jsxs("div",{id:"tool-bar-buttons",className:"breadcrumbs",style:_e,children:[te.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:"4px"},children:[te.jsx("span",{className:"fas fa-th",style:{cursor:B[j].transcriptionType!=="g"?"pointer":"default",padding:"0 15px"},title:B[j].transcriptionType!=="g"&&"Return to Grid View",onClick:B[j].transcriptionType!=="g"&&w}),te.jsx("span",{title:"Toggle coordination of views",onClick:_,className:de}),te.jsx("span",{title:"Toggle book mode",onClick:P,className:Ae}),te.jsx("span",{title:"Toggle XML mode",onClick:C,style:{paddingRight:"15px"},className:ve?"invisible":ke}),te.jsx("span",{title:"Go back",onClick:k,"data-id":B[j].previousFolioShortID,className:B[j].hasPrevious?"arrow":"arrow disabled",children:te.jsx(su,{})}),te.jsx("span",{title:"Go forward",onClick:k,"data-id":B[j].nextFolioShortID,className:B[j].hasNext?"arrow":"arrow disabled",children:te.jsx(lu,{})})]})," ",te.jsxs("div",{title:`${e.documentName||Z.documentName}/${me}`,style:{display:"flex",overflowX:"hidden",justifyContent:"flex-end"},children:[te.jsx("span",{children:e.documentName||Z.documentName}),te.jsx("span",{children:" / "}),te.jsxs("div",{onClick:V,className:"folioName",style:{flexShrink:"0",minWidth:"40px"},children:[me,te.jsx("span",{style:be,className:"fa fa-hand-point-right"})]})]}),te.jsx(iV,{side:j,anchorEl:n.anchorEl,submitHandler:Y.jumpToFolio,blurHandler:m})]}):te.jsx(yx,{onFilterChange:ie,value:e.value}),te.jsxs("div",{id:"doc-type-help",style:fe,ref:h,children:[te.jsxs(ef,{className:le,style:{...ae,marginRight:15,fontSize:"max(16px, 1rem)"},value:B[j].transcriptionType,id:"doc-type",onClick:g,children:[Object.keys(e.document.folios.find(F=>F.id===e.documentView[e.side].iiifShortID).annotationURLs).map(F=>te.jsx(ho,{value:F,children:e.document.variorum?e.document.transcriptionTypes[e.document.folios.find(we=>we.id===e.documentView[e.side].iiifShortID).doc_id][F]:e.document.transcriptionTypes[F]},F)),te.jsx(ho,{value:"f",children:ys.transcriptionTypeLabels.f},"f"),e.glossary&&te.jsx(ho,{value:"glossary",children:ys.transcriptionTypeLabels.glossary},"glossary")]}),te.jsx("span",{title:"Toggle folio help",onClick:x,className:"helpIcon",children:te.jsx("i",{className:"fas fa-question-circle"})}),te.jsx(Sx,{marginStyle:Ee,anchorEl:h.current,open:r,onClose:x})]})]})}),te.jsx("div",{className:"navigationComponentNarrow",children:te.jsxs("div",{id:"navigation-row",className:"navigationRowNarrow",children:[B[j].transcriptionType!=="glossary"?te.jsxs("div",{id:"tool-bar-buttons",className:"breadcrumbsNarrow",style:_e,children:[te.jsx("span",{className:"fas fa-th",style:{cursor:B[j].transcriptionType!=="g"?"pointer":"default",padding:"0 15px"},title:B[j].transcriptionType!=="g"&&"Return to Grid View",onClick:B[j].transcriptionType!=="g"&&w})," ",te.jsx("span",{title:"Toggle XML mode",onClick:C,className:ve?"invisible":ke}),ve&&te.jsxs(te.Fragment,{children:[te.jsxs("span",{title:"Go back",onClick:k,"data-id":B[j].previousFolioShortID,className:B[j].hasPrevious?"arrow":"arrow disabled",children:[" ",te.jsx(su,{})," "]}),te.jsxs("span",{title:"Go forward",onClick:k,"data-id":B[j].nextFolioShortID,className:B[j].hasNext?"arrow":"arrow disabled",children:[" ",te.jsx(lu,{})]})]})]}):te.jsx(yx,{onFilterChange:ie,value:e.value}),te.jsxs("div",{id:"doc-type-help",style:fe,ref:f,children:[te.jsxs(ef,{className:le,style:{...ae,marginRight:15,fontSize:"max(16px, 1rem)"},value:B[j].transcriptionType,id:"doc-type",onClick:g,children:[Object.keys(e.document.folios.find(F=>F.id===e.documentView[e.side].iiifShortID).annotationURLs).map(F=>te.jsx(ho,{value:F,title:F,children:e.document.variorum?e.document.transcriptionTypes[e.document.folios.find(we=>we.id===e.documentView[e.side].iiifShortID).doc_id][F]:e.document.transcriptionTypes[F]},F)),te.jsx(ho,{value:"f",children:ys.transcriptionTypeLabels.f},"f"),e.glossary&&te.jsx(ho,{value:"glossary",children:ys.transcriptionTypeLabels.glossary},"glossary")]}),te.jsx("span",{title:"Toggle folio help",onClick:T,className:"helpIcon",children:te.jsx("i",{className:"fas fa-question-circle"})}),te.jsx(Sx,{marginStyle:Ee,anchorEl:f.current,open:l,onClose:T})]})]})})]})}function sV(e){return{document:e.document,glossary:!!e.glossary.URL}}const oa=Mr(sV)(aV);class lV extends Te.Component{constructor(){super();wr(this,"onFilterChange",t=>{const r=t.target.value;this.setState({...this.state,filterTerm:r})});this.state={filterTerm:""}}renderGlossary(){const{glossary:t}=this.props.glossary,r=this.state.filterTerm.toLowerCase(),o=Object.values(t.entries),l=(f,m,g)=>{const w=f.split(g);for(const x of w)if(x.startsWith(m))return!0;return!1},d=[];let h=0;for(const f of o){if(r.length===0&&f.headWord[0]===vs[h]){const x=`alpha-${h}`;d.push(te.jsxs(Yn,{variant:"h4",id:x,children:["—",vs[h]," ","—"]},`gloss-heading-${vs[h]}`)),h++}const m=f.headWord.toLowerCase(),g=f.alternateSpellings.toLowerCase(),w=f.modernSpelling.toLowerCase();if(r.length===0||r.length!==0&&l(m,r," ")||r.length!==0&&l(w,r," ")||r.length!==0&&l(g,r,", ")){const x=uV(f),T=x[x.length-1].endsWith("."),P=f.alternateSpellings?`, ${f.alternateSpellings}`:"",C=f.meanings[0].partOfSpeech,_=C?`${C}:`:"",k=C?",":":",V=f.modernSpelling?` (mod. ${f.modernSpelling})`:"",j=T?"":",",Z=f.seeAlso?`${j} see also <span>→</span>${f.seeAlso} `:"",B=f.synonym?`, syn. <span>→</span>${f.synonym}`:"",Y=f.antonym?`, ant. <span>→</span>${f.antonym}`:"";d.push(te.jsxs(Yn,{gutterBottom:!0,children:[te.jsx("u",{children:f.headWord}),P,V,k," ",_," ",x.map(ie=>Er(ie)),Er(Z),Er(B),Er(Y)]},`gloss-${f.headWord}`))}}return d}render(){return this.props.glossary.loaded?te.jsxs("div",{id:"glossaryView",style:{position:"relative",overflow:"auto"},children:[te.jsx(oa,{side:this.props.side,onFilterChange:this.onFilterChange,value:this.state.filterTerm,documentView:this.props.documentView,documentViewActions:this.props.documentViewActions}),te.jsx("div",{id:"glossaryViewInner",children:te.jsxs("div",{id:"glossaryContent",children:[te.jsx(Yn,{variant:"h2",className:"title",children:"Glossary"}),this.props.glossary.glossary.title&&te.jsx("div",{className:"subtitle MuiTypography-root MuiTypography-body1",children:te.jsx(qf,{children:this.props.glossary.glossary.title})}),te.jsx("div",{className:"cite-instructions",children:this.props.glossary.glossary.citation&&te.jsxs(te.Fragment,{children:[te.jsx(Yn,{className:"cite-header",children:"How to Cite"}),te.jsx("div",{className:"MuiTypography-root MuiTypography-body1",children:te.jsx(qf,{children:this.props.glossary.glossary.citation})})]})}),this.renderGlossary()]})})]}):null}}function uV(e){const n=[];for(let t=0;t<e.meanings.length;t++){const r=e.meanings[t],o=r.references?` [${r.references}]`:"",l=e.meanings.length>1?`${t+1}. `:"",d=t<e.meanings.length-1?" ":"";n.push(`${l}${r.meaning}${o}${d}`)}return n}function cV(e){return{glossary:e.glossary}}const hV=Mr(cV)(lV);class lp extends Te.Component{constructor(n){super(n),this.scrollListener=this.scrollListener.bind(this),this.eventListenerOptions=this.eventListenerOptions.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this)}componentDidMount(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}componentDidUpdate(){if(this.props.isReverse&&this.loadMore){const n=this.getParentElement(this.scrollComponent);n.scrollTop=n.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}componentWillUnmount(){this.detachScrollListener(),this.detachMousewheelListener()}isPassiveSupported(){let n=!1;const t={get passive(){n=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch{}return n}eventListenerOptions(){let n=this.props.useCapture;return this.isPassiveSupported()?n={useCapture:this.props.useCapture,passive:!0}:n={passive:!1},n}setDefaultLoader(n){this.defaultLoader=n}detachMousewheelListener(){let n=window;this.props.useWindow===!1&&(n=this.scrollComponent.parentNode),n.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}detachScrollListener(){let n=window;this.props.useWindow===!1&&(n=this.getParentElement(this.scrollComponent)),n.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),n.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}getParentElement(n){const t=this.props.getScrollParent&&this.props.getScrollParent();return t??(n&&n.parentNode)}filterProps(n){return n}attachScrollListener(){const n=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!n)return;let t=window;this.props.useWindow===!1&&(t=n),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()}mousewheelListener(n){n.deltaY===1&&!this.isPassiveSupported()&&n.preventDefault()}scrollListener(){const n=this.scrollComponent,t=window,r=this.getParentElement(n);let o;if(this.props.useWindow){const l=document.documentElement||document.body.parentNode||document.body,d=t.pageYOffset!==void 0?t.pageYOffset:l.scrollTop;this.props.isReverse?o=d:o=this.calculateOffset(n,d)}else this.props.isReverse?o=r.scrollTop:o=n.scrollHeight-r.scrollTop-r.clientHeight;o<Number(this.props.threshold)&&n&&n.offsetParent!==null&&(this.detachScrollListener(),this.beforeScrollHeight=r.scrollHeight,this.beforeScrollTop=r.scrollTop,typeof this.props.loadMore=="function"&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}calculateOffset(n,t){return n?this.calculateTopPosition(n)+(n.offsetHeight-t-window.innerHeight):0}calculateTopPosition(n){return n?n.offsetTop+this.calculateTopPosition(n.offsetParent):0}render(){const n=this.filterProps(this.props),{children:t,element:r,hasMore:o,initialLoad:l,isReverse:d,loader:h,loadMore:f,pageStart:m,ref:g,threshold:w,useCapture:x,useWindow:T,getScrollParent:P,...C}=n;C.ref=k=>{this.scrollComponent=k,g&&g(k)};const _=[t];return o&&(h?d?_.unshift(h):_.push(h):this.defaultLoader&&(d?_.unshift(this.defaultLoader):_.push(this.defaultLoader))),Te.createElement(r,C,_)}}wr(lp,"propTypes",{children:R.node.isRequired,element:R.node,hasMore:R.bool,initialLoad:R.bool,isReverse:R.bool,loader:R.node,loadMore:R.func.isRequired,pageStart:R.number,ref:R.func,getScrollParent:R.func,threshold:R.number,useCapture:R.bool,useWindow:R.bool}),wr(lp,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});class dV extends Te.Component{constructor(t,r){super(t,r);wr(this,"onJumpToChange",t=>{const r=t.target.value;this.setState({...this.state,jumpToBuffer:r})});wr(this,"onJumpTo",t=>{const{jumpToBuffer:r}=this.state,{side:o,document:l,documentViewActions:d}=this.props;if(t.preventDefault(),l.folioByName[r]){const h=l.folioByName[r];h&&d.changeCurrentFolio(h.id,o)}this.setState({...this.state,jumpToBuffer:""})});wr(this,"onSelectDoc",t=>{if(!t.target.value||t.target.value==0)return;t.target.value&&t.target.value!=="none"?this.setState({...this.state,currentDoc:t.target.value}):this.setState({...this.state,currentDoc:null});const{documentView:r}=this.props,o=r[this.props.side].iiifShortID,l=this.generateThumbs(o,t.target.value!=="none"?this.props.document.folios.filter(f=>f.doc_id===t.target.value):this.props.document.folios),d=l.length>this.loadIncrement?this.loadIncrement:l.length,h=l.slice(0,d);this.setState({thumbs:l,visibleThumbs:h})});wr(this,"onClickThumb",(t,r)=>{this.props.documentViewActions.changeCurrentFolio(t,this.props.side,"f")});wr(this,"moreThumbs",()=>{const{thumbs:t}=this.state;let{visibleThumbs:r}=this.state;const o=r.length+this.loadIncrement;t.length>=o?r=t.slice(0,o):r=t,this.setState({visibleThumbs:r})});this.generateThumbs=this.generateThumbs.bind(this),this.loadIncrement=10,this.state={jumpToBuffer:"",thumbs:"",visibleThumbs:[],currentDoc:t.selectedDoc||null}}componentDidUpdate(t){const{documentView:r}=this.props,o=r[this.props.side].iiifShortID,l=this.props.documentView[this.props.side].iiifShortID;if(o!==l){const d=this.generateThumbs(l,this.state.currentDoc?this.props.document.folios.filter(m=>m.doc_id===this.state.currentDoc):this.props.document.folios),h=d.length>this.loadIncrement?this.loadIncrement:d.length,f=d.slice(0,h);this.setState({thumbs:d,visibleThumbs:f})}}renderToolbar(){return te.jsxs("div",{className:"imageGridToolbar",children:[te.jsx("span",{className:"fas fa-th",style:{paddingLeft:"15px"}}),this.props.document.variorum?this.renderDocSelect():te.jsx("div",{className:"doc-select",style:{marginTop:"5px"},children:this.props.document.documentName}),te.jsx("div",{className:"jump-to",children:te.jsxs("form",{onSubmit:this.onJumpTo,children:[te.jsx("span",{children:"Jump to: "}),te.jsx("input",{id:"jump-to-input",placeholder:"Page Name (e.g. '3r')",onChange:this.onJumpToChange,value:this.state.jumpToBuffer}),te.jsx("button",{id:"jump-to-button",onClick:this.onJumpTo,children:te.jsx("span",{style:{color:"black"},className:"fa fa-hand-point-right"})})]})})]})}renderDocSelect(){return te.jsx("div",{className:"doc-select",children:te.jsx(ef,{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,children:Object.keys(this.props.document.derivativeNames).map(t=>te.jsx(ho,{value:t,children:this.props.document.derivativeNames[t]},t))})})}componentDidMount(){const{documentView:t}=this.props,r=t[this.props.side].iiifShortID,o=this.generateThumbs(r,this.props.document.variorum&&this.state.currentDoc?this.props.document.folios.filter(h=>h.doc_id===this.state.currentDoc):this.props.document.folios),l=o.length>this.loadIncrement?this.loadIncrement:o.length,d=o.slice(0,l);this.setState({thumbs:o,visibleThumbs:d})}generateThumbs(t,r){return r.map((l,d)=>te.jsxs("li",{className:"thumbnail",children:[te.jsx("figure",{children:te.jsx("a",{id:l.id,onClick:this.onClickThumb.bind(this,l.id),children:te.jsx("img",{src:l.image_thumbnail_url,alt:l.name,style:{maxWidth:"130px",maxHeight:"130px"},onError:({currentTarget:h})=>{h.onerror=null,l.image_zoom_url&&h.src!==`${l.image_zoom_url.slice(0,-9)}full/full/0/default.jpg`&&(h.src=`${l.image_zoom_url.slice(0,-9)}full/full/0/default.jpg`)}})})}),te.jsx("figcaption",{className:"thumbnail-caption",children:l.name})]},`thumb-${d}`))}hasMore(){return this.state.visibleThumbs.length!==this.state.thumbs.length}render(){let t="imageGridComponent";t=`${t} ${this.props.side}`;let{visibleThumbs:r}=this.state;return r.constructor.toString().includes("Array")||(r=[]),te.jsxs("div",{className:t,children:[this.renderToolbar(),te.jsx(lp,{element:"ul",loadMore:this.moreThumbs,hasMore:this.hasMore(),useWindow:!1,children:r})]})}}function fV(e){return{document:e.document}}const pV=Mr(fV)(dV);var Tx={exports:{}};(function(e,n){(function(t,r){e.exports=r()})(Gn,function(){var t=Object.defineProperty,r=(a,u,i)=>u in a?t(a,u,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[u]=i,o=(a,u,i)=>(r(a,typeof u!="symbol"?u+"":u,i),i),l,d,h,f,m,g,w,x={},T=[],P=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function C(a,u){for(var i in u)a[i]=u[i];return a}function _(a){var u=a.parentNode;u&&u.removeChild(a)}function k(a,u,i){var s,c,p,v={};for(p in u)p=="key"?s=u[p]:p=="ref"?c=u[p]:v[p]=u[p];if(arguments.length>2&&(v.children=arguments.length>3?l.call(arguments,2):i),typeof a=="function"&&a.defaultProps!=null)for(p in a.defaultProps)v[p]===void 0&&(v[p]=a.defaultProps[p]);return V(a,v,s,c,null)}function V(a,u,i,s,c){var p={type:a,props:u,key:i,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:c??++h};return c==null&&d.vnode!=null&&d.vnode(p),p}function j(){return{current:null}}function Z(a){return a.children}function B(a,u){this.props=a,this.context=u}function Y(a,u){if(u==null)return a.__?Y(a.__,a.__.__k.indexOf(a)+1):null;for(var i;u<a.__k.length;u++)if((i=a.__k[u])!=null&&i.__e!=null)return i.__e;return typeof a.type=="function"?Y(a):null}function ie(a){var u,i;if((a=a.__)!=null&&a.__c!=null){for(a.__e=a.__c.base=null,u=0;u<a.__k.length;u++)if((i=a.__k[u])!=null&&i.__e!=null){a.__e=a.__c.base=i.__e;break}return ie(a)}}function ae(a){(!a.__d&&(a.__d=!0)&&f.push(a)&&!le.__r++||g!==d.debounceRendering)&&((g=d.debounceRendering)||m)(le)}function le(){for(var a;le.__r=f.length;)a=f.sort(function(u,i){return u.__v.__b-i.__v.__b}),f=[],a.some(function(u){var i,s,c,p,v,y;u.__d&&(v=(p=(i=u).__v).__e,(y=i.__P)&&(s=[],(c=C({},p)).__v=p.__v+1,Oe(y,p,c,i.__n,y.ownerSVGElement!==void 0,p.__h!=null?[v]:null,s,v??Y(p),p.__h),F(s,p),p.__e!=v&&ie(p)))})}function _e(a,u,i,s,c,p,v,y,b,E){var S,O,A,H,W,re,$,se=s&&s.__k||T,I=se.length;for(i.__k=[],S=0;S<u.length;S++)if((H=i.__k[S]=(H=u[S])==null||typeof H=="boolean"?null:typeof H=="string"||typeof H=="number"||typeof H=="bigint"?V(null,H,null,null,H):Array.isArray(H)?V(Z,{children:H},null,null,null):H.__b>0?V(H.type,H.props,H.key,null,H.__v):H)!=null){if(H.__=i,H.__b=i.__b+1,(A=se[S])===null||A&&H.key==A.key&&H.type===A.type)se[S]=void 0;else for(O=0;O<I;O++){if((A=se[O])&&H.key==A.key&&H.type===A.type){se[O]=void 0;break}A=null}Oe(a,H,A=A||x,c,p,v,y,b,E),W=H.__e,(O=H.ref)&&A.ref!=O&&($||($=[]),A.ref&&$.push(A.ref,null,H),$.push(O,H.__c||W,H)),W!=null?(re==null&&(re=W),typeof H.type=="function"&&H.__k===A.__k?H.__d=b=fe(H,b,a):b=ve(a,H,A,se,W,b),typeof i.type=="function"&&(i.__d=b)):b&&A.__e==b&&b.parentNode!=a&&(b=Y(A))}for(i.__e=re,S=I;S--;)se[S]!=null&&(typeof i.type=="function"&&se[S].__e!=null&&se[S].__e==i.__d&&(i.__d=Y(s,S+1)),X(se[S],se[S]));if($)for(S=0;S<$.length;S++)Ne($[S],$[++S],$[++S])}function fe(a,u,i){for(var s,c=a.__k,p=0;c&&p<c.length;p++)(s=c[p])&&(s.__=a,u=typeof s.type=="function"?fe(s,u,i):ve(i,s,s,c,s.__e,u));return u}function de(a,u){return u=u||[],a==null||typeof a=="boolean"||(Array.isArray(a)?a.some(function(i){de(i,u)}):u.push(a)),u}function ve(a,u,i,s,c,p){var v,y,b;if(u.__d!==void 0)v=u.__d,u.__d=void 0;else if(i==null||c!=p||c.parentNode==null)e:if(p==null||p.parentNode!==a)a.appendChild(c),v=null;else{for(y=p,b=0;(y=y.nextSibling)&&b<s.length;b+=2)if(y==c)break e;a.insertBefore(c,p),v=p}return v!==void 0?v:c.nextSibling}function Ae(a,u,i,s,c){var p;for(p in i)p==="children"||p==="key"||p in u||me(a,p,null,i[p],s);for(p in u)c&&typeof u[p]!="function"||p==="children"||p==="key"||p==="value"||p==="checked"||i[p]===u[p]||me(a,p,u[p],i[p],s)}function ke(a,u,i){u[0]==="-"?a.setProperty(u,i):a[u]=i==null?"":typeof i!="number"||P.test(u)?i:i+"px"}function me(a,u,i,s,c){var p;e:if(u==="style")if(typeof i=="string")a.style.cssText=i;else{if(typeof s=="string"&&(a.style.cssText=s=""),s)for(u in s)i&&u in i||ke(a.style,u,"");if(i)for(u in i)s&&i[u]===s[u]||ke(a.style,u,i[u])}else if(u[0]==="o"&&u[1]==="n")p=u!==(u=u.replace(/Capture$/,"")),u=u.toLowerCase()in a?u.toLowerCase().slice(2):u.slice(2),a.l||(a.l={}),a.l[u+p]=i,i?s||a.addEventListener(u,p?Ee:be,p):a.removeEventListener(u,p?Ee:be,p);else if(u!=="dangerouslySetInnerHTML"){if(c)u=u.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(u!=="href"&&u!=="list"&&u!=="form"&&u!=="tabIndex"&&u!=="download"&&u in a)try{a[u]=i??"";break e}catch{}typeof i=="function"||(i!=null&&(i!==!1||u[0]==="a"&&u[1]==="r")?a.setAttribute(u,i):a.removeAttribute(u))}}function be(a){this.l[a.type+!1](d.event?d.event(a):a)}function Ee(a){this.l[a.type+!0](d.event?d.event(a):a)}function Oe(a,u,i,s,c,p,v,y,b){var E,S,O,A,H,W,re,$,se,I,ne,he=u.type;if(u.constructor!==void 0)return null;i.__h!=null&&(b=i.__h,y=u.__e=i.__e,u.__h=null,p=[y]),(E=d.__b)&&E(u);try{e:if(typeof he=="function"){if($=u.props,se=(E=he.contextType)&&s[E.__c],I=E?se?se.props.value:E.__:s,i.__c?re=(S=u.__c=i.__c).__=S.__E:("prototype"in he&&he.prototype.render?u.__c=S=new he($,I):(u.__c=S=new B($,I),S.constructor=he,S.render=Be),se&&se.sub(S),S.props=$,S.state||(S.state={}),S.context=I,S.__n=s,O=S.__d=!0,S.__h=[]),S.__s==null&&(S.__s=S.state),he.getDerivedStateFromProps!=null&&(S.__s==S.state&&(S.__s=C({},S.__s)),C(S.__s,he.getDerivedStateFromProps($,S.__s))),A=S.props,H=S.state,O)he.getDerivedStateFromProps==null&&S.componentWillMount!=null&&S.componentWillMount(),S.componentDidMount!=null&&S.__h.push(S.componentDidMount);else{if(he.getDerivedStateFromProps==null&&$!==A&&S.componentWillReceiveProps!=null&&S.componentWillReceiveProps($,I),!S.__e&&S.shouldComponentUpdate!=null&&S.shouldComponentUpdate($,S.__s,I)===!1||u.__v===i.__v){S.props=$,S.state=S.__s,u.__v!==i.__v&&(S.__d=!1),S.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(ce){ce&&(ce.__=u)}),S.__h.length&&v.push(S);break e}S.componentWillUpdate!=null&&S.componentWillUpdate($,S.__s,I),S.componentDidUpdate!=null&&S.__h.push(function(){S.componentDidUpdate(A,H,W)})}S.context=I,S.props=$,S.state=S.__s,(E=d.__r)&&E(u),S.__d=!1,S.__v=u,S.__P=a,E=S.render(S.props,S.state,S.context),S.state=S.__s,S.getChildContext!=null&&(s=C(C({},s),S.getChildContext())),O||S.getSnapshotBeforeUpdate==null||(W=S.getSnapshotBeforeUpdate(A,H)),ne=E!=null&&E.type===Z&&E.key==null?E.props.children:E,_e(a,Array.isArray(ne)?ne:[ne],u,i,s,c,p,v,y,b),S.base=u.__e,u.__h=null,S.__h.length&&v.push(S),re&&(S.__E=S.__=null),S.__e=!1}else p==null&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=we(i.__e,u,i,s,c,p,v,b);(E=d.diffed)&&E(u)}catch(ce){u.__v=null,(b||p!=null)&&(u.__e=y,u.__h=!!b,p[p.indexOf(y)]=null),d.__e(ce,u,i)}}function F(a,u){d.__c&&d.__c(u,a),a.some(function(i){try{a=i.__h,i.__h=[],a.some(function(s){s.call(i)})}catch(s){d.__e(s,i.__v)}})}function we(a,u,i,s,c,p,v,y){var b,E,S,O=i.props,A=u.props,H=u.type,W=0;if(H==="svg"&&(c=!0),p!=null){for(;W<p.length;W++)if((b=p[W])&&"setAttribute"in b==!!H&&(H?b.localName===H:b.nodeType===3)){a=b,p[W]=null;break}}if(a==null){if(H===null)return document.createTextNode(A);a=c?document.createElementNS("http://www.w3.org/2000/svg",H):document.createElement(H,A.is&&A),p=null,y=!1}if(H===null)O===A||y&&a.data===A||(a.data=A);else{if(p=p&&l.call(a.childNodes),E=(O=i.props||x).dangerouslySetInnerHTML,S=A.dangerouslySetInnerHTML,!y){if(p!=null)for(O={},W=0;W<a.attributes.length;W++)O[a.attributes[W].name]=a.attributes[W].value;(S||E)&&(S&&(E&&S.__html==E.__html||S.__html===a.innerHTML)||(a.innerHTML=S&&S.__html||""))}if(Ae(a,A,O,c,y),S)u.__k=[];else if(W=u.props.children,_e(a,Array.isArray(W)?W:[W],u,i,s,c&&H!=="foreignObject",p,v,p?p[0]:i.__k&&Y(i,0),y),p!=null)for(W=p.length;W--;)p[W]!=null&&_(p[W]);y||("value"in A&&(W=A.value)!==void 0&&(W!==O.value||W!==a.value||H==="progress"&&!W)&&me(a,"value",W,O.value,!1),"checked"in A&&(W=A.checked)!==void 0&&W!==a.checked&&me(a,"checked",W,O.checked,!1))}return a}function Ne(a,u,i){try{typeof a=="function"?a(u):a.current=u}catch(s){d.__e(s,i)}}function X(a,u,i){var s,c;if(d.unmount&&d.unmount(a),(s=a.ref)&&(s.current&&s.current!==a.__e||Ne(s,null,u)),(s=a.__c)!=null){if(s.componentWillUnmount)try{s.componentWillUnmount()}catch(p){d.__e(p,u)}s.base=s.__P=null}if(s=a.__k)for(c=0;c<s.length;c++)s[c]&&X(s[c],u,typeof a.type!="function");i||a.__e==null||_(a.__e),a.__e=a.__d=void 0}function Be(a,u,i){return this.constructor(a,i)}function Je(a,u,i){var s,c,p;d.__&&d.__(a,u),c=(s=typeof i=="function")?null:i&&i.__k||u.__k,p=[],Oe(u,a=(!s&&i||u).__k=k(Z,null,[a]),c||x,x,u.ownerSVGElement!==void 0,!s&&i?[i]:c?null:u.firstChild?l.call(u.childNodes):null,p,!s&&i?i:c?c.__e:u.firstChild,s),F(p,a)}function He(a,u){Je(a,u,He)}function Ze(a,u,i){var s,c,p,v=C({},a.props);for(p in u)p=="key"?s=u[p]:p=="ref"?c=u[p]:v[p]=u[p];return arguments.length>2&&(v.children=arguments.length>3?l.call(arguments,2):i),V(a.type,v,s||a.key,c||a.ref,null)}function Qe(a,u){var i={__c:u="__cC"+w++,__:a,Consumer:function(s,c){return s.children(c)},Provider:function(s){var c,p;return this.getChildContext||(c=[],(p={})[u]=this,this.getChildContext=function(){return p},this.shouldComponentUpdate=function(v){this.props.value!==v.value&&c.some(ae)},this.sub=function(v){c.push(v);var y=v.componentWillUnmount;v.componentWillUnmount=function(){c.splice(c.indexOf(v),1),y&&y.call(v)}}),s.children}};return i.Provider.__=i.Consumer.contextType=i}l=T.slice,d={__e:function(a,u){for(var i,s,c;u=u.__;)if((i=u.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(a)),c=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(a),c=i.__d),c)return i.__E=i}catch(p){a=p}throw a}},h=0,B.prototype.setState=function(a,u){var i;i=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=C({},this.state),typeof a=="function"&&(a=a(C({},i),this.props)),a&&C(i,a),a!=null&&this.__v&&(u&&this.__h.push(u),ae(this))},B.prototype.forceUpdate=function(a){this.__v&&(this.__e=!0,a&&this.__h.push(a),ae(this))},B.prototype.render=Z,f=[],m=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,le.__r=0,w=0;var it,Ke,Le,pe=0,mt=[],Ce=d.__b,Pt=d.__r,wt=d.diffed,D=d.__c,K=d.unmount;function xe(a,u){d.__h&&d.__h(Ke,a,pe||u),pe=0;var i=Ke.__H||(Ke.__H={__:[],__h:[]});return a>=i.__.length&&i.__.push({}),i.__[a]}function ze(a){return pe=1,Ve(bt,a)}function Ve(a,u,i){var s=xe(it++,2);return s.t=a,s.__c||(s.__=[i?i(u):bt(void 0,u),function(c){var p=s.t(s.__[0],c);s.__[0]!==p&&(s.__=[p,s.__[1]],s.__c.setState({}))}],s.__c=Ke),s.__}function ut(a,u){var i=xe(it++,3);!d.__s&&ot(i.__H,u)&&(i.__=a,i.__H=u,Ke.__H.__h.push(i))}function Ye(a,u){var i=xe(it++,4);!d.__s&&ot(i.__H,u)&&(i.__=a,i.__H=u,Ke.__h.push(i))}function gt(a){return pe=5,St(function(){return{current:a}},[])}function Ct(a,u,i){pe=6,Ye(function(){typeof a=="function"?a(u()):a&&(a.current=u())},i==null?i:i.concat(a))}function St(a,u){var i=xe(it++,7);return ot(i.__H,u)&&(i.__=a(),i.__H=u,i.__h=a),i.__}function ge(a,u){return pe=8,St(function(){return a},u)}function Ie(a){var u=Ke.context[a.__c],i=xe(it++,9);return i.c=a,u?(i.__==null&&(i.__=!0,u.sub(Ke)),u.props.value):a.__}function M(a,u){d.useDebugValue&&d.useDebugValue(u?u(a):a)}function L(a){var u=xe(it++,10),i=ze();return u.__=a,Ke.componentDidCatch||(Ke.componentDidCatch=function(s){u.__&&u.__(s),i[1](s)}),[i[0],function(){i[1](void 0)}]}function q(){var a;for(mt.sort(function(u,i){return u.__v.__b-i.__v.__b});a=mt.pop();)if(a.__P)try{a.__H.__h.forEach(ye),a.__H.__h.forEach(Re),a.__H.__h=[]}catch(u){a.__H.__h=[],d.__e(u,a.__v)}}d.__b=function(a){Ke=null,Ce&&Ce(a)},d.__r=function(a){Pt&&Pt(a),it=0;var u=(Ke=a.__c).__H;u&&(u.__h.forEach(ye),u.__h.forEach(Re),u.__h=[])},d.diffed=function(a){wt&&wt(a);var u=a.__c;u&&u.__H&&u.__H.__h.length&&(mt.push(u)!==1&&Le===d.requestAnimationFrame||((Le=d.requestAnimationFrame)||function(i){var s,c=function(){clearTimeout(p),J&&cancelAnimationFrame(s),setTimeout(i)},p=setTimeout(c,100);J&&(s=requestAnimationFrame(c))})(q)),Ke=null},d.__c=function(a,u){u.some(function(i){try{i.__h.forEach(ye),i.__h=i.__h.filter(function(s){return!s.__||Re(s)})}catch(s){u.some(function(c){c.__h&&(c.__h=[])}),u=[],d.__e(s,i.__v)}}),D&&D(a,u)},d.unmount=function(a){K&&K(a);var u,i=a.__c;i&&i.__H&&(i.__H.__.forEach(function(s){try{ye(s)}catch(c){u=c}}),u&&d.__e(u,i.__v))};var J=typeof requestAnimationFrame=="function";function ye(a){var u=Ke,i=a.__c;typeof i=="function"&&(a.__c=void 0,i()),Ke=u}function Re(a){var u=Ke;a.__c=a.__(),Ke=u}function ot(a,u){return!a||a.length!==u.length||u.some(function(i,s){return i!==a[s]})}function bt(a,u){return typeof u=="function"?u(a):u}function je(a,u){for(var i in u)a[i]=u[i];return a}function fn(a,u){for(var i in a)if(i!=="__source"&&!(i in u))return!0;for(var s in u)if(s!=="__source"&&a[s]!==u[s])return!0;return!1}function Vt(a){this.props=a}function fr(a,u){function i(c){var p=this.props.ref,v=p==c.ref;return!v&&p&&(p.call?p(null):p.current=null),u?!u(this.props,c)||!v:fn(this.props,c)}function s(c){return this.shouldComponentUpdate=i,k(a,c)}return s.displayName="Memo("+(a.displayName||a.name)+")",s.prototype.isReactComponent=!0,s.__f=!0,s}(Vt.prototype=new B).isPureReactComponent=!0,Vt.prototype.shouldComponentUpdate=function(a,u){return fn(this.props,a)||fn(this.state,u)};var yi=d.__b;d.__b=function(a){a.type&&a.type.__f&&a.ref&&(a.props.ref=a.ref,a.ref=null),yi&&yi(a)};var vo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function wi(a){function u(i,s){var c=je({},i);return delete c.ref,a(c,(s=i.ref||s)&&(typeof s!="object"||"current"in s)?s:null)}return u.$$typeof=vo,u.render=u,u.prototype.isReactComponent=u.__f=!0,u.displayName="ForwardRef("+(a.displayName||a.name)+")",u}var uu=function(a,u){return a==null?null:de(de(a).map(u))},cu={map:uu,forEach:uu,count:function(a){return a?de(a).length:0},only:function(a){var u=de(a);if(u.length!==1)throw"Children.only";return u[0]},toArray:de},hu=d.__e;d.__e=function(a,u,i){if(a.then){for(var s,c=u;c=c.__;)if((s=c.__c)&&s.__c)return u.__e==null&&(u.__e=i.__e,u.__k=i.__k),s.__c(a,u)}hu(a,u,i)};var du=d.unmount;function yo(){this.__u=0,this.t=null,this.__b=null}function fu(a){var u=a.__.__c;return u&&u.__e&&u.__e(a)}function pu(a){var u,i,s;function c(p){if(u||(u=a()).then(function(v){i=v.default||v},function(v){s=v}),s)throw s;if(!i)throw u;return k(i,p)}return c.displayName="Lazy",c.__f=!0,c}function ue(){this.u=null,this.o=null}d.unmount=function(a){var u=a.__c;u&&u.__R&&u.__R(),u&&a.__h===!0&&(a.type=null),du&&du(a)},(yo.prototype=new B).__c=function(a,u){var i=u.__c,s=this;s.t==null&&(s.t=[]),s.t.push(i);var c=fu(s.__v),p=!1,v=function(){p||(p=!0,i.__R=null,c?c(y):y())};i.__R=v;var y=function(){if(!--s.__u){if(s.state.__e){var E=s.state.__e;s.__v.__k[0]=function O(A,H,W){return A&&(A.__v=null,A.__k=A.__k&&A.__k.map(function(re){return O(re,H,W)}),A.__c&&A.__c.__P===H&&(A.__e&&W.insertBefore(A.__e,A.__d),A.__c.__e=!0,A.__c.__P=W)),A}(E,E.__c.__P,E.__c.__O)}var S;for(s.setState({__e:s.__b=null});S=s.t.pop();)S.forceUpdate()}},b=u.__h===!0;s.__u++||b||s.setState({__e:s.__b=s.__v.__k[0]}),a.then(v,v)},yo.prototype.componentWillUnmount=function(){this.t=[]},yo.prototype.render=function(a,u){if(this.__b){if(this.__v.__k){var i=document.createElement("div"),s=this.__v.__k[0].__c;this.__v.__k[0]=function p(v,y,b){return v&&(v.__c&&v.__c.__H&&(v.__c.__H.__.forEach(function(E){typeof E.__c=="function"&&E.__c()}),v.__c.__H=null),(v=je({},v)).__c!=null&&(v.__c.__P===b&&(v.__c.__P=y),v.__c=null),v.__k=v.__k&&v.__k.map(function(E){return p(E,y,b)})),v}(this.__b,i,s.__O=s.__P)}this.__b=null}var c=u.__e&&k(Z,null,a.fallback);return c&&(c.__h=null),[k(Z,null,u.__e?null:a.children),c]};var et=function(a,u,i){if(++i[1]===i[0]&&a.o.delete(u),a.props.revealOrder&&(a.props.revealOrder[0]!=="t"||!a.o.size))for(i=a.u;i;){for(;i.length>3;)i.pop()();if(i[1]<i[0])break;a.u=i=i[2]}};function vt(a){return this.getChildContext=function(){return a.context},a.children}function Dt(a){var u=this,i=a.i;u.componentWillUnmount=function(){Je(null,u.l),u.l=null,u.i=null},u.i&&u.i!==i&&u.componentWillUnmount(),a.__v?(u.l||(u.i=i,u.l={nodeType:1,parentNode:i,childNodes:[],appendChild:function(s){this.childNodes.push(s),u.i.appendChild(s)},insertBefore:function(s,c){this.childNodes.push(s),u.i.appendChild(s)},removeChild:function(s){this.childNodes.splice(this.childNodes.indexOf(s)>>>1,1),u.i.removeChild(s)}}),Je(k(vt,{context:u.context},a.__v),u.l)):u.l&&u.componentWillUnmount()}function pn(a,u){return k(Dt,{__v:a,i:u})}(ue.prototype=new B).__e=function(a){var u=this,i=fu(u.__v),s=u.o.get(a);return s[0]++,function(c){var p=function(){u.props.revealOrder?(s.push(c),et(u,a,s)):c()};i?i(p):p()}},ue.prototype.render=function(a){this.u=null,this.o=new Map;var u=de(a.children);a.revealOrder&&a.revealOrder[0]==="b"&&u.reverse();for(var i=u.length;i--;)this.o.set(u[i],this.u=[1,0,this.u]);return a.children},ue.prototype.componentDidUpdate=ue.prototype.componentDidMount=function(){var a=this;this.o.forEach(function(u,i){et(a,i,u)})};var mn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,qt=/^(?: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]/,Wt=typeof document<"u",er=function(a){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(a)};function On(a,u,i){return u.__k==null&&(u.textContent=""),Je(a,u),typeof i=="function"&&i(),a?a.__c:null}function Dn(a,u,i){return He(a,u),typeof i=="function"&&i(),a?a.__c:null}B.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(a){Object.defineProperty(B.prototype,a,{configurable:!0,get:function(){return this["UNSAFE_"+a]},set:function(u){Object.defineProperty(this,a,{configurable:!0,writable:!0,value:u})}})});var Hr=d.event;function ji(){}function mu(){return this.cancelBubble}function Xr(){return this.defaultPrevented}d.event=function(a){return Hr&&(a=Hr(a)),a.persist=ji,a.isPropagationStopped=mu,a.isDefaultPrevented=Xr,a.nativeEvent=a};var Px,Rx={configurable:!0,get:function(){return this.class}},Ox=d.vnode;d.vnode=function(a){var u=a.type,i=a.props,s=i;if(typeof u=="string"){var c=u.indexOf("-")===-1;for(var p in s={},i){var v=i[p];Wt&&p==="children"&&u==="noscript"||p==="value"&&"defaultValue"in i&&v==null||(p==="defaultValue"&&"value"in i&&i.value==null?p="value":p==="download"&&v===!0?v="":/ondoubleclick/i.test(p)?p="ondblclick":/^onchange(textarea|input)/i.test(p+u)&&!er(i.type)?p="oninput":/^onfocus$/i.test(p)?p="onfocusin":/^onblur$/i.test(p)?p="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(p)?p=p.toLowerCase():c&&qt.test(p)?p=p.replace(/[A-Z0-9]/,"-$&").toLowerCase():v===null&&(v=void 0),s[p]=v)}u=="select"&&s.multiple&&Array.isArray(s.value)&&(s.value=de(i.children).forEach(function(y){y.props.selected=s.value.indexOf(y.props.value)!=-1})),u=="select"&&s.defaultValue!=null&&(s.value=de(i.children).forEach(function(y){y.props.selected=s.multiple?s.defaultValue.indexOf(y.props.value)!=-1:s.defaultValue==y.props.value})),a.props=s,i.class!=i.className&&(Rx.enumerable="className"in i,i.className!=null&&(s.class=i.className),Object.defineProperty(s,"className",Rx))}a.$$typeof=mn,Ox&&Ox(a)};var kx=d.__r;d.__r=function(a){kx&&kx(a),Px=a.__c};var Ax={ReactCurrentDispatcher:{current:{readContext:function(a){return Px.__n[a.__c].props.value}}}},XV="17.0.2";function Dx(a){return k.bind(null,a)}function dp(a){return!!a&&a.$$typeof===mn}function Ix(a){return dp(a)?Ze.apply(null,arguments):a}function Mx(a){return!!a.__k&&(Je(null,a),!0)}function Nx(a){return a&&(a.base||a.nodeType===1&&a)||null}var Lx=function(a,u){return a(u)},Fx=function(a,u){return a(u)},ZV=Z,Ue={useState:ze,useReducer:Ve,useEffect:ut,useLayoutEffect:Ye,useRef:gt,useImperativeHandle:Ct,useMemo:St,useCallback:ge,useContext:Ie,useDebugValue:M,version:"17.0.2",Children:cu,render:On,hydrate:Dn,unmountComponentAtNode:Mx,createPortal:pn,createElement:k,createContext:Qe,createFactory:Dx,cloneElement:Ix,createRef:j,Fragment:Z,isValidElement:dp,findDOMNode:Nx,Component:B,PureComponent:Vt,memo:fr,forwardRef:wi,flushSync:Fx,unstable_batchedUpdates:Lx,StrictMode:Z,Suspense:yo,SuspenseList:ue,lazy:pu,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ax},fp=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Ue,version:XV,Children:cu,render:On,hydrate:Dn,unmountComponentAtNode:Mx,createPortal:pn,createFactory:Dx,cloneElement:Ix,isValidElement:dp,findDOMNode:Nx,PureComponent:Vt,memo:fr,forwardRef:wi,flushSync:Fx,unstable_batchedUpdates:Lx,StrictMode:ZV,Suspense:yo,SuspenseList:ue,lazy:pu,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ax,createElement:k,createContext:Qe,createRef:j,Fragment:Z,Component:B,useState:ze,useReducer:Ve,useEffect:ut,useLayoutEffect:Ye,useRef:gt,useImperativeHandle:Ct,useMemo:St,useCallback:ge,useContext:Ie,useDebugValue:M,useErrorBoundary:L}),Hi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Gn<"u"?Gn:typeof self<"u"?self:{};function KV(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}function pp(a){if(a.__esModule)return a;var u=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(a).forEach(function(i){var s=Object.getOwnPropertyDescriptor(a,i);Object.defineProperty(u,i,s.get?s:{enumerable:!0,get:function(){return a[i]}})}),u}var mp={exports:{}};function gp(){}gp.prototype={on:function(a,u,i){var s=this.e||(this.e={});return(s[a]||(s[a]=[])).push({fn:u,ctx:i}),this},once:function(a,u,i){var s=this;function c(){s.off(a,c),u.apply(i,arguments)}return c._=u,this.on(a,c,i)},emit:function(a){var u=[].slice.call(arguments,1),i=((this.e||(this.e={}))[a]||[]).slice(),s=0,c=i.length;for(s;s<c;s++)i[s].fn.apply(i[s].ctx,u);return this},off:function(a,u){var i=this.e||(this.e={}),s=i[a],c=[];if(s&&u)for(var p=0,v=s.length;p<v;p++)s[p].fn!==u&&s[p].fn._!==u&&c.push(s[p]);return c.length?i[a]=c:delete i[a],this}},mp.exports=gp,mp.exports.TinyEmitter=gp;var gu=mp.exports,vu={exports:{}},Bx={},sa=pp(fp),Es={exports:{}},JV="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",QV=JV,$V=QV;function jx(){}function Hx(){}Hx.resetWarningCache=jx;var eU=function(){function a(s,c,p,v,y,b){if(b!==$V){var E=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 E.name="Invariant Violation",E}}a.isRequired=a;function u(){return a}var i={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:u,element:a,elementType:a,instanceOf:u,node:a,objectOf:u,oneOf:u,oneOfType:u,shape:u,exact:u,checkPropTypes:Hx,resetWarningCache:jx};return i.PropTypes=i,i};Es.exports=eU();function zx(a){var u,i,s="";if(typeof a=="string"||typeof a=="number")s+=a;else if(typeof a=="object")if(Array.isArray(a))for(u=0;u<a.length;u++)a[u]&&(i=zx(a[u]))&&(s&&(s+=" "),s+=i);else for(u in a)a[u]&&(s&&(s+=" "),s+=u);return s}function Vx(){for(var a,u,i=0,s="";i<arguments.length;)(a=arguments[i++])&&(u=zx(a))&&(s&&(s+=" "),s+=u);return s}var tU=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",clsx:Vx,default:Vx}),nU=pp(tU),Nn={},oi={};Object.defineProperty(oi,"__esModule",{value:!0}),oi.dontSetMe=sU,oi.findInArray=rU,oi.int=aU,oi.isFunction=iU,oi.isNum=oU;function rU(a,u){for(var i=0,s=a.length;i<s;i++)if(u.apply(u,[a[i],i,a]))return a[i]}function iU(a){return typeof a=="function"||Object.prototype.toString.call(a)==="[object Function]"}function oU(a){return typeof a=="number"&&!isNaN(a)}function aU(a){return parseInt(a,10)}function sU(a,u,i){if(a[u])return new Error("Invalid prop ".concat(u," passed to ").concat(i," - do not set this, set it on the child."))}var wo={};Object.defineProperty(wo,"__esModule",{value:!0}),wo.browserPrefixToKey=Wx,wo.browserPrefixToStyle=lU,wo.default=void 0,wo.getPrefix=Ux;var vp=["Moz","Webkit","O","ms"];function Ux(){var a,u,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";var s=(a=window.document)===null||a===void 0||(u=a.documentElement)===null||u===void 0?void 0:u.style;if(!s||i in s)return"";for(var c=0;c<vp.length;c++)if(Wx(i,vp[c])in s)return vp[c];return""}function Wx(a,u){return u?"".concat(u).concat(uU(a)):a}function lU(a,u){return u?"-".concat(u.toLowerCase(),"-").concat(a):a}function uU(a){for(var u="",i=!0,s=0;s<a.length;s++)i?(u+=a[s].toUpperCase(),i=!1):a[s]==="-"?i=!0:u+=a[s];return u}var cU=Ux();wo.default=cU;function yp(a){return yp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},yp(a)}Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.addClassName=Jx,Nn.addEvent=fU,Nn.addUserSelectStyles=TU,Nn.createCSSTransform=bU,Nn.createSVGTransform=EU,Nn.getTouch=xU,Nn.getTouchIdentifier=SU,Nn.getTranslation=wp,Nn.innerHeight=vU,Nn.innerWidth=yU,Nn.matchesSelector=Kx,Nn.matchesSelectorAndParentsTo=dU,Nn.offsetXYFromParent=wU,Nn.outerHeight=mU,Nn.outerWidth=gU,Nn.removeClassName=Qx,Nn.removeEvent=pU,Nn.removeUserSelectStyles=_U;var Tr=oi,Gx=hU(wo);function qx(a){if(typeof WeakMap!="function")return null;var u=new WeakMap,i=new WeakMap;return(qx=function(s){return s?i:u})(a)}function hU(a,u){if(a&&a.__esModule)return a;if(a===null||yp(a)!=="object"&&typeof a!="function")return{default:a};var i=qx(u);if(i&&i.has(a))return i.get(a);var s={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in a)if(p!=="default"&&Object.prototype.hasOwnProperty.call(a,p)){var v=c?Object.getOwnPropertyDescriptor(a,p):null;v&&(v.get||v.set)?Object.defineProperty(s,p,v):s[p]=a[p]}return s.default=a,i&&i.set(a,s),s}function Yx(a,u){var i=Object.keys(a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(a);u&&(s=s.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),i.push.apply(i,s)}return i}function Xx(a){for(var u=1;u<arguments.length;u++){var i=arguments[u]!=null?arguments[u]:{};u%2?Yx(Object(i),!0).forEach(function(s){Zx(a,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(i)):Yx(Object(i)).forEach(function(s){Object.defineProperty(a,s,Object.getOwnPropertyDescriptor(i,s))})}return a}function Zx(a,u,i){return u in a?Object.defineProperty(a,u,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[u]=i,a}var yu="";function Kx(a,u){return yu||(yu=(0,Tr.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(i){return(0,Tr.isFunction)(a[i])})),(0,Tr.isFunction)(a[yu])?a[yu](u):!1}function dU(a,u,i){var s=a;do{if(Kx(s,u))return!0;if(s===i)return!1;s=s.parentNode}while(s);return!1}function fU(a,u,i,s){if(a){var c=Xx({capture:!0},s);a.addEventListener?a.addEventListener(u,i,c):a.attachEvent?a.attachEvent("on"+u,i):a["on"+u]=i}}function pU(a,u,i,s){if(a){var c=Xx({capture:!0},s);a.removeEventListener?a.removeEventListener(u,i,c):a.detachEvent?a.detachEvent("on"+u,i):a["on"+u]=null}}function mU(a){var u=a.clientHeight,i=a.ownerDocument.defaultView.getComputedStyle(a);return u+=(0,Tr.int)(i.borderTopWidth),u+=(0,Tr.int)(i.borderBottomWidth),u}function gU(a){var u=a.clientWidth,i=a.ownerDocument.defaultView.getComputedStyle(a);return u+=(0,Tr.int)(i.borderLeftWidth),u+=(0,Tr.int)(i.borderRightWidth),u}function vU(a){var u=a.clientHeight,i=a.ownerDocument.defaultView.getComputedStyle(a);return u-=(0,Tr.int)(i.paddingTop),u-=(0,Tr.int)(i.paddingBottom),u}function yU(a){var u=a.clientWidth,i=a.ownerDocument.defaultView.getComputedStyle(a);return u-=(0,Tr.int)(i.paddingLeft),u-=(0,Tr.int)(i.paddingRight),u}function wU(a,u,i){var s=u===u.ownerDocument.body,c=s?{left:0,top:0}:u.getBoundingClientRect(),p=(a.clientX+u.scrollLeft-c.left)/i,v=(a.clientY+u.scrollTop-c.top)/i;return{x:p,y:v}}function bU(a,u){var i=wp(a,u,"px");return Zx({},(0,Gx.browserPrefixToKey)("transform",Gx.default),i)}function EU(a,u){var i=wp(a,u,"");return i}function wp(a,u,i){var s=a.x,c=a.y,p="translate(".concat(s).concat(i,",").concat(c).concat(i,")");if(u){var v="".concat(typeof u.x=="string"?u.x:u.x+i),y="".concat(typeof u.y=="string"?u.y:u.y+i);p="translate(".concat(v,", ").concat(y,")")+p}return p}function xU(a,u){return a.targetTouches&&(0,Tr.findInArray)(a.targetTouches,function(i){return u===i.identifier})||a.changedTouches&&(0,Tr.findInArray)(a.changedTouches,function(i){return u===i.identifier})}function SU(a){if(a.targetTouches&&a.targetTouches[0])return a.targetTouches[0].identifier;if(a.changedTouches&&a.changedTouches[0])return a.changedTouches[0].identifier}function TU(a){if(a){var u=a.getElementById("react-draggable-style-el");u||(u=a.createElement("style"),u.type="text/css",u.id="react-draggable-style-el",u.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
304
|
-
`,u.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
305
|
-
`,a.getElementsByTagName("head")[0].appendChild(u)),a.body&&Jx(a.body,"react-draggable-transparent-selection")}}function _U(a){if(a)try{if(a.body&&Qx(a.body,"react-draggable-transparent-selection"),a.selection)a.selection.empty();else{var u=(a.defaultView||window).getSelection();u&&u.type!=="Caret"&&u.removeAllRanges()}}catch{}}function Jx(a,u){a.classList?a.classList.add(u):a.className.match(new RegExp("(?:^|\\s)".concat(u,"(?!\\S)")))||(a.className+=" ".concat(u))}function Qx(a,u){a.classList?a.classList.remove(u):a.className=a.className.replace(new RegExp("(?:^|\\s)".concat(u,"(?!\\S)"),"g"),"")}var ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.canDragX=RU,ai.canDragY=OU,ai.createCoreData=AU,ai.createDraggableData=DU,ai.getBoundPosition=CU,ai.getControlPosition=kU,ai.snapToGrid=PU;var _r=oi,la=Nn;function CU(a,u,i){if(!a.props.bounds)return[u,i];var s=a.props.bounds;s=typeof s=="string"?s:IU(s);var c=bp(a);if(typeof s=="string"){var p=c.ownerDocument,v=p.defaultView,y;if(s==="parent"?y=c.parentNode:y=p.querySelector(s),!(y instanceof v.HTMLElement))throw new Error('Bounds selector "'+s+'" could not find an element.');var b=y,E=v.getComputedStyle(c),S=v.getComputedStyle(b);s={left:-c.offsetLeft+(0,_r.int)(S.paddingLeft)+(0,_r.int)(E.marginLeft),top:-c.offsetTop+(0,_r.int)(S.paddingTop)+(0,_r.int)(E.marginTop),right:(0,la.innerWidth)(b)-(0,la.outerWidth)(c)-c.offsetLeft+(0,_r.int)(S.paddingRight)-(0,_r.int)(E.marginRight),bottom:(0,la.innerHeight)(b)-(0,la.outerHeight)(c)-c.offsetTop+(0,_r.int)(S.paddingBottom)-(0,_r.int)(E.marginBottom)}}return(0,_r.isNum)(s.right)&&(u=Math.min(u,s.right)),(0,_r.isNum)(s.bottom)&&(i=Math.min(i,s.bottom)),(0,_r.isNum)(s.left)&&(u=Math.max(u,s.left)),(0,_r.isNum)(s.top)&&(i=Math.max(i,s.top)),[u,i]}function PU(a,u,i){var s=Math.round(u/a[0])*a[0],c=Math.round(i/a[1])*a[1];return[s,c]}function RU(a){return a.props.axis==="both"||a.props.axis==="x"}function OU(a){return a.props.axis==="both"||a.props.axis==="y"}function kU(a,u,i){var s=typeof u=="number"?(0,la.getTouch)(a,u):null;if(typeof u=="number"&&!s)return null;var c=bp(i),p=i.props.offsetParent||c.offsetParent||c.ownerDocument.body;return(0,la.offsetXYFromParent)(s||a,p,i.props.scale)}function AU(a,u,i){var s=a.state,c=!(0,_r.isNum)(s.lastX),p=bp(a);return c?{node:p,deltaX:0,deltaY:0,lastX:u,lastY:i,x:u,y:i}:{node:p,deltaX:u-s.lastX,deltaY:i-s.lastY,lastX:s.lastX,lastY:s.lastY,x:u,y:i}}function DU(a,u){var i=a.props.scale;return{node:u.node,x:a.state.x+u.deltaX/i,y:a.state.y+u.deltaY/i,deltaX:u.deltaX/i,deltaY:u.deltaY/i,lastX:a.state.x,lastY:a.state.y}}function IU(a){return{left:a.left,top:a.top,right:a.right,bottom:a.bottom}}function bp(a){var u=a.findDOMNode();if(!u)throw new Error("<DraggableCore>: Unmounted during event!");return u}var wu={},bu={};Object.defineProperty(bu,"__esModule",{value:!0}),bu.default=MU;function MU(){}function Eu(a){return Eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},Eu(a)}Object.defineProperty(wu,"__esModule",{value:!0}),wu.default=void 0;var Ep=LU(sa),Cr=Sp(Es.exports),NU=Sp(sa),lr=Nn,zi=ai,xp=oi,xs=Sp(bu);function Sp(a){return a&&a.__esModule?a:{default:a}}function $x(a){if(typeof WeakMap!="function")return null;var u=new WeakMap,i=new WeakMap;return($x=function(s){return s?i:u})(a)}function LU(a,u){if(a&&a.__esModule)return a;if(a===null||Eu(a)!=="object"&&typeof a!="function")return{default:a};var i=$x(u);if(i&&i.has(a))return i.get(a);var s={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in a)if(p!=="default"&&Object.prototype.hasOwnProperty.call(a,p)){var v=c?Object.getOwnPropertyDescriptor(a,p):null;v&&(v.get||v.set)?Object.defineProperty(s,p,v):s[p]=a[p]}return s.default=a,i&&i.set(a,s),s}function eS(a,u){return HU(a)||jU(a,u)||BU(a,u)||FU()}function FU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
306
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BU(a,u){if(a){if(typeof a=="string")return tS(a,u);var i=Object.prototype.toString.call(a).slice(8,-1);if(i==="Object"&&a.constructor&&(i=a.constructor.name),i==="Map"||i==="Set")return Array.from(a);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return tS(a,u)}}function tS(a,u){(u==null||u>a.length)&&(u=a.length);for(var i=0,s=new Array(u);i<u;i++)s[i]=a[i];return s}function jU(a,u){var i=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(i!=null){var s=[],c=!0,p=!1,v,y;try{for(i=i.call(a);!(c=(v=i.next()).done)&&(s.push(v.value),!(u&&s.length===u));c=!0);}catch(b){p=!0,y=b}finally{try{!c&&i.return!=null&&i.return()}finally{if(p)throw y}}return s}}function HU(a){if(Array.isArray(a))return a}function zU(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}function VU(a,u){for(var i=0;i<u.length;i++){var s=u[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(a,s.key,s)}}function UU(a,u,i){return u&&VU(a.prototype,u),Object.defineProperty(a,"prototype",{writable:!1}),a}function WU(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),u&&Tp(a,u)}function Tp(a,u){return Tp=Object.setPrototypeOf||function(i,s){return i.__proto__=s,i},Tp(a,u)}function GU(a){var u=YU();return function(){var i=xu(a),s;if(u){var c=xu(this).constructor;s=Reflect.construct(i,arguments,c)}else s=i.apply(this,arguments);return qU(this,s)}}function qU(a,u){if(u&&(Eu(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ur(a)}function ur(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function YU(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function xu(a){return xu=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},xu(a)}function zr(a,u,i){return u in a?Object.defineProperty(a,u,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[u]=i,a}var Zr={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},Vi=Zr.mouse,Su=function(a){WU(i,a);var u=GU(i);function i(){var s;zU(this,i);for(var c=arguments.length,p=new Array(c),v=0;v<c;v++)p[v]=arguments[v];return s=u.call.apply(u,[this].concat(p)),zr(ur(s),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),zr(ur(s),"mounted",!1),zr(ur(s),"handleDragStart",function(y){if(s.props.onMouseDown(y),!s.props.allowAnyClick&&typeof y.button=="number"&&y.button!==0)return!1;var b=s.findDOMNode();if(!b||!b.ownerDocument||!b.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var E=b.ownerDocument;if(!(s.props.disabled||!(y.target instanceof E.defaultView.Node)||s.props.handle&&!(0,lr.matchesSelectorAndParentsTo)(y.target,s.props.handle,b)||s.props.cancel&&(0,lr.matchesSelectorAndParentsTo)(y.target,s.props.cancel,b))){y.type==="touchstart"&&y.preventDefault();var S=(0,lr.getTouchIdentifier)(y);s.setState({touchIdentifier:S});var O=(0,zi.getControlPosition)(y,S,ur(s));if(O!=null){var A=O.x,H=O.y,W=(0,zi.createCoreData)(ur(s),A,H);(0,xs.default)("DraggableCore: handleDragStart: %j",W),(0,xs.default)("calling",s.props.onStart);var re=s.props.onStart(y,W);re===!1||s.mounted===!1||(s.props.enableUserSelectHack&&(0,lr.addUserSelectStyles)(E),s.setState({dragging:!0,lastX:A,lastY:H}),(0,lr.addEvent)(E,Vi.move,s.handleDrag),(0,lr.addEvent)(E,Vi.stop,s.handleDragStop))}}}),zr(ur(s),"handleDrag",function(y){var b=(0,zi.getControlPosition)(y,s.state.touchIdentifier,ur(s));if(b!=null){var E=b.x,S=b.y;if(Array.isArray(s.props.grid)){var O=E-s.state.lastX,A=S-s.state.lastY,H=(0,zi.snapToGrid)(s.props.grid,O,A),W=eS(H,2);if(O=W[0],A=W[1],!O&&!A)return;E=s.state.lastX+O,S=s.state.lastY+A}var re=(0,zi.createCoreData)(ur(s),E,S);(0,xs.default)("DraggableCore: handleDrag: %j",re);var $=s.props.onDrag(y,re);if($===!1||s.mounted===!1){try{s.handleDragStop(new MouseEvent("mouseup"))}catch{var se=document.createEvent("MouseEvents");se.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),s.handleDragStop(se)}return}s.setState({lastX:E,lastY:S})}}),zr(ur(s),"handleDragStop",function(y){if(s.state.dragging){var b=(0,zi.getControlPosition)(y,s.state.touchIdentifier,ur(s));if(b!=null){var E=b.x,S=b.y;if(Array.isArray(s.props.grid)){var O=E-s.state.lastX||0,A=S-s.state.lastY||0,H=(0,zi.snapToGrid)(s.props.grid,O,A),W=eS(H,2);O=W[0],A=W[1],E=s.state.lastX+O,S=s.state.lastY+A}var re=(0,zi.createCoreData)(ur(s),E,S),$=s.props.onStop(y,re);if($===!1||s.mounted===!1)return!1;var se=s.findDOMNode();se&&s.props.enableUserSelectHack&&(0,lr.removeUserSelectStyles)(se.ownerDocument),(0,xs.default)("DraggableCore: handleDragStop: %j",re),s.setState({dragging:!1,lastX:NaN,lastY:NaN}),se&&((0,xs.default)("DraggableCore: Removing handlers"),(0,lr.removeEvent)(se.ownerDocument,Vi.move,s.handleDrag),(0,lr.removeEvent)(se.ownerDocument,Vi.stop,s.handleDragStop))}}}),zr(ur(s),"onMouseDown",function(y){return Vi=Zr.mouse,s.handleDragStart(y)}),zr(ur(s),"onMouseUp",function(y){return Vi=Zr.mouse,s.handleDragStop(y)}),zr(ur(s),"onTouchStart",function(y){return Vi=Zr.touch,s.handleDragStart(y)}),zr(ur(s),"onTouchEnd",function(y){return Vi=Zr.touch,s.handleDragStop(y)}),s}return UU(i,[{key:"componentDidMount",value:function(){this.mounted=!0;var s=this.findDOMNode();s&&(0,lr.addEvent)(s,Zr.touch.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var s=this.findDOMNode();if(s){var c=s.ownerDocument;(0,lr.removeEvent)(c,Zr.mouse.move,this.handleDrag),(0,lr.removeEvent)(c,Zr.touch.move,this.handleDrag),(0,lr.removeEvent)(c,Zr.mouse.stop,this.handleDragStop),(0,lr.removeEvent)(c,Zr.touch.stop,this.handleDragStop),(0,lr.removeEvent)(s,Zr.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,lr.removeUserSelectStyles)(c)}}},{key:"findDOMNode",value:function(){var s,c,p;return(s=this.props)!==null&&s!==void 0&&s.nodeRef?(c=this.props)===null||c===void 0||(p=c.nodeRef)===null||p===void 0?void 0:p.current:NU.default.findDOMNode(this)}},{key:"render",value:function(){return Ep.cloneElement(Ep.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),i}(Ep.Component);wu.default=Su,zr(Su,"displayName","DraggableCore"),zr(Su,"propTypes",{allowAnyClick:Cr.default.bool,disabled:Cr.default.bool,enableUserSelectHack:Cr.default.bool,offsetParent:function(a,u){if(a[u]&&a[u].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Cr.default.arrayOf(Cr.default.number),handle:Cr.default.string,cancel:Cr.default.string,nodeRef:Cr.default.object,onStart:Cr.default.func,onDrag:Cr.default.func,onStop:Cr.default.func,onMouseDown:Cr.default.func,scale:Cr.default.number,className:xp.dontSetMe,style:xp.dontSetMe,transform:xp.dontSetMe}),zr(Su,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(a){function u(Ge){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(at){return typeof at}:function(at){return at&&typeof Symbol=="function"&&at.constructor===Symbol&&at!==Symbol.prototype?"symbol":typeof at},u(Ge)}Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"DraggableCore",{enumerable:!0,get:function(){return E.default}}),a.default=void 0;var i=W(sa),s=A(Es.exports),c=A(sa),p=A(nU),v=Nn,y=ai,b=oi,E=A(wu),S=A(bu),O=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];function A(Ge){return Ge&&Ge.__esModule?Ge:{default:Ge}}function H(Ge){if(typeof WeakMap!="function")return null;var at=new WeakMap,lt=new WeakMap;return(H=function(st){return st?lt:at})(Ge)}function W(Ge,at){if(Ge&&Ge.__esModule)return Ge;if(Ge===null||u(Ge)!=="object"&&typeof Ge!="function")return{default:Ge};var lt=H(at);if(lt&<.has(Ge))return lt.get(Ge);var st={},ct=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _t in Ge)if(_t!=="default"&&Object.prototype.hasOwnProperty.call(Ge,_t)){var gn=ct?Object.getOwnPropertyDescriptor(Ge,_t):null;gn&&(gn.get||gn.set)?Object.defineProperty(st,_t,gn):st[_t]=Ge[_t]}return st.default=Ge,lt&<.set(Ge,st),st}function re(){return re=Object.assign||function(Ge){for(var at=1;at<arguments.length;at++){var lt=arguments[at];for(var st in lt)Object.prototype.hasOwnProperty.call(lt,st)&&(Ge[st]=lt[st])}return Ge},re.apply(this,arguments)}function $(Ge,at){if(Ge==null)return{};var lt=se(Ge,at),st,ct;if(Object.getOwnPropertySymbols){var _t=Object.getOwnPropertySymbols(Ge);for(ct=0;ct<_t.length;ct++)st=_t[ct],!(at.indexOf(st)>=0)&&(!Object.prototype.propertyIsEnumerable.call(Ge,st)||(lt[st]=Ge[st]))}return lt}function se(Ge,at){if(Ge==null)return{};var lt={},st=Object.keys(Ge),ct,_t;for(_t=0;_t<st.length;_t++)ct=st[_t],!(at.indexOf(ct)>=0)&&(lt[ct]=Ge[ct]);return lt}function I(Ge,at){var lt=Object.keys(Ge);if(Object.getOwnPropertySymbols){var st=Object.getOwnPropertySymbols(Ge);at&&(st=st.filter(function(ct){return Object.getOwnPropertyDescriptor(Ge,ct).enumerable})),lt.push.apply(lt,st)}return lt}function ne(Ge){for(var at=1;at<arguments.length;at++){var lt=arguments[at]!=null?arguments[at]:{};at%2?I(Object(lt),!0).forEach(function(st){ft(Ge,st,lt[st])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ge,Object.getOwnPropertyDescriptors(lt)):I(Object(lt)).forEach(function(st){Object.defineProperty(Ge,st,Object.getOwnPropertyDescriptor(lt,st))})}return Ge}function he(Ge,at){return tt(Ge)||Xe(Ge,at)||Se(Ge,at)||ce()}function ce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
307
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Se(Ge,at){if(Ge){if(typeof Ge=="string")return Pe(Ge,at);var lt=Object.prototype.toString.call(Ge).slice(8,-1);if(lt==="Object"&&Ge.constructor&&(lt=Ge.constructor.name),lt==="Map"||lt==="Set")return Array.from(Ge);if(lt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(lt))return Pe(Ge,at)}}function Pe(Ge,at){(at==null||at>Ge.length)&&(at=Ge.length);for(var lt=0,st=new Array(at);lt<at;lt++)st[lt]=Ge[lt];return st}function Xe(Ge,at){var lt=Ge==null?null:typeof Symbol<"u"&&Ge[Symbol.iterator]||Ge["@@iterator"];if(lt!=null){var st=[],ct=!0,_t=!1,gn,In;try{for(lt=lt.call(Ge);!(ct=(gn=lt.next()).done)&&(st.push(gn.value),!(at&&st.length===at));ct=!0);}catch(Jt){_t=!0,In=Jt}finally{try{!ct&<.return!=null&<.return()}finally{if(_t)throw In}}return st}}function tt(Ge){if(Array.isArray(Ge))return Ge}function ht(Ge,at){if(!(Ge instanceof at))throw new TypeError("Cannot call a class as a function")}function yt(Ge,at){for(var lt=0;lt<at.length;lt++){var st=at[lt];st.enumerable=st.enumerable||!1,st.configurable=!0,"value"in st&&(st.writable=!0),Object.defineProperty(Ge,st.key,st)}}function dt(Ge,at,lt){return at&&yt(Ge.prototype,at),lt&&yt(Ge,lt),Object.defineProperty(Ge,"prototype",{writable:!1}),Ge}function Tt(Ge,at){if(typeof at!="function"&&at!==null)throw new TypeError("Super expression must either be null or a function");Ge.prototype=Object.create(at&&at.prototype,{constructor:{value:Ge,writable:!0,configurable:!0}}),Object.defineProperty(Ge,"prototype",{writable:!1}),at&&xt(Ge,at)}function xt(Ge,at){return xt=Object.setPrototypeOf||function(lt,st){return lt.__proto__=st,lt},xt(Ge,at)}function Nt(Ge){var at=Qt();return function(){var lt=wn(Ge),st;if(at){var ct=wn(this).constructor;st=Reflect.construct(lt,arguments,ct)}else st=lt.apply(this,arguments);return Mt(this,st)}}function Mt(Ge,at){if(at&&(u(at)==="object"||typeof at=="function"))return at;if(at!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ht(Ge)}function Ht(Ge){if(Ge===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ge}function Qt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wn(Ge){return wn=Object.setPrototypeOf?Object.getPrototypeOf:function(at){return at.__proto__||Object.getPrototypeOf(at)},wn(Ge)}function ft(Ge,at,lt){return at in Ge?Object.defineProperty(Ge,at,{value:lt,enumerable:!0,configurable:!0,writable:!0}):Ge[at]=lt,Ge}var Gt=function(Ge){Tt(lt,Ge);var at=Nt(lt);function lt(st){var ct;return ht(this,lt),ct=at.call(this,st),ft(Ht(ct),"onDragStart",function(_t,gn){(0,S.default)("Draggable: onDragStart: %j",gn);var In=ct.props.onStart(_t,(0,y.createDraggableData)(Ht(ct),gn));if(In===!1)return!1;ct.setState({dragging:!0,dragged:!0})}),ft(Ht(ct),"onDrag",function(_t,gn){if(!ct.state.dragging)return!1;(0,S.default)("Draggable: onDrag: %j",gn);var In=(0,y.createDraggableData)(Ht(ct),gn),Jt={x:In.x,y:In.y};if(ct.props.bounds){var Vr=Jt.x,yr=Jt.y;Jt.x+=ct.state.slackX,Jt.y+=ct.state.slackY;var kr=(0,y.getBoundPosition)(Ht(ct),Jt.x,Jt.y),N=he(kr,2),oe=N[0],De=N[1];Jt.x=oe,Jt.y=De,Jt.slackX=ct.state.slackX+(Vr-Jt.x),Jt.slackY=ct.state.slackY+(yr-Jt.y),In.x=Jt.x,In.y=Jt.y,In.deltaX=Jt.x-ct.state.x,In.deltaY=Jt.y-ct.state.y}var $e=ct.props.onDrag(_t,In);if($e===!1)return!1;ct.setState(Jt)}),ft(Ht(ct),"onDragStop",function(_t,gn){if(!ct.state.dragging)return!1;var In=ct.props.onStop(_t,(0,y.createDraggableData)(Ht(ct),gn));if(In===!1)return!1;(0,S.default)("Draggable: onDragStop: %j",gn);var Jt={dragging:!1,slackX:0,slackY:0},Vr=!!ct.props.position;if(Vr){var yr=ct.props.position,kr=yr.x,N=yr.y;Jt.x=kr,Jt.y=N}ct.setState(Jt)}),ct.state={dragging:!1,dragged:!1,x:st.position?st.position.x:st.defaultPosition.x,y:st.position?st.position.y:st.defaultPosition.y,prevPropsPosition:ne({},st.position),slackX:0,slackY:0,isElementSVG:!1},st.position&&!(st.onDrag||st.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."),ct}return dt(lt,[{key:"componentDidMount",value:function(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var st,ct,_t;return(st=(ct=this.props)===null||ct===void 0||(_t=ct.nodeRef)===null||_t===void 0?void 0:_t.current)!==null&&st!==void 0?st:c.default.findDOMNode(this)}},{key:"render",value:function(){var st,ct=this.props;ct.axis,ct.bounds;var _t=ct.children,gn=ct.defaultPosition,In=ct.defaultClassName,Jt=ct.defaultClassNameDragging,Vr=ct.defaultClassNameDragged,yr=ct.position,kr=ct.positionOffset;ct.scale;var N=$(ct,O),oe={},De=null,$e=!!yr,qe=!$e||this.state.dragging,Et=yr||gn,pt={x:(0,y.canDragX)(this)&&qe?this.state.x:Et.x,y:(0,y.canDragY)(this)&&qe?this.state.y:Et.y};this.state.isElementSVG?De=(0,v.createSVGTransform)(pt,kr):oe=(0,v.createCSSTransform)(pt,kr);var $t=(0,p.default)(_t.props.className||"",In,(st={},ft(st,Jt,this.state.dragging),ft(st,Vr,this.state.dragged),st));return i.createElement(E.default,re({},N,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),i.cloneElement(i.Children.only(_t),{className:$t,style:ne(ne({},_t.props.style),oe),transform:De}))}}],[{key:"getDerivedStateFromProps",value:function(st,ct){var _t=st.position,gn=ct.prevPropsPosition;return _t&&(!gn||_t.x!==gn.x||_t.y!==gn.y)?((0,S.default)("Draggable: getDerivedStateFromProps %j",{position:_t,prevPropsPosition:gn}),{x:_t.x,y:_t.y,prevPropsPosition:ne({},_t)}):null}}]),lt}(i.Component);a.default=Gt,ft(Gt,"displayName","Draggable"),ft(Gt,"propTypes",ne(ne({},E.default.propTypes),{},{axis:s.default.oneOf(["both","x","y","none"]),bounds:s.default.oneOfType([s.default.shape({left:s.default.number,right:s.default.number,top:s.default.number,bottom:s.default.number}),s.default.string,s.default.oneOf([!1])]),defaultClassName:s.default.string,defaultClassNameDragging:s.default.string,defaultClassNameDragged:s.default.string,defaultPosition:s.default.shape({x:s.default.number,y:s.default.number}),positionOffset:s.default.shape({x:s.default.oneOfType([s.default.number,s.default.string]),y:s.default.oneOfType([s.default.number,s.default.string])}),position:s.default.shape({x:s.default.number,y:s.default.number}),className:b.dontSetMe,style:b.dontSetMe,transform:b.dontSetMe})),ft(Gt,"defaultProps",ne(ne({},E.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))}(Bx);var nS=Bx,rS=nS.default,XU=nS.DraggableCore;vu.exports=rS,vu.exports.default=rS,vu.exports.DraggableCore=XU;var ZU=vu.exports,KU=["second","minute","hour","day","week","month","year"];function JU(a,u){if(u===0)return["just now","right now"];var i=KU[Math.floor(u/2)];return a>1&&(i+="s"),[a+" "+i+" ago","in "+a+" "+i]}var QU=["秒","分钟","小时","天","周","个月","年"];function $U(a,u){if(u===0)return["刚刚","片刻后"];var i=QU[~~(u/2)];return[a+" "+i+"前",a+" "+i+"后"]}var _p={},Ln=function(a,u){_p[a]=u},iS=function(a){return _p[a]||_p.en_US},bo=[60,60,24,7,365/7/12,12];function oS(a){return a instanceof Date?a:!isNaN(a)||/^\d+$/.test(a)?new Date(parseInt(a)):(a=(a||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(a))}function aS(a,u){var i=a<0?1:0;a=Math.abs(a);for(var s=a,c=0;a>=bo[c]&&c<bo.length;c++)a/=bo[c];return a=Math.floor(a),c*=2,a>(c===0?9:1)&&(c+=1),u(a,c,s)[i].replace("%s",a.toString())}function sS(a,u){var i=u?oS(u):new Date;return(+i-+oS(a))/1e3}function e9(a){for(var u=1,i=0,s=Math.abs(a);a>=bo[i]&&i<bo.length;i++)a/=bo[i],u*=bo[i];return s=s%u,s=s?u-s:u,Math.ceil(s)}var t9=function(a,u,i){var s=sS(a,i&&i.relativeDate);return aS(s,iS(u))},lS="timeago-id";function n9(a){return a.getAttribute("datetime")}function r9(a,u){a.setAttribute(lS,u)}function uS(a){return parseInt(a.getAttribute(lS))}var Cp={},Pp=function(a){clearTimeout(a),delete Cp[a]};function cS(a,u,i,s){Pp(uS(a));var c=s.relativeDate,p=s.minInterval,v=sS(u,c);a.innerText=aS(v,i);var y=setTimeout(function(){cS(a,u,i,s)},Math.min(Math.max(e9(v),p||1)*1e3,2147483647));Cp[y]=0,r9(a,y)}function hS(a){a?Pp(uS(a)):Object.keys(Cp).forEach(Pp)}function i9(a,u,i){var s=a.length?a:[a];return s.forEach(function(c){cS(c,n9(c),iS(u),i||{})}),s}Ln("en_US",JU),Ln("zh_CN",$U);var o9=globalThis&&globalThis.__extends||function(){var a=function(u,i){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,c){s.__proto__=c}||function(s,c){for(var p in c)c.hasOwnProperty(p)&&(s[p]=c[p])},a(u,i)};return function(u,i){a(u,i);function s(){this.constructor=u}u.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)}}(),Rp=globalThis&&globalThis.__assign||function(){return Rp=Object.assign||function(a){for(var u,i=1,s=arguments.length;i<s;i++){u=arguments[i];for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(a[c]=u[c])}return a},Rp.apply(this,arguments)},a9=globalThis&&globalThis.__rest||function(a,u){var i={};for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&u.indexOf(s)<0&&(i[s]=a[s]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,s=Object.getOwnPropertySymbols(a);c<s.length;c++)u.indexOf(s[c])<0&&Object.prototype.propertyIsEnumerable.call(a,s[c])&&(i[s[c]]=a[s[c]]);return i},s9=function(a){return""+(a instanceof Date?a.getTime():a)},l9=function(a){o9(u,a);function u(){var i=a!==null&&a.apply(this,arguments)||this;return i.dom=null,i}return u.prototype.componentDidMount=function(){this.renderTimeAgo()},u.prototype.componentDidUpdate=function(){this.renderTimeAgo()},u.prototype.renderTimeAgo=function(){var i=this.props,s=i.live,c=i.datetime,p=i.locale,v=i.opts;hS(this.dom),s!==!1&&(this.dom.setAttribute("datetime",s9(c)),i9(this.dom,p,v))},u.prototype.componentWillUnmount=function(){hS(this.dom)},u.prototype.render=function(){var i=this,s=this.props,c=s.datetime;s.live;var p=s.locale,v=s.opts,y=a9(s,["datetime","live","locale","opts"]);return k("time",Rp({ref:function(b){i.dom=b}},y),t9(c,p,v))},u.defaultProps={live:!0,className:""},u}(Vt);function u9(a,u){const i=s=>{a.current&&!a.current.contains(event.target)&&u()};ut(()=>(document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)))}var dS=Object.prototype.toString,fS=function(a){var u=dS.call(a),i=u==="[object Arguments]";return i||(i=u!=="[object Array]"&&a!==null&&typeof a=="object"&&typeof a.length=="number"&&a.length>=0&&dS.call(a.callee)==="[object Function]"),i},pS;if(!Object.keys){var Tu=Object.prototype.hasOwnProperty,mS=Object.prototype.toString,c9=fS,gS=Object.prototype.propertyIsEnumerable,h9=!gS.call({toString:null},"toString"),d9=gS.call(function(){},"prototype"),_u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Op=function(a){var u=a.constructor;return u&&u.prototype===a},f9={$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},p9=function(){if(typeof window>"u")return!1;for(var a in window)try{if(!f9["$"+a]&&Tu.call(window,a)&&window[a]!==null&&typeof window[a]=="object")try{Op(window[a])}catch{return!0}}catch{return!0}return!1}(),m9=function(a){if(typeof window>"u"||!p9)return Op(a);try{return Op(a)}catch{return!1}};pS=function(a){var u=a!==null&&typeof a=="object",i=mS.call(a)==="[object Function]",s=c9(a),c=u&&mS.call(a)==="[object String]",p=[];if(!u&&!i&&!s)throw new TypeError("Object.keys called on a non-object");var v=d9&&i;if(c&&a.length>0&&!Tu.call(a,0))for(var y=0;y<a.length;++y)p.push(String(y));if(s&&a.length>0)for(var b=0;b<a.length;++b)p.push(String(b));else for(var E in a)!(v&&E==="prototype")&&Tu.call(a,E)&&p.push(String(E));if(h9)for(var S=m9(a),O=0;O<_u.length;++O)!(S&&_u[O]==="constructor")&&Tu.call(a,_u[O])&&p.push(_u[O]);return p}}var g9=pS,v9=Array.prototype.slice,y9=fS,vS=Object.keys,Cu=vS?function(a){return vS(a)}:g9,yS=Object.keys;Cu.shim=function(){if(Object.keys){var a=function(){var u=Object.keys(arguments);return u&&u.length===arguments.length}(1,2);a||(Object.keys=function(u){return y9(u)?yS(v9.call(u)):yS(u)})}else Object.keys=Cu;return Object.keys||Cu};var w9=Cu,wS=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var a={},u=Symbol("test"),i=Object(u);if(typeof u=="string"||Object.prototype.toString.call(u)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var s=42;a[u]=s;for(u in a)return!1;if(typeof Object.keys=="function"&&Object.keys(a).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(a).length!==0)return!1;var c=Object.getOwnPropertySymbols(a);if(c.length!==1||c[0]!==u||!Object.prototype.propertyIsEnumerable.call(a,u))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var p=Object.getOwnPropertyDescriptor(a,u);if(p.value!==s||p.enumerable!==!0)return!1}return!0},bS=typeof Symbol<"u"&&Symbol,b9=wS,ES=function(){return typeof bS!="function"||typeof Symbol!="function"||typeof bS("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:b9()},xS={foo:{}},E9=Object,x9=function(){return{__proto__:xS}.foo===xS.foo&&!({__proto__:null}instanceof E9)},S9="Function.prototype.bind called on incompatible ",kp=Array.prototype.slice,T9=Object.prototype.toString,_9="[object Function]",C9=function(a){var u=this;if(typeof u!="function"||T9.call(u)!==_9)throw new TypeError(S9+u);for(var i=kp.call(arguments,1),s,c=function(){if(this instanceof s){var E=u.apply(this,i.concat(kp.call(arguments)));return Object(E)===E?E:this}else return u.apply(a,i.concat(kp.call(arguments)))},p=Math.max(0,u.length-i.length),v=[],y=0;y<p;y++)v.push("$"+y);if(s=Function("binder","return function ("+v.join(",")+"){ return binder.apply(this,arguments); }")(c),u.prototype){var b=function(){};b.prototype=u.prototype,s.prototype=new b,b.prototype=null}return s},P9=C9,Ap=Function.prototype.bind||P9,R9=Ap,SS=R9.call(Function.call,Object.prototype.hasOwnProperty),Yt,ua=SyntaxError,TS=Function,ca=TypeError,Dp=function(a){try{return TS('"use strict"; return ('+a+").constructor;")()}catch{}},Eo=Object.getOwnPropertyDescriptor;if(Eo)try{Eo({},"")}catch{Eo=null}var Ip=function(){throw new ca},O9=Eo?function(){try{return arguments.callee,Ip}catch{try{return Eo(arguments,"callee").get}catch{return Ip}}}():Ip,ha=ES(),k9=x9(),Xn=Object.getPrototypeOf||(k9?function(a){return a.__proto__}:null),da={},A9=typeof Uint8Array>"u"||!Xn?Yt:Xn(Uint8Array),xo={"%AggregateError%":typeof AggregateError>"u"?Yt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Yt:ArrayBuffer,"%ArrayIteratorPrototype%":ha&&Xn?Xn([][Symbol.iterator]()):Yt,"%AsyncFromSyncIteratorPrototype%":Yt,"%AsyncFunction%":da,"%AsyncGenerator%":da,"%AsyncGeneratorFunction%":da,"%AsyncIteratorPrototype%":da,"%Atomics%":typeof Atomics>"u"?Yt:Atomics,"%BigInt%":typeof BigInt>"u"?Yt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Yt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Yt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Yt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Yt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Yt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Yt:FinalizationRegistry,"%Function%":TS,"%GeneratorFunction%":da,"%Int8Array%":typeof Int8Array>"u"?Yt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Yt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Yt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ha&&Xn?Xn(Xn([][Symbol.iterator]())):Yt,"%JSON%":typeof JSON=="object"?JSON:Yt,"%Map%":typeof Map>"u"?Yt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ha||!Xn?Yt:Xn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Yt:Promise,"%Proxy%":typeof Proxy>"u"?Yt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Yt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Yt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ha||!Xn?Yt:Xn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Yt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ha&&Xn?Xn(""[Symbol.iterator]()):Yt,"%Symbol%":ha?Symbol:Yt,"%SyntaxError%":ua,"%ThrowTypeError%":O9,"%TypedArray%":A9,"%TypeError%":ca,"%Uint8Array%":typeof Uint8Array>"u"?Yt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Yt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Yt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Yt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Yt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Yt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Yt:WeakSet};if(Xn)try{null.error}catch(a){var D9=Xn(Xn(a));xo["%Error.prototype%"]=D9}var I9=function a(u){var i;if(u==="%AsyncFunction%")i=Dp("async function () {}");else if(u==="%GeneratorFunction%")i=Dp("function* () {}");else if(u==="%AsyncGeneratorFunction%")i=Dp("async function* () {}");else if(u==="%AsyncGenerator%"){var s=a("%AsyncGeneratorFunction%");s&&(i=s.prototype)}else if(u==="%AsyncIteratorPrototype%"){var c=a("%AsyncGenerator%");c&&Xn&&(i=Xn(c.prototype))}return xo[u]=i,i},_S={"%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"]},Ss=Ap,Pu=SS,M9=Ss.call(Function.call,Array.prototype.concat),N9=Ss.call(Function.apply,Array.prototype.splice),CS=Ss.call(Function.call,String.prototype.replace),Ru=Ss.call(Function.call,String.prototype.slice),L9=Ss.call(Function.call,RegExp.prototype.exec),F9=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,B9=/\\(\\)?/g,j9=function(a){var u=Ru(a,0,1),i=Ru(a,-1);if(u==="%"&&i!=="%")throw new ua("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&u!=="%")throw new ua("invalid intrinsic syntax, expected opening `%`");var s=[];return CS(a,F9,function(c,p,v,y){s[s.length]=v?CS(y,B9,"$1"):p||c}),s},H9=function(a,u){var i=a,s;if(Pu(_S,i)&&(s=_S[i],i="%"+s[0]+"%"),Pu(xo,i)){var c=xo[i];if(c===da&&(c=I9(i)),typeof c>"u"&&!u)throw new ca("intrinsic "+a+" exists, but is not available. Please file an issue!");return{alias:s,name:i,value:c}}throw new ua("intrinsic "+a+" does not exist!")},tr=function(a,u){if(typeof a!="string"||a.length===0)throw new ca("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof u!="boolean")throw new ca('"allowMissing" argument must be a boolean');if(L9(/^%?[^%]*%?$/,a)===null)throw new ua("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=j9(a),s=i.length>0?i[0]:"",c=H9("%"+s+"%",u),p=c.name,v=c.value,y=!1,b=c.alias;b&&(s=b[0],N9(i,M9([0,1],b)));for(var E=1,S=!0;E<i.length;E+=1){var O=i[E],A=Ru(O,0,1),H=Ru(O,-1);if((A==='"'||A==="'"||A==="`"||H==='"'||H==="'"||H==="`")&&A!==H)throw new ua("property names with quotes must have matching quotes");if((O==="constructor"||!S)&&(y=!0),s+="."+O,p="%"+s+"%",Pu(xo,p))v=xo[p];else if(v!=null){if(!(O in v)){if(!u)throw new ca("base intrinsic for "+a+" exists, but the property is not available.");return}if(Eo&&E+1>=i.length){var W=Eo(v,O);S=!!W,S&&"get"in W&&!("originalValue"in W.get)?v=W.get:v=v[O]}else S=Pu(v,O),v=v[O];S&&!y&&(xo[p]=v)}}return v},z9=tr,Mp=z9("%Object.defineProperty%",!0),Np=function(){if(Mp)try{return Mp({},"a",{value:1}),!0}catch{return!1}return!1};Np.hasArrayLengthDefineBug=function(){if(!Np())return null;try{return Mp([],"length",{value:1}).length!==1}catch{return!0}};var V9=Np,U9=w9,W9=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",G9=Object.prototype.toString,q9=Array.prototype.concat,PS=Object.defineProperty,Y9=function(a){return typeof a=="function"&&G9.call(a)==="[object Function]"},X9=V9(),RS=PS&&X9,Z9=function(a,u,i,s){if(u in a){if(s===!0){if(a[u]===i)return}else if(!Y9(s)||!s())return}RS?PS(a,u,{configurable:!0,enumerable:!1,value:i,writable:!0}):a[u]=i},OS=function(a,u){var i=arguments.length>2?arguments[2]:{},s=U9(u);W9&&(s=q9.call(s,Object.getOwnPropertySymbols(u)));for(var c=0;c<s.length;c+=1)Z9(a,s[c],u[s[c]],i[s[c]])};OS.supportsDescriptors=!!RS;var fa=OS,Ts={exports:{}};(function(a){var u=Ap,i=tr,s=i("%Function.prototype.apply%"),c=i("%Function.prototype.call%"),p=i("%Reflect.apply%",!0)||u.call(c,s),v=i("%Object.getOwnPropertyDescriptor%",!0),y=i("%Object.defineProperty%",!0),b=i("%Math.max%");if(y)try{y({},"a",{value:1})}catch{y=null}a.exports=function(S){var O=p(u,c,arguments);if(v&&y){var A=v(O,"length");A.configurable&&y(O,"length",{value:1+b(0,S.length-(arguments.length-1))})}return O};var E=function(){return p(u,s,arguments)};y?y(a.exports,"apply",{value:E}):a.exports.apply=E})(Ts);var kS=tr,AS=Ts.exports,K9=AS(kS("String.prototype.indexOf")),bi=function(a,u){var i=kS(a,!!u);return typeof i=="function"&&K9(a,".prototype.")>-1?AS(i):i},J9=tr,Q9=J9("%TypeError%"),$9=function(a,u){if(a==null)throw new Q9(u||"Cannot call method on "+a);return a},_s=$9,eW=tr,DS=eW("%Array%"),tW=!DS.isArray&&bi("Object.prototype.toString"),nW=DS.isArray||function(a){return tW(a)==="[object Array]"},rW=nW,IS=tr,iW=bi,oW=IS("%TypeError%"),aW=rW,sW=IS("%Reflect.apply%",!0)||iW("Function.prototype.apply"),lW=function(a,u){var i=arguments.length>2?arguments[2]:[];if(!aW(i))throw new oW("Assertion failed: optional `argumentsList`, if provided, must be a List");return sW(a,u,i)},uW={},cW=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:uW}),hW=pp(cW),Lp=typeof Map=="function"&&Map.prototype,Fp=Object.getOwnPropertyDescriptor&&Lp?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ou=Lp&&Fp&&typeof Fp.get=="function"?Fp.get:null,MS=Lp&&Map.prototype.forEach,Bp=typeof Set=="function"&&Set.prototype,jp=Object.getOwnPropertyDescriptor&&Bp?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ku=Bp&&jp&&typeof jp.get=="function"?jp.get:null,NS=Bp&&Set.prototype.forEach,dW=typeof WeakMap=="function"&&WeakMap.prototype,Cs=dW?WeakMap.prototype.has:null,fW=typeof WeakSet=="function"&&WeakSet.prototype,Ps=fW?WeakSet.prototype.has:null,pW=typeof WeakRef=="function"&&WeakRef.prototype,LS=pW?WeakRef.prototype.deref:null,mW=Boolean.prototype.valueOf,gW=Object.prototype.toString,vW=Function.prototype.toString,yW=String.prototype.match,Hp=String.prototype.slice,Ui=String.prototype.replace,wW=String.prototype.toUpperCase,FS=String.prototype.toLowerCase,BS=RegExp.prototype.test,jS=Array.prototype.concat,si=Array.prototype.join,bW=Array.prototype.slice,HS=Math.floor,zp=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Vp=Object.getOwnPropertySymbols,Up=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,pa=typeof Symbol=="function"&&typeof Symbol.iterator=="object",cr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===pa||!0)?Symbol.toStringTag:null,zS=Object.prototype.propertyIsEnumerable,VS=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(a){return a.__proto__}:null);function US(a,u){if(a===1/0||a===-1/0||a!==a||a&&a>-1e3&&a<1e3||BS.call(/e/,u))return u;var i=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof a=="number"){var s=a<0?-HS(-a):HS(a);if(s!==a){var c=String(s),p=Hp.call(u,c.length+1);return Ui.call(c,i,"$&_")+"."+Ui.call(Ui.call(p,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ui.call(u,i,"$&_")}var Wp=hW,WS=Wp.custom,GS=XS(WS)?WS:null,EW=function a(u,i,s,c){var p=i||{};if(Wi(p,"quoteStyle")&&p.quoteStyle!=="single"&&p.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Wi(p,"maxStringLength")&&(typeof p.maxStringLength=="number"?p.maxStringLength<0&&p.maxStringLength!==1/0:p.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var v=Wi(p,"customInspect")?p.customInspect:!0;if(typeof v!="boolean"&&v!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Wi(p,"indent")&&p.indent!==null&&p.indent!==" "&&!(parseInt(p.indent,10)===p.indent&&p.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Wi(p,"numericSeparator")&&typeof p.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var y=p.numericSeparator;if(typeof u>"u")return"undefined";if(u===null)return"null";if(typeof u=="boolean")return u?"true":"false";if(typeof u=="string")return KS(u,p);if(typeof u=="number"){if(u===0)return 1/0/u>0?"0":"-0";var b=String(u);return y?US(u,b):b}if(typeof u=="bigint"){var E=String(u)+"n";return y?US(u,E):E}var S=typeof p.depth>"u"?5:p.depth;if(typeof s>"u"&&(s=0),s>=S&&S>0&&typeof u=="object")return Gp(u)?"[Array]":"[Object]";var O=jW(p,s);if(typeof c>"u")c=[];else if(ZS(c,u)>=0)return"[Circular]";function A(Tt,xt,Nt){if(xt&&(c=bW.call(c),c.push(xt)),Nt){var Mt={depth:p.depth};return Wi(p,"quoteStyle")&&(Mt.quoteStyle=p.quoteStyle),a(Tt,Mt,s+1,c)}return a(Tt,p,s+1,c)}if(typeof u=="function"&&!YS(u)){var H=kW(u),W=Au(u,A);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(W.length>0?" { "+si.call(W,", ")+" }":"")}if(XS(u)){var re=pa?Ui.call(String(u),/^(Symbol\(.*\))_[^)]*$/,"$1"):Up.call(u);return typeof u=="object"&&!pa?Rs(re):re}if(LW(u)){for(var $="<"+FS.call(String(u.nodeName)),se=u.attributes||[],I=0;I<se.length;I++)$+=" "+se[I].name+"="+qS(xW(se[I].value),"double",p);return $+=">",u.childNodes&&u.childNodes.length&&($+="..."),$+="</"+FS.call(String(u.nodeName))+">",$}if(Gp(u)){if(u.length===0)return"[]";var ne=Au(u,A);return O&&!BW(ne)?"["+Yp(ne,O)+"]":"[ "+si.call(ne,", ")+" ]"}if(TW(u)){var he=Au(u,A);return!("cause"in Error.prototype)&&"cause"in u&&!zS.call(u,"cause")?"{ ["+String(u)+"] "+si.call(jS.call("[cause]: "+A(u.cause),he),", ")+" }":he.length===0?"["+String(u)+"]":"{ ["+String(u)+"] "+si.call(he,", ")+" }"}if(typeof u=="object"&&v){if(GS&&typeof u[GS]=="function"&&Wp)return Wp(u,{depth:S-s});if(v!=="symbol"&&typeof u.inspect=="function")return u.inspect()}if(AW(u)){var ce=[];return MS&&MS.call(u,function(Tt,xt){ce.push(A(xt,u,!0)+" => "+A(Tt,u))}),JS("Map",Ou.call(u),ce,O)}if(MW(u)){var Se=[];return NS&&NS.call(u,function(Tt){Se.push(A(Tt,u))}),JS("Set",ku.call(u),Se,O)}if(DW(u))return qp("WeakMap");if(NW(u))return qp("WeakSet");if(IW(u))return qp("WeakRef");if(CW(u))return Rs(A(Number(u)));if(RW(u))return Rs(A(zp.call(u)));if(PW(u))return Rs(mW.call(u));if(_W(u))return Rs(A(String(u)));if(!SW(u)&&!YS(u)){var Pe=Au(u,A),Xe=VS?VS(u)===Object.prototype:u instanceof Object||u.constructor===Object,tt=u instanceof Object?"":"null prototype",ht=!Xe&&cr&&Object(u)===u&&cr in u?Hp.call(Gi(u),8,-1):tt?"Object":"",yt=Xe||typeof u.constructor!="function"?"":u.constructor.name?u.constructor.name+" ":"",dt=yt+(ht||tt?"["+si.call(jS.call([],ht||[],tt||[]),": ")+"] ":"");return Pe.length===0?dt+"{}":O?dt+"{"+Yp(Pe,O)+"}":dt+"{ "+si.call(Pe,", ")+" }"}return String(u)};function qS(a,u,i){var s=(i.quoteStyle||u)==="double"?'"':"'";return s+a+s}function xW(a){return Ui.call(String(a),/"/g,""")}function Gp(a){return Gi(a)==="[object Array]"&&(!cr||!(typeof a=="object"&&cr in a))}function SW(a){return Gi(a)==="[object Date]"&&(!cr||!(typeof a=="object"&&cr in a))}function YS(a){return Gi(a)==="[object RegExp]"&&(!cr||!(typeof a=="object"&&cr in a))}function TW(a){return Gi(a)==="[object Error]"&&(!cr||!(typeof a=="object"&&cr in a))}function _W(a){return Gi(a)==="[object String]"&&(!cr||!(typeof a=="object"&&cr in a))}function CW(a){return Gi(a)==="[object Number]"&&(!cr||!(typeof a=="object"&&cr in a))}function PW(a){return Gi(a)==="[object Boolean]"&&(!cr||!(typeof a=="object"&&cr in a))}function XS(a){if(pa)return a&&typeof a=="object"&&a instanceof Symbol;if(typeof a=="symbol")return!0;if(!a||typeof a!="object"||!Up)return!1;try{return Up.call(a),!0}catch{}return!1}function RW(a){if(!a||typeof a!="object"||!zp)return!1;try{return zp.call(a),!0}catch{}return!1}var OW=Object.prototype.hasOwnProperty||function(a){return a in this};function Wi(a,u){return OW.call(a,u)}function Gi(a){return gW.call(a)}function kW(a){if(a.name)return a.name;var u=yW.call(vW.call(a),/^function\s*([\w$]+)/);return u?u[1]:null}function ZS(a,u){if(a.indexOf)return a.indexOf(u);for(var i=0,s=a.length;i<s;i++)if(a[i]===u)return i;return-1}function AW(a){if(!Ou||!a||typeof a!="object")return!1;try{Ou.call(a);try{ku.call(a)}catch{return!0}return a instanceof Map}catch{}return!1}function DW(a){if(!Cs||!a||typeof a!="object")return!1;try{Cs.call(a,Cs);try{Ps.call(a,Ps)}catch{return!0}return a instanceof WeakMap}catch{}return!1}function IW(a){if(!LS||!a||typeof a!="object")return!1;try{return LS.call(a),!0}catch{}return!1}function MW(a){if(!ku||!a||typeof a!="object")return!1;try{ku.call(a);try{Ou.call(a)}catch{return!0}return a instanceof Set}catch{}return!1}function NW(a){if(!Ps||!a||typeof a!="object")return!1;try{Ps.call(a,Ps);try{Cs.call(a,Cs)}catch{return!0}return a instanceof WeakSet}catch{}return!1}function LW(a){return!a||typeof a!="object"?!1:typeof HTMLElement<"u"&&a instanceof HTMLElement?!0:typeof a.nodeName=="string"&&typeof a.getAttribute=="function"}function KS(a,u){if(a.length>u.maxStringLength){var i=a.length-u.maxStringLength,s="... "+i+" more character"+(i>1?"s":"");return KS(Hp.call(a,0,u.maxStringLength),u)+s}var c=Ui.call(Ui.call(a,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,FW);return qS(c,"single",u)}function FW(a){var u=a.charCodeAt(0),i={8:"b",9:"t",10:"n",12:"f",13:"r"}[u];return i?"\\"+i:"\\x"+(u<16?"0":"")+wW.call(u.toString(16))}function Rs(a){return"Object("+a+")"}function qp(a){return a+" { ? }"}function JS(a,u,i,s){var c=s?Yp(i,s):si.call(i,", ");return a+" ("+u+") {"+c+"}"}function BW(a){for(var u=0;u<a.length;u++)if(ZS(a[u],`
|
|
308
|
-
`)>=0)return!1;return!0}function jW(a,u){var i;if(a.indent===" ")i=" ";else if(typeof a.indent=="number"&&a.indent>0)i=si.call(Array(a.indent+1)," ");else return null;return{base:i,prev:si.call(Array(u+1),i)}}function Yp(a,u){if(a.length===0)return"";var i=`
|
|
309
|
-
`+u.prev+u.base;return i+si.call(a,","+i)+`
|
|
310
|
-
`+u.prev}function Au(a,u){var i=Gp(a),s=[];if(i){s.length=a.length;for(var c=0;c<a.length;c++)s[c]=Wi(a,c)?u(a[c],a):""}var p=typeof Vp=="function"?Vp(a):[],v;if(pa){v={};for(var y=0;y<p.length;y++)v["$"+p[y]]=p[y]}for(var b in a)!Wi(a,b)||i&&String(Number(b))===b&&b<a.length||pa&&v["$"+b]instanceof Symbol||(BS.call(/[^\w$]/,b)?s.push(u(b,a)+": "+u(a[b],a)):s.push(b+": "+u(a[b],a)));if(typeof Vp=="function")for(var E=0;E<p.length;E++)zS.call(a,p[E])&&s.push("["+u(p[E])+"]: "+u(a[p[E]],a));return s}var QS=function(a){return typeof a=="string"||typeof a=="symbol"},HW=function(a){if(a===null)return"Null";if(typeof a>"u")return"Undefined";if(typeof a=="function"||typeof a=="object")return"Object";if(typeof a=="number")return"Number";if(typeof a=="boolean")return"Boolean";if(typeof a=="string")return"String"},zW=HW,Os=function(a){return typeof a=="symbol"?"Symbol":typeof a=="bigint"?"BigInt":zW(a)},VW=tr,$S=VW("%TypeError%"),UW=EW,WW=QS,GW=Os,eT=function(a,u){if(GW(a)!=="Object")throw new $S("Assertion failed: Type(O) is not Object");if(!WW(u))throw new $S("Assertion failed: IsPropertyKey(P) is not true, got "+UW(u));return a[u]},qW=tr,tT=qW("%TypeError%"),YW=QS,XW=Os,ZW=function(a,u){if(XW(a)!=="Object")throw new tT("Assertion failed: `O` must be an Object");if(!YW(u))throw new tT("Assertion failed: `P` must be a Property Key");return u in a},nT=Function.prototype.toString,ma=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Xp,Du;if(typeof ma=="function"&&typeof Object.defineProperty=="function")try{Xp=Object.defineProperty({},"length",{get:function(){throw Du}}),Du={},ma(function(){throw 42},null,Xp)}catch(a){a!==Du&&(ma=null)}else ma=null;var KW=/^\s*class\b/,Zp=function(a){try{var u=nT.call(a);return KW.test(u)}catch{return!1}},Kp=function(a){try{return Zp(a)?!1:(nT.call(a),!0)}catch{return!1}},Iu=Object.prototype.toString,JW="[object Object]",QW="[object Function]",$W="[object GeneratorFunction]",e6="[object HTMLAllCollection]",t6="[object HTML document.all class]",n6="[object HTMLCollection]",r6=typeof Symbol=="function"&&!!Symbol.toStringTag,i6=!(0 in[,]),Jp=function(){return!1};if(typeof document=="object"){var o6=document.all;Iu.call(o6)===Iu.call(document.all)&&(Jp=function(a){if((i6||!a)&&(typeof a>"u"||typeof a=="object"))try{var u=Iu.call(a);return(u===e6||u===t6||u===n6||u===JW)&&a("")==null}catch{}return!1})}var rT=ma?function(a){if(Jp(a))return!0;if(!a||typeof a!="function"&&typeof a!="object")return!1;try{ma(a,null,Xp)}catch(u){if(u!==Du)return!1}return!Zp(a)&&Kp(a)}:function(a){if(Jp(a))return!0;if(!a||typeof a!="function"&&typeof a!="object")return!1;if(r6)return Kp(a);if(Zp(a))return!1;var u=Iu.call(a);return u!==QW&&u!==$W&&!/^\[object HTML/.test(u)?!1:Kp(a)},a6=rT,iT=tr,s6=iT("%Math%"),l6=iT("%Number%"),u6=l6.MAX_SAFE_INTEGER||s6.pow(2,53)-1,c6=tr,h6=c6("%Math.abs%"),d6=function(a){return h6(a)},f6=Os,p6=Math.floor,m6=function(a){return f6(a)==="BigInt"?a:p6(a)},g6=function(a){return a===null||typeof a!="function"&&typeof a!="object"},v6=function(a){return a===null||typeof a!="function"&&typeof a!="object"},y6=wS,Qp=function(){return y6()&&!!Symbol.toStringTag},w6=Date.prototype.getDay,b6=function(a){try{return w6.call(a),!0}catch{return!1}},E6=Object.prototype.toString,x6="[object Date]",S6=Qp(),T6=function(a){return typeof a!="object"||a===null?!1:S6?b6(a):E6.call(a)===x6},$p={exports:{}},_6=Object.prototype.toString,C6=ES();if(C6){var P6=Symbol.prototype.toString,R6=/^Symbol\(.*\)$/,O6=function(a){return typeof a.valueOf()!="symbol"?!1:R6.test(P6.call(a))};$p.exports=function(a){if(typeof a=="symbol")return!0;if(_6.call(a)!=="[object Symbol]")return!1;try{return O6(a)}catch{return!1}}}else $p.exports=function(a){return!1};var k6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol",em=v6,oT=rT,A6=T6,aT=$p.exports,D6=function(a,u){if(typeof a>"u"||a===null)throw new TypeError("Cannot call method on "+a);if(typeof u!="string"||u!=="number"&&u!=="string")throw new TypeError('hint must be "string" or "number"');var i=u==="string"?["toString","valueOf"]:["valueOf","toString"],s,c,p;for(p=0;p<i.length;++p)if(s=a[i[p]],oT(s)&&(c=s.call(a),em(c)))return c;throw new TypeError("No default value")},I6=function(a,u){var i=a[u];if(i!==null&&typeof i<"u"){if(!oT(i))throw new TypeError(i+" returned for property "+u+" of object "+a+" is not a function");return i}},M6=function(a){if(em(a))return a;var u="default";arguments.length>1&&(arguments[1]===String?u="string":arguments[1]===Number&&(u="number"));var i;if(k6&&(Symbol.toPrimitive?i=I6(a,Symbol.toPrimitive):aT(a)&&(i=Symbol.prototype.valueOf)),typeof i<"u"){var s=i.call(a,u);if(em(s))return s;throw new TypeError("unable to convert exotic object to primitive")}return u==="default"&&(A6(a)||aT(a))&&(u="string"),D6(a,u==="default"?"number":u)},sT=M6,N6=function(a){return arguments.length>1?sT(a,arguments[1]):sT(a)},tm=bi,lT=Qp(),uT,cT,nm,rm;if(lT){uT=tm("Object.prototype.hasOwnProperty"),cT=tm("RegExp.prototype.exec"),nm={};var im=function(){throw nm};rm={toString:im,valueOf:im},typeof Symbol.toPrimitive=="symbol"&&(rm[Symbol.toPrimitive]=im)}var L6=tm("Object.prototype.toString"),F6=Object.getOwnPropertyDescriptor,B6="[object RegExp]",j6=lT?function(a){if(!a||typeof a!="object")return!1;var u=F6(a,"lastIndex"),i=u&&uT(u,"value");if(!i)return!1;try{cT(a,rm)}catch(s){return s===nm}}:function(a){return!a||typeof a!="object"&&typeof a!="function"?!1:L6(a)===B6},H6=bi,z6=tr,V6=j6,U6=H6("RegExp.prototype.exec"),W6=z6("%TypeError%"),G6=function(a){if(!V6(a))throw new W6("`regex` must be a RegExp");return function(u){return U6(a,u)!==null}},hT=tr,q6=hT("%String%"),Y6=hT("%TypeError%"),dT=function(a){if(typeof a=="symbol")throw new Y6("Cannot convert a Symbol value to a string");return q6(a)},X6=_s,Z6=dT,K6=bi,fT=K6("String.prototype.replace"),pT=/^\s$/.test(""),J6=pT?/^[\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]+/,Q6=pT?/[\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]+$/,mT=function(){var a=Z6(X6(this));return fT(fT(a,J6,""),Q6,"")},$6=mT,gT="",ga="",vT=function(){return String.prototype.trim&&gT.trim()===gT&&ga.trim()===ga&&("_"+ga).trim()==="_"+ga&&(ga+"_").trim()===ga+"_"?String.prototype.trim:$6},e5=fa,t5=vT,n5=function(){var a=t5();return e5(String.prototype,{trim:a},{trim:function(){return String.prototype.trim!==a}}),a},r5=Ts.exports,i5=fa,o5=_s,a5=mT,yT=vT,s5=n5,l5=r5(yT()),wT=function(a){return o5(a),l5(a)};i5(wT,{getPolyfill:yT,implementation:a5,shim:s5});var bT=wT,Mu=tr,om=Mu("%Number%"),u5=Mu("%RegExp%"),c5=Mu("%TypeError%"),ET=Mu("%parseInt%"),h5=bi,Nu=G6,xT=h5("String.prototype.slice"),d5=Nu(/^0b[01]+$/i),f5=Nu(/^0o[0-7]+$/i),p5=Nu(/^[-+]0x[0-9a-f]+$/i),m5=["
","",""].join(""),g5=new u5("["+m5+"]","g"),v5=Nu(g5),y5=bT,w5=Os,b5=function a(u){if(w5(u)!=="String")throw new c5("Assertion failed: `argument` is not a String");if(d5(u))return om(ET(xT(u,2),2));if(f5(u))return om(ET(xT(u,2),8));if(v5(u)||p5(u))return NaN;var i=y5(u);return i!==u?a(i):om(u)},ST=tr,TT=ST("%TypeError%"),_T=ST("%Number%"),E5=g6,x5=N6,S5=b5,T5=function(a){var u=E5(a)?a:x5(a,_T);if(typeof u=="symbol")throw new TT("Cannot convert a Symbol value to a number");if(typeof u=="bigint")throw new TT("Conversion from 'BigInt' to 'number' is not allowed.");return typeof u=="string"?S5(u):_T(u)},CT=Number.isNaN||function(a){return a!==a},_5=CT,C5=function(a){return(typeof a=="number"||typeof a=="bigint")&&!_5(a)&&a!==1/0&&a!==-1/0},P5=function(a){return a>=0?1:-1},R5=d6,O5=m6,k5=T5,A5=CT,D5=C5,I5=P5,M5=function(a){var u=k5(a);if(A5(u)||u===0)return 0;if(!D5(u))return u;var i=O5(R5(u));return i===0?0:I5(u)*i},PT=u6,N5=M5,L5=function(a){var u=N5(a);return u<=0?0:u>PT?PT:u},F5=tr,B5=F5("%TypeError%"),j5=eT,H5=L5,z5=Os,V5=function(a){if(z5(a)!=="Object")throw new B5("Assertion failed: `obj` must be an Object");return H5(j5(a,"length"))},U5=tr,W5=U5("%Object%"),G5=_s,q5=function(a){return G5(a),W5(a)},Y5=String.prototype.valueOf,X5=function(a){try{return Y5.call(a),!0}catch{return!1}},Z5=Object.prototype.toString,K5="[object String]",J5=Qp(),Q5=function(a){return typeof a=="string"?!0:typeof a!="object"?!1:J5?X5(a):Z5.call(a)===K5},$5=tr,eG=bi,tG=$5("%TypeError%"),nG=lW,rG=eT,iG=ZW,oG=a6,aG=V5,sG=q5,lG=dT,uG=Q5,cG=eG("String.prototype.split"),RT=Object("a"),hG=RT[0]!=="a"||!(0 in RT),OT=function(a){var u=sG(this),i=hG&&uG(this)?cG(this,""):u,s=aG(i);if(!oG(a))throw new tG("Array.prototype.forEach callback must be a function");var c;arguments.length>1&&(c=arguments[1]);for(var p=0;p<s;){var v=lG(p),y=iG(i,v);if(y){var b=rG(i,v);nG(a,c,[b,p,i])}p+=1}},dG=function(a){var u=!0,i=!0,s=!1;if(typeof a=="function"){try{a.call("f",function(c,p,v){typeof v!="object"&&(u=!1)}),a.call([null],function(){"use strict";i=typeof this=="string"},"x")}catch{s=!0}return!s&&u&&i}return!1},fG=dG,pG=OT,kT=function(){var a=Array.prototype.forEach;return fG(a)?a:pG},mG=fa,gG=kT,vG=function(){var a=gG();return mG(Array.prototype,{forEach:a},{forEach:function(){return Array.prototype.forEach!==a}}),a},yG=fa,wG=Ts.exports,bG=bi,EG=_s,xG=OT,AT=kT,SG=AT(),TG=vG,_G=bG("Array.prototype.slice"),CG=wG.apply(SG),DT=function(a,u){return EG(a),CG(a,_G(arguments,1))};yG(DT,{getPolyfill:AT,implementation:xG,shim:TG});var PG=DT,RG=_s,IT=bi,OG=IT("Object.prototype.propertyIsEnumerable"),kG=IT("Array.prototype.push"),MT=function(a){var u=RG(a),i=[];for(var s in u)OG(u,s)&&kG(i,[s,u[s]]);return i},AG=MT,NT=function(){return typeof Object.entries=="function"?Object.entries:AG},DG=NT,IG=fa,MG=function(){var a=DG();return IG(Object,{entries:a},{entries:function(){return Object.entries!==a}}),a},NG=fa,LG=Ts.exports,FG=MT,LT=NT,BG=MG,FT=LG(LT(),Object);NG(FT,{getPolyfill:LT,implementation:FG,shim:BG});var jG=FT,Lu=PG,am=jG,BT=SS,HG=bT,zG=function(a){},jT=String.prototype.replace,HT=String.prototype.split,Fu="||||",sm=function(a){var u=a%100,i=u%10;return u!==11&&i===1?0:2<=i&&i<=4&&!(u>=12&&u<=14)?1:2},zT={pluralTypes:{arabic:function(a){if(a<3)return a;var u=a%100;return u>=3&&u<=10?3:u>=11?4:5},bosnian_serbian:sm,chinese:function(){return 0},croatian:sm,french:function(a){return a>=2?1:0},german:function(a){return a!==1?1:0},russian:sm,lithuanian:function(a){return a%10===1&&a%100!==11?0:a%10>=2&&a%10<=9&&(a%100<11||a%100>19)?1:2},czech:function(a){return a===1?0:a>=2&&a<=4?1:2},polish:function(a){if(a===1)return 0;var u=a%10;return 2<=u&&u<=4&&(a%100<10||a%100>=20)?1:2},icelandic:function(a){return a%10!==1||a%100===11?1:0},slovenian:function(a){var u=a%100;return u===1?0:u===2?1:u===3||u===4?2:3},romanian:function(a){if(a===1)return 0;var u=a%100;return a===0||u>=2&&u<=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 VG(a){var u={};return Lu(am(a),function(i){var s=i[0],c=i[1];Lu(c,function(p){u[p]=s})}),u}function UG(a,u){var i=VG(a.pluralTypeToLanguages);return i[u]||i[HT.call(u,/-/,1)[0]]||i.en}function WG(a,u,i){return a.pluralTypes[u](i)}function GG(){var a={};return function(u,i){var s=a[i];return s&&!u.pluralTypes[s]&&(s=null,a[i]=s),s||(s=UG(u,i),s&&(a[i]=s)),s}}function VT(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function qG(a){var u=a&&a.prefix||"%{",i=a&&a.suffix||"}";if(u===Fu||i===Fu)throw new RangeError('"'+Fu+'" token is reserved for pluralization');return new RegExp(VT(u)+"(.*?)"+VT(i),"g")}var YG=GG(),XG=/%\{(.*?)\}/g;function lm(a,u,i,s,c,p){if(typeof a!="string")throw new TypeError("Polyglot.transformPhrase expects argument #1 to be string");if(u==null)return a;var v=a,y=s||XG,b=p||jT,E=typeof u=="number"?{smart_count:u}:u;if(E.smart_count!=null&&a){var S=c||zT,O=HT.call(a,Fu),A=i||"en",H=YG(S,A),W=WG(S,H,E.smart_count);v=HG(O[W]||O[0])}return v=b.call(v,y,function(re,$){return!BT(E,$)||E[$]==null?re:E[$]}),v}function Ei(a){var u=a||{};this.phrases={},this.extend(u.phrases||{}),this.currentLocale=u.locale||"en";var i=u.allowMissing?lm:null;this.onMissingKey=typeof u.onMissingKey=="function"?u.onMissingKey:i,this.warn=u.warn||zG,this.replaceImplementation=u.replace||jT,this.tokenRegex=qG(u.interpolation),this.pluralRules=u.pluralRules||zT}Ei.prototype.locale=function(a){return a&&(this.currentLocale=a),this.currentLocale},Ei.prototype.extend=function(a,u){Lu(am(a||{}),function(i){var s=i[0],c=i[1],p=u?u+"."+s:s;typeof c=="object"?this.extend(c,p):this.phrases[p]=c},this)},Ei.prototype.unset=function(a,u){typeof a=="string"?delete this.phrases[a]:Lu(am(a||{}),function(i){var s=i[0],c=i[1],p=u?u+"."+s:s;typeof c=="object"?this.unset(c,p):delete this.phrases[p]},this)},Ei.prototype.clear=function(){this.phrases={}},Ei.prototype.replace=function(a){this.clear(),this.extend(a)},Ei.prototype.t=function(a,u){var i,s,c=u??{};if(typeof this.phrases[a]=="string")i=this.phrases[a];else if(typeof c._=="string")i=c._;else if(this.onMissingKey){var p=this.onMissingKey;s=p(a,c,this.currentLocale,this.tokenRegex,this.pluralRules,this.replaceImplementation)}else this.warn('Missing translation for key: "'+a+'"'),s=a;return typeof i=="string"&&(s=lm(i,c,this.currentLocale,this.tokenRegex,this.pluralRules,this.replaceImplementation)),s},Ei.prototype.has=function(a){return BT(this.phrases,a)},Ei.transformPhrase=function(a,u,i){return lm(a,u,i)};var ZG=Ei,KG={"Add a comment...":"إضافة تعليق","Add a reply...":"إضافة رد","Add tag...":"إضافة علامة",Cancel:"إلغاء",Close:"إغلاق",Edit:"Edit",Delete:"Delete",Ok:"تم"},JG={"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"},QG={"Add a comment...":"Kommentar schreiben...","Add a reply...":"Antwort schreiben...","Add tag...":"Tag...",Cancel:"Abbrechen",Close:"Schliessen",Edit:"Bearbeiten",Delete:"Löschen",Ok:"Ok"},$G={"Add a comment...":"Σχολίασε...","Add a reply...":"Απάντησε...","Add tag...":"Πρόσθεσε tag...",Cancel:"Άκυρο",Close:"Κλείσιμο",Edit:"Επεξεργασία",Delete:"Διαγραφή",Ok:"Ok"},e4={"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"},t4={"Add a comment...":"Lisää kommentti","Add a reply...":"Lisää vastaus","Add tag...":"Lisää tunniste",Cancel:"Peruuta",Close:"Sulje",Edit:"Muokkaa",Delete:"Poista",Ok:"Ok"},n4={"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"},r4={"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"},i4={"Add a comment...":"टिप्पणी जोड़ें","Add a reply...":"जवाब दें","Add tag...":"टैग लगाएँ",Cancel:"रद्द करें",Close:"बंद करें",Edit:"संपादित करें",Delete:"हटाएँ",Ok:"ठीक है"},o4={"Add a comment...":"Commenta...","Add a reply...":"Rispondi...","Add tag...":"Aggiungi tag...",Cancel:"Annulla",Close:"Chiudi",Edit:"Edit",Delete:"Delete",Ok:"Ok"},a4={"Add a comment...":"コメントを追加する...","Add a reply...":"返信する...","Add tag...":"タグを追加する...",Cancel:"キャンセル",Close:"閉じる",Edit:"編集",Delete:"削除",Ok:"Ok"},s4={"Add a comment...":"댓글 추가","Add a reply...":"답글 추가","Add tag...":"태그 추가",Cancel:"취소",Close:"닫기",Edit:"수정",Delete:"삭제",Ok:"확인"},l4={"Add a comment...":"Commentaar toevoegen...","Add a reply...":"Antwoord toevoegen...","Add tag...":"Tag toevoegen...",Cancel:"Afbreken",Close:"Sluiten",Edit:"Bewerken",Delete:"Verwijderen",Ok:"Ok"},u4={"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"},c4={"Add a comment...":"Добавить комментарий...","Add a reply...":"Добавить ответ...","Add tag...":"Добавить тэг...",Cancel:"Отмена",Close:"Закрыть",Edit:"Редактировать",Delete:"Удалить",Ok:"Ок"},h4={"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"},d4={"Add a comment...":"เพิ่มคอมเมนต์...","Add a reply...":"ตอบกลับ...","Add tag...":"เพิ่มแท็ก...",Cancel:"ยกเลิก",Close:"ปิด",Edit:"แก้ไข",Delete:"ลบ",Ok:"ตกลง"},f4={"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"},p4={"Add a comment...":"تبصرہ کریں","Add a reply...":"جواب دیں","Add tag...":"ٹیگ لگائیں",Cancel:"منسوخ کریں",Close:"بند کریں",Edit:"ترمیم کریں",Delete:"ہٹائیں",Ok:"ٹھیک ہے"},m4={"Add a comment...":"添加评论...","Add a reply...":"添加回复...","Add tag...":"添加标签...",Cancel:"取消",Close:"关闭",Edit:"编辑",Delete:"删除",Ok:"确认"},g4={"Add a comment...":"添加評論...","Add a reply...":"添加回覆...","Add tag...":"添加標籤...",Cancel:"取消",Close:"關閉",Edit:"編輯",Delete:"刪除",Ok:"確認"},UT={};Object.defineProperty(UT,"__esModule",{value:!0});var um=[["ثانية","ثانيتين","%s ثوان","%s ثانية"],["دقيقة","دقيقتين","%s دقائق","%s دقيقة"],["ساعة","ساعتين","%s ساعات","%s ساعة"],["يوم","يومين","%s أيام","%s يوماً"],["أسبوع","أسبوعين","%s أسابيع","%s أسبوعاً"],["شهر","شهرين","%s أشهر","%s شهراً"],["عام","عامين","%s أعوام","%s عاماً"]];function v4(a,u){return u<3?um[a][u-1]:u>=3&&u<=10?um[a][2]:um[a][3]}function y4(a,u){if(u===0)return["منذ لحظات","بعد لحظات"];var i=v4(Math.floor(u/2),a);return["منذ "+i,"بعد "+i]}var w4=UT.default=y4,WT={};Object.defineProperty(WT,"__esModule",{value:!0});function b4(a,u){var i=0,s=u==1||u==3||u==5||u==7||u==9||u==11||u==13;return s&&a>=5&&(i=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"]]][u][i]}var E4=WT.default=b4,GT={};Object.defineProperty(GT,"__esModule",{value:!0});function x4(a,u){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"]][u]}var S4=GT.default=x4,qT={};Object.defineProperty(qT,"__esModule",{value:!0});function T4(a,u){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 χρόνια"]][u]}var _4=qT.default=T4,YT={};Object.defineProperty(YT,"__esModule",{value:!0});function C4(a,u){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"]][u]}var P4=YT.default=C4,XT={};Object.defineProperty(XT,"__esModule",{value:!0});function R4(a,u){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ä"]][u]}var O4=XT.default=R4,ZT={};Object.defineProperty(ZT,"__esModule",{value:!0});function k4(a,u){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"]][u]}var A4=ZT.default=k4,KT={};Object.defineProperty(KT,"__esModule",{value:!0});function D4(a,u){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"]][u]}var I4=KT.default=D4,JT={};Object.defineProperty(JT,"__esModule",{value:!0});function M4(a,u){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 साल में"]][u]}var N4=JT.default=M4,QT={};Object.defineProperty(QT,"__esModule",{value:!0});function L4(a,u){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"]][u]}var F4=QT.default=L4,$T={};Object.defineProperty($T,"__esModule",{value:!0});function B4(a,u){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年以内"]][u]}var j4=$T.default=B4,e_={};Object.defineProperty(e_,"__esModule",{value:!0});function H4(a,u){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년 후"]][u]}var z4=e_.default=H4,t_={};Object.defineProperty(t_,"__esModule",{value:!0});function V4(a,u){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"]][u]}var U4=t_.default=V4,n_={};Object.defineProperty(n_,"__esModule",{value:!0});function W4(a,u){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"]][u]}var G4=n_.default=W4,r_={};Object.defineProperty(r_,"__esModule",{value:!0});function So(a,u,i,s,c){var p=c%10,v=s;return c===1?v=a:p===1&&c>20?v=u:p>1&&p<5&&(c>20||c<10)&&(v=i),v}var i_=So.bind(null,"секунду","%s секунду","%s секунды","%s секунд"),o_=So.bind(null,"минуту","%s минуту","%s минуты","%s минут"),a_=So.bind(null,"час","%s час","%s часа","%s часов"),s_=So.bind(null,"день","%s день","%s дня","%s дней"),l_=So.bind(null,"неделю","%s неделю","%s недели","%s недель"),u_=So.bind(null,"месяц","%s месяц","%s месяца","%s месяцев"),c_=So.bind(null,"год","%s год","%s года","%s лет");function q4(a,u){switch(u){case 0:return["только что","через несколько секунд"];case 1:return[i_(a)+" назад","через "+i_(a)];case 2:case 3:return[o_(a)+" назад","через "+o_(a)];case 4:case 5:return[a_(a)+" назад","через "+a_(a)];case 6:return["вчера","завтра"];case 7:return[s_(a)+" назад","через "+s_(a)];case 8:case 9:return[l_(a)+" назад","через "+l_(a)];case 10:case 11:return[u_(a)+" назад","через "+u_(a)];case 12:case 13:return[c_(a)+" назад","через "+c_(a)];default:return["",""]}}var Y4=r_.default=q4,h_={};Object.defineProperty(h_,"__esModule",{value:!0});function X4(a,u){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"]][u]}var Z4=h_.default=X4,d_={};Object.defineProperty(d_,"__esModule",{value:!0});function K4(a,u){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 ปี"]][u]}var J4=d_.default=K4,f_={};Object.defineProperty(f_,"__esModule",{value:!0});function Q4(a,u){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"]][u]}var $4=f_.default=Q4,p_={};Object.defineProperty(p_,"__esModule",{value:!0});var e3=["秒","分钟","小时","天","周","个月","年"];function t3(a,u){if(u===0)return["刚刚","片刻后"];var i=e3[~~(u/2)];return[a+" "+i+"前",a+" "+i+"后"]}var n3=p_.default=t3,m_={};Object.defineProperty(m_,"__esModule",{value:!0});function r3(a,u){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 年後"]][u]}var i3=m_.default=r3;const va={ar:KG,cs:JG,de:QG,el:$G,es:e4,fi:t4,fr:n4,gl:r4,hi:i4,it:o4,ja:a4,ko:s4,nl:l4,pt:u4,ru:c4,sv:h4,th:d4,tr:f4,ur:p4,"zh-CN":m4,"zh-TW":g4},o3=Object.keys(va),To=new ZG({allowMissing:!0});To.init=(a,u)=>{To.clear(),a&&(To.locale(a),To.extend(va[a])),u&&To.extend(u)},Ln("ar",w4),Ln("cs",E4),Ln("de",S4),Ln("el",_4),Ln("es",P4),Ln("fi",O4),Ln("fr",A4),Ln("gl",I4),Ln("hi",N4),Ln("it",F4),Ln("ja",j4),Ln("ko",z4),Ln("nl",U4),Ln("pt",G4),Ln("ru",Y4),Ln("sv",Z4),Ln("th",J4),Ln("tr",$4),Ln("zh-CN",n3),Ln("zh-TW",i3),To.registerMessages=(a,u)=>{va[a]?va[a]={...va[a],...u}:va[a]=u};var Pr=To,a3=a=>{const u=gt();return u9(u,()=>a.onClickOutside()),Ue.createElement("ul",{ref:u,className:"r6o-comment-dropdown-menu"},Ue.createElement("li",{onClick:a.onEdit},Pr.t("Edit")),Ue.createElement("li",{onClick:a.onDelete},Pr.t("Delete")))},g_={},cm={},hm={exports:{}};/*!
|
|
311
|
-
autosize 4.0.4
|
|
312
|
-
license: MIT
|
|
313
|
-
http://www.jacklmoore.com/autosize
|
|
314
|
-
*/(function(a,u){(function(i,s){s(a,u)})(Hi,function(i,s){var c=typeof Map=="function"?new Map:function(){var S=[],O=[];return{has:function(A){return S.indexOf(A)>-1},get:function(A){return O[S.indexOf(A)]},set:function(A,H){S.indexOf(A)===-1&&(S.push(A),O.push(H))},delete:function(A){var H=S.indexOf(A);H>-1&&(S.splice(H,1),O.splice(H,1))}}}(),p=function(S){return new Event(S,{bubbles:!0})};try{new Event("test")}catch{p=function(S){var O=document.createEvent("Event");return O.initEvent(S,!0,!1),O}}function v(S){if(!S||!S.nodeName||S.nodeName!=="TEXTAREA"||c.has(S))return;var O=null,A=null,H=null;function W(){var ce=window.getComputedStyle(S,null);ce.resize==="vertical"?S.style.resize="none":ce.resize==="both"&&(S.style.resize="horizontal"),ce.boxSizing==="content-box"?O=-(parseFloat(ce.paddingTop)+parseFloat(ce.paddingBottom)):O=parseFloat(ce.borderTopWidth)+parseFloat(ce.borderBottomWidth),isNaN(O)&&(O=0),I()}function re(ce){{var Se=S.style.width;S.style.width="0px",S.offsetWidth,S.style.width=Se}S.style.overflowY=ce}function $(ce){for(var Se=[];ce&&ce.parentNode&&ce.parentNode instanceof Element;)ce.parentNode.scrollTop&&Se.push({node:ce.parentNode,scrollTop:ce.parentNode.scrollTop}),ce=ce.parentNode;return Se}function se(){if(S.scrollHeight!==0){var ce=$(S),Se=document.documentElement&&document.documentElement.scrollTop;S.style.height="",S.style.height=S.scrollHeight+O+"px",A=S.clientWidth,ce.forEach(function(Pe){Pe.node.scrollTop=Pe.scrollTop}),Se&&(document.documentElement.scrollTop=Se)}}function I(){se();var ce=Math.round(parseFloat(S.style.height)),Se=window.getComputedStyle(S,null),Pe=Se.boxSizing==="content-box"?Math.round(parseFloat(Se.height)):S.offsetHeight;if(Pe<ce?Se.overflowY==="hidden"&&(re("scroll"),se(),Pe=Se.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(S,null).height)):S.offsetHeight):Se.overflowY!=="hidden"&&(re("hidden"),se(),Pe=Se.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(S,null).height)):S.offsetHeight),H!==Pe){H=Pe;var Xe=p("autosize:resized");try{S.dispatchEvent(Xe)}catch{}}}var ne=function(){S.clientWidth!==A&&I()},he=(function(ce){window.removeEventListener("resize",ne,!1),S.removeEventListener("input",I,!1),S.removeEventListener("keyup",I,!1),S.removeEventListener("autosize:destroy",he,!1),S.removeEventListener("autosize:update",I,!1),Object.keys(ce).forEach(function(Se){S.style[Se]=ce[Se]}),c.delete(S)}).bind(S,{height:S.style.height,resize:S.style.resize,overflowY:S.style.overflowY,overflowX:S.style.overflowX,wordWrap:S.style.wordWrap});S.addEventListener("autosize:destroy",he,!1),"onpropertychange"in S&&"oninput"in S&&S.addEventListener("keyup",I,!1),window.addEventListener("resize",ne,!1),S.addEventListener("input",I,!1),S.addEventListener("autosize:update",I,!1),S.style.overflowX="hidden",S.style.wordWrap="break-word",c.set(S,{destroy:he,update:I}),W()}function y(S){var O=c.get(S);O&&O.destroy()}function b(S){var O=c.get(S);O&&O.update()}var E=null;typeof window>"u"||typeof window.getComputedStyle!="function"?(E=function(S){return S},E.destroy=function(S){return S},E.update=function(S){return S}):(E=function(S,O){return S&&Array.prototype.forEach.call(S.length?S:[S],function(A){return v(A)}),S},E.destroy=function(S){return S&&Array.prototype.forEach.call(S.length?S:[S],y),S},E.update=function(S){return S&&Array.prototype.forEach.call(S.length?S:[S],b),S}),s.default=E,i.exports=s.default})})(hm,hm.exports);var s3=function(a,u,i){return i=window.getComputedStyle,(i?i(a):a.currentStyle)[u.replace(/-(\w)/gi,function(s,c){return c.toUpperCase()})]},l3=s3,dm=l3;function u3(a){var u=dm(a,"line-height"),i=parseFloat(u,10);if(u===i+""){var s=a.style.lineHeight;a.style.lineHeight=u+"em",u=dm(a,"line-height"),i=parseFloat(u,10),s?a.style.lineHeight=s:delete a.style.lineHeight}if(u.indexOf("pt")!==-1?(i*=4,i/=3):u.indexOf("mm")!==-1?(i*=96,i/=25.4):u.indexOf("cm")!==-1?(i*=96,i/=2.54):u.indexOf("in")!==-1?i*=96:u.indexOf("pc")!==-1&&(i*=16),i=Math.round(i),u==="normal"){var c=a.nodeName,p=document.createElement(c);p.innerHTML=" ",c.toUpperCase()==="TEXTAREA"&&p.setAttribute("rows","1");var v=dm(a,"font-size");p.style.fontSize=v,p.style.padding="0px",p.style.border="0px";var y=document.body;y.appendChild(p);var b=p.offsetHeight;i=b,y.removeChild(p)}return i}var c3=u3,h3=Hi&&Hi.__extends||function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,i){u.__proto__=i}||function(u,i){for(var s in i)i.hasOwnProperty(s)&&(u[s]=i[s])};return function(u,i){a(u,i);function s(){this.constructor=u}u.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)}}(),fm=Hi&&Hi.__assign||Object.assign||function(a){for(var u,i=1,s=arguments.length;i<s;i++){u=arguments[i];for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(a[c]=u[c])}return a},d3=Hi&&Hi.__rest||function(a,u){var i={};for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&u.indexOf(s)<0&&(i[s]=a[s]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,s=Object.getOwnPropertySymbols(a);c<s.length;c++)u.indexOf(s[c])<0&&(i[s[c]]=a[s[c]]);return i};cm.__esModule=!0;var Bu=sa,ks=Es.exports,ju=hm.exports,f3=c3,p3=f3,v_="autosize:resized",m3=function(a){h3(u,a);function u(){var i=a!==null&&a.apply(this,arguments)||this;return i.state={lineHeight:null},i.textarea=null,i.onResize=function(s){i.props.onResize&&i.props.onResize(s)},i.updateLineHeight=function(){i.textarea&&i.setState({lineHeight:p3(i.textarea)})},i.onChange=function(s){var c=i.props.onChange;i.currentValue=s.currentTarget.value,c&&c(s)},i}return u.prototype.componentDidMount=function(){var i=this,s=this.props,c=s.maxRows,p=s.async;typeof c=="number"&&this.updateLineHeight(),typeof c=="number"||p?setTimeout(function(){return i.textarea&&ju(i.textarea)}):this.textarea&&ju(this.textarea),this.textarea&&this.textarea.addEventListener(v_,this.onResize)},u.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(v_,this.onResize),ju.destroy(this.textarea))},u.prototype.render=function(){var i=this,s=this,c=s.props;c.onResize;var p=c.maxRows;c.onChange;var v=c.style;c.innerRef;var y=c.children,b=d3(c,["onResize","maxRows","onChange","style","innerRef","children"]),E=s.state.lineHeight,S=p&&E?E*p:null;return Bu.createElement("textarea",fm({},b,{onChange:this.onChange,style:S?fm({},v,{maxHeight:S}):v,ref:function(O){i.textarea=O,typeof i.props.innerRef=="function"?i.props.innerRef(O):i.props.innerRef&&(i.props.innerRef.current=O)}}),y)},u.prototype.componentDidUpdate=function(){this.textarea&&ju.update(this.textarea)},u.defaultProps={rows:1,async:!1},u.propTypes={rows:ks.number,maxRows:ks.number,onResize:ks.func,innerRef:ks.any,async:ks.bool},u}(Bu.Component);cm.TextareaAutosize=Bu.forwardRef(function(a,u){return Bu.createElement(m3,fm({},a,{innerRef:u}))}),function(a){a.__esModule=!0;var u=cm;a.default=u.TextareaAutosize}(g_);var g3=KV(g_);class y_ extends B{constructor(u){super(u),o(this,"onKeyDown",i=>{i.which===13&&i.ctrlKey&&this.props.onSaveAndClose()}),o(this,"onKeyUp",i=>{i.which===46&&i.stopPropagation()}),this.element=j()}componentDidMount(){this.props.focus&&this.element.current&&this.element.current.focus({preventScroll:!0})}render(){return Ue.createElement(g3,{ref:this.element,className:"r6o-editable-text",value:this.props.content,placeholder:this.props.placeholder||Pr.t("Add a comment..."),disabled:!this.props.editable,onChange:this.props.onChange,onKeyUp:this.onKeyUp,onKeyDown:this.onKeyDown})}}function kt(){return kt=Object.assign?Object.assign.bind():function(a){for(var u=1;u<arguments.length;u++){var i=arguments[u];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(a[s]=i[s])}return a},kt.apply(this,arguments)}function v3(a){if(a.sheet)return a.sheet;for(var u=0;u<document.styleSheets.length;u++)if(document.styleSheets[u].ownerNode===a)return document.styleSheets[u]}function y3(a){var u=document.createElement("style");return u.setAttribute("data-emotion",a.key),a.nonce!==void 0&&u.setAttribute("nonce",a.nonce),u.appendChild(document.createTextNode("")),u.setAttribute("data-s",""),u}var w3=function(){function a(i){var s=this;this._insertTag=function(c){var p;s.tags.length===0?s.insertionPoint?p=s.insertionPoint.nextSibling:s.prepend?p=s.container.firstChild:p=s.before:p=s.tags[s.tags.length-1].nextSibling,s.container.insertBefore(c,p),s.tags.push(c)},this.isSpeedy=i.speedy===void 0?!0:i.speedy,this.tags=[],this.ctr=0,this.nonce=i.nonce,this.key=i.key,this.container=i.container,this.prepend=i.prepend,this.insertionPoint=i.insertionPoint,this.before=null}var u=a.prototype;return u.hydrate=function(i){i.forEach(this._insertTag)},u.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(y3(this));var s=this.tags[this.tags.length-1];if(this.isSpeedy){var c=v3(s);try{c.insertRule(i,c.cssRules.length)}catch{}}else s.appendChild(document.createTextNode(i));this.ctr++},u.flush=function(){this.tags.forEach(function(i){return i.parentNode&&i.parentNode.removeChild(i)}),this.tags=[],this.ctr=0},a}(),hr="-ms-",Hu="-moz-",nn="-webkit-",w_="comm",pm="rule",mm="decl",b3="@import",b_="@keyframes",E3="@layer",x3=Math.abs,zu=String.fromCharCode,S3=Object.assign;function T3(a,u){return nr(a,0)^45?(((u<<2^nr(a,0))<<2^nr(a,1))<<2^nr(a,2))<<2^nr(a,3):0}function E_(a){return a.trim()}function _3(a,u){return(a=u.exec(a))?a[0]:a}function rn(a,u,i){return a.replace(u,i)}function gm(a,u){return a.indexOf(u)}function nr(a,u){return a.charCodeAt(u)|0}function As(a,u,i){return a.slice(u,i)}function li(a){return a.length}function vm(a){return a.length}function Vu(a,u){return u.push(a),a}function C3(a,u){return a.map(u).join("")}var Uu=1,ya=1,x_=0,vr=0,Hn=0,wa="";function Wu(a,u,i,s,c,p,v){return{value:a,root:u,parent:i,type:s,props:c,children:p,line:Uu,column:ya,length:v,return:""}}function Ds(a,u){return S3(Wu("",null,null,"",null,null,0),a,{length:-a.length},u)}function P3(){return Hn}function R3(){return Hn=vr>0?nr(wa,--vr):0,ya--,Hn===10&&(ya=1,Uu--),Hn}function Rr(){return Hn=vr<x_?nr(wa,vr++):0,ya++,Hn===10&&(ya=1,Uu++),Hn}function ui(){return nr(wa,vr)}function Gu(){return vr}function Is(a,u){return As(wa,a,u)}function Ms(a){switch(a){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 S_(a){return Uu=ya=1,x_=li(wa=a),vr=0,[]}function T_(a){return wa="",a}function qu(a){return E_(Is(vr-1,ym(a===91?a+2:a===40?a+1:a)))}function O3(a){for(;(Hn=ui())&&Hn<33;)Rr();return Ms(a)>2||Ms(Hn)>3?"":" "}function k3(a,u){for(;--u&&Rr()&&!(Hn<48||Hn>102||Hn>57&&Hn<65||Hn>70&&Hn<97););return Is(a,Gu()+(u<6&&ui()==32&&Rr()==32))}function ym(a){for(;Rr();)switch(Hn){case a:return vr;case 34:case 39:a!==34&&a!==39&&ym(Hn);break;case 40:a===41&&ym(a);break;case 92:Rr();break}return vr}function A3(a,u){for(;Rr()&&a+Hn!==57&&!(a+Hn===84&&ui()===47););return"/*"+Is(u,vr-1)+"*"+zu(a===47?a:Rr())}function D3(a){for(;!Ms(ui());)Rr();return Is(a,vr)}function I3(a){return T_(Yu("",null,null,null,[""],a=S_(a),0,[0],a))}function Yu(a,u,i,s,c,p,v,y,b){for(var E=0,S=0,O=v,A=0,H=0,W=0,re=1,$=1,se=1,I=0,ne="",he=c,ce=p,Se=s,Pe=ne;$;)switch(W=I,I=Rr()){case 40:if(W!=108&&nr(Pe,O-1)==58){gm(Pe+=rn(qu(I),"&","&\f"),"&\f")!=-1&&(se=-1);break}case 34:case 39:case 91:Pe+=qu(I);break;case 9:case 10:case 13:case 32:Pe+=O3(W);break;case 92:Pe+=k3(Gu()-1,7);continue;case 47:switch(ui()){case 42:case 47:Vu(M3(A3(Rr(),Gu()),u,i),b);break;default:Pe+="/"}break;case 123*re:y[E++]=li(Pe)*se;case 125*re:case 59:case 0:switch(I){case 0:case 125:$=0;case 59+S:se==-1&&(Pe=rn(Pe,/\f/g,"")),H>0&&li(Pe)-O&&Vu(H>32?C_(Pe+";",s,i,O-1):C_(rn(Pe," ","")+";",s,i,O-2),b);break;case 59:Pe+=";";default:if(Vu(Se=__(Pe,u,i,E,S,c,y,ne,he=[],ce=[],O),p),I===123)if(S===0)Yu(Pe,u,Se,Se,he,p,O,y,ce);else switch(A===99&&nr(Pe,3)===110?100:A){case 100:case 108:case 109:case 115:Yu(a,Se,Se,s&&Vu(__(a,Se,Se,0,0,c,y,ne,c,he=[],O),ce),c,ce,O,y,s?he:ce);break;default:Yu(Pe,Se,Se,Se,[""],ce,0,y,ce)}}E=S=H=0,re=se=1,ne=Pe="",O=v;break;case 58:O=1+li(Pe),H=W;default:if(re<1){if(I==123)--re;else if(I==125&&re++==0&&R3()==125)continue}switch(Pe+=zu(I),I*re){case 38:se=S>0?1:(Pe+="\f",-1);break;case 44:y[E++]=(li(Pe)-1)*se,se=1;break;case 64:ui()===45&&(Pe+=qu(Rr())),A=ui(),S=O=li(ne=Pe+=D3(Gu())),I++;break;case 45:W===45&&li(Pe)==2&&(re=0)}}return p}function __(a,u,i,s,c,p,v,y,b,E,S){for(var O=c-1,A=c===0?p:[""],H=vm(A),W=0,re=0,$=0;W<s;++W)for(var se=0,I=As(a,O+1,O=x3(re=v[W])),ne=a;se<H;++se)(ne=E_(re>0?A[se]+" "+I:rn(I,/&\f/g,A[se])))&&(b[$++]=ne);return Wu(a,u,i,c===0?pm:y,b,E,S)}function M3(a,u,i){return Wu(a,u,i,w_,zu(P3()),As(a,2,-2),0)}function C_(a,u,i,s){return Wu(a,u,i,mm,As(a,0,s),As(a,s+1,-1),s)}function ba(a,u){for(var i="",s=vm(a),c=0;c<s;c++)i+=u(a[c],c,a,u)||"";return i}function N3(a,u,i,s){switch(a.type){case E3:if(a.children.length)break;case b3:case mm:return a.return=a.return||a.value;case w_:return"";case b_:return a.return=a.value+"{"+ba(a.children,s)+"}";case pm:a.value=a.props.join(",")}return li(i=ba(a.children,s))?a.return=a.value+"{"+i+"}":""}function L3(a){var u=vm(a);return function(i,s,c,p){for(var v="",y=0;y<u;y++)v+=a[y](i,s,c,p)||"";return v}}function F3(a){return function(u){u.root||(u=u.return)&&a(u)}}function B3(a){var u=Object.create(null);return function(i){return u[i]===void 0&&(u[i]=a(i)),u[i]}}var j3=function(a,u,i){for(var s=0,c=0;s=c,c=ui(),s===38&&c===12&&(u[i]=1),!Ms(c);)Rr();return Is(a,vr)},H3=function(a,u){var i=-1,s=44;do switch(Ms(s)){case 0:s===38&&ui()===12&&(u[i]=1),a[i]+=j3(vr-1,u,i);break;case 2:a[i]+=qu(s);break;case 4:if(s===44){a[++i]=ui()===58?"&\f":"",u[i]=a[i].length;break}default:a[i]+=zu(s)}while(s=Rr());return a},z3=function(a,u){return T_(H3(S_(a),u))},P_=new WeakMap,V3=function(a){if(!(a.type!=="rule"||!a.parent||a.length<1)){for(var u=a.value,i=a.parent,s=a.column===i.column&&a.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(a.props.length===1&&u.charCodeAt(0)!==58&&!P_.get(i))&&!s){P_.set(a,!0);for(var c=[],p=z3(u,c),v=i.props,y=0,b=0;y<p.length;y++)for(var E=0;E<v.length;E++,b++)a.props[b]=c[y]?p[y].replace(/&\f/g,v[E]):v[E]+" "+p[y]}}},U3=function(a){if(a.type==="decl"){var u=a.value;u.charCodeAt(0)===108&&u.charCodeAt(2)===98&&(a.return="",a.value="")}};function R_(a,u){switch(T3(a,u)){case 5103:return nn+"print-"+a+a;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 nn+a+a;case 5349:case 4246:case 4810:case 6968:case 2756:return nn+a+Hu+a+hr+a+a;case 6828:case 4268:return nn+a+hr+a+a;case 6165:return nn+a+hr+"flex-"+a+a;case 5187:return nn+a+rn(a,/(\w+).+(:[^]+)/,nn+"box-$1$2"+hr+"flex-$1$2")+a;case 5443:return nn+a+hr+"flex-item-"+rn(a,/flex-|-self/,"")+a;case 4675:return nn+a+hr+"flex-line-pack"+rn(a,/align-content|flex-|-self/,"")+a;case 5548:return nn+a+hr+rn(a,"shrink","negative")+a;case 5292:return nn+a+hr+rn(a,"basis","preferred-size")+a;case 6060:return nn+"box-"+rn(a,"-grow","")+nn+a+hr+rn(a,"grow","positive")+a;case 4554:return nn+rn(a,/([^-])(transform)/g,"$1"+nn+"$2")+a;case 6187:return rn(rn(rn(a,/(zoom-|grab)/,nn+"$1"),/(image-set)/,nn+"$1"),a,"")+a;case 5495:case 3959:return rn(a,/(image-set\([^]*)/,nn+"$1$`$1");case 4968:return rn(rn(a,/(.+:)(flex-)?(.*)/,nn+"box-pack:$3"+hr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+nn+a+a;case 4095:case 3583:case 4068:case 2532:return rn(a,/(.+)-inline(.+)/,nn+"$1$2")+a;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(li(a)-1-u>6)switch(nr(a,u+1)){case 109:if(nr(a,u+4)!==45)break;case 102:return rn(a,/(.+:)(.+)-([^]+)/,"$1"+nn+"$2-$3$1"+Hu+(nr(a,u+3)==108?"$3":"$2-$3"))+a;case 115:return~gm(a,"stretch")?R_(rn(a,"stretch","fill-available"),u)+a:a}break;case 4949:if(nr(a,u+1)!==115)break;case 6444:switch(nr(a,li(a)-3-(~gm(a,"!important")&&10))){case 107:return rn(a,":",":"+nn)+a;case 101:return rn(a,/(.+:)([^;!]+)(;|!.+)?/,"$1"+nn+(nr(a,14)===45?"inline-":"")+"box$3$1"+nn+"$2$3$1"+hr+"$2box$3")+a}break;case 5936:switch(nr(a,u+11)){case 114:return nn+a+hr+rn(a,/[svh]\w+-[tblr]{2}/,"tb")+a;case 108:return nn+a+hr+rn(a,/[svh]\w+-[tblr]{2}/,"tb-rl")+a;case 45:return nn+a+hr+rn(a,/[svh]\w+-[tblr]{2}/,"lr")+a}return nn+a+hr+a+a}return a}var W3=function(a,u,i,s){if(a.length>-1&&!a.return)switch(a.type){case mm:a.return=R_(a.value,a.length);break;case b_:return ba([Ds(a,{value:rn(a.value,"@","@"+nn)})],s);case pm:if(a.length)return C3(a.props,function(c){switch(_3(c,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ba([Ds(a,{props:[rn(c,/:(read-\w+)/,":"+Hu+"$1")]})],s);case"::placeholder":return ba([Ds(a,{props:[rn(c,/:(plac\w+)/,":"+nn+"input-$1")]}),Ds(a,{props:[rn(c,/:(plac\w+)/,":"+Hu+"$1")]}),Ds(a,{props:[rn(c,/:(plac\w+)/,hr+"input-$1")]})],s)}return""})}},G3=[W3],q3=function(a){var u=a.key;if(u==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(W){var re=W.getAttribute("data-emotion");re.indexOf(" ")!==-1&&(document.head.appendChild(W),W.setAttribute("data-s",""))})}var s=a.stylisPlugins||G3,c={},p,v=[];p=a.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+u+' "]'),function(W){for(var re=W.getAttribute("data-emotion").split(" "),$=1;$<re.length;$++)c[re[$]]=!0;v.push(W)});var y,b=[V3,U3];{var E,S=[N3,F3(function(W){E.insert(W)})],O=L3(b.concat(s,S)),A=function(W){return ba(I3(W),O)};y=function(W,re,$,se){E=$,A(W?W+"{"+re.styles+"}":re.styles),se&&(H.inserted[re.name]=!0)}}var H={key:u,sheet:new w3({key:u,container:p,nonce:a.nonce,speedy:a.speedy,prepend:a.prepend,insertionPoint:a.insertionPoint}),nonce:a.nonce,inserted:c,registered:{},insert:y};return H.sheet.hydrate(v),H},O_={exports:{}},yn={};/** @license React v16.13.1
|
|
315
|
-
* react-is.production.min.js
|
|
316
|
-
*
|
|
317
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
318
|
-
*
|
|
319
|
-
* This source code is licensed under the MIT license found in the
|
|
320
|
-
* LICENSE file in the root directory of this source tree.
|
|
321
|
-
*/var Zn=typeof Symbol=="function"&&Symbol.for,wm=Zn?Symbol.for("react.element"):60103,bm=Zn?Symbol.for("react.portal"):60106,Xu=Zn?Symbol.for("react.fragment"):60107,Zu=Zn?Symbol.for("react.strict_mode"):60108,Ku=Zn?Symbol.for("react.profiler"):60114,Ju=Zn?Symbol.for("react.provider"):60109,Qu=Zn?Symbol.for("react.context"):60110,Em=Zn?Symbol.for("react.async_mode"):60111,$u=Zn?Symbol.for("react.concurrent_mode"):60111,ec=Zn?Symbol.for("react.forward_ref"):60112,tc=Zn?Symbol.for("react.suspense"):60113,Y3=Zn?Symbol.for("react.suspense_list"):60120,nc=Zn?Symbol.for("react.memo"):60115,rc=Zn?Symbol.for("react.lazy"):60116,X3=Zn?Symbol.for("react.block"):60121,Z3=Zn?Symbol.for("react.fundamental"):60117,K3=Zn?Symbol.for("react.responder"):60118,J3=Zn?Symbol.for("react.scope"):60119;function Or(a){if(typeof a=="object"&&a!==null){var u=a.$$typeof;switch(u){case wm:switch(a=a.type,a){case Em:case $u:case Xu:case Ku:case Zu:case tc:return a;default:switch(a=a&&a.$$typeof,a){case Qu:case ec:case rc:case nc:case Ju:return a;default:return u}}case bm:return u}}}function k_(a){return Or(a)===$u}yn.AsyncMode=Em,yn.ConcurrentMode=$u,yn.ContextConsumer=Qu,yn.ContextProvider=Ju,yn.Element=wm,yn.ForwardRef=ec,yn.Fragment=Xu,yn.Lazy=rc,yn.Memo=nc,yn.Portal=bm,yn.Profiler=Ku,yn.StrictMode=Zu,yn.Suspense=tc,yn.isAsyncMode=function(a){return k_(a)||Or(a)===Em},yn.isConcurrentMode=k_,yn.isContextConsumer=function(a){return Or(a)===Qu},yn.isContextProvider=function(a){return Or(a)===Ju},yn.isElement=function(a){return typeof a=="object"&&a!==null&&a.$$typeof===wm},yn.isForwardRef=function(a){return Or(a)===ec},yn.isFragment=function(a){return Or(a)===Xu},yn.isLazy=function(a){return Or(a)===rc},yn.isMemo=function(a){return Or(a)===nc},yn.isPortal=function(a){return Or(a)===bm},yn.isProfiler=function(a){return Or(a)===Ku},yn.isStrictMode=function(a){return Or(a)===Zu},yn.isSuspense=function(a){return Or(a)===tc},yn.isValidElementType=function(a){return typeof a=="string"||typeof a=="function"||a===Xu||a===$u||a===Ku||a===Zu||a===tc||a===Y3||typeof a=="object"&&a!==null&&(a.$$typeof===rc||a.$$typeof===nc||a.$$typeof===Ju||a.$$typeof===Qu||a.$$typeof===ec||a.$$typeof===Z3||a.$$typeof===K3||a.$$typeof===J3||a.$$typeof===X3)},yn.typeOf=Or,O_.exports=yn;var A_=O_.exports,Q3={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},$3={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},D_={};D_[A_.ForwardRef]=Q3,D_[A_.Memo]=$3;var eq=!0;function I_(a,u,i){var s="";return i.split(" ").forEach(function(c){a[c]!==void 0?u.push(a[c]+";"):s+=c+" "}),s}var xm=function(a,u,i){var s=a.key+"-"+u.name;(i===!1||eq===!1)&&a.registered[s]===void 0&&(a.registered[s]=u.styles)},M_=function(a,u,i){xm(a,u,i);var s=a.key+"-"+u.name;if(a.inserted[u.name]===void 0){var c=u;do a.insert(u===c?"."+s:"",c,a.sheet,!0),c=c.next;while(c!==void 0)}};function tq(a){for(var u=0,i,s=0,c=a.length;c>=4;++s,c-=4)i=a.charCodeAt(s)&255|(a.charCodeAt(++s)&255)<<8|(a.charCodeAt(++s)&255)<<16|(a.charCodeAt(++s)&255)<<24,i=(i&65535)*1540483477+((i>>>16)*59797<<16),i^=i>>>24,u=(i&65535)*1540483477+((i>>>16)*59797<<16)^(u&65535)*1540483477+((u>>>16)*59797<<16);switch(c){case 3:u^=(a.charCodeAt(s+2)&255)<<16;case 2:u^=(a.charCodeAt(s+1)&255)<<8;case 1:u^=a.charCodeAt(s)&255,u=(u&65535)*1540483477+((u>>>16)*59797<<16)}return u^=u>>>13,u=(u&65535)*1540483477+((u>>>16)*59797<<16),((u^u>>>15)>>>0).toString(36)}var nq={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},rq=/[A-Z]|^ms/g,iq=/_EMO_([^_]+?)_([^]*?)_EMO_/g,N_=function(a){return a.charCodeAt(1)===45},L_=function(a){return a!=null&&typeof a!="boolean"},Sm=B3(function(a){return N_(a)?a:a.replace(rq,"-$&").toLowerCase()}),F_=function(a,u){switch(a){case"animation":case"animationName":if(typeof u=="string")return u.replace(iq,function(i,s,c){return ci={name:s,styles:c,next:ci},s})}return nq[a]!==1&&!N_(a)&&typeof u=="number"&&u!==0?u+"px":u};function Ns(a,u,i){if(i==null)return"";if(i.__emotion_styles!==void 0)return i;switch(typeof i){case"boolean":return"";case"object":{if(i.anim===1)return ci={name:i.name,styles:i.styles,next:ci},i.name;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)ci={name:s.name,styles:s.styles,next:ci},s=s.next;var c=i.styles+";";return c}return oq(a,u,i)}case"function":{if(a!==void 0){var p=ci,v=i(a);return ci=p,Ns(a,u,v)}break}}if(u==null)return i;var y=u[i];return y!==void 0?y:i}function oq(a,u,i){var s="";if(Array.isArray(i))for(var c=0;c<i.length;c++)s+=Ns(a,u,i[c])+";";else for(var p in i){var v=i[p];if(typeof v!="object")u!=null&&u[v]!==void 0?s+=p+"{"+u[v]+"}":L_(v)&&(s+=Sm(p)+":"+F_(p,v)+";");else if(Array.isArray(v)&&typeof v[0]=="string"&&(u==null||u[v[0]]===void 0))for(var y=0;y<v.length;y++)L_(v[y])&&(s+=Sm(p)+":"+F_(p,v[y])+";");else{var b=Ns(a,u,v);switch(p){case"animation":case"animationName":{s+=Sm(p)+":"+b+";";break}default:s+=p+"{"+b+"}"}}}return s}var B_=/label:\s*([^\s;\n{]+)\s*(;|$)/g,ci,Tm=function(a,u,i){if(a.length===1&&typeof a[0]=="object"&&a[0]!==null&&a[0].styles!==void 0)return a[0];var s=!0,c="";ci=void 0;var p=a[0];p==null||p.raw===void 0?(s=!1,c+=Ns(i,u,p)):c+=p[0];for(var v=1;v<a.length;v++)c+=Ns(i,u,a[v]),s&&(c+=p[v]);B_.lastIndex=0;for(var y="",b;(b=B_.exec(c))!==null;)y+="-"+b[1];var E=tq(c)+y;return{name:E,styles:c,next:ci}},aq=function(a){return a()},sq=fp.useInsertionEffect?fp.useInsertionEffect:!1,j_=sq||aq,_m={}.hasOwnProperty,H_=Qe(typeof HTMLElement<"u"?q3({key:"css"}):null);H_.Provider;var z_=function(a){return wi(function(u,i){var s=Ie(H_);return a(u,s,i)})},V_=Qe({}),Cm="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",lq=function(a,u){var i={};for(var s in u)_m.call(u,s)&&(i[s]=u[s]);return i[Cm]=a,i},uq=function(a){var u=a.cache,i=a.serialized,s=a.isStringTag;return xm(u,i,s),j_(function(){return M_(u,i,s)}),null},cq=z_(function(a,u,i){var s=a.css;typeof s=="string"&&u.registered[s]!==void 0&&(s=u.registered[s]);var c=a[Cm],p=[s],v="";typeof a.className=="string"?v=I_(u.registered,p,a.className):a.className!=null&&(v=a.className+" ");var y=Tm(p,void 0,Ie(V_));v+=u.key+"-"+y.name;var b={};for(var E in a)_m.call(a,E)&&E!=="css"&&E!==Cm&&(b[E]=a[E]);return b.ref=i,b.className=v,k(Z,null,k(uq,{cache:u,serialized:y,isStringTag:typeof c=="string"}),k(c,b))}),hq=cq,At=function(a,u){var i=arguments;if(u==null||!_m.call(u,"css"))return k.apply(void 0,i);var s=i.length,c=new Array(s);c[0]=hq,c[1]=lq(a,u);for(var p=2;p<s;p++)c[p]=i[p];return k.apply(null,c)};function Pm(){for(var a=arguments.length,u=new Array(a),i=0;i<a;i++)u[i]=arguments[i];return Tm(u)}var dq=function(){var a=Pm.apply(void 0,arguments),u="animation-"+a.name;return{name:u,styles:"@keyframes "+u+"{"+a.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},fq=function a(u){for(var i=u.length,s=0,c="";s<i;s++){var p=u[s];if(p!=null){var v=void 0;switch(typeof p){case"boolean":break;case"object":{if(Array.isArray(p))v=a(p);else{v="";for(var y in p)p[y]&&y&&(v&&(v+=" "),v+=y)}break}default:v=p}v&&(c&&(c+=" "),c+=v)}}return c};function pq(a,u,i){var s=[],c=I_(a,s,i);return s.length<2?i:c+u(s)}var mq=function(a){var u=a.cache,i=a.serializedArr;return j_(function(){for(var s=0;s<i.length;s++)M_(u,i[s],!1)}),null},gq=z_(function(a,u){var i=[],s=function(){for(var y=arguments.length,b=new Array(y),E=0;E<y;E++)b[E]=arguments[E];var S=Tm(b,u.registered);return i.push(S),xm(u,S,!1),u.key+"-"+S.name},c=function(){for(var y=arguments.length,b=new Array(y),E=0;E<y;E++)b[E]=arguments[E];return pq(u.registered,s,fq(b))},p={css:s,cx:c,theme:Ie(V_)},v=a.children(p);return k(Z,null,k(mq,{cache:u,serializedArr:i}),v)});function vq(a,u){return u||(u=a.slice(0)),Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(u)}}))}function Rm(a,u){if(a==null)return{};var i={},s=Object.keys(a),c,p;for(p=0;p<s.length;p++)c=s[p],!(u.indexOf(c)>=0)&&(i[c]=a[c]);return i}function Ea(a,u){if(a==null)return{};var i=Rm(a,u),s,c;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(a);for(c=0;c<p.length;c++)s=p[c],!(u.indexOf(s)>=0)&&(!Object.prototype.propertyIsEnumerable.call(a,s)||(i[s]=a[s]))}return i}function xa(a){return xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},xa(a)}var U_={};Object.defineProperty(U_,"__esModule",{value:!0});var Om=Object.assign||function(a){for(var u=1;u<arguments.length;u++){var i=arguments[u];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(a[s]=i[s])}return a},W_=function(){function a(u,i){for(var s=0;s<i.length;s++){var c=i[s];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(u,c.key,c)}}return function(u,i,s){return i&&a(u.prototype,i),s&&a(u,s),u}}(),G_=sa,Ls=q_(G_),yq=Es.exports,Wn=q_(yq);function q_(a){return a&&a.__esModule?a:{default:a}}function wq(a,u){var i={};for(var s in a)u.indexOf(s)>=0||!Object.prototype.hasOwnProperty.call(a,s)||(i[s]=a[s]);return i}function bq(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}function Eq(a,u){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:a}function xq(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(a,u):a.__proto__=u)}var Y_={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},Sq=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],Tq=function(a){return Sq.forEach(function(u){return delete a[u]}),a},X_=function(a,u){u.style.fontSize=a.fontSize,u.style.fontFamily=a.fontFamily,u.style.fontWeight=a.fontWeight,u.style.fontStyle=a.fontStyle,u.style.letterSpacing=a.letterSpacing,u.style.textTransform=a.textTransform},Z_=typeof window<"u"&&window.navigator?/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent):!1,K_=function(){return Z_?"_"+Math.random().toString(36).substr(2,12):void 0},km=function(a){xq(u,a),W_(u,null,[{key:"getDerivedStateFromProps",value:function(i,s){var c=i.id;return c!==s.prevId?{inputId:c||K_(),prevId:c}:null}}]);function u(i){bq(this,u);var s=Eq(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,i));return s.inputRef=function(c){s.input=c,typeof s.props.inputRef=="function"&&s.props.inputRef(c)},s.placeHolderSizerRef=function(c){s.placeHolderSizer=c},s.sizerRef=function(c){s.sizer=c},s.state={inputWidth:i.minWidth,inputId:i.id||K_(),prevId:i.id},s}return W_(u,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(i,s){s.inputWidth!==this.state.inputWidth&&typeof this.props.onAutosize=="function"&&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 i=this.input&&window.getComputedStyle(this.input);!i||(X_(i,this.sizer),this.placeHolderSizer&&X_(i,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(!(!this.mounted||!this.sizer||typeof this.sizer.scrollWidth>"u")){var i=void 0;this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?i=Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:i=this.sizer.scrollWidth+2;var s=this.props.type==="number"&&this.props.extraWidth===void 0?16:parseInt(this.props.extraWidth)||0;i+=s,i<this.props.minWidth&&(i=this.props.minWidth),i!==this.state.inputWidth&&this.setState({inputWidth:i})}}},{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 i=this.props.injectStyles;return Z_&&i?Ls.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var i=[this.props.defaultValue,this.props.value,""].reduce(function(v,y){return v??y}),s=Om({},this.props.style);s.display||(s.display="inline-block");var c=Om({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),p=wq(this.props,[]);return Tq(p),p.className=this.props.inputClassName,p.id=this.state.inputId,p.style=c,Ls.default.createElement("div",{className:this.props.className,style:s},this.renderStyles(),Ls.default.createElement("input",Om({},p,{ref:this.inputRef})),Ls.default.createElement("div",{ref:this.sizerRef,style:Y_},i),this.props.placeholder?Ls.default.createElement("div",{ref:this.placeHolderSizerRef,style:Y_},this.props.placeholder):null)}}]),u}(G_.Component);km.propTypes={className:Wn.default.string,defaultValue:Wn.default.any,extraWidth:Wn.default.oneOfType([Wn.default.number,Wn.default.string]),id:Wn.default.string,injectStyles:Wn.default.bool,inputClassName:Wn.default.string,inputRef:Wn.default.func,inputStyle:Wn.default.object,minWidth:Wn.default.oneOfType([Wn.default.number,Wn.default.string]),onAutosize:Wn.default.func,onChange:Wn.default.func,placeholder:Wn.default.string,placeholderIsMinWidth:Wn.default.bool,style:Wn.default.object,value:Wn.default.any},km.defaultProps={minWidth:1,injectStyles:!0};var _q=U_.default=km;function ic(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}function Cq(a,u){if(xa(a)!=="object"||a===null)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var s=i.call(a,u);if(xa(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}function J_(a){var u=Cq(a,"string");return xa(u)==="symbol"?u:String(u)}function Q_(a,u){for(var i=0;i<u.length;i++){var s=u[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(a,J_(s.key),s)}}function oc(a,u,i){return u&&Q_(a.prototype,u),i&&Q_(a,i),Object.defineProperty(a,"prototype",{writable:!1}),a}function ac(a,u){return ac=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,s){return i.__proto__=s,i},ac(a,u)}function sc(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),u&&ac(a,u)}function xi(a,u,i){return u=J_(u),u in a?Object.defineProperty(a,u,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[u]=i,a}function Pq(a,u,i){return u in a?Object.defineProperty(a,u,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[u]=i,a}function $_(a,u){var i=Object.keys(a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(a);u&&(s=s.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),i.push.apply(i,s)}return i}function rr(a){for(var u=1;u<arguments.length;u++){var i=arguments[u]!=null?arguments[u]:{};u%2?$_(Object(i),!0).forEach(function(s){Pq(a,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(i)):$_(Object(i)).forEach(function(s){Object.defineProperty(a,s,Object.getOwnPropertyDescriptor(i,s))})}return a}function lc(a){return lc=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},lc(a)}function Rq(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Oq(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function kq(a,u){return u&&(typeof u=="object"||typeof u=="function")?u:Oq(a)}function uc(a){var u=Rq();return function(){var i=lc(a),s;if(u){var c=lc(this).constructor;s=Reflect.construct(i,arguments,c)}else s=i.apply(this,arguments);return kq(this,s)}}var cc=function(){};function Aq(a,u){return u?u[0]==="-"?a+u:a+"__"+u:a}function Dq(a,u,i){var s=[i];if(u&&a)for(var c in u)u.hasOwnProperty(c)&&u[c]&&s.push("".concat(Aq(a,c)));return s.filter(function(p){return p}).map(function(p){return String(p).trim()}).join(" ")}var eC=function(a){return Array.isArray(a)?a.filter(Boolean):xa(a)==="object"&&a!==null?[a]:[]},tC=function(a){a.className,a.clearValue,a.cx,a.getStyles,a.getValue,a.hasValue,a.isMulti,a.isRtl,a.options,a.selectOption,a.selectProps,a.setValue,a.theme;var u=Ea(a,["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"]);return rr({},u)};function Am(a){return[document.documentElement,document.body,window].indexOf(a)>-1}function nC(a){return Am(a)?window.pageYOffset:a.scrollTop}function hc(a,u){if(Am(a)){window.scrollTo(0,u);return}a.scrollTop=u}function Iq(a){var u=getComputedStyle(a),i=u.position==="absolute",s=/(auto|scroll)/,c=document.documentElement;if(u.position==="fixed")return c;for(var p=a;p=p.parentElement;)if(u=getComputedStyle(p),!(i&&u.position==="static")&&s.test(u.overflow+u.overflowY+u.overflowX))return p;return c}function Mq(a,u,i,s){return i*((a=a/s-1)*a*a+1)+u}function dc(a,u){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:cc,c=nC(a),p=u-c,v=10,y=0;function b(){y+=v;var E=Mq(y,c,p,i);hc(a,E),y<i?window.requestAnimationFrame(b):s(a)}b()}function Nq(a,u){var i=a.getBoundingClientRect(),s=u.getBoundingClientRect(),c=u.offsetHeight/3;s.bottom+c>i.bottom?hc(a,Math.min(u.offsetTop+u.clientHeight-a.offsetHeight+c,a.scrollHeight)):s.top-c<i.top&&hc(a,Math.max(u.offsetTop-c,0))}function Lq(a){var u=a.getBoundingClientRect();return{bottom:u.bottom,height:u.height,left:u.left,right:u.right,top:u.top,width:u.width}}function rC(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function Fq(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var iC=!1,Bq={get passive(){return iC=!0}},fc=typeof window<"u"?window:{};fc.addEventListener&&fc.removeEventListener&&(fc.addEventListener("p",cc,Bq),fc.removeEventListener("p",cc,!1));var jq=iC;function Hq(a){var u=a.maxHeight,i=a.menuEl,s=a.minHeight,c=a.placement,p=a.shouldScroll,v=a.isFixedPosition,y=a.theme,b=y.spacing,E=Iq(i),S={placement:"bottom",maxHeight:u};if(!i||!i.offsetParent)return S;var O=E.getBoundingClientRect(),A=O.height,H=i.getBoundingClientRect(),W=H.bottom,re=H.height,$=H.top,se=i.offsetParent.getBoundingClientRect(),I=se.top,ne=window.innerHeight,he=nC(E),ce=parseInt(getComputedStyle(i).marginBottom,10),Se=parseInt(getComputedStyle(i).marginTop,10),Pe=I-Se,Xe=ne-$,tt=Pe+he,ht=A-he-$,yt=W-ne+he+ce,dt=he+$-Se,Tt=160;switch(c){case"auto":case"bottom":if(Xe>=re)return{placement:"bottom",maxHeight:u};if(ht>=re&&!v)return p&&dc(E,yt,Tt),{placement:"bottom",maxHeight:u};if(!v&&ht>=s||v&&Xe>=s){p&&dc(E,yt,Tt);var xt=v?Xe-ce:ht-ce;return{placement:"bottom",maxHeight:xt}}if(c==="auto"||v){var Nt=u,Mt=v?Pe:tt;return Mt>=s&&(Nt=Math.min(Mt-ce-b.controlHeight,u)),{placement:"top",maxHeight:Nt}}if(c==="bottom")return p&&hc(E,yt),{placement:"bottom",maxHeight:u};break;case"top":if(Pe>=re)return{placement:"top",maxHeight:u};if(tt>=re&&!v)return p&&dc(E,dt,Tt),{placement:"top",maxHeight:u};if(!v&&tt>=s||v&&Pe>=s){var Ht=u;return(!v&&tt>=s||v&&Pe>=s)&&(Ht=v?Pe-Se:tt-Se),p&&dc(E,dt,Tt),{placement:"top",maxHeight:Ht}}return{placement:"bottom",maxHeight:u};default:throw new Error('Invalid placement provided "'.concat(c,'".'))}return S}function zq(a){var u={bottom:"top",top:"bottom"};return a?u[a]:"bottom"}var Dm=function(a){return a==="auto"?"bottom":a},Vq=function(a){var u,i=a.placement,s=a.theme,c=s.borderRadius,p=s.spacing,v=s.colors;return u={label:"menu"},xi(u,zq(i),"100%"),xi(u,"backgroundColor",v.neutral0),xi(u,"borderRadius",c),xi(u,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),xi(u,"marginBottom",p.menuGutter),xi(u,"marginTop",p.menuGutter),xi(u,"position","absolute"),xi(u,"width","100%"),xi(u,"zIndex",1),u},oC=Qe({getPortalPlacement:null}),aC=function(a){sc(i,a);var u=uc(i);function i(){var s;ic(this,i);for(var c=arguments.length,p=new Array(c),v=0;v<c;v++)p[v]=arguments[v];return s=u.call.apply(u,[this].concat(p)),s.state={maxHeight:s.props.maxMenuHeight,placement:null},s.getPlacement=function(y){var b=s.props,E=b.minMenuHeight,S=b.maxMenuHeight,O=b.menuPlacement,A=b.menuPosition,H=b.menuShouldScrollIntoView,W=b.theme;if(y){var re=A==="fixed",$=H&&!re,se=Hq({maxHeight:S,menuEl:y,minHeight:E,placement:O,shouldScroll:$,isFixedPosition:re,theme:W}),I=s.context.getPortalPlacement;I&&I(se),s.setState(se)}},s.getUpdatedProps=function(){var y=s.props.menuPlacement,b=s.state.placement||Dm(y);return rr(rr({},s.props),{},{placement:b,maxHeight:s.state.maxHeight})},s}return oc(i,[{key:"render",value:function(){var s=this.props.children;return s({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),i}(B);aC.contextType=oC;var Uq=function(a){var u=a.children,i=a.className,s=a.cx,c=a.getStyles,p=a.innerRef,v=a.innerProps;return At("div",kt({css:c("menu",a),className:s({menu:!0},i),ref:p},v),u)},Wq=function(a){var u=a.maxHeight,i=a.theme.spacing.baseUnit;return{maxHeight:u,overflowY:"auto",paddingBottom:i,paddingTop:i,position:"relative",WebkitOverflowScrolling:"touch"}},Gq=function(a){var u=a.children,i=a.className,s=a.cx,c=a.getStyles,p=a.innerProps,v=a.innerRef,y=a.isMulti;return At("div",kt({css:c("menuList",a),className:s({"menu-list":!0,"menu-list--is-multi":y},i),ref:v},p),u)},sC=function(a){var u=a.theme,i=u.spacing.baseUnit,s=u.colors;return{color:s.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px"),textAlign:"center"}},qq=sC,Yq=sC,lC=function(a){var u=a.children,i=a.className,s=a.cx,c=a.getStyles,p=a.innerProps;return At("div",kt({css:c("noOptionsMessage",a),className:s({"menu-notice":!0,"menu-notice--no-options":!0},i)},p),u)};lC.defaultProps={children:"No options"};var uC=function(a){var u=a.children,i=a.className,s=a.cx,c=a.getStyles,p=a.innerProps;return At("div",kt({css:c("loadingMessage",a),className:s({"menu-notice":!0,"menu-notice--loading":!0},i)},p),u)};uC.defaultProps={children:"Loading..."};var Xq=function(a){var u=a.rect,i=a.offset,s=a.position;return{left:u.left,position:s,top:i,width:u.width,zIndex:1}},Zq=function(a){sc(i,a);var u=uc(i);function i(){var s;ic(this,i);for(var c=arguments.length,p=new Array(c),v=0;v<c;v++)p[v]=arguments[v];return s=u.call.apply(u,[this].concat(p)),s.state={placement:null},s.getPortalPlacement=function(y){var b=y.placement,E=Dm(s.props.menuPlacement);b!==E&&s.setState({placement:b})},s}return oc(i,[{key:"render",value:function(){var s=this.props,c=s.appendTo,p=s.children,v=s.className,y=s.controlElement,b=s.cx,E=s.innerProps,S=s.menuPlacement,O=s.menuPosition,A=s.getStyles,H=O==="fixed";if(!c&&!H||!y)return null;var W=this.state.placement||Dm(S),re=Lq(y),$=H?0:window.pageYOffset,se=re[W]+$,I={offset:se,position:O,rect:re},ne=At("div",kt({css:A("menuPortal",I),className:b({"menu-portal":!0},v)},E),p);return At(oC.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},c?pn(ne,c):ne)}}]),i}(B),Kq=function(a){var u=a.isDisabled,i=a.isRtl;return{label:"container",direction:i?"rtl":null,pointerEvents:u?"none":null,position:"relative"}},Jq=function(a){var u=a.children,i=a.className,s=a.cx,c=a.getStyles,p=a.innerProps,v=a.isDisabled,y=a.isRtl;return At("div",kt({css:c("container",a),className:s({"--is-disabled":v,"--is-rtl":y},i)},p),u)},Qq=function(a){var u=a.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(u.baseUnit/2,"px ").concat(u.baseUnit*2,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}},$q=function(a){var u=a.children,i=a.className,s=a.cx,c=a.innerProps,p=a.isMulti,v=a.getStyles,y=a.hasValue;return At("div",kt({css:v("valueContainer",a),className:s({"value-container":!0,"value-container--is-multi":p,"value-container--has-value":y},i)},c),u)},e8=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},t8=function(a){var u=a.children,i=a.className,s=a.cx,c=a.innerProps,p=a.getStyles;return At("div",kt({css:p("indicatorsContainer",a),className:s({indicators:!0},i)},c),u)},cC,n8={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},hC=function(a){var u=a.size,i=Ea(a,["size"]);return At("svg",kt({height:u,width:u,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:n8},i))},Im=function(a){return At(hC,kt({size:20},a),At("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"}))},dC=function(a){return At(hC,kt({size:20},a),At("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"}))},fC=function(a){var u=a.isFocused,i=a.theme,s=i.spacing.baseUnit,c=i.colors;return{label:"indicatorContainer",color:u?c.neutral60:c.neutral20,display:"flex",padding:s*2,transition:"color 150ms",":hover":{color:u?c.neutral80:c.neutral40}}},r8=fC,i8=function(a){var u=a.children,i=a.className,s=a.cx,c=a.getStyles,p=a.innerProps;return At("div",kt({css:c("dropdownIndicator",a),className:s({indicator:!0,"dropdown-indicator":!0},i)},p),u||At(dC,null))},o8=fC,a8=function(a){var u=a.children,i=a.className,s=a.cx,c=a.getStyles,p=a.innerProps;return At("div",kt({css:c("clearIndicator",a),className:s({indicator:!0,"clear-indicator":!0},i)},p),u||At(Im,null))},s8=function(a){var u=a.isDisabled,i=a.theme,s=i.spacing.baseUnit,c=i.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:u?c.neutral10:c.neutral20,marginBottom:s*2,marginTop:s*2,width:1}},l8=function(a){var u=a.className,i=a.cx,s=a.getStyles,c=a.innerProps;return At("span",kt({},c,{css:s("indicatorSeparator",a),className:i({"indicator-separator":!0},u)}))},u8=dq(cC||(cC=vq([`
|
|
322
|
-
0%, 80%, 100% { opacity: 0; }
|
|
323
|
-
40% { opacity: 1; }
|
|
324
|
-
`]))),c8=function(a){var u=a.isFocused,i=a.size,s=a.theme,c=s.colors,p=s.spacing.baseUnit;return{label:"loadingIndicator",color:u?c.neutral60:c.neutral20,display:"flex",padding:p*2,transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"}},Mm=function(a){var u=a.delay,i=a.offset;return At("span",{css:Pm({animation:"".concat(u8," 1s ease-in-out ").concat(u,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:i?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"","")})},pC=function(a){var u=a.className,i=a.cx,s=a.getStyles,c=a.innerProps,p=a.isRtl;return At("div",kt({css:s("loadingIndicator",a),className:i({indicator:!0,"loading-indicator":!0},u)},c),At(Mm,{delay:0,offset:p}),At(Mm,{delay:160,offset:!0}),At(Mm,{delay:320,offset:!p}))};pC.defaultProps={size:4};var h8=function(a){var u=a.isDisabled,i=a.isFocused,s=a.theme,c=s.colors,p=s.borderRadius,v=s.spacing;return{label:"control",alignItems:"center",backgroundColor:u?c.neutral5:c.neutral0,borderColor:u?c.neutral10:i?c.primary:c.neutral20,borderRadius:p,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(c.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:v.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:i?c.primary:c.neutral30}}},d8=function(a){var u=a.children,i=a.cx,s=a.getStyles,c=a.className,p=a.isDisabled,v=a.isFocused,y=a.innerRef,b=a.innerProps,E=a.menuIsOpen;return At("div",kt({ref:y,css:s("control",a),className:i({control:!0,"control--is-disabled":p,"control--is-focused":v,"control--menu-is-open":E},c)},b),u)},f8=function(a){var u=a.theme.spacing;return{paddingBottom:u.baseUnit*2,paddingTop:u.baseUnit*2}},p8=function(a){var u=a.children,i=a.className,s=a.cx,c=a.getStyles,p=a.Heading,v=a.headingProps,y=a.innerProps,b=a.label,E=a.theme,S=a.selectProps;return At("div",kt({css:c("group",a),className:s({group:!0},i)},y),At(p,kt({},v,{selectProps:S,theme:E,getStyles:c,cx:s}),b),At("div",null,u))},m8=function(a){var u=a.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:u.baseUnit*3,paddingRight:u.baseUnit*3,textTransform:"uppercase"}},g8=function(a){var u=a.getStyles,i=a.cx,s=a.className,c=tC(a);c.data;var p=Ea(c,["data"]);return At("div",kt({css:u("groupHeading",a),className:i({"group-heading":!0},s)},p))},v8=function(a){var u=a.isDisabled,i=a.theme,s=i.spacing,c=i.colors;return{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,visibility:u?"hidden":"visible",color:c.neutral80}},y8=function(a){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"}},w8=function(a){var u=a.className,i=a.cx,s=a.getStyles,c=tC(a),p=c.innerRef,v=c.isDisabled,y=c.isHidden,b=Ea(c,["innerRef","isDisabled","isHidden"]);return At("div",{css:s("input",a)},At(_q,kt({className:i({input:!0},u),inputRef:p,inputStyle:y8(y),disabled:v},b)))},b8=function(a){var u=a.theme,i=u.spacing,s=u.borderRadius,c=u.colors;return{label:"multiValue",backgroundColor:c.neutral10,borderRadius:s/2,display:"flex",margin:i.baseUnit/2,minWidth:0}},E8=function(a){var u=a.theme,i=u.borderRadius,s=u.colors,c=a.cropWithEllipsis;return{borderRadius:i/2,color:s.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:c?"ellipsis":null,whiteSpace:"nowrap"}},x8=function(a){var u=a.theme,i=u.spacing,s=u.borderRadius,c=u.colors,p=a.isFocused;return{alignItems:"center",borderRadius:s/2,backgroundColor:p&&c.dangerLight,display:"flex",paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:c.dangerLight,color:c.danger}}},mC=function(a){var u=a.children,i=a.innerProps;return At("div",i,u)},S8=mC,T8=mC;function _8(a){var u=a.children,i=a.innerProps;return At("div",i,u||At(Im,{size:14}))}var gC=function(a){var u=a.children,i=a.className,s=a.components,c=a.cx,p=a.data,v=a.getStyles,y=a.innerProps,b=a.isDisabled,E=a.removeProps,S=a.selectProps,O=s.Container,A=s.Label,H=s.Remove;return At(gq,null,function(W){var re=W.css,$=W.cx;return At(O,{data:p,innerProps:rr({className:$(re(v("multiValue",a)),c({"multi-value":!0,"multi-value--is-disabled":b},i))},y),selectProps:S},At(A,{data:p,innerProps:{className:$(re(v("multiValueLabel",a)),c({"multi-value__label":!0},i))},selectProps:S},u),At(H,{data:p,innerProps:rr({className:$(re(v("multiValueRemove",a)),c({"multi-value__remove":!0},i))},E),selectProps:S}))})};gC.defaultProps={cropWithEllipsis:!0};var C8=function(a){var u=a.isDisabled,i=a.isFocused,s=a.isSelected,c=a.theme,p=c.spacing,v=c.colors;return{label:"option",backgroundColor:s?v.primary:i?v.primary25:"transparent",color:u?v.neutral20:s?v.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(p.baseUnit*2,"px ").concat(p.baseUnit*3,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!u&&(s?v.primary:v.primary50)}}},P8=function(a){var u=a.children,i=a.className,s=a.cx,c=a.getStyles,p=a.isDisabled,v=a.isFocused,y=a.isSelected,b=a.innerRef,E=a.innerProps;return At("div",kt({css:c("option",a),className:s({option:!0,"option--is-disabled":p,"option--is-focused":v,"option--is-selected":y},i),ref:b},E),u)},R8=function(a){var u=a.theme,i=u.spacing,s=u.colors;return{label:"placeholder",color:s.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},O8=function(a){var u=a.children,i=a.className,s=a.cx,c=a.getStyles,p=a.innerProps;return At("div",kt({css:c("placeholder",a),className:s({placeholder:!0},i)},p),u)},k8=function(a){var u=a.isDisabled,i=a.theme,s=i.spacing,c=i.colors;return{label:"singleValue",color:u?c.neutral40:c.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2,maxWidth:"calc(100% - ".concat(s.baseUnit*2,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},A8=function(a){var u=a.children,i=a.className,s=a.cx,c=a.getStyles,p=a.isDisabled,v=a.innerProps;return At("div",kt({css:c("singleValue",a),className:s({"single-value":!0,"single-value--is-disabled":p},i)},v),u)},D8={ClearIndicator:a8,Control:d8,DropdownIndicator:i8,DownChevron:dC,CrossIcon:Im,Group:p8,GroupHeading:g8,IndicatorsContainer:t8,IndicatorSeparator:l8,Input:w8,LoadingIndicator:pC,Menu:Uq,MenuList:Gq,MenuPortal:Zq,LoadingMessage:uC,NoOptionsMessage:lC,MultiValue:gC,MultiValueContainer:S8,MultiValueLabel:T8,MultiValueRemove:_8,Option:P8,Placeholder:O8,SelectContainer:Jq,SingleValue:A8,ValueContainer:$q},I8=function(a){return rr(rr({},D8),a.components)};function Nm(a,u){(u==null||u>a.length)&&(u=a.length);for(var i=0,s=new Array(u);i<u;i++)s[i]=a[i];return s}function M8(a){if(Array.isArray(a))return Nm(a)}function N8(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function L8(a,u){if(a){if(typeof a=="string")return Nm(a,u);var i=Object.prototype.toString.call(a).slice(8,-1);if(i==="Object"&&a.constructor&&(i=a.constructor.name),i==="Map"||i==="Set")return Array.from(a);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Nm(a,u)}}function F8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
325
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vC(a){return M8(a)||N8(a)||L8(a)||F8()}var yC=Number.isNaN||function(a){return typeof a=="number"&&a!==a};function B8(a,u){return!!(a===u||yC(a)&&yC(u))}function j8(a,u){if(a.length!==u.length)return!1;for(var i=0;i<a.length;i++)if(!B8(a[i],u[i]))return!1;return!0}function H8(a,u){u===void 0&&(u=j8);var i,s=[],c,p=!1;function v(){for(var y=[],b=0;b<arguments.length;b++)y[b]=arguments[b];return p&&i===this&&u(y,s)||(c=a.apply(this,y),p=!0,i=this,s=y),c}return v}for(var z8={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"},V8=function(a){return At("span",kt({css:z8},a))},U8={guidance:function(a){var u=a.isSearchable,i=a.isMulti,s=a.isDisabled,c=a.tabSelectsValue,p=a.context;switch(p){case"menu":return"Use Up and Down to choose options".concat(s?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(c?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(a["aria-label"]||"Select"," is focused ").concat(u?",type to refine list":"",", press Down to open the menu, ").concat(i?" 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(a){var u=a.action,i=a.label,s=i===void 0?"":i,c=a.isDisabled;switch(u){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(s,", deselected.");case"select-option":return c?"option ".concat(s," is disabled. Select another option."):"option ".concat(s,", selected.");default:return""}},onFocus:function(a){var u=a.context,i=a.focused,s=i===void 0?{}:i,c=a.options,p=a.label,v=p===void 0?"":p,y=a.selectValue,b=a.isDisabled,E=a.isSelected,S=function(H,W){return H&&H.length?"".concat(H.indexOf(W)+1," of ").concat(H.length):""};if(u==="value"&&y)return"value ".concat(v," focused, ").concat(S(y,s),".");if(u==="menu"){var O=b?" disabled":"",A="".concat(E?"selected":"focused").concat(O);return"option ".concat(v," ").concat(A,", ").concat(S(c,s),".")}return""},onFilter:function(a){var u=a.inputValue,i=a.resultsMessage;return"".concat(i).concat(u?" for search term "+u:"",".")}},W8=function(a){var u=a.ariaSelection,i=a.focusedOption,s=a.focusedValue,c=a.focusableOptions,p=a.isFocused,v=a.selectValue,y=a.selectProps,b=y.ariaLiveMessages,E=y.getOptionLabel,S=y.inputValue,O=y.isMulti,A=y.isOptionDisabled,H=y.isSearchable,W=y.menuIsOpen,re=y.options,$=y.screenReaderStatus,se=y.tabSelectsValue,I=y["aria-label"],ne=y["aria-live"],he=St(function(){return rr(rr({},U8),b||{})},[b]),ce=St(function(){var ht="";if(u&&he.onChange){var yt=u.option,dt=u.removedValue,Tt=u.value,xt=function(Ht){return Array.isArray(Ht)?null:Ht},Nt=dt||yt||xt(Tt),Mt=rr({isDisabled:Nt&&A(Nt),label:Nt?E(Nt):""},u);ht=he.onChange(Mt)}return ht},[u,A,E,he]),Se=St(function(){var ht="",yt=i||s,dt=!!(i&&v&&v.includes(i));if(yt&&he.onFocus){var Tt={focused:yt,label:E(yt),isDisabled:A(yt),isSelected:dt,options:re,context:yt===i?"menu":"value",selectValue:v};ht=he.onFocus(Tt)}return ht},[i,s,E,A,he,re,v]),Pe=St(function(){var ht="";if(W&&re.length&&he.onFilter){var yt=$({count:c.length});ht=he.onFilter({inputValue:S,resultsMessage:yt})}return ht},[c,S,W,he,re,$]),Xe=St(function(){var ht="";if(he.guidance){var yt=s?"value":W?"menu":"input";ht=he.guidance({"aria-label":I,context:yt,isDisabled:i&&A(i),isMulti:O,isSearchable:H,tabSelectsValue:se})}return ht},[I,i,s,O,A,H,W,he,se]),tt="".concat(Se," ").concat(Pe," ").concat(Xe);return At(V8,{"aria-live":ne,"aria-atomic":"false","aria-relevant":"additions text"},p&&At(Ue.Fragment,null,At("span",{id:"aria-selection"},ce),At("span",{id:"aria-context"},tt)))},Lm=[{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źẑżžẓẕƶȥɀⱬꝣ"}],G8=new RegExp("["+Lm.map(function(a){return a.letters}).join("")+"]","g"),wC={},Fm=0;Fm<Lm.length;Fm++)for(var Bm=Lm[Fm],jm=0;jm<Bm.letters.length;jm++)wC[Bm.letters[jm]]=Bm.base;var bC=function(a){return a.replace(G8,function(u){return wC[u]})},q8=H8(bC),EC=function(a){return a.replace(/^\s+|\s+$/g,"")},Y8=function(a){return"".concat(a.label," ").concat(a.value)},X8=function(a){return function(u,i){var s=rr({ignoreCase:!0,ignoreAccents:!0,stringify:Y8,trim:!0,matchFrom:"any"},a),c=s.ignoreCase,p=s.ignoreAccents,v=s.stringify,y=s.trim,b=s.matchFrom,E=y?EC(i):i,S=y?EC(v(u)):v(u);return c&&(E=E.toLowerCase(),S=S.toLowerCase()),p&&(E=q8(E),S=bC(S)),b==="start"?S.substr(0,E.length)===E:S.indexOf(E)>-1}};function Z8(a){a.in,a.out,a.onExited,a.appear,a.enter,a.exit;var u=a.innerRef;a.emotion;var i=Ea(a,["in","out","onExited","appear","enter","exit","innerRef","emotion"]);return At("input",kt({ref:u},i,{css:Pm({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 K8=function(a){a.preventDefault(),a.stopPropagation()};function J8(a){var u=a.isEnabled,i=a.onBottomArrive,s=a.onBottomLeave,c=a.onTopArrive,p=a.onTopLeave,v=gt(!1),y=gt(!1),b=gt(0),E=gt(null),S=ge(function($,se){if(E.current!==null){var I=E.current,ne=I.scrollTop,he=I.scrollHeight,ce=I.clientHeight,Se=E.current,Pe=se>0,Xe=he-ce-ne,tt=!1;Xe>se&&v.current&&(s&&s($),v.current=!1),Pe&&y.current&&(p&&p($),y.current=!1),Pe&&se>Xe?(i&&!v.current&&i($),Se.scrollTop=he,tt=!0,v.current=!0):!Pe&&-se>ne&&(c&&!y.current&&c($),Se.scrollTop=0,tt=!0,y.current=!0),tt&&K8($)}},[]),O=ge(function($){S($,$.deltaY)},[S]),A=ge(function($){b.current=$.changedTouches[0].clientY},[]),H=ge(function($){var se=b.current-$.changedTouches[0].clientY;S($,se)},[S]),W=ge(function($){if($){var se=jq?{passive:!1}:!1;typeof $.addEventListener=="function"&&$.addEventListener("wheel",O,se),typeof $.addEventListener=="function"&&$.addEventListener("touchstart",A,se),typeof $.addEventListener=="function"&&$.addEventListener("touchmove",H,se)}},[H,A,O]),re=ge(function($){!$||(typeof $.removeEventListener=="function"&&$.removeEventListener("wheel",O,!1),typeof $.removeEventListener=="function"&&$.removeEventListener("touchstart",A,!1),typeof $.removeEventListener=="function"&&$.removeEventListener("touchmove",H,!1))},[H,A,O]);return ut(function(){if(u){var $=E.current;return W($),function(){re($)}}},[u,W,re]),function($){E.current=$}}var xC=["boxSizing","height","overflow","paddingRight","position"],SC={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function TC(a){a.preventDefault()}function _C(a){a.stopPropagation()}function CC(){var a=this.scrollTop,u=this.scrollHeight,i=a+this.offsetHeight;a===0?this.scrollTop=1:i===u&&(this.scrollTop=a-1)}function PC(){return"ontouchstart"in window||navigator.maxTouchPoints}var RC=!!(typeof window<"u"&&window.document&&window.document.createElement),Fs=0,Sa={capture:!1,passive:!1};function Q8(a){var u=a.isEnabled,i=a.accountForScrollbars,s=i===void 0?!0:i,c=gt({}),p=gt(null),v=ge(function(b){if(RC){var E=document.body,S=E&&E.style;if(s&&xC.forEach(function(W){var re=S&&S[W];c.current[W]=re}),s&&Fs<1){var O=parseInt(c.current.paddingRight,10)||0,A=document.body?document.body.clientWidth:0,H=window.innerWidth-A+O||0;Object.keys(SC).forEach(function(W){var re=SC[W];S&&(S[W]=re)}),S&&(S.paddingRight="".concat(H,"px"))}E&&PC()&&(E.addEventListener("touchmove",TC,Sa),b&&(b.addEventListener("touchstart",CC,Sa),b.addEventListener("touchmove",_C,Sa))),Fs+=1}},[]),y=ge(function(b){if(RC){var E=document.body,S=E&&E.style;Fs=Math.max(Fs-1,0),s&&Fs<1&&xC.forEach(function(O){var A=c.current[O];S&&(S[O]=A)}),E&&PC()&&(E.removeEventListener("touchmove",TC,Sa),b&&(b.removeEventListener("touchstart",CC,Sa),b.removeEventListener("touchmove",_C,Sa)))}},[]);return ut(function(){if(u){var b=p.current;return v(b),function(){y(b)}}},[u,v,y]),function(b){p.current=b}}var $8=function(){return document.activeElement&&document.activeElement.blur()},eY={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function tY(a){var u=a.children,i=a.lockEnabled,s=a.captureEnabled,c=s===void 0?!0:s,p=a.onBottomArrive,v=a.onBottomLeave,y=a.onTopArrive,b=a.onTopLeave,E=J8({isEnabled:c,onBottomArrive:p,onBottomLeave:v,onTopArrive:y,onTopLeave:b}),S=Q8({isEnabled:i}),O=function(A){E(A),S(A)};return At(Ue.Fragment,null,i&&At("div",{onClick:$8,css:eY}),u(O))}var nY=function(a){return a.label},rY=function(a){return a.label},iY=function(a){return a.value},oY=function(a){return!!a.isDisabled},aY={clearIndicator:o8,container:Kq,control:h8,dropdownIndicator:r8,group:f8,groupHeading:m8,indicatorsContainer:e8,indicatorSeparator:s8,input:v8,loadingIndicator:c8,loadingMessage:Yq,menu:Vq,menuList:Wq,menuPortal:Xq,multiValue:b8,multiValueLabel:E8,multiValueRemove:x8,noOptionsMessage:qq,option:C8,placeholder:R8,singleValue:k8,valueContainer:Qq},sY={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%)"},lY=4,OC=4,uY=38,cY=OC*2,hY={baseUnit:OC,controlHeight:uY,menuGutter:cY},Hm={borderRadius:lY,colors:sY,spacing:hY},dY={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:rC(),captureMenuScroll:!rC(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:X8(),formatGroupLabel:nY,getOptionLabel:rY,getOptionValue:iY,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:oY,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!Fq(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(a){var u=a.count;return"".concat(u," result").concat(u!==1?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0};function kC(a,u,i,s){var c=NC(a,u,i),p=LC(a,u,i),v=MC(a,u),y=pc(a,u);return{type:"option",data:u,isDisabled:c,isSelected:p,label:v,value:y,index:s}}function AC(a,u){return a.options.map(function(i,s){if(i.options){var c=i.options.map(function(v,y){return kC(a,v,u,y)}).filter(function(v){return IC(a,v)});return c.length>0?{type:"group",data:i,options:c,index:s}:void 0}var p=kC(a,i,u,s);return IC(a,p)?p:void 0}).filter(function(i){return!!i})}function DC(a){return a.reduce(function(u,i){return i.type==="group"?u.push.apply(u,vC(i.options.map(function(s){return s.data}))):u.push(i.data),u},[])}function fY(a,u){return DC(AC(a,u))}function IC(a,u){var i=a.inputValue,s=i===void 0?"":i,c=u.data,p=u.isSelected,v=u.label,y=u.value;return(!BC(a)||!p)&&FC(a,{label:v,value:y,data:c},s)}function pY(a,u){var i=a.focusedValue,s=a.selectValue,c=s.indexOf(i);if(c>-1){var p=u.indexOf(i);if(p>-1)return i;if(c<u.length)return u[c]}return null}function mY(a,u){var i=a.focusedOption;return i&&u.indexOf(i)>-1?i:u[0]}var MC=function(a,u){return a.getOptionLabel(u)},pc=function(a,u){return a.getOptionValue(u)};function NC(a,u,i){return typeof a.isOptionDisabled=="function"?a.isOptionDisabled(u,i):!1}function LC(a,u,i){if(i.indexOf(u)>-1)return!0;if(typeof a.isOptionSelected=="function")return a.isOptionSelected(u,i);var s=pc(a,u);return i.some(function(c){return pc(a,c)===s})}function FC(a,u,i){return a.filterOption?a.filterOption(u,i):!0}var BC=function(a){var u=a.hideSelectedOptions,i=a.isMulti;return u===void 0?i:u},gY=1,jC=function(a){sc(i,a);var u=uc(i);function i(s){var c;return ic(this,i),c=u.call(this,s),c.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},c.blockOptionHover=!1,c.isComposing=!1,c.commonProps=void 0,c.initialTouchX=0,c.initialTouchY=0,c.instancePrefix="",c.openAfterFocus=!1,c.scrollToFocusedOptionOnUpdate=!1,c.userIsDragging=void 0,c.controlRef=null,c.getControlRef=function(p){c.controlRef=p},c.focusedOptionRef=null,c.getFocusedOptionRef=function(p){c.focusedOptionRef=p},c.menuListRef=null,c.getMenuListRef=function(p){c.menuListRef=p},c.inputRef=null,c.getInputRef=function(p){c.inputRef=p},c.focus=c.focusInput,c.blur=c.blurInput,c.onChange=function(p,v){var y=c.props,b=y.onChange,E=y.name;v.name=E,c.ariaOnChange(p,v),b(p,v)},c.setValue=function(p){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"set-value",y=arguments.length>2?arguments[2]:void 0,b=c.props,E=b.closeMenuOnSelect,S=b.isMulti;c.onInputChange("",{action:"set-value"}),E&&(c.setState({inputIsHiddenAfterUpdate:!S}),c.onMenuClose()),c.setState({clearFocusValueOnUpdate:!0}),c.onChange(p,{action:v,option:y})},c.selectOption=function(p){var v=c.props,y=v.blurInputOnSelect,b=v.isMulti,E=v.name,S=c.state.selectValue,O=b&&c.isOptionSelected(p,S),A=c.isOptionDisabled(p,S);if(O){var H=c.getOptionValue(p);c.setValue(S.filter(function(W){return c.getOptionValue(W)!==H}),"deselect-option",p)}else if(!A)b?c.setValue([].concat(vC(S),[p]),"select-option",p):c.setValue(p,"select-option");else{c.ariaOnChange(p,{action:"select-option",name:E});return}y&&c.blurInput()},c.removeValue=function(p){var v=c.props.isMulti,y=c.state.selectValue,b=c.getOptionValue(p),E=y.filter(function(O){return c.getOptionValue(O)!==b}),S=v?E:E[0]||null;c.onChange(S,{action:"remove-value",removedValue:p}),c.focusInput()},c.clearValue=function(){var p=c.state.selectValue;c.onChange(c.props.isMulti?[]:null,{action:"clear",removedValues:p})},c.popValue=function(){var p=c.props.isMulti,v=c.state.selectValue,y=v[v.length-1],b=v.slice(0,v.length-1),E=p?b:b[0]||null;c.onChange(E,{action:"pop-value",removedValue:y})},c.getValue=function(){return c.state.selectValue},c.cx=function(){for(var p=arguments.length,v=new Array(p),y=0;y<p;y++)v[y]=arguments[y];return Dq.apply(void 0,[c.props.classNamePrefix].concat(v))},c.getOptionLabel=function(p){return MC(c.props,p)},c.getOptionValue=function(p){return pc(c.props,p)},c.getStyles=function(p,v){var y=aY[p](v);y.boxSizing="border-box";var b=c.props.styles[p];return b?b(y,v):y},c.getElementId=function(p){return"".concat(c.instancePrefix,"-").concat(p)},c.getComponents=function(){return I8(c.props)},c.buildCategorizedOptions=function(){return AC(c.props,c.state.selectValue)},c.getCategorizedOptions=function(){return c.props.menuIsOpen?c.buildCategorizedOptions():[]},c.buildFocusableOptions=function(){return DC(c.buildCategorizedOptions())},c.getFocusableOptions=function(){return c.props.menuIsOpen?c.buildFocusableOptions():[]},c.ariaOnChange=function(p,v){c.setState({ariaSelection:rr({value:p},v)})},c.onMenuMouseDown=function(p){p.button===0&&(p.stopPropagation(),p.preventDefault(),c.focusInput())},c.onMenuMouseMove=function(p){c.blockOptionHover=!1},c.onControlMouseDown=function(p){var v=c.props.openMenuOnClick;c.state.isFocused?c.props.menuIsOpen?p.target.tagName!=="INPUT"&&p.target.tagName!=="TEXTAREA"&&c.onMenuClose():v&&c.openMenu("first"):(v&&(c.openAfterFocus=!0),c.focusInput()),p.target.tagName!=="INPUT"&&p.target.tagName!=="TEXTAREA"&&p.preventDefault()},c.onDropdownIndicatorMouseDown=function(p){if(!(p&&p.type==="mousedown"&&p.button!==0)&&!c.props.isDisabled){var v=c.props,y=v.isMulti,b=v.menuIsOpen;c.focusInput(),b?(c.setState({inputIsHiddenAfterUpdate:!y}),c.onMenuClose()):c.openMenu("first"),p.preventDefault(),p.stopPropagation()}},c.onClearIndicatorMouseDown=function(p){p&&p.type==="mousedown"&&p.button!==0||(c.clearValue(),p.stopPropagation(),c.openAfterFocus=!1,p.type==="touchend"?c.focusInput():setTimeout(function(){return c.focusInput()}))},c.onScroll=function(p){typeof c.props.closeMenuOnScroll=="boolean"?p.target instanceof HTMLElement&&Am(p.target)&&c.props.onMenuClose():typeof c.props.closeMenuOnScroll=="function"&&c.props.closeMenuOnScroll(p)&&c.props.onMenuClose()},c.onCompositionStart=function(){c.isComposing=!0},c.onCompositionEnd=function(){c.isComposing=!1},c.onTouchStart=function(p){var v=p.touches,y=v&&v.item(0);!y||(c.initialTouchX=y.clientX,c.initialTouchY=y.clientY,c.userIsDragging=!1)},c.onTouchMove=function(p){var v=p.touches,y=v&&v.item(0);if(y){var b=Math.abs(y.clientX-c.initialTouchX),E=Math.abs(y.clientY-c.initialTouchY),S=5;c.userIsDragging=b>S||E>S}},c.onTouchEnd=function(p){c.userIsDragging||(c.controlRef&&!c.controlRef.contains(p.target)&&c.menuListRef&&!c.menuListRef.contains(p.target)&&c.blurInput(),c.initialTouchX=0,c.initialTouchY=0)},c.onControlTouchEnd=function(p){c.userIsDragging||c.onControlMouseDown(p)},c.onClearIndicatorTouchEnd=function(p){c.userIsDragging||c.onClearIndicatorMouseDown(p)},c.onDropdownIndicatorTouchEnd=function(p){c.userIsDragging||c.onDropdownIndicatorMouseDown(p)},c.handleInputChange=function(p){var v=p.currentTarget.value;c.setState({inputIsHiddenAfterUpdate:!1}),c.onInputChange(v,{action:"input-change"}),c.props.menuIsOpen||c.onMenuOpen()},c.onInputFocus=function(p){c.props.onFocus&&c.props.onFocus(p),c.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(c.openAfterFocus||c.props.openMenuOnFocus)&&c.openMenu("first"),c.openAfterFocus=!1},c.onInputBlur=function(p){if(c.menuListRef&&c.menuListRef.contains(document.activeElement)){c.inputRef.focus();return}c.props.onBlur&&c.props.onBlur(p),c.onInputChange("",{action:"input-blur"}),c.onMenuClose(),c.setState({focusedValue:null,isFocused:!1})},c.onOptionHover=function(p){c.blockOptionHover||c.state.focusedOption===p||c.setState({focusedOption:p})},c.shouldHideSelectedOptions=function(){return BC(c.props)},c.onKeyDown=function(p){var v=c.props,y=v.isMulti,b=v.backspaceRemovesValue,E=v.escapeClearsValue,S=v.inputValue,O=v.isClearable,A=v.isDisabled,H=v.menuIsOpen,W=v.onKeyDown,re=v.tabSelectsValue,$=v.openMenuOnFocus,se=c.state,I=se.focusedOption,ne=se.focusedValue,he=se.selectValue;if(!A&&!(typeof W=="function"&&(W(p),p.defaultPrevented))){switch(c.blockOptionHover=!0,p.key){case"ArrowLeft":if(!y||S)return;c.focusValue("previous");break;case"ArrowRight":if(!y||S)return;c.focusValue("next");break;case"Delete":case"Backspace":if(S)return;if(ne)c.removeValue(ne);else{if(!b)return;y?c.popValue():O&&c.clearValue()}break;case"Tab":if(c.isComposing||p.shiftKey||!H||!re||!I||$&&c.isOptionSelected(I,he))return;c.selectOption(I);break;case"Enter":if(p.keyCode===229)break;if(H){if(!I||c.isComposing)return;c.selectOption(I);break}return;case"Escape":H?(c.setState({inputIsHiddenAfterUpdate:!1}),c.onInputChange("",{action:"menu-close"}),c.onMenuClose()):O&&E&&c.clearValue();break;case" ":if(S)return;if(!H){c.openMenu("first");break}if(!I)return;c.selectOption(I);break;case"ArrowUp":H?c.focusOption("up"):c.openMenu("last");break;case"ArrowDown":H?c.focusOption("down"):c.openMenu("first");break;case"PageUp":if(!H)return;c.focusOption("pageup");break;case"PageDown":if(!H)return;c.focusOption("pagedown");break;case"Home":if(!H)return;c.focusOption("first");break;case"End":if(!H)return;c.focusOption("last");break;default:return}p.preventDefault()}},c.instancePrefix="react-select-"+(c.props.instanceId||++gY),c.state.selectValue=eC(s.value),c}return oc(i,[{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(s){var c=this.props,p=c.isDisabled,v=c.menuIsOpen,y=this.state.isFocused;(y&&!p&&s.isDisabled||y&&v&&!s.menuIsOpen)&&this.focusInput(),y&&p&&!s.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Nq(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(s,c){this.props.onInputChange(s,c)}},{key:"focusInput",value:function(){!this.inputRef||this.inputRef.focus()}},{key:"blurInput",value:function(){!this.inputRef||this.inputRef.blur()}},{key:"openMenu",value:function(s){var c=this,p=this.state,v=p.selectValue,y=p.isFocused,b=this.buildFocusableOptions(),E=s==="first"?0:b.length-1;if(!this.props.isMulti){var S=b.indexOf(v[0]);S>-1&&(E=S)}this.scrollToFocusedOptionOnUpdate=!(y&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:b[E]},function(){return c.onMenuOpen()})}},{key:"focusValue",value:function(s){var c=this.state,p=c.selectValue,v=c.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var y=p.indexOf(v);v||(y=-1);var b=p.length-1,E=-1;if(p.length){switch(s){case"previous":y===0?E=0:y===-1?E=b:E=y-1;break;case"next":y>-1&&y<b&&(E=y+1);break}this.setState({inputIsHidden:E!==-1,focusedValue:p[E]})}}}},{key:"focusOption",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",c=this.props.pageSize,p=this.state.focusedOption,v=this.getFocusableOptions();if(v.length){var y=0,b=v.indexOf(p);p||(b=-1),s==="up"?y=b>0?b-1:v.length-1:s==="down"?y=(b+1)%v.length:s==="pageup"?(y=b-c,y<0&&(y=0)):s==="pagedown"?(y=b+c,y>v.length-1&&(y=v.length-1)):s==="last"&&(y=v.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:v[y],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Hm):rr(rr({},Hm),this.props.theme):Hm}},{key:"getCommonProps",value:function(){var s=this.clearValue,c=this.cx,p=this.getStyles,v=this.getValue,y=this.selectOption,b=this.setValue,E=this.props,S=E.isMulti,O=E.isRtl,A=E.options,H=this.hasValue();return{clearValue:s,cx:c,getStyles:p,getValue:v,hasValue:H,isMulti:S,isRtl:O,options:A,selectOption:y,selectProps:E,setValue:b,theme:this.getTheme()}}},{key:"hasValue",value:function(){var s=this.state.selectValue;return s.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var s=this.props,c=s.isClearable,p=s.isMulti;return c===void 0?p:c}},{key:"isOptionDisabled",value:function(s,c){return NC(this.props,s,c)}},{key:"isOptionSelected",value:function(s,c){return LC(this.props,s,c)}},{key:"filterOption",value:function(s,c){return FC(this.props,s,c)}},{key:"formatOptionLabel",value:function(s,c){if(typeof this.props.formatOptionLabel=="function"){var p=this.props.inputValue,v=this.state.selectValue;return this.props.formatOptionLabel(s,{context:c,inputValue:p,selectValue:v})}else return this.getOptionLabel(s)}},{key:"formatGroupLabel",value:function(s){return this.props.formatGroupLabel(s)}},{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 s=this.props,c=s.isDisabled,p=s.isSearchable,v=s.inputId,y=s.inputValue,b=s.tabIndex,E=s.form,S=this.getComponents(),O=S.Input,A=this.state.inputIsHidden,H=this.commonProps,W=v||this.getElementId("input"),re={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return p?Ue.createElement(O,kt({},H,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:W,innerRef:this.getInputRef,isDisabled:c,isHidden:A,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:b,form:E,type:"text",value:y},re)):Ue.createElement(Z8,kt({id:W,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:cc,onFocus:this.onInputFocus,readOnly:!0,disabled:c,tabIndex:b,form:E,value:""},re))}},{key:"renderPlaceholderOrValue",value:function(){var s=this,c=this.getComponents(),p=c.MultiValue,v=c.MultiValueContainer,y=c.MultiValueLabel,b=c.MultiValueRemove,E=c.SingleValue,S=c.Placeholder,O=this.commonProps,A=this.props,H=A.controlShouldRenderValue,W=A.isDisabled,re=A.isMulti,$=A.inputValue,se=A.placeholder,I=this.state,ne=I.selectValue,he=I.focusedValue,ce=I.isFocused;if(!this.hasValue()||!H)return $?null:Ue.createElement(S,kt({},O,{key:"placeholder",isDisabled:W,isFocused:ce}),se);if(re){var Se=ne.map(function(Xe,tt){var ht=Xe===he;return Ue.createElement(p,kt({},O,{components:{Container:v,Label:y,Remove:b},isFocused:ht,isDisabled:W,key:"".concat(s.getOptionValue(Xe)).concat(tt),index:tt,removeProps:{onClick:function(){return s.removeValue(Xe)},onTouchEnd:function(){return s.removeValue(Xe)},onMouseDown:function(yt){yt.preventDefault(),yt.stopPropagation()}},data:Xe}),s.formatOptionLabel(Xe,"value"))});return Se}if($)return null;var Pe=ne[0];return Ue.createElement(E,kt({},O,{data:Pe,isDisabled:W}),this.formatOptionLabel(Pe,"value"))}},{key:"renderClearIndicator",value:function(){var s=this.getComponents(),c=s.ClearIndicator,p=this.commonProps,v=this.props,y=v.isDisabled,b=v.isLoading,E=this.state.isFocused;if(!this.isClearable()||!c||y||!this.hasValue()||b)return null;var S={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return Ue.createElement(c,kt({},p,{innerProps:S,isFocused:E}))}},{key:"renderLoadingIndicator",value:function(){var s=this.getComponents(),c=s.LoadingIndicator,p=this.commonProps,v=this.props,y=v.isDisabled,b=v.isLoading,E=this.state.isFocused;if(!c||!b)return null;var S={"aria-hidden":"true"};return Ue.createElement(c,kt({},p,{innerProps:S,isDisabled:y,isFocused:E}))}},{key:"renderIndicatorSeparator",value:function(){var s=this.getComponents(),c=s.DropdownIndicator,p=s.IndicatorSeparator;if(!c||!p)return null;var v=this.commonProps,y=this.props.isDisabled,b=this.state.isFocused;return Ue.createElement(p,kt({},v,{isDisabled:y,isFocused:b}))}},{key:"renderDropdownIndicator",value:function(){var s=this.getComponents(),c=s.DropdownIndicator;if(!c)return null;var p=this.commonProps,v=this.props.isDisabled,y=this.state.isFocused,b={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return Ue.createElement(c,kt({},p,{innerProps:b,isDisabled:v,isFocused:y}))}},{key:"renderMenu",value:function(){var s=this,c=this.getComponents(),p=c.Group,v=c.GroupHeading,y=c.Menu,b=c.MenuList,E=c.MenuPortal,S=c.LoadingMessage,O=c.NoOptionsMessage,A=c.Option,H=this.commonProps,W=this.state.focusedOption,re=this.props,$=re.captureMenuScroll,se=re.inputValue,I=re.isLoading,ne=re.loadingMessage,he=re.minMenuHeight,ce=re.maxMenuHeight,Se=re.menuIsOpen,Pe=re.menuPlacement,Xe=re.menuPosition,tt=re.menuPortalTarget,ht=re.menuShouldBlockScroll,yt=re.menuShouldScrollIntoView,dt=re.noOptionsMessage,Tt=re.onMenuScrollToTop,xt=re.onMenuScrollToBottom;if(!Se)return null;var Nt=function(Gt,Ge){var at=Gt.type,lt=Gt.data,st=Gt.isDisabled,ct=Gt.isSelected,_t=Gt.label,gn=Gt.value,In=W===lt,Jt=st?void 0:function(){return s.onOptionHover(lt)},Vr=st?void 0:function(){return s.selectOption(lt)},yr="".concat(s.getElementId("option"),"-").concat(Ge),kr={id:yr,onClick:Vr,onMouseMove:Jt,onMouseOver:Jt,tabIndex:-1};return Ue.createElement(A,kt({},H,{innerProps:kr,data:lt,isDisabled:st,isSelected:ct,key:yr,label:_t,type:at,value:gn,isFocused:In,innerRef:In?s.getFocusedOptionRef:void 0}),s.formatOptionLabel(Gt.data,"menu"))},Mt;if(this.hasOptions())Mt=this.getCategorizedOptions().map(function(Gt){if(Gt.type==="group"){var Ge=Gt.data,at=Gt.options,lt=Gt.index,st="".concat(s.getElementId("group"),"-").concat(lt),ct="".concat(st,"-heading");return Ue.createElement(p,kt({},H,{key:st,data:Ge,options:at,Heading:v,headingProps:{id:ct,data:Gt.data},label:s.formatGroupLabel(Gt.data)}),Gt.options.map(function(_t){return Nt(_t,"".concat(lt,"-").concat(_t.index))}))}else if(Gt.type==="option")return Nt(Gt,"".concat(Gt.index))});else if(I){var Ht=ne({inputValue:se});if(Ht===null)return null;Mt=Ue.createElement(S,H,Ht)}else{var Qt=dt({inputValue:se});if(Qt===null)return null;Mt=Ue.createElement(O,H,Qt)}var wn={minMenuHeight:he,maxMenuHeight:ce,menuPlacement:Pe,menuPosition:Xe,menuShouldScrollIntoView:yt},ft=Ue.createElement(aC,kt({},H,wn),function(Gt){var Ge=Gt.ref,at=Gt.placerProps,lt=at.placement,st=at.maxHeight;return Ue.createElement(y,kt({},H,wn,{innerRef:Ge,innerProps:{onMouseDown:s.onMenuMouseDown,onMouseMove:s.onMenuMouseMove},isLoading:I,placement:lt}),Ue.createElement(tY,{captureEnabled:$,onTopArrive:Tt,onBottomArrive:xt,lockEnabled:ht},function(ct){return Ue.createElement(b,kt({},H,{innerRef:function(_t){s.getMenuListRef(_t),ct(_t)},isLoading:I,maxHeight:st,focusedOption:W}),Mt)}))});return tt||Xe==="fixed"?Ue.createElement(E,kt({},H,{appendTo:tt,controlElement:this.controlRef,menuPlacement:Pe,menuPosition:Xe}),ft):ft}},{key:"renderFormField",value:function(){var s=this,c=this.props,p=c.delimiter,v=c.isDisabled,y=c.isMulti,b=c.name,E=this.state.selectValue;if(!(!b||v))if(y)if(p){var S=E.map(function(H){return s.getOptionValue(H)}).join(p);return Ue.createElement("input",{name:b,type:"hidden",value:S})}else{var O=E.length>0?E.map(function(H,W){return Ue.createElement("input",{key:"i-".concat(W),name:b,type:"hidden",value:s.getOptionValue(H)})}):Ue.createElement("input",{name:b,type:"hidden"});return Ue.createElement("div",null,O)}else{var A=E[0]?this.getOptionValue(E[0]):"";return Ue.createElement("input",{name:b,type:"hidden",value:A})}}},{key:"renderLiveRegion",value:function(){var s=this.commonProps,c=this.state,p=c.ariaSelection,v=c.focusedOption,y=c.focusedValue,b=c.isFocused,E=c.selectValue,S=this.getFocusableOptions();return Ue.createElement(W8,kt({},s,{ariaSelection:p,focusedOption:v,focusedValue:y,isFocused:b,selectValue:E,focusableOptions:S}))}},{key:"render",value:function(){var s=this.getComponents(),c=s.Control,p=s.IndicatorsContainer,v=s.SelectContainer,y=s.ValueContainer,b=this.props,E=b.className,S=b.id,O=b.isDisabled,A=b.menuIsOpen,H=this.state.isFocused,W=this.commonProps=this.getCommonProps();return Ue.createElement(v,kt({},W,{className:E,innerProps:{id:S,onKeyDown:this.onKeyDown},isDisabled:O,isFocused:H}),this.renderLiveRegion(),Ue.createElement(c,kt({},W,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:O,isFocused:H,menuIsOpen:A}),Ue.createElement(y,kt({},W,{isDisabled:O}),this.renderPlaceholderOrValue(),this.renderInput()),Ue.createElement(p,kt({},W,{isDisabled:O}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(s,c){var p=c.prevProps,v=c.clearFocusValueOnUpdate,y=c.inputIsHiddenAfterUpdate,b=s.options,E=s.value,S=s.menuIsOpen,O=s.inputValue,A={};if(p&&(E!==p.value||b!==p.options||S!==p.menuIsOpen||O!==p.inputValue)){var H=eC(E),W=S?fY(s,H):[],re=v?pY(c,H):null,$=mY(c,W);A={selectValue:H,focusedOption:$,focusedValue:re,clearFocusValueOnUpdate:!1}}var se=y!=null&&s!==p?{inputIsHidden:y,inputIsHiddenAfterUpdate:void 0}:{};return rr(rr(rr({},A),se),{},{prevProps:s})}}]),i}(B);jC.defaultProps=dY;var vY={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},yY=function(a){var u,i;return i=u=function(s){sc(p,s);var c=uc(p);function p(){var v;ic(this,p);for(var y=arguments.length,b=new Array(y),E=0;E<y;E++)b[E]=arguments[E];return v=c.call.apply(c,[this].concat(b)),v.select=void 0,v.state={inputValue:v.props.inputValue!==void 0?v.props.inputValue:v.props.defaultInputValue,menuIsOpen:v.props.menuIsOpen!==void 0?v.props.menuIsOpen:v.props.defaultMenuIsOpen,value:v.props.value!==void 0?v.props.value:v.props.defaultValue},v.onChange=function(S,O){v.callProp("onChange",S,O),v.setState({value:S})},v.onInputChange=function(S,O){var A=v.callProp("onInputChange",S,O);v.setState({inputValue:A!==void 0?A:S})},v.onMenuOpen=function(){v.callProp("onMenuOpen"),v.setState({menuIsOpen:!0})},v.onMenuClose=function(){v.callProp("onMenuClose"),v.setState({menuIsOpen:!1})},v}return oc(p,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(v){return this.props[v]!==void 0?this.props[v]:this.state[v]}},{key:"callProp",value:function(v){if(typeof this.props[v]=="function"){for(var y,b=arguments.length,E=new Array(b>1?b-1:0),S=1;S<b;S++)E[S-1]=arguments[S];return(y=this.props)[v].apply(y,E)}}},{key:"render",value:function(){var v=this,y=this.props;y.defaultInputValue,y.defaultMenuIsOpen,y.defaultValue;var b=Ea(y,["defaultInputValue","defaultMenuIsOpen","defaultValue"]);return Ue.createElement(a,kt({},b,{ref:function(E){v.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")}))}}]),p}(B),u.defaultProps=vY,i},wY=yY(jC),bY=wY;const zm=[{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"}];var HC=a=>{const u=a.content?zm.find(i=>i.value===a.content):null;return Ue.createElement("div",{className:"r6o-purposedropdown"},Ue.createElement(bY,{value:u,onChange:a.onChange,options:zm,isDisabled:!a.editable}))};const EY=a=>Ue.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1000 940",width:a.width},Ue.createElement("metadata",null,"IcoFont Icons"),Ue.createElement("title",null,"simple-down"),Ue.createElement("glyph",{glyphName:"simple-down",unicode:"",horizAdvX:"1000"}),Ue.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"})),xY=a=>Ue.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"180 150 700 800",width:a.width},Ue.createElement("metadata",null,"IcoFont Icons"),Ue.createElement("title",null,"close"),Ue.createElement("glyph",{glyphName:"close",unicode:"",horizAdvX:"1000"}),Ue.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"})),SY=a=>Ue.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:a.width},Ue.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"}));var TY=a=>{const[u,i]=ze(!1),[s,c]=ze(!1),p=O=>{i(!0),c(!1)},v=O=>{a.onDelete(a.body),c(!1)},y=O=>a.onUpdate(a.body,{...a.body,value:O.target.value}),b=O=>a.onUpdate(a.body,{...a.body,purpose:O.value}),E=a.body.modified||a.body.created,S=a.body.creator&&Ue.createElement("div",{className:"r6o-lastmodified"},Ue.createElement("span",{className:"r6o-lastmodified-by"},a.body.creator.name||a.body.creator.id),a.body.created&&Ue.createElement("span",{className:"r6o-lastmodified-at"},Ue.createElement(l9,{datetime:a.env.toClientTime(E),locale:Pr.locale()})));return a.readOnly?Ue.createElement("div",{className:"r6o-widget comment"},Ue.createElement("div",{className:"r6o-readonly-comment"},a.body.value),S):Ue.createElement("div",{className:u?"r6o-widget comment editable":"r6o-widget comment"},Ue.createElement(y_,{editable:u,content:a.body.value,onChange:y,onSaveAndClose:a.onSaveAndClose}),!u&&S,a.purposeSelector&&Ue.createElement(HC,{editable:u,content:a.body.purpose,onChange:b,onSaveAndClose:a.onSaveAndClose}),Ue.createElement("div",{className:s?"r6o-icon r6o-arrow-down r6o-menu-open":"r6o-icon r6o-arrow-down",onClick:()=>c(!s)},Ue.createElement(EY,{width:12})),s&&Ue.createElement(a3,{onEdit:p,onDelete:v,onClickOutside:()=>c(!1)}))};const _Y=zm.map(a=>a.value),zC=(a,u)=>{const i=u?_Y.indexOf(a.purpose)>-1:a.purpose=="commenting"||a.purpose=="replying";return a.type==="TextualBody"&&(!Object.prototype.hasOwnProperty.call(a,"purpose")||i)},VC=(a,u)=>{var i,s;if(u.editable===!0)return!1;if(u.editable===!1)return!0;if(u.editable==="MINE_ONLY"){const c=(i=a.creator)==null?void 0:i.id;return((s=u.env.user)==null?void 0:s.id)!==c}return u.readOnly},CY=(a,u)=>a||{type:"TextualBody",value:"",purpose:u?"replying":"commenting",draft:!0},UC=a=>{const u=a.annotation?a.annotation.bodies.filter(b=>zC(b,a.purposeSelector)):[],i=CY(u.find(b=>b.draft==!0),u.length>1),s=u.filter(b=>b!=i),c=b=>{const E=i.value,S=b.target.value;E.length===0&&S.length>0?a.onAppendBody({...i,value:S}):E.length>0&&S.length===0?a.onRemoveBody(i):a.onUpdateBody(i,{...i,value:S})},p=b=>a.onUpdateBody(i,{...i,purpose:b.value}),v=!a.readOnly&&a.annotation,y=s.length===0||!a.disableReply;return Ue.createElement(Ue.Fragment,null,s.map((b,E)=>Ue.createElement(TY,{key:E,env:a.env,purposeSelector:a.purposeSelector,readOnly:VC(b,a),body:b,onUpdate:a.onUpdateBody,onDelete:a.onRemoveBody,onSaveAndClose:a.onSaveAndClose})),v&&y&&Ue.createElement("div",{className:"r6o-widget comment editable"},Ue.createElement(y_,{focus:a.focus,content:i.value,editable:!0,placeholder:s.length>0?Pr.t("Add a reply..."):a.textPlaceHolder||Pr.t("Add a comment..."),onChange:c,onSaveAndClose:()=>a.onSaveAndClose()}),a.purposeSelector&&i.value.length>0&&Ue.createElement(HC,{editable:!0,content:i.purpose,onChange:p,onSaveAndClose:()=>a.onSaveAndClose()})))};UC.disableDelete=(a,u)=>a.bodies.filter(i=>zC(i,u.purposeSelector)).some(i=>VC(i,u));var WC=UC;function GC(a,u){a.prototype=Object.create(u.prototype),a.prototype.constructor=a,ac(a,u)}function PY(a,u){return a.classList?!!u&&a.classList.contains(u):(" "+(a.className.baseVal||a.className)+" ").indexOf(" "+u+" ")!==-1}function RY(a,u){a.classList?a.classList.add(u):PY(a,u)||(typeof a.className=="string"?a.className=a.className+" "+u:a.setAttribute("class",(a.className&&a.className.baseVal||"")+" "+u))}function qC(a,u){return a.replace(new RegExp("(^|\\s)"+u+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function OY(a,u){a.classList?a.classList.remove(u):typeof a.className=="string"?a.className=qC(a.className,u):a.setAttribute("class",qC(a.className&&a.className.baseVal||"",u))}var YC={disabled:!1},XC=Ue.createContext(null),ZC=function(a){return a.scrollTop},Bs="unmounted",_o="exited",Co="entering",Ta="entered",Vm="exiting",Si=function(a){GC(u,a);function u(s,c){var p;p=a.call(this,s,c)||this;var v=c,y=v&&!v.isMounting?s.enter:s.appear,b;return p.appearStatus=null,s.in?y?(b=_o,p.appearStatus=Co):b=Ta:s.unmountOnExit||s.mountOnEnter?b=Bs:b=_o,p.state={status:b},p.nextCallback=null,p}u.getDerivedStateFromProps=function(s,c){var p=s.in;return p&&c.status===Bs?{status:_o}:null};var i=u.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(s){var c=null;if(s!==this.props){var p=this.state.status;this.props.in?p!==Co&&p!==Ta&&(c=Co):(p===Co||p===Ta)&&(c=Vm)}this.updateStatus(!1,c)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var s=this.props.timeout,c,p,v;return c=p=v=s,s!=null&&typeof s!="number"&&(c=s.exit,p=s.enter,v=s.appear!==void 0?s.appear:p),{exit:c,enter:p,appear:v}},i.updateStatus=function(s,c){if(s===void 0&&(s=!1),c!==null)if(this.cancelNextCallback(),c===Co){if(this.props.unmountOnExit||this.props.mountOnEnter){var p=this.props.nodeRef?this.props.nodeRef.current:Ue.findDOMNode(this);p&&ZC(p)}this.performEnter(s)}else this.performExit();else this.props.unmountOnExit&&this.state.status===_o&&this.setState({status:Bs})},i.performEnter=function(s){var c=this,p=this.props.enter,v=this.context?this.context.isMounting:s,y=this.props.nodeRef?[v]:[Ue.findDOMNode(this),v],b=y[0],E=y[1],S=this.getTimeouts(),O=v?S.appear:S.enter;if(!s&&!p||YC.disabled){this.safeSetState({status:Ta},function(){c.props.onEntered(b)});return}this.props.onEnter(b,E),this.safeSetState({status:Co},function(){c.props.onEntering(b,E),c.onTransitionEnd(O,function(){c.safeSetState({status:Ta},function(){c.props.onEntered(b,E)})})})},i.performExit=function(){var s=this,c=this.props.exit,p=this.getTimeouts(),v=this.props.nodeRef?void 0:Ue.findDOMNode(this);if(!c||YC.disabled){this.safeSetState({status:_o},function(){s.props.onExited(v)});return}this.props.onExit(v),this.safeSetState({status:Vm},function(){s.props.onExiting(v),s.onTransitionEnd(p.exit,function(){s.safeSetState({status:_o},function(){s.props.onExited(v)})})})},i.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(s,c){c=this.setNextCallback(c),this.setState(s,c)},i.setNextCallback=function(s){var c=this,p=!0;return this.nextCallback=function(v){p&&(p=!1,c.nextCallback=null,s(v))},this.nextCallback.cancel=function(){p=!1},this.nextCallback},i.onTransitionEnd=function(s,c){this.setNextCallback(c);var p=this.props.nodeRef?this.props.nodeRef.current:Ue.findDOMNode(this),v=s==null&&!this.props.addEndListener;if(!p||v){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var y=this.props.nodeRef?[this.nextCallback]:[p,this.nextCallback],b=y[0],E=y[1];this.props.addEndListener(b,E)}s!=null&&setTimeout(this.nextCallback,s)},i.render=function(){var s=this.state.status;if(s===Bs)return null;var c=this.props,p=c.children;c.in,c.mountOnEnter,c.unmountOnExit,c.appear,c.enter,c.exit,c.timeout,c.addEndListener,c.onEnter,c.onEntering,c.onEntered,c.onExit,c.onExiting,c.onExited,c.nodeRef;var v=Rm(c,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ue.createElement(XC.Provider,{value:null},typeof p=="function"?p(s,v):Ue.cloneElement(Ue.Children.only(p),v))},u}(Ue.Component);Si.contextType=XC,Si.propTypes={};function _a(){}Si.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:_a,onEntering:_a,onEntered:_a,onExit:_a,onExiting:_a,onExited:_a},Si.UNMOUNTED=Bs,Si.EXITED=_o,Si.ENTERING=Co,Si.ENTERED=Ta,Si.EXITING=Vm;var kY=Si,AY=function(a,u){return a&&u&&u.split(" ").forEach(function(i){return RY(a,i)})},Um=function(a,u){return a&&u&&u.split(" ").forEach(function(i){return OY(a,i)})},Wm=function(a){GC(u,a);function u(){for(var s,c=arguments.length,p=new Array(c),v=0;v<c;v++)p[v]=arguments[v];return s=a.call.apply(a,[this].concat(p))||this,s.appliedClasses={appear:{},enter:{},exit:{}},s.onEnter=function(y,b){var E=s.resolveArguments(y,b),S=E[0],O=E[1];s.removeClasses(S,"exit"),s.addClass(S,O?"appear":"enter","base"),s.props.onEnter&&s.props.onEnter(y,b)},s.onEntering=function(y,b){var E=s.resolveArguments(y,b),S=E[0],O=E[1],A=O?"appear":"enter";s.addClass(S,A,"active"),s.props.onEntering&&s.props.onEntering(y,b)},s.onEntered=function(y,b){var E=s.resolveArguments(y,b),S=E[0],O=E[1],A=O?"appear":"enter";s.removeClasses(S,A),s.addClass(S,A,"done"),s.props.onEntered&&s.props.onEntered(y,b)},s.onExit=function(y){var b=s.resolveArguments(y),E=b[0];s.removeClasses(E,"appear"),s.removeClasses(E,"enter"),s.addClass(E,"exit","base"),s.props.onExit&&s.props.onExit(y)},s.onExiting=function(y){var b=s.resolveArguments(y),E=b[0];s.addClass(E,"exit","active"),s.props.onExiting&&s.props.onExiting(y)},s.onExited=function(y){var b=s.resolveArguments(y),E=b[0];s.removeClasses(E,"exit"),s.addClass(E,"exit","done"),s.props.onExited&&s.props.onExited(y)},s.resolveArguments=function(y,b){return s.props.nodeRef?[s.props.nodeRef.current,y]:[y,b]},s.getClassNames=function(y){var b=s.props.classNames,E=typeof b=="string",S=E&&b?b+"-":"",O=E?""+S+y:b[y],A=E?O+"-active":b[y+"Active"],H=E?O+"-done":b[y+"Done"];return{baseClassName:O,activeClassName:A,doneClassName:H}},s}var i=u.prototype;return i.addClass=function(s,c,p){var v=this.getClassNames(c)[p+"ClassName"],y=this.getClassNames("enter"),b=y.doneClassName;c==="appear"&&p==="done"&&b&&(v+=" "+b),p==="active"&&s&&ZC(s),v&&(this.appliedClasses[c][p]=v,AY(s,v))},i.removeClasses=function(s,c){var p=this.appliedClasses[c],v=p.base,y=p.active,b=p.done;this.appliedClasses[c]={},v&&Um(s,v),y&&Um(s,y),b&&Um(s,b)},i.render=function(){var s=this.props;s.classNames;var c=Rm(s,["classNames"]);return Ue.createElement(kY,kt({},c,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},u}(Ue.Component);Wm.defaultProps={classNames:""},Wm.propTypes={};var DY=Wm;const IY=(a,u)=>u.filter(i=>(i.label?i.label:i).toLowerCase().startsWith(a.toLowerCase())),MY=(a,u)=>u(a);var NY=a=>{const u=gt(),[i,s]=ze(a.initialValue||""),[c,p]=ze([]),[v,y]=ze(null);ut(()=>{a.focus&&u.current.querySelector("input").focus({preventScroll:!0})},[]),ut(()=>{a.onChange&&a.onChange(i)},[i]);const b=A=>{if(typeof a.vocabulary=="function"){const H=MY(A,a.vocabulary);H.then?H.then(p):p(H)}else{const H=IY(A,a.vocabulary);p(H)}},E=()=>{if(v!==null)a.onSubmit(c[v]);else{const A=i.trim();if(A){const H=Array.isArray(a.vocabulary)?a.vocabulary.find(W=>(W.label||W).toLowerCase()===A.toLowerCase()):null;H?a.onSubmit(H):a.onSubmit(A)}}s(""),p([]),y(null)},S=A=>{if(A.which===13)E();else if(A.which===27)a.onCancel&&a.onCancel();else if(c.length>0){if(A.which===38)if(v===null)y(0);else{const H=Math.max(0,v-1);y(H)}else if(A.which===40)if(v===null)y(0);else{const H=Math.min(c.length-1,v+1);y(H)}}else A.which===40&&Array.isArray(a.vocabulary)&&p(a.vocabulary)},O=A=>{const{value:H}=A.target;s(H),y(null),H?b(H):p([])};return Ue.createElement("div",{ref:u,className:"r6o-autocomplete"},Ue.createElement("div",null,Ue.createElement("input",{onKeyDown:S,onChange:O,value:i,placeholder:a.placeholder})),Ue.createElement("ul",null,c.length>0&&c.map((A,H)=>Ue.createElement("li",{key:`${A.label?A.label:A}${H}`,onClick:E,onMouseEnter:()=>y(H),style:v===H?{backgroundColor:"#bde4ff"}:{}},A.label?A.label:A))))};const LY=a=>a||{type:"TextualBody",value:"",purpose:"tagging",draft:!0};var KC=a=>{const u=a.annotation?a.annotation.bodies.filter(O=>O.purpose==="tagging"):[],i=LY(u.slice().reverse().find(O=>O.draft)),s=u.filter(O=>O!=i),[c,p]=ze(!1),v=O=>A=>{p(c===O?!1:O)},y=O=>{const A=i.value.trim(),H=O.trim();A.length===0&&H.length>0?a.onAppendBody({...i,value:H}):A.length>0&&H.length===0?a.onRemoveBody(i):A!==H&&a.onUpdateBody(i,{...i,value:H})},b=O=>A=>{A.stopPropagation(),a.onRemoveBody(O)},E=O=>{const A=O.uri?{type:"SpecificResource",purpose:"tagging",source:{id:O.uri,label:O.label}}:{type:"TextualBody",purpose:"tagging",value:O.label||O};i.value.trim().length===0?a.onAppendBody(A):a.onUpdateBody(i,A)},S=O=>O.value||O.source.label;return Ue.createElement("div",{className:"r6o-widget r6o-tag"},s.length>0&&Ue.createElement("ul",{className:"r6o-taglist"},s.map(O=>Ue.createElement("li",{key:S(O),onClick:v(O)},Ue.createElement("span",{className:"r6o-label"},S(O)),!a.readOnly&&Ue.createElement(DY,{in:c===O,timeout:200,classNames:"r6o-delete"},Ue.createElement("span",{className:"r6o-delete-wrapper",onClick:b(O)},Ue.createElement("span",{className:"r6o-delete"},Ue.createElement(xY,{width:12}))))))),!a.readOnly&&Ue.createElement(NY,{focus:a.focus,placeholder:a.textPlaceHolder||Pr.t("Add tag..."),vocabulary:a.vocabulary||[],onChange:y,onSubmit:E}))};class JC extends B{constructor(u){super(u),this.element=Ue.createRef()}renderWidget(u){const i=this.props.widget({annotation:u.annotation,readOnly:u.readOnly,...u.config,onAppendBody:(s,c)=>u.onAppendBody(s,c),onUpdateBody:(s,c,p)=>u.onUpdateBody(s,c,p),onUpsertBody:(s,c,p)=>u.onUpsertBody(s,c,p),onRemoveBody:(s,c)=>u.onRemoveBody(s,c),onBatchModify:(s,c)=>u.onBatchModify(s,c),onSetProperty:(s,c)=>u.onSetProperty(s,c),onAddContext:s=>u.onAddContext(s),onSaveAndClose:()=>u.onSaveAndClose()});for(;this.element.current.firstChild;)this.element.current.removeChild(this.element.current.lastChild);this.element.current.appendChild(i)}componentDidMount(){this.renderWidget(this.props)}componentWillReceiveProps(u){this.element.current&&this.props.annotation!==u.annotation&&this.renderWidget(u)}render(){return Ue.createElement("div",{ref:this.element,className:"widget"})}}window.React=Ue,window.ReactDOM=Ue;const FY={COMMENT:WC,TAG:KC},BY=[Ue.createElement(WC,null),Ue.createElement(KC,null)],jY=a=>{const u=s=>{var c;return typeof s=="function"&&!!((c=s.prototype)!=null&&c.isReactComponent)},i=s=>typeof s=="function"&&(String(s).match(/return .+\(['|"].+['|"],\s*\{/g)||String(s).match(/return .+preact_compat/)||String(s).match(/return .+\.createElement/g));return u(a)||i(a)},HY=a=>{const u=(i,s,c)=>{if(typeof i=="string"||i instanceof String)return Ue.createElement(FY[i],s);if((c==null?void 0:c.toLowerCase())==="react")return Ue.createElement(i,s);if((c==null?void 0:c.toLowerCase())==="plainjs")return Ue.createElement(JC,{widget:i,config:s});if(jY(i))return Ue.createElement(i,s);if(typeof i=="function"||i instanceof Function)return Ue.createElement(JC,{widget:i,config:s});throw`${i} is not a valid plugin`};if(a.widget){const{widget:i,force:s,...c}=a;return u(i,c,s)}else return u(a)},QC=14;var $C=(a,u,i,s)=>{const c=a.getBoundingClientRect();u.className="r6o-editor r6o-arrow-top r6o-arrow-left";const{left:p,top:v,right:y,bottom:b}=i.getBoundingClientRect();if(u.style.top=`${b-c.top+QC}px`,u.style.left=`${p-c.left}px`,s){const E=u.children[1].getBoundingClientRect(),{innerWidth:S,innerHeight:O}=a.ownerDocument.defaultView;if(E.right>S&&(u.classList.remove("r6o-arrow-left"),u.classList.add("r6o-arrow-right"),u.style.left=`${y-E.width-c.left}px`),E.bottom>O){u.classList.remove("r6o-arrow-top"),u.classList.add("r6o-arrow-bottom");const H=u.children[1].getBoundingClientRect().height;u.style.top=`${v-c.top-H-QC}px`}const A=u.children[1].getBoundingClientRect();if(A.top<0){u.classList.add("pushed","down"),u.style.top=`${-c.top}px`;const H=b-c.top;A.height-c.top>H&&u.classList.remove("r6o-arrow-bottom")}A.left<0&&(u.classList.add("pushed","right"),u.style.left=`${-c.left}px`),requestAnimationFrame(()=>u.style.opacity=1)}};const eP=a=>{const{top:u,left:i,width:s,height:c}=a.getBoundingClientRect();return`${u}, ${i}, ${s}, ${c}`};class zY extends B{constructor(u){super(u),o(this,"initResizeObserver",()=>{const i=this.props.autoPosition===void 0?!0:this.props.autoPosition;if(window!=null&&window.ResizeObserver){const s=new ResizeObserver(()=>{this.state.dragged||$C(this.props.wrapperEl,this.element.current,this.props.selectedElement,i)});return s.observe(this.props.wrapperEl),()=>s.disconnect()}else this.state.dragged||$C(this.props.wrapperEl,this.element.current,this.props.selectedElement,i)}),o(this,"creationMeta",i=>{const s={},{user:c}=this.props.env;return c&&(s.creator={},c.id&&(s.creator.id=c.id),c.displayName&&(s.creator.name=c.displayName),s[i.created?"modified":"created"]=this.props.env.getCurrentTimeAdjusted()),s}),o(this,"getCurrentAnnotation",()=>this.state.currentAnnotation.clone()),o(this,"hasChanges",()=>{var i;return!((i=this.props.annotation)!=null&&i.isEqual(this.state.currentAnnotation))}),o(this,"updateCurrentAnnotation",(i,s)=>{this.setState({currentAnnotation:this.state.currentAnnotation.clone(i)},()=>{s?this.onOk():this.props.onChanged&&this.props.onChanged()})}),o(this,"onAppendBody",(i,s)=>this.updateCurrentAnnotation({body:[...this.state.currentAnnotation.bodies,{...i,...this.creationMeta(i)}]},s)),o(this,"onUpdateBody",(i,s,c)=>this.updateCurrentAnnotation({body:this.state.currentAnnotation.bodies.map(p=>p===i?{...s,...this.creationMeta(s)}:p)},c)),o(this,"onRemoveBody",(i,s)=>this.updateCurrentAnnotation({body:this.state.currentAnnotation.bodies.filter(c=>c!==i)},s)),o(this,"onUpsertBody",(i,s,c)=>{if(i==null&&s!=null)this.onAppendBody(s,c);else if(i!=null&&s!=null)this.onUpdateBody(i,s,c);else if(i!=null&&s==null){const p=this.state.currentAnnotation.bodies.find(v=>v.purpose===i.purpose);p?this.onUpdateBody(p,i,c):this.onAppendBody(i,c)}}),o(this,"onBatchModify",(i,s)=>{const c=i.filter(E=>E.action==="upsert"&&E.body).map(E=>({previous:this.state.currentAnnotation.bodies.find(S=>S.purpose===E.body.purpose),updated:{...E.body,...this.creationMeta(E.body)}})),p=i.filter(E=>E.action==="remove").map(E=>E.body),v=[...i.filter(E=>E.action==="append"||E.action==="upsert"&&E.updated&&!E.previous).map(E=>({...E.body,...this.creationMeta(E.body)})),...c.filter(E=>!E.previous).map(E=>E.updated)],y=[...i.filter(E=>E.action==="update"||E.action==="upsert"&&E.updated&&E.previous).map(E=>({previous:E.previous,updated:{...E.updated,...this.creationMeta(E.updated)}})),...c.filter(E=>E.previous)],b=[...this.state.currentAnnotation.bodies.filter(E=>!p.includes(E)).map(E=>{const S=y.find(O=>O.previous===E);return S?S.updated:E}),...v];this.updateCurrentAnnotation({body:b},s)}),o(this,"onSetProperty",(i,s)=>{if(["@context","id","type","body","target"].includes(i))throw new Exception(`Cannot set ${i} - not allowed`);if(s)this.updateCurrentAnnotation({[i]:s});else{const c=this.currentAnnotation.clone();delete c[i],this.setState({currentAnnotation:c})}}),o(this,"onAddContext",i=>{const{currentAnnotation:s}=this.state,c=Array.isArray(s.context)?s.context:[s.context];c.indexOf(i)<0&&(c.push(i),this.updateCurrentAnnotation({"@context":c}))}),o(this,"onCancel",()=>this.props.onCancel(this.props.annotation)),o(this,"onOk",()=>{const i=c=>c.clone({body:c.bodies.map(({draft:p,...v})=>v)}),{currentAnnotation:s}=this.state;s.bodies.length===0&&!this.props.allowEmpty?s.isSelection?this.onCancel():this.props.onAnnotationDeleted(this.props.annotation):s.isSelection?this.props.onAnnotationCreated(i(s).toAnnotation()):this.props.onAnnotationUpdated(i(s),this.props.annotation)}),o(this,"onDelete",()=>this.props.onAnnotationDeleted(this.props.annotation)),this.element=Ue.createRef(),this.state={currentAnnotation:u.annotation,dragged:!1,selectionBounds:eP(u.selectedElement)}}componentWillReceiveProps(u){var i;const{selectionBounds:s}=this.state,c=eP(u.selectedElement);(i=this.props.annotation)!=null&&i.isEqual(u.annotation)?this.setState({selectionBounds:c}):this.setState({currentAnnotation:u.annotation,selectionBounds:c}),this.props.modifiedTarget!=u.modifiedTarget&&this.state.currentAnnotation&&this.updateCurrentAnnotation({target:this.props.modifiedTarget}),s!=c&&this.element.current&&(this.removeObserver&&this.removeObserver(),this.removeObserver=this.initResizeObserver())}componentDidMount(){this.removeObserver=this.initResizeObserver(),new MutationObserver(()=>{this.element.current&&(this.removeObserver&&this.removeObserver(),this.removeObserver=this.initResizeObserver())}).observe(this.element.current,{childList:!0,subtree:!0})}componentWillUnmount(){this.removeObserver&&this.removeObserver()}render(){const{currentAnnotation:u}=this.state,i=this.props.widgets?this.props.widgets.map(HY):BY,s=p=>p.type.disableDelete?p.type.disableDelete(u,{...p.props,readOnly:this.props.readOnly,env:this.props.env}):!1,c=u&&(u.bodies.length>0||this.props.allowEmpty)&&!this.props.readOnly&&!u.isSelection&&!i.some(s);return Ue.createElement(ZU,{disabled:!this.props.detachable,handle:".r6o-draggable",cancel:".r6o-btn, .r6o-btn *",onDrag:()=>this.setState({dragged:!0})},Ue.createElement("div",{ref:this.element,className:this.state.dragged?"r6o-editor dragged":"r6o-editor"},Ue.createElement("div",{className:"r6o-arrow"}),Ue.createElement("div",{className:"r6o-editor-inner"},i.map((p,v)=>Ue.cloneElement(p,{key:`${v}`,focus:v===0,annotation:u,readOnly:this.props.readOnly,env:this.props.env,onAppendBody:this.onAppendBody,onUpdateBody:this.onUpdateBody,onRemoveBody:this.onRemoveBody,onUpsertBody:this.onUpsertBody,onBatchModify:this.onBatchModify,onSetProperty:this.onSetProperty,onAddContext:this.onAddContext,onSaveAndClose:this.onOk})),this.props.readOnly?Ue.createElement("div",{className:"r6o-footer"},Ue.createElement("button",{className:"r6o-btn",onClick:this.onCancel},Pr.t("Close"))):Ue.createElement("div",{className:this.props.detachable?"r6o-footer r6o-draggable":"r6o-footer"},c&&Ue.createElement("button",{className:"r6o-btn left delete-annotation",title:Pr.t("Delete"),onClick:this.onDelete},Ue.createElement(SY,{width:12})),Ue.createElement("button",{className:"r6o-btn outline",onClick:this.onCancel},Pr.t("Cancel")),Ue.createElement("button",{className:"r6o-btn ",onClick:this.onOk},Pr.t("Ok"))))))}}var mc,VY=new Uint8Array(16);function UY(){if(!mc&&(mc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!mc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return mc(VY)}var WY=/^(?:[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 GY(a){return typeof a=="string"&&WY.test(a)}for(var ir=[],Gm=0;Gm<256;++Gm)ir.push((Gm+256).toString(16).substr(1));function qY(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=(ir[a[u+0]]+ir[a[u+1]]+ir[a[u+2]]+ir[a[u+3]]+"-"+ir[a[u+4]]+ir[a[u+5]]+"-"+ir[a[u+6]]+ir[a[u+7]]+"-"+ir[a[u+8]]+ir[a[u+9]]+"-"+ir[a[u+10]]+ir[a[u+11]]+ir[a[u+12]]+ir[a[u+13]]+ir[a[u+14]]+ir[a[u+15]]).toLowerCase();if(!GY(i))throw TypeError("Stringified UUID is invalid");return i}function tP(a,u,i){a=a||{};var s=a.random||(a.rng||UY)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,qY(s)}var YY=function a(u,i){if(u===i)return!0;if(u&&i&&typeof u=="object"&&typeof i=="object"){if(u.constructor!==i.constructor)return!1;var s,c,p;if(Array.isArray(u)){if(s=u.length,s!=i.length)return!1;for(c=s;c--!==0;)if(!a(u[c],i[c]))return!1;return!0}if(u.constructor===RegExp)return u.source===i.source&&u.flags===i.flags;if(u.valueOf!==Object.prototype.valueOf)return u.valueOf()===i.valueOf();if(u.toString!==Object.prototype.toString)return u.toString()===i.toString();if(p=Object.keys(u),s=p.length,s!==Object.keys(i).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(i,p[c]))return!1;for(c=s;c--!==0;){var v=p[c];if(!a(u[v],i[v]))return!1}return!0}return u!==u&&i!==i},nP=YY;const qm=class{constructor(a,u){o(this,"clone",(i,s)=>new qm({...this.underlying,...i},{...this.opts,...s})),o(this,"selector",i=>{const{target:s}=this.underlying;if(s.selector)return(Array.isArray(s.selector)?s.selector:[s.selector]).find(c=>c.type===i)}),this.underlying=a,this.opts=u}isEqual(a){return(a==null?void 0:a.type)!=="Annotation"?!1:this.underlying===a.underlying?!0:!this.underlying.id||!a.underlying.id?!1:nP(this.underlying,a.underlying)}get readOnly(){var a;return(a=this.opts)==null?void 0:a.readOnly}get id(){return this.underlying.id}get context(){return this.underlying["@context"]}get type(){return this.underlying.type}get motivation(){return this.underlying.motivation}get body(){return this.underlying.body}get target(){return this.underlying.target}get bodies(){return Array.isArray(this.underlying.body)?this.underlying.body:[this.underlying.body]}set bodies(a){this.underlying.body=a}get targets(){return Array.isArray(this.underlying.target)?this.underlying.target:[this.underlying.target]}get quote(){var a;return(a=this.selector("TextQuoteSelector"))==null?void 0:a.exact}get start(){var a;return(a=this.selector("TextPositionSelector"))==null?void 0:a.start}get end(){var a;return(a=this.selector("TextPositionSelector"))==null?void 0:a.end}};let Po=qm;o(Po,"create",a=>{const u={"@context":"http://www.w3.org/ns/anno.jsonld",type:"Annotation",id:`#${tP()}`,body:[]};return new qm({...u,...a})});class js{constructor(u,i){o(this,"clone",s=>{const c=new js;return c.underlying=JSON.parse(JSON.stringify(this.underlying)),s&&(c.underlying={...c.underlying,...s}),c}),o(this,"selector",s=>{const{target:c}=this.underlying;if(c.selector)return(Array.isArray(c.selector)?c.selector:[c.selector]).find(p=>p.type===s)}),o(this,"toAnnotation",()=>{const s=Object.assign({},this.underlying,{type:"Annotation",id:`#${tP()}`});return new Po(s)}),this.underlying={"@context":"http://www.w3.org/ns/anno.jsonld",type:"Selection",body:i||[],target:u}}get context(){return this.underlying["@context"]}get type(){return this.underlying.type}get body(){return this.underlying.body}get target(){return this.underlying.target}get targets(){return Array.isArray(this.underlying.target)?this.underlying.target:[this.underlying.target]}isEqual(u){return u?nP(this.underlying,u.underlying):!1}get bodies(){return Array.isArray(this.underlying.body)?this.underlying.body:[this.underlying.body]}get quote(){var u;return(u=this.selector("TextQuoteSelector"))==null?void 0:u.exact}get isSelection(){return!0}}let Ym=0;var XY=()=>({setServerTime:a=>{const u=Date.now();Ym=a-u},getCurrentTimeAdjusted:()=>new Date(Date.now()+Ym).toISOString(),toClientTime:a=>Date.parse(a)-Ym});const ZY=(a,u)=>{if(a){const i=a==="auto"?window.navigator.userLanguage||window.navigator.language:a,s=i.split("-")[0].toLowerCase(),c=[i,s].find(p=>o3.includes(p));c||console.warn(`Unsupported locale '${i}'. Falling back to default en.`),Pr.init(c,u)}else Pr.init(null,u)};var rP={exports:{}};(function(a){//! openseadragon 3.0.0
|
|
326
|
-
//! Built on 2021-12-15
|
|
327
|
-
//! Git commit: v3.0.0-0-3eded36
|
|
328
|
-
//! http://openseadragon.github.io
|
|
329
|
-
//! License: http://openseadragon.github.io/license/
|
|
330
|
-
function u(i){return new u.Viewer(i)}(function(i){i.version={versionStr:"3.0.0",major:parseInt("3",10),minor:parseInt("0",10),revision:parseInt("0",10)};var s={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},c=Object.prototype.toString,p=Object.prototype.hasOwnProperty;i.isFunction=function(v){return i.type(v)==="function"},i.isArray=Array.isArray||function(v){return i.type(v)==="array"},i.isWindow=function(v){return v&&typeof v=="object"&&"setInterval"in v},i.type=function(v){return v==null?String(v):s[c.call(v)]||"object"},i.isPlainObject=function(v){if(!v||u.type(v)!=="object"||v.nodeType||i.isWindow(v)||v.constructor&&!p.call(v,"constructor")&&!p.call(v.constructor.prototype,"isPrototypeOf"))return!1;var y;for(var b in v)y=b;return y===void 0||p.call(v,y)},i.isEmptyObject=function(v){for(var y in v)return!1;return!0},i.freezeObject=function(v){return Object.freeze?i.freezeObject=Object.freeze:i.freezeObject=function(y){return y},i.freezeObject(v)},i.supportsCanvas=function(){var v=document.createElement("canvas");return!!(i.isFunction(v.getContext)&&v.getContext("2d"))}(),i.isCanvasTainted=function(v){var y=!1;try{v.getContext("2d").getImageData(0,0,1,1)}catch{y=!0}return y},i.supportsAddEventListener=function(){return!!(document.documentElement.addEventListener&&document.addEventListener)}(),i.supportsRemoveEventListener=function(){return!!(document.documentElement.removeEventListener&&document.removeEventListener)}(),i.supportsEventListenerOptions=function(){var v=0;if(i.supportsAddEventListener)try{var y={get capture(){return v++,!1},get once(){return v++,!1},get passive(){return v++,!1}};window.addEventListener("test",null,y),window.removeEventListener("test",null,y)}catch{v=0}return v>=3}(),i.getCurrentPixelDensityRatio=function(){if(i.supportsCanvas){var v=document.createElement("canvas").getContext("2d"),y=window.devicePixelRatio||1,b=v.webkitBackingStorePixelRatio||v.mozBackingStorePixelRatio||v.msBackingStorePixelRatio||v.oBackingStorePixelRatio||v.backingStorePixelRatio||1;return Math.max(y,1)/b}else return 1},i.pixelDensityRatio=i.getCurrentPixelDensityRatio()})(u),function(i){i.extend=function(){var b,E,S,O,A,H,W=arguments[0]||{},re=arguments.length,$=!1,se=1;for(typeof W=="boolean"&&($=W,W=arguments[1]||{},se=2),typeof W!="object"&&!u.isFunction(W)&&(W={}),re===se&&(W=this,--se);se<re;se++)if(b=arguments[se],b!==null||b!==void 0)for(E in b)S=W[E],O=b[E],W!==O&&($&&O&&(u.isPlainObject(O)||(A=u.isArray(O)))?(A?(A=!1,H=S&&u.isArray(S)?S:[]):H=S&&u.isPlainObject(S)?S:{},W[E]=u.extend($,H,O)):O!==void 0&&(W[E]=O));return W};var s=function(){if(typeof navigator!="object")return!1;var b=navigator.userAgent;return typeof b!="string"?!1:b.indexOf("iPhone")!==-1||b.indexOf("iPad")!==-1||b.indexOf("iPod")!==-1};i.extend(i,{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:s(),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(b,E){return function(){var S=arguments;return S===void 0&&(S=[]),E.apply(b,S)}},BROWSERS:{UNKNOWN:0,IE:1,FIREFOX:2,SAFARI:3,CHROME:4,OPERA:5,EDGE:6,CHROMEEDGE:7},_viewers:new Map,getViewer:function(b){return i._viewers.get(this.getElement(b))},getElement:function(b){return typeof b=="string"&&(b=document.getElementById(b)),b},getElementPosition:function(b){var E=new i.Point,S,O;for(b=i.getElement(b),S=i.getElementStyle(b).position==="fixed",O=y(b,S);O;)E.x+=b.offsetLeft,E.y+=b.offsetTop,S&&(E=E.plus(i.getPageScroll())),b=O,S=i.getElementStyle(b).position==="fixed",O=y(b,S);return E},getElementOffset:function(b){b=i.getElement(b);var E=b&&b.ownerDocument,S,O,A={top:0,left:0};return E?(S=E.documentElement,typeof b.getBoundingClientRect<"u"&&(A=b.getBoundingClientRect()),O=E===E.window?E:E.nodeType===9?E.defaultView||E.parentWindow:!1,new i.Point(A.left+(O.pageXOffset||S.scrollLeft)-(S.clientLeft||0),A.top+(O.pageYOffset||S.scrollTop)-(S.clientTop||0))):new i.Point},getElementSize:function(b){return b=i.getElement(b),new i.Point(b.clientWidth,b.clientHeight)},getElementStyle:document.documentElement.currentStyle?function(b){return b=i.getElement(b),b.currentStyle}:function(b){return b=i.getElement(b),window.getComputedStyle(b,"")},getCssPropertyWithVendorPrefix:function(b){var E={};return i.getCssPropertyWithVendorPrefix=function(S){if(E[S]!==void 0)return E[S];var O=document.createElement("div").style,A=null;if(O[S]!==void 0)A=S;else for(var H=["Webkit","Moz","MS","O","webkit","moz","ms","o"],W=i.capitalizeFirstLetter(S),re=0;re<H.length;re++){var $=H[re]+W;if(O[$]!==void 0){A=$;break}}return E[S]=A,A},i.getCssPropertyWithVendorPrefix(b)},capitalizeFirstLetter:function(b){return b.charAt(0).toUpperCase()+b.slice(1)},positiveModulo:function(b,E){var S=b%E;return S<0&&(S+=E),S},pointInElement:function(b,E){b=i.getElement(b);var S=i.getElementOffset(b),O=i.getElementSize(b);return E.x>=S.x&&E.x<S.x+O.x&&E.y<S.y+O.y&&E.y>=S.y},getMousePosition:function(b){if(typeof b.pageX=="number")i.getMousePosition=function(E){var S=new i.Point;return S.x=E.pageX,S.y=E.pageY,S};else if(typeof b.clientX=="number")i.getMousePosition=function(E){var S=new i.Point;return S.x=E.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,S.y=E.clientY+document.body.scrollTop+document.documentElement.scrollTop,S};else throw new Error("Unknown event mouse position, no known technique.");return i.getMousePosition(b)},getPageScroll:function(){var b=document.documentElement||{},E=document.body||{};if(typeof window.pageXOffset=="number")i.getPageScroll=function(){return new i.Point(window.pageXOffset,window.pageYOffset)};else if(E.scrollLeft||E.scrollTop)i.getPageScroll=function(){return new i.Point(document.body.scrollLeft,document.body.scrollTop)};else if(b.scrollLeft||b.scrollTop)i.getPageScroll=function(){return new i.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)};else return new i.Point(0,0);return i.getPageScroll()},setPageScroll:function(b){if(typeof window.scrollTo<"u")i.setPageScroll=function(O){window.scrollTo(O.x,O.y)};else{var E=i.getPageScroll();if(E.x===b.x&&E.y===b.y)return;document.body.scrollLeft=b.x,document.body.scrollTop=b.y;var S=i.getPageScroll();if(S.x!==E.x&&S.y!==E.y){i.setPageScroll=function(O){document.body.scrollLeft=O.x,document.body.scrollTop=O.y};return}if(document.documentElement.scrollLeft=b.x,document.documentElement.scrollTop=b.y,S=i.getPageScroll(),S.x!==E.x&&S.y!==E.y){i.setPageScroll=function(O){document.documentElement.scrollLeft=O.x,document.documentElement.scrollTop=O.y};return}i.setPageScroll=function(O){}}i.setPageScroll(b)},getWindowSize:function(){var b=document.documentElement||{},E=document.body||{};if(typeof window.innerWidth=="number")i.getWindowSize=function(){return new i.Point(window.innerWidth,window.innerHeight)};else if(b.clientWidth||b.clientHeight)i.getWindowSize=function(){return new i.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else if(E.clientWidth||E.clientHeight)i.getWindowSize=function(){return new i.Point(document.body.clientWidth,document.body.clientHeight)};else throw new Error("Unknown window size, no known technique.");return i.getWindowSize()},makeCenteredNode:function(b){b=i.getElement(b);var E=[i.makeNeutralElement("div"),i.makeNeutralElement("div"),i.makeNeutralElement("div")];return i.extend(E[0].style,{display:"table",height:"100%",width:"100%"}),i.extend(E[1].style,{display:"table-row"}),i.extend(E[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),E[0].appendChild(E[1]),E[1].appendChild(E[2]),E[2].appendChild(b),E[0]},makeNeutralElement:function(b){var E=document.createElement(b),S=E.style;return S.background="transparent none",S.border="none",S.margin="0px",S.padding="0px",S.position="static",E},now:function(){return Date.now?i.now=Date.now:i.now=function(){return new Date().getTime()},i.now()},makeTransparentImage:function(b){var E=i.makeNeutralElement("img");return E.src=b,E},setElementOpacity:function(b,E,S){var O,A;b=i.getElement(b),S&&!i.Browser.alpha&&(E=Math.round(E)),i.Browser.opacity?b.style.opacity=E<1?E:"":E<1?(O=Math.round(100*E),A="alpha(opacity="+O+")",b.style.filter=A):b.style.filter=""},setElementTouchActionNone:function(b){b=i.getElement(b),typeof b.style.touchAction<"u"?b.style.touchAction="none":typeof b.style.msTouchAction<"u"&&(b.style.msTouchAction="none")},setElementPointerEvents:function(b,E){b=i.getElement(b),typeof b.style.pointerEvents<"u"&&(b.style.pointerEvents=E)},setElementPointerEventsNone:function(b){i.setElementPointerEvents(b,"none")},addClass:function(b,E){b=i.getElement(b),b.className?(" "+b.className+" ").indexOf(" "+E+" ")===-1&&(b.className+=" "+E):b.className=E},indexOf:function(b,E,S){return Array.prototype.indexOf?this.indexOf=function(O,A,H){return O.indexOf(A,H)}:this.indexOf=function(O,A,H){var W,re=H||0,$;if(!O)throw new TypeError;if($=O.length,$===0||re>=$)return-1;for(re<0&&(re=$-Math.abs(re)),W=re;W<$;W++)if(O[W]===A)return W;return-1},this.indexOf(b,E,S)},removeClass:function(b,E){var S,O=[],A;for(b=i.getElement(b),S=b.className.split(/\s+/),A=0;A<S.length;A++)S[A]&&S[A]!==E&&O.push(S[A]);b.className=O.join(" ")},normalizeEventListenerOptions:function(b){var E;return typeof b<"u"?typeof b=="boolean"?E=i.supportsEventListenerOptions?{capture:b}:b:E=i.supportsEventListenerOptions?b:typeof b.capture<"u"?b.capture:!1:E=i.supportsEventListenerOptions?{capture:!1}:!1,E},addEvent:function(){if(i.supportsAddEventListener)return function(b,E,S,O){O=i.normalizeEventListenerOptions(O),b=i.getElement(b),b.addEventListener(E,S,O)};if(document.documentElement.attachEvent&&document.attachEvent)return function(b,E,S){b=i.getElement(b),b.attachEvent("on"+E,S)};throw new Error("No known event model.")}(),removeEvent:function(){if(i.supportsRemoveEventListener)return function(b,E,S,O){O=i.normalizeEventListenerOptions(O),b=i.getElement(b),b.removeEventListener(E,S,O)};if(document.documentElement.detachEvent&&document.detachEvent)return function(b,E,S){b=i.getElement(b),b.detachEvent("on"+E,S)};throw new Error("No known event model.")}(),cancelEvent:function(b){b.preventDefault()},eventIsCanceled:function(b){return b.defaultPrevented},stopEvent:function(b){b.stopPropagation()},createCallback:function(b,E){var S=[],O;for(O=2;O<arguments.length;O++)S.push(arguments[O]);return function(){var A=S.concat([]),H;for(H=0;H<arguments.length;H++)A.push(arguments[H]);return E.apply(b,A)}},getUrlParameter:function(b){var E=v[b];return E||null},getUrlProtocol:function(b){var E=b.match(/^([a-z]+:)\/\//i);return E===null?window.location.protocol:E[1].toLowerCase()},createAjaxRequest:function(b){var E;try{E=!!new ActiveXObject("Microsoft.XMLHTTP")}catch{E=!1}if(E)window.XMLHttpRequest?i.createAjaxRequest=function(S){return S?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest}:i.createAjaxRequest=function(){return new ActiveXObject("Microsoft.XMLHTTP")};else if(window.XMLHttpRequest)i.createAjaxRequest=function(){return new XMLHttpRequest};else throw new Error("Browser doesn't support XMLHttpRequest.");return i.createAjaxRequest(b)},makeAjaxRequest:function(b,E,S){var O,A,H;i.isPlainObject(b)&&(E=b.success,S=b.error,O=b.withCredentials,A=b.headers,H=b.responseType||null,b=b.url);var W=i.getUrlProtocol(b),re=i.createAjaxRequest(W==="file:");if(!i.isFunction(E))throw new Error("makeAjaxRequest requires a success callback");re.onreadystatechange=function(){re.readyState===4&&(re.onreadystatechange=function(){},re.status>=200&&re.status<300||re.status===0&&W!=="http:"&&W!=="https:"?E(re):(i.console.log("AJAX request returned %d: %s",re.status,b),i.isFunction(S)&&S(re)))};try{if(re.open("GET",b,!0),H&&(re.responseType=H),A)for(var $ in A)Object.prototype.hasOwnProperty.call(A,$)&&A[$]&&re.setRequestHeader($,A[$]);O&&(re.withCredentials=!0),re.send(null)}catch(se){i.console.log("%s while making AJAX request: %s",se.name,se.message),re.onreadystatechange=function(){},i.isFunction(S)&&S(re,se)}return re},jsonp:function(b){var E,S=b.url,O=document.head||document.getElementsByTagName("head")[0]||document.documentElement,A=b.callbackName||"openseadragon"+i.now(),H=window[A],W="$1"+A+"$2",re=b.param||"callback",$=b.callback;S=S.replace(/(=)\?(&|$)|\?\?/i,W),S+=(/\?/.test(S)?"&":"?")+re+"="+A,window[A]=function(se){if(H)window[A]=H;else try{delete window[A]}catch{}$&&i.isFunction($)&&$(se)},E=document.createElement("script"),(b.async!==void 0||b.async!==!1)&&(E.async="async"),b.scriptCharset&&(E.charset=b.scriptCharset),E.src=S,E.onload=E.onreadystatechange=function(se,I){(I||!E.readyState||/loaded|complete/.test(E.readyState))&&(E.onload=E.onreadystatechange=null,O&&E.parentNode&&O.removeChild(E),E=void 0)},O.insertBefore(E,O.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(b){if(window.DOMParser)i.parseXml=function(E){var S=null,O;return O=new DOMParser,S=O.parseFromString(E,"text/xml"),S};else if(window.ActiveXObject)i.parseXml=function(E){var S=null;return S=new ActiveXObject("Microsoft.XMLDOM"),S.async=!1,S.loadXML(E),S};else throw new Error("Browser doesn't support XML DOM.");return i.parseXml(b)},parseJSON:function(b){return i.parseJSON=window.JSON.parse,i.parseJSON(b)},imageFormatSupported:function(b){return b=b||"",!!p[b.toLowerCase()]},setImageFormatsSupported:function(b){i.extend(p,b)}});var c=function(b){};i.console=window.console||{log:c,debug:c,info:c,warn:c,error:c,assert:c},i.Browser={vendor:i.BROWSERS.UNKNOWN,version:0,alpha:!0};var p={bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1},v={};(function(){var b=navigator.appVersion,E=navigator.userAgent,S;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&(i.Browser.vendor=i.BROWSERS.IE,i.Browser.version=parseFloat(E.substring(E.indexOf("MSIE")+5,E.indexOf(";",E.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(E.indexOf("Edge")>=0?(i.Browser.vendor=i.BROWSERS.EDGE,i.Browser.version=parseFloat(E.substring(E.indexOf("Edge")+5))):E.indexOf("Edg")>=0?(i.Browser.vendor=i.BROWSERS.CHROMEEDGE,i.Browser.version=parseFloat(E.substring(E.indexOf("Edg")+4))):E.indexOf("Firefox")>=0?(i.Browser.vendor=i.BROWSERS.FIREFOX,i.Browser.version=parseFloat(E.substring(E.indexOf("Firefox")+8))):E.indexOf("Safari")>=0?(i.Browser.vendor=E.indexOf("Chrome")>=0?i.BROWSERS.CHROME:i.BROWSERS.SAFARI,i.Browser.version=parseFloat(E.substring(E.substring(0,E.indexOf("Safari")).lastIndexOf("/")+1,E.indexOf("Safari")))):(S=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"),S.exec(E)!==null&&(i.Browser.vendor=i.BROWSERS.IE,i.Browser.version=parseFloat(RegExp.$1))));break;case"Opera":i.Browser.vendor=i.BROWSERS.OPERA,i.Browser.version=parseFloat(b);break}var O=window.location.search.substring(1),A=O.split("&"),H,W,re;for(re=0;re<A.length;re++)if(H=A[re],W=H.indexOf("="),W>0){var $=H.substring(0,W),se=H.substring(W+1);try{v[$]=decodeURIComponent(se)}catch{i.console.error("Ignoring malformed URL parameter: %s=%s",$,se)}}i.Browser.alpha=!(i.Browser.vendor===i.BROWSERS.CHROME&&i.Browser.version<2),i.Browser.opacity=!0,i.Browser.vendor===i.BROWSERS.IE&&i.Browser.version<11&&i.console.error("Internet Explorer versions < 11 are not supported by OpenSeadragon")})(),function(b){var E=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame,S=b.cancelAnimationFrame||b.mozCancelAnimationFrame||b.webkitCancelAnimationFrame||b.msCancelAnimationFrame;if(E&&S)i.requestAnimationFrame=function(){return E.apply(b,arguments)},i.cancelAnimationFrame=function(){return S.apply(b,arguments)};else{var O=[],A=[],H=0,W;i.requestAnimationFrame=function(re){return O.push([++H,re]),W||(W=setInterval(function(){if(O.length){var $=i.now(),se=A;for(A=O,O=se;A.length;)A.shift()[1]($)}else clearInterval(W),W=void 0},1e3/50)),H},i.cancelAnimationFrame=function(re){var $,se;for($=0,se=O.length;$<se;$+=1)if(O[$][0]===re){O.splice($,1);return}for($=0,se=A.length;$<se;$+=1)if(A[$][0]===re){A.splice($,1);return}}}}(window);function y(b,E){return E&&b!==document.body?document.body:b.offsetParent}}(u),function(i,s){a.exports?a.exports=s():i.OpenSeadragon=s()}(Hi,function(){return u}),function(i){var s={supportsFullScreen:!1,isFullScreen:function(){return!1},getFullScreenElement:function(){return null},requestFullScreen:function(){},exitFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",fullScreenErrorEventName:""};document.exitFullscreen?(s.supportsFullScreen=!0,s.getFullScreenElement=function(){return document.fullscreenElement},s.requestFullScreen=function(c){return c.requestFullscreen()},s.exitFullScreen=function(){document.exitFullscreen()},s.fullScreenEventName="fullscreenchange",s.fullScreenErrorEventName="fullscreenerror"):document.msExitFullscreen?(s.supportsFullScreen=!0,s.getFullScreenElement=function(){return document.msFullscreenElement},s.requestFullScreen=function(c){return c.msRequestFullscreen()},s.exitFullScreen=function(){document.msExitFullscreen()},s.fullScreenEventName="MSFullscreenChange",s.fullScreenErrorEventName="MSFullscreenError"):document.webkitExitFullscreen?(s.supportsFullScreen=!0,s.getFullScreenElement=function(){return document.webkitFullscreenElement},s.requestFullScreen=function(c){return c.webkitRequestFullscreen()},s.exitFullScreen=function(){document.webkitExitFullscreen()},s.fullScreenEventName="webkitfullscreenchange",s.fullScreenErrorEventName="webkitfullscreenerror"):document.webkitCancelFullScreen?(s.supportsFullScreen=!0,s.getFullScreenElement=function(){return document.webkitCurrentFullScreenElement},s.requestFullScreen=function(c){return c.webkitRequestFullScreen()},s.exitFullScreen=function(){document.webkitCancelFullScreen()},s.fullScreenEventName="webkitfullscreenchange",s.fullScreenErrorEventName="webkitfullscreenerror"):document.mozCancelFullScreen&&(s.supportsFullScreen=!0,s.getFullScreenElement=function(){return document.mozFullScreenElement},s.requestFullScreen=function(c){return c.mozRequestFullScreen()},s.exitFullScreen=function(){document.mozCancelFullScreen()},s.fullScreenEventName="mozfullscreenchange",s.fullScreenErrorEventName="mozfullscreenerror"),s.isFullScreen=function(){return s.getFullScreenElement()!==null},s.cancelFullScreen=function(){i.console.error("cancelFullScreen is deprecated. Use exitFullScreen instead."),s.exitFullScreen()},i.extend(i,s)}(u),function(i){i.EventSource=function(){this.events={}},i.EventSource.prototype={addOnceHandler:function(s,c,p,v){var y=this;v=v||1;var b=0,E=function(S){b++,b===v&&y.removeHandler(s,E),c(S)};this.addHandler(s,E,p)},addHandler:function(s,c,p){var v=this.events[s];v||(this.events[s]=v=[]),c&&i.isFunction(c)&&(v[v.length]={handler:c,userData:p||null})},removeHandler:function(s,c){var p=this.events[s],v=[],y;if(p&&i.isArray(p)){for(y=0;y<p.length;y++)p[y].handler!==c&&v.push(p[y]);this.events[s]=v}},removeAllHandlers:function(s){if(s)this.events[s]=[];else for(var c in this.events)this.events[c]=[]},getHandler:function(s){var c=this.events[s];return!c||!c.length?null:(c=c.length===1?[c[0]]:Array.apply(null,c),function(p,v){var y,b=c.length;for(y=0;y<b;y++)c[y]&&(v.eventSource=p,v.userData=c[y].userData,c[y].handler(v))})},raiseEvent:function(s,c){var p=this.getHandler(s);p&&(c||(c={}),p(this,c))}}}(u),function(i){var s={};i.MouseTracker=function(U){var z=arguments;i.isPlainObject(U)||(U={element:z[0],clickTimeThreshold:z[1],clickDistThreshold:z[2]}),this.hash=Math.random(),this.element=i.getElement(U.element),this.clickTimeThreshold=U.clickTimeThreshold||i.DEFAULT_SETTINGS.clickTimeThreshold,this.clickDistThreshold=U.clickDistThreshold||i.DEFAULT_SETTINGS.clickDistThreshold,this.dblClickTimeThreshold=U.dblClickTimeThreshold||i.DEFAULT_SETTINGS.dblClickTimeThreshold,this.dblClickDistThreshold=U.dblClickDistThreshold||i.DEFAULT_SETTINGS.dblClickDistThreshold,this.userData=U.userData||null,this.stopDelay=U.stopDelay||50,this.preProcessEventHandler=U.preProcessEventHandler||null,this.contextMenuHandler=U.contextMenuHandler||null,this.enterHandler=U.enterHandler||null,this.leaveHandler=U.leaveHandler||null,this.exitHandler=U.exitHandler||null,this.overHandler=U.overHandler||null,this.outHandler=U.outHandler||null,this.pressHandler=U.pressHandler||null,this.nonPrimaryPressHandler=U.nonPrimaryPressHandler||null,this.releaseHandler=U.releaseHandler||null,this.nonPrimaryReleaseHandler=U.nonPrimaryReleaseHandler||null,this.moveHandler=U.moveHandler||null,this.scrollHandler=U.scrollHandler||null,this.clickHandler=U.clickHandler||null,this.dblClickHandler=U.dblClickHandler||null,this.dragHandler=U.dragHandler||null,this.dragEndHandler=U.dragEndHandler||null,this.pinchHandler=U.pinchHandler||null,this.stopHandler=U.stopHandler||null,this.keyDownHandler=U.keyDownHandler||null,this.keyUpHandler=U.keyUpHandler||null,this.keyHandler=U.keyHandler||null,this.focusHandler=U.focusHandler||null,this.blurHandler=U.blurHandler||null;var Q=this;s[this.hash]={click:function(ee){ne(Q,ee)},dblclick:function(ee){he(Q,ee)},keydown:function(ee){ce(Q,ee)},keyup:function(ee){Se(Q,ee)},keypress:function(ee){Pe(Q,ee)},focus:function(ee){Xe(Q,ee)},blur:function(ee){tt(Q,ee)},contextmenu:function(ee){ht(Q,ee)},wheel:function(ee){yt(Q,ee)},mousewheel:function(ee){dt(Q,ee)},DOMMouseScroll:function(ee){dt(Q,ee)},MozMousePixelScroll:function(ee){dt(Q,ee)},losecapture:function(ee){xt(Q,ee)},mouseenter:function(ee){at(Q,ee)},mouseleave:function(ee){lt(Q,ee)},mouseover:function(ee){st(Q,ee)},mouseout:function(ee){ct(Q,ee)},mousedown:function(ee){_t(Q,ee)},mouseup:function(ee){gn(Q,ee)},mousemove:function(ee){Vr(Q,ee)},touchstart:function(ee){Nt(Q,ee)},touchend:function(ee){Mt(Q,ee)},touchmove:function(ee){Ht(Q,ee)},touchcancel:function(ee){Qt(Q,ee)},gesturestart:function(ee){wn(Q,ee)},gesturechange:function(ee){ft(Q,ee)},gotpointercapture:function(ee){Gt(Q,ee)},lostpointercapture:function(ee){Ge(Q,ee)},pointerenter:function(ee){at(Q,ee)},pointerleave:function(ee){lt(Q,ee)},pointerover:function(ee){st(Q,ee)},pointerout:function(ee){ct(Q,ee)},pointerdown:function(ee){_t(Q,ee)},pointerup:function(ee){gn(Q,ee)},pointermove:function(ee){Vr(Q,ee)},pointercancel:function(ee){N(Q,ee)},pointerupcaptured:function(ee){In(Q,ee)},pointermovecaptured:function(ee){yr(Q,ee)},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,i.MouseTracker.havePointerEvents&&i.setElementPointerEvents(this.element,"auto"),this.exitHandler&&i.console.error("MouseTracker.exitHandler is deprecated. Use MouseTracker.leaveHandler instead."),U.startDisabled||this.setTracking(!0)},i.MouseTracker.prototype={destroy:function(){b(this),this.element=null,s[this.hash]=null,delete s[this.hash]},isTracking:function(){return s[this.hash].tracking},setTracking:function(U){return U?y(this):b(this),this},getActivePointersListByType:function(U){var z=s[this.hash],Q,ee=z.activePointersLists.length,Fe;for(Q=0;Q<ee;Q++)if(z.activePointersLists[Q].type===U)return z.activePointersLists[Q];return Fe=new i.MouseTracker.GesturePointList(U),z.activePointersLists.push(Fe),Fe},getActivePointerCount:function(){var U=s[this.hash],z,Q=U.activePointersLists.length,ee=0;for(z=0;z<Q;z++)ee+=U.activePointersLists[z].getLength();return ee},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 c=function(){try{return window.self!==window.top}catch{return!0}}();function p(U){try{return U.addEventListener&&U.removeEventListener}catch{return!1}}i.MouseTracker.gesturePointVelocityTracker=function(){var U=[],z=0,Q=0,ee=function(bn,Ot){return bn.hash.toString()+Ot.type+Ot.id.toString()},Fe=function(){var bn,Ot=U.length,Ar,Kn,Oa=i.now(),CP,PP,RP;for(CP=Oa-Q,Q=Oa,bn=0;bn<Ot;bn++)Ar=U[bn],Kn=Ar.gPoint,Kn.direction=Math.atan2(Kn.currentPos.y-Ar.lastPos.y,Kn.currentPos.x-Ar.lastPos.x),PP=Ar.lastPos.distanceTo(Kn.currentPos),Ar.lastPos=Kn.currentPos,RP=1e3*PP/(CP+1),Kn.speed=.75*RP+.25*Kn.speed},rt=function(bn,Ot){var Ar=ee(bn,Ot);U.push({guid:Ar,gPoint:Ot,lastPos:Ot.currentPos}),U.length===1&&(Q=i.now(),z=window.setInterval(Fe,50))},Rt=function(bn,Ot){var Ar=ee(bn,Ot),Kn,Oa=U.length;for(Kn=0;Kn<Oa;Kn++)if(U[Kn].guid===Ar){U.splice(Kn,1),Oa--,Oa===0&&window.clearInterval(z);break}};return{addPoint:rt,removePoint:Rt}}(),i.MouseTracker.captureElement=document,i.MouseTracker.wheelEventName=i.Browser.vendor===i.BROWSERS.IE&&i.Browser.version>8||"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",i.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur","contextmenu",i.MouseTracker.wheelEventName],i.MouseTracker.wheelEventName==="DOMMouseScroll"&&i.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent?(i.MouseTracker.havePointerEvents=!0,i.MouseTracker.subscribeEvents.push("pointerenter","pointerleave","pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),i.MouseTracker.havePointerCapture=function(){var U=document.createElement("div");return i.isFunction(U.setPointerCapture)&&i.isFunction(U.releasePointerCapture)}(),i.MouseTracker.havePointerCapture&&i.MouseTracker.subscribeEvents.push("gotpointercapture","lostpointercapture")):(i.MouseTracker.havePointerEvents=!1,i.MouseTracker.subscribeEvents.push("mouseenter","mouseleave","mouseover","mouseout","mousedown","mouseup","mousemove"),i.MouseTracker.mousePointerId="legacy-mouse",i.MouseTracker.havePointerCapture=function(){var U=document.createElement("div");return i.isFunction(U.setCapture)&&i.isFunction(U.releaseCapture)}(),i.MouseTracker.havePointerCapture&&i.MouseTracker.subscribeEvents.push("losecapture"),"ontouchstart"in window&&i.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&i.MouseTracker.subscribeEvents.push("gesturestart","gesturechange")),i.MouseTracker.GesturePointList=function(U){this._gPoints=[],this.type=U,this.buttons=0,this.contacts=0,this.clicks=0,this.captureCount=0},i.MouseTracker.GesturePointList.prototype={getLength:function(){return this._gPoints.length},asArray:function(){return this._gPoints},add:function(U){return this._gPoints.push(U)},removeById:function(U){var z,Q=this._gPoints.length;for(z=0;z<Q;z++)if(this._gPoints[z].id===U){this._gPoints.splice(z,1);break}return this._gPoints.length},getByIndex:function(U){return U<this._gPoints.length?this._gPoints[U]:null},getById:function(U){var z,Q=this._gPoints.length;for(z=0;z<Q;z++)if(this._gPoints[z].id===U)return this._gPoints[z];return null},getPrimary:function(U){var z,Q=this._gPoints.length;for(z=0;z<Q;z++)if(this._gPoints[z].isPrimary)return this._gPoints[z];return null},addContact:function(){++this.contacts,this.contacts>1&&(this.type==="mouse"||this.type==="pen")&&(i.console.warn("GesturePointList.addContact() Implausible contacts value"),this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(i.console.warn("GesturePointList.removeContact() Implausible contacts value"),this.contacts=0)}};function v(U){var z=s[U.hash],Q,ee,Fe,rt,Rt,bn=z.activePointersLists.length;for(Q=0;Q<bn;Q++)if(Fe=z.activePointersLists[Q],Fe.getLength()>0){for(Rt=[],rt=Fe.asArray(),ee=0;ee<rt.length;ee++)Rt.push(rt[ee]);for(ee=0;ee<Rt.length;ee++)De(U,Fe,Rt[ee])}for(Q=0;Q<bn;Q++)z.activePointersLists.pop();z.sentDragEvent=!1}function y(U){var z=s[U.hash],Q,ee;if(!z.tracking){for(ee=0;ee<i.MouseTracker.subscribeEvents.length;ee++)Q=i.MouseTracker.subscribeEvents[ee],i.addEvent(U.element,Q,z[Q],Q===i.MouseTracker.wheelEventName?{passive:!1,capture:!1}:!1);v(U),z.tracking=!0}}function b(U){var z=s[U.hash],Q,ee;if(z.tracking){for(ee=0;ee<i.MouseTracker.subscribeEvents.length;ee++)Q=i.MouseTracker.subscribeEvents[ee],i.removeEvent(U.element,Q,z[Q],!1);v(U),z.tracking=!1}}function E(U,z){var Q=s[U.hash];if(z==="pointerevent")return{upName:"pointerup",upHandler:Q.pointerupcaptured,moveName:"pointermove",moveHandler:Q.pointermovecaptured};if(z==="mouse")return{upName:"pointerup",upHandler:Q.pointerupcaptured,moveName:"pointermove",moveHandler:Q.pointermovecaptured};if(z==="touch")return{upName:"touchend",upHandler:Q.touchendcaptured,moveName:"touchmove",moveHandler:Q.touchmovecaptured};throw new Error("MouseTracker.getCaptureEventParams: Unknown pointer type.")}function S(U,z){var Q;if(i.MouseTracker.havePointerCapture)if(i.MouseTracker.havePointerEvents)try{U.element.setPointerCapture(z.id)}catch{i.console.warn("setPointerCapture() called on invalid pointer ID");return}else U.element.setCapture(!0);else Q=E(U,i.MouseTracker.havePointerEvents?"pointerevent":z.type),c&&p(window.top)&&i.addEvent(window.top,Q.upName,Q.upHandler,!0),i.addEvent(i.MouseTracker.captureElement,Q.upName,Q.upHandler,!0),i.addEvent(i.MouseTracker.captureElement,Q.moveName,Q.moveHandler,!0);Et(U,z,!0)}function O(U,z){var Q,ee,Fe;if(i.MouseTracker.havePointerCapture)if(i.MouseTracker.havePointerEvents){if(ee=U.getActivePointersListByType(z.type),Fe=ee.getById(z.id),!Fe||!Fe.captured)return;try{U.element.releasePointerCapture(z.id)}catch{}}else U.element.releaseCapture();else Q=E(U,i.MouseTracker.havePointerEvents?"pointerevent":z.type),c&&p(window.top)&&i.removeEvent(window.top,Q.upName,Q.upHandler,!0),i.removeEvent(i.MouseTracker.captureElement,Q.moveName,Q.moveHandler,!0),i.removeEvent(i.MouseTracker.captureElement,Q.upName,Q.upHandler,!0);Et(U,z,!1)}function A(U){return i.MouseTracker.havePointerEvents?U.pointerId:i.MouseTracker.mousePointerId}function H(U){return i.MouseTracker.havePointerEvents?U.pointerType||(i.Browser.vendor===i.BROWSERS.IE?"mouse":""):"mouse"}function W(U){return i.MouseTracker.havePointerEvents?U.isPrimary:!0}function re(U){return i.getMousePosition(U)}function $(U,z){return se(re(U),z)}function se(U,z){var Q=i.getElementOffset(z);return U.minus(Q)}function I(U,z){return new i.Point((U.x+z.x)/2,(U.y+z.y)/2)}function ne(U,z){var Q={originalEvent:z,eventType:"click",pointerType:"mouse",isEmulated:!1};qe(U,Q),Q.preventDefault&&!Q.defaultPrevented&&i.cancelEvent(z),Q.stopPropagation&&i.stopEvent(z)}function he(U,z){var Q={originalEvent:z,eventType:"dblclick",pointerType:"mouse",isEmulated:!1};qe(U,Q),Q.preventDefault&&!Q.defaultPrevented&&i.cancelEvent(z),Q.stopPropagation&&i.stopEvent(z)}function ce(U,z){var Q=null,ee={originalEvent:z,eventType:"keydown",pointerType:"",isEmulated:!1};qe(U,ee),U.keyDownHandler&&!ee.preventGesture&&!ee.defaultPrevented&&(Q={eventSource:U,keyCode:z.keyCode?z.keyCode:z.charCode,ctrl:z.ctrlKey,shift:z.shiftKey,alt:z.altKey,meta:z.metaKey,originalEvent:z,preventDefault:ee.preventDefault||ee.defaultPrevented,userData:U.userData},U.keyDownHandler(Q)),(Q&&Q.preventDefault||ee.preventDefault&&!ee.defaultPrevented)&&i.cancelEvent(z),ee.stopPropagation&&i.stopEvent(z)}function Se(U,z){var Q=null,ee={originalEvent:z,eventType:"keyup",pointerType:"",isEmulated:!1};qe(U,ee),U.keyUpHandler&&!ee.preventGesture&&!ee.defaultPrevented&&(Q={eventSource:U,keyCode:z.keyCode?z.keyCode:z.charCode,ctrl:z.ctrlKey,shift:z.shiftKey,alt:z.altKey,meta:z.metaKey,originalEvent:z,preventDefault:ee.preventDefault||ee.defaultPrevented,userData:U.userData},U.keyUpHandler(Q)),(Q&&Q.preventDefault||ee.preventDefault&&!ee.defaultPrevented)&&i.cancelEvent(z),ee.stopPropagation&&i.stopEvent(z)}function Pe(U,z){var Q=null,ee={originalEvent:z,eventType:"keypress",pointerType:"",isEmulated:!1};qe(U,ee),U.keyHandler&&!ee.preventGesture&&!ee.defaultPrevented&&(Q={eventSource:U,keyCode:z.keyCode?z.keyCode:z.charCode,ctrl:z.ctrlKey,shift:z.shiftKey,alt:z.altKey,meta:z.metaKey,originalEvent:z,preventDefault:ee.preventDefault||ee.defaultPrevented,userData:U.userData},U.keyHandler(Q)),(Q&&Q.preventDefault||ee.preventDefault&&!ee.defaultPrevented)&&i.cancelEvent(z),ee.stopPropagation&&i.stopEvent(z)}function Xe(U,z){var Q={originalEvent:z,eventType:"focus",pointerType:"",isEmulated:!1};qe(U,Q),U.focusHandler&&!Q.preventGesture&&U.focusHandler({eventSource:U,originalEvent:z,userData:U.userData})}function tt(U,z){var Q={originalEvent:z,eventType:"blur",pointerType:"",isEmulated:!1};qe(U,Q),U.blurHandler&&!Q.preventGesture&&U.blurHandler({eventSource:U,originalEvent:z,userData:U.userData})}function ht(U,z){var Q=null,ee={originalEvent:z,eventType:"contextmenu",pointerType:"mouse",isEmulated:!1};qe(U,ee),U.contextMenuHandler&&!ee.preventGesture&&!ee.defaultPrevented&&(Q={eventSource:U,position:se(re(z),U.element),originalEvent:ee.originalEvent,preventDefault:ee.preventDefault||ee.defaultPrevented,userData:U.userData},U.contextMenuHandler(Q)),(Q&&Q.preventDefault||ee.preventDefault&&!ee.defaultPrevented)&&i.cancelEvent(z),ee.stopPropagation&&i.stopEvent(z)}function yt(U,z){Tt(U,z,z)}function dt(U,z){var Q={target:z.target||z.srcElement,type:"wheel",shiftKey:z.shiftKey||!1,clientX:z.clientX,clientY:z.clientY,pageX:z.pageX?z.pageX:z.clientX,pageY:z.pageY?z.pageY:z.clientY,deltaMode:z.type==="MozMousePixelScroll"?0:1,deltaX:0,deltaZ:0};i.MouseTracker.wheelEventName==="mousewheel"?Q.deltaY=-z.wheelDelta/i.DEFAULT_SETTINGS.pixelsPerWheelLine:Q.deltaY=z.detail,Tt(U,Q,z)}function Tt(U,z,Q){var ee=0,Fe,rt=null;ee=z.deltaY<0?1:-1,Fe={originalEvent:z,eventType:"wheel",pointerType:"mouse",isEmulated:z!==Q},qe(U,Fe),U.scrollHandler&&!Fe.preventGesture&&!Fe.defaultPrevented&&(rt={eventSource:U,pointerType:"mouse",position:$(z,U.element),scroll:ee,shift:z.shiftKey,isTouchEvent:!1,originalEvent:Q,preventDefault:Fe.preventDefault||Fe.defaultPrevented,userData:U.userData},U.scrollHandler(rt)),Fe.stopPropagation&&i.stopEvent(Q),(rt&&rt.preventDefault||Fe.preventDefault&&!Fe.defaultPrevented)&&i.cancelEvent(Q)}function xt(U,z){var Q={id:i.MouseTracker.mousePointerId,type:"mouse"},ee={originalEvent:z,eventType:"lostpointercapture",pointerType:"mouse",isEmulated:!1};qe(U,ee),z.target===U.element&&Et(U,Q,!1),ee.stopPropagation&&i.stopEvent(z)}function Nt(U,z){var Q,ee,Fe=z.changedTouches.length,rt,Rt=U.getActivePointersListByType("touch");Q=i.now(),Rt.getLength()>z.touches.length-Fe&&i.console.warn("Tracked touch contact count doesn't match event.touches.length");var bn={originalEvent:z,eventType:"pointerdown",pointerType:"touch",isEmulated:!1};for(qe(U,bn),ee=0;ee<Fe;ee++)rt={id:z.changedTouches[ee].identifier,type:"touch",isPrimary:Rt.getLength()===0,currentPos:re(z.changedTouches[ee]),currentTime:Q},pt(U,bn,rt),Lt(U,bn,rt,0),Et(U,rt,!0);bn.preventDefault&&!bn.defaultPrevented&&i.cancelEvent(z),bn.stopPropagation&&i.stopEvent(z)}function Mt(U,z){var Q,ee,Fe=z.changedTouches.length,rt;Q=i.now();var Rt={originalEvent:z,eventType:"pointerup",pointerType:"touch",isEmulated:!1};for(qe(U,Rt),ee=0;ee<Fe;ee++)rt={id:z.changedTouches[ee].identifier,type:"touch",currentPos:re(z.changedTouches[ee]),currentTime:Q},Fn(U,Rt,rt,0),Et(U,rt,!1),$t(U,Rt,rt);Rt.preventDefault&&!Rt.defaultPrevented&&i.cancelEvent(z),Rt.stopPropagation&&i.stopEvent(z)}function Ht(U,z){var Q,ee,Fe=z.changedTouches.length,rt;Q=i.now();var Rt={originalEvent:z,eventType:"pointermove",pointerType:"touch",isEmulated:!1};for(qe(U,Rt),ee=0;ee<Fe;ee++)rt={id:z.changedTouches[ee].identifier,type:"touch",currentPos:re(z.changedTouches[ee]),currentTime:Q},Zt(U,Rt,rt);Rt.preventDefault&&!Rt.defaultPrevented&&i.cancelEvent(z),Rt.stopPropagation&&i.stopEvent(z)}function Qt(U,z){var Q=z.changedTouches.length,ee,Fe,rt={originalEvent:z,eventType:"pointercancel",pointerType:"touch",isEmulated:!1};for(qe(U,rt),ee=0;ee<Q;ee++)Fe={id:z.changedTouches[ee].identifier,type:"touch"},or(U,rt,Fe);rt.stopPropagation&&i.stopEvent(z)}function wn(U,z){return i.eventIsCanceled(z)||z.preventDefault(),!1}function ft(U,z){return i.eventIsCanceled(z)||z.preventDefault(),!1}function Gt(U,z){var Q={originalEvent:z,eventType:"gotpointercapture",pointerType:H(z),isEmulated:!1};qe(U,Q),z.target===U.element&&Et(U,{id:z.pointerId,type:H(z)},!0),Q.stopPropagation&&i.stopEvent(z)}function Ge(U,z){var Q={originalEvent:z,eventType:"lostpointercapture",pointerType:H(z),isEmulated:!1};qe(U,Q),z.target===U.element&&Et(U,{id:z.pointerId,type:H(z)},!1),Q.stopPropagation&&i.stopEvent(z)}function at(U,z){var Q={id:A(z),type:H(z),isPrimary:W(z),currentPos:re(z),currentTime:i.now()},ee={originalEvent:z,eventType:"pointerenter",pointerType:Q.type,isEmulated:!1};qe(U,ee),pt(U,ee,Q)}function lt(U,z){var Q={id:A(z),type:H(z),isPrimary:W(z),currentPos:re(z),currentTime:i.now()},ee={originalEvent:z,eventType:"pointerleave",pointerType:Q.type,isEmulated:!1};qe(U,ee),$t(U,ee,Q)}function st(U,z){var Q={id:A(z),type:H(z),isPrimary:W(z),currentPos:re(z),currentTime:i.now()},ee={originalEvent:z,eventType:"pointerover",pointerType:Q.type,isEmulated:!1};qe(U,ee),Cn(U,ee,Q),ee.preventDefault&&!ee.defaultPrevented&&i.cancelEvent(z),ee.stopPropagation&&i.stopEvent(z)}function ct(U,z){var Q={id:A(z),type:H(z),isPrimary:W(z),currentPos:re(z),currentTime:i.now()},ee={originalEvent:z,eventType:"pointerout",pointerType:Q.type,isEmulated:!1};qe(U,ee),en(U,ee,Q),ee.preventDefault&&!ee.defaultPrevented&&i.cancelEvent(z),ee.stopPropagation&&i.stopEvent(z)}function _t(U,z){var Q={id:A(z),type:H(z),isPrimary:W(z),currentPos:re(z),currentTime:i.now()},ee=i.MouseTracker.havePointerEvents&&Q.type==="touch"&&i.Browser.vendor!==i.BROWSERS.IE,Fe={originalEvent:z,eventType:"pointerdown",pointerType:Q.type,isEmulated:!1};qe(U,Fe),Lt(U,Fe,Q,z.button),Fe.preventDefault&&!Fe.defaultPrevented&&i.cancelEvent(z),Fe.stopPropagation&&i.stopEvent(z),Fe.shouldCapture&&(ee?Et(U,Q,!0):S(U,Q))}function gn(U,z){Jt(U,z)}function In(U,z){var Q=U.getActivePointersListByType(H(z));Q.getById(z.pointerId)&&Jt(U,z),i.stopEvent(z)}function Jt(U,z){var Q;Q={id:A(z),type:H(z),isPrimary:W(z),currentPos:re(z),currentTime:i.now()};var ee={originalEvent:z,eventType:"pointerup",pointerType:Q.type,isEmulated:!1};qe(U,ee),Fn(U,ee,Q,z.button),ee.preventDefault&&!ee.defaultPrevented&&i.cancelEvent(z),ee.stopPropagation&&i.stopEvent(z),ee.shouldReleaseCapture&&(z.target===U.element?O(U,Q):Et(U,Q,!1))}function Vr(U,z){kr(U,z)}function yr(U,z){var Q=U.getActivePointersListByType(H(z));Q.getById(z.pointerId)&&kr(U,z),i.stopEvent(z)}function kr(U,z){var Q={id:A(z),type:H(z),isPrimary:W(z),currentPos:re(z),currentTime:i.now()},ee={originalEvent:z,eventType:"pointermove",pointerType:Q.type,isEmulated:!1};qe(U,ee),Zt(U,ee,Q),ee.preventDefault&&!ee.defaultPrevented&&i.cancelEvent(z),ee.stopPropagation&&i.stopEvent(z)}function N(U,z){var Q={id:z.pointerId,type:H(z)},ee={originalEvent:z,eventType:"pointercancel",pointerType:Q.type,isEmulated:!1};qe(U,ee),or(U,ee,Q),ee.stopPropagation&&i.stopEvent(z)}function oe(U,z){return z.speed=0,z.direction=0,z.contactPos=z.currentPos,z.contactTime=z.currentTime,z.lastPos=z.currentPos,z.lastTime=z.currentTime,U.add(z)}function De(U,z,Q){var ee,Fe=z.getById(Q.id);return Fe?(Fe.captured&&(i.console.warn("stopTrackingPointer() called on captured pointer"),O(U,Fe)),(z.type==="mouse"||z.type==="pen")&&z.contacts>0&&z.removeContact(),ee=z.removeById(Q.id)):ee=z.getLength(),ee}function $e(U,z){switch(z.eventType){case"pointermove":z.isStoppable=!0,z.isCancelable=!0,z.preventDefault=!1,z.preventGesture=!U.hasGestureHandlers,z.stopPropagation=!1;break;case"pointerover":case"pointerout":case"contextmenu":case"keydown":case"keyup":case"keypress":z.isStoppable=!0,z.isCancelable=!0,z.preventDefault=!1,z.preventGesture=!1,z.stopPropagation=!1;break;case"pointerdown":z.isStoppable=!0,z.isCancelable=!0,z.preventDefault=!1,z.preventGesture=!U.hasGestureHandlers,z.stopPropagation=!1;break;case"pointerup":z.isStoppable=!0,z.isCancelable=!0,z.preventDefault=!1,z.preventGesture=!U.hasGestureHandlers,z.stopPropagation=!1;break;case"wheel":z.isStoppable=!0,z.isCancelable=!0,z.preventDefault=!1,z.preventGesture=!U.hasScrollHandler,z.stopPropagation=!1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":z.isStoppable=!0,z.isCancelable=!1,z.preventDefault=!1,z.preventGesture=!1,z.stopPropagation=!1;break;case"click":z.isStoppable=!0,z.isCancelable=!0,z.preventDefault=!!U.clickHandler,z.preventGesture=!1,z.stopPropagation=!1;break;case"dblclick":z.isStoppable=!0,z.isCancelable=!0,z.preventDefault=!!U.dblClickHandler,z.preventGesture=!1,z.stopPropagation=!1;break;case"focus":case"blur":case"pointerenter":case"pointerleave":default:z.isStoppable=!1,z.isCancelable=!1,z.preventDefault=!1,z.preventGesture=!1,z.stopPropagation=!1;break}}function qe(U,z){z.eventSource=U,z.eventPhase=z.originalEvent&&typeof z.originalEvent.eventPhase<"u"?z.originalEvent.eventPhase:0,z.defaultPrevented=i.eventIsCanceled(z.originalEvent),z.shouldCapture=!1,z.shouldReleaseCapture=!1,z.userData=U.userData,$e(U,z),U.preProcessEventHandler&&U.preProcessEventHandler(z)}function Et(U,z,Q){var ee=U.getActivePointersListByType(z.type),Fe=ee.getById(z.id);Fe?Q&&!Fe.captured?(Fe.captured=!0,ee.captureCount++):!Q&&Fe.captured&&(Fe.captured=!1,ee.captureCount--,ee.captureCount<0&&(ee.captureCount=0,i.console.warn("updatePointerCaptured() - pointsList.captureCount went negative"))):i.console.warn("updatePointerCaptured() called on untracked pointer")}function pt(U,z,Q){var ee=U.getActivePointersListByType(Q.type),Fe;Fe=ee.getById(Q.id),Fe?(Fe.insideElement=!0,Fe.lastPos=Fe.currentPos,Fe.lastTime=Fe.currentTime,Fe.currentPos=Q.currentPos,Fe.currentTime=Q.currentTime,Q=Fe):(Q.captured=!1,Q.insideElementPressed=!1,Q.insideElement=!0,oe(ee,Q)),U.enterHandler&&U.enterHandler({eventSource:U,pointerType:Q.type,position:se(Q.currentPos,U.element),buttons:ee.buttons,pointers:U.getActivePointerCount(),insideElementPressed:Q.insideElementPressed,buttonDownAny:ee.buttons!==0,isTouchEvent:Q.type==="touch",originalEvent:z.originalEvent,userData:U.userData})}function $t(U,z,Q){var ee=U.getActivePointersListByType(Q.type),Fe,rt;Fe=ee.getById(Q.id),Fe?(Fe.captured?(Fe.insideElement=!1,Fe.lastPos=Fe.currentPos,Fe.lastTime=Fe.currentTime,Fe.currentPos=Q.currentPos,Fe.currentTime=Q.currentTime):De(U,ee,Fe),Q=Fe):(Q.captured=!1,Q.insideElementPressed=!1),(U.leaveHandler||U.exitHandler)&&(rt={eventSource:U,pointerType:Q.type,position:Q.currentPos&&se(Q.currentPos,U.element),buttons:ee.buttons,pointers:U.getActivePointerCount(),insideElementPressed:Q.insideElementPressed,buttonDownAny:ee.buttons!==0,isTouchEvent:Q.type==="touch",originalEvent:z.originalEvent,userData:U.userData},U.leaveHandler&&U.leaveHandler(rt),U.exitHandler&&U.exitHandler(rt))}function Cn(U,z,Q){var ee,Fe;ee=U.getActivePointersListByType(Q.type),Fe=ee.getById(Q.id),Fe?Q=Fe:(Q.captured=!1,Q.insideElementPressed=!1),U.overHandler&&U.overHandler({eventSource:U,pointerType:Q.type,position:se(Q.currentPos,U.element),buttons:ee.buttons,pointers:U.getActivePointerCount(),insideElementPressed:Q.insideElementPressed,buttonDownAny:ee.buttons!==0,isTouchEvent:Q.type==="touch",originalEvent:z.originalEvent,userData:U.userData})}function en(U,z,Q){var ee,Fe;ee=U.getActivePointersListByType(Q.type),Fe=ee.getById(Q.id),Fe?Q=Fe:(Q.captured=!1,Q.insideElementPressed=!1),U.outHandler&&U.outHandler({eventSource:U,pointerType:Q.type,position:Q.currentPos&&se(Q.currentPos,U.element),buttons:ee.buttons,pointers:U.getActivePointerCount(),insideElementPressed:Q.insideElementPressed,buttonDownAny:ee.buttons!==0,isTouchEvent:Q.type==="touch",originalEvent:z.originalEvent,userData:U.userData})}function Lt(U,z,Q,ee){var Fe=s[U.hash],rt=U.getActivePointersListByType(Q.type),Rt;if(typeof z.originalEvent.buttons<"u"?rt.buttons=z.originalEvent.buttons:ee===0?rt.buttons|=1:ee===1?rt.buttons|=4:ee===2?rt.buttons|=2:ee===3?rt.buttons|=8:ee===4?rt.buttons|=16:ee===5&&(rt.buttons|=32),ee!==0){z.shouldCapture=!1,z.shouldReleaseCapture=!1,U.nonPrimaryPressHandler&&!z.preventGesture&&!z.defaultPrevented&&(z.preventDefault=!0,U.nonPrimaryPressHandler({eventSource:U,pointerType:Q.type,position:se(Q.currentPos,U.element),button:ee,buttons:rt.buttons,isTouchEvent:Q.type==="touch",originalEvent:z.originalEvent,userData:U.userData}));return}if(Rt=rt.getById(Q.id),Rt)Rt.insideElementPressed=!0,Rt.insideElement=!0,Rt.originalTarget=z.originalEvent.target,Rt.contactPos=Q.currentPos,Rt.contactTime=Q.currentTime,Rt.lastPos=Rt.currentPos,Rt.lastTime=Rt.currentTime,Rt.currentPos=Q.currentPos,Rt.currentTime=Q.currentTime,Q=Rt;else{i.console.warn("pointerdown event on untracked pointer"),Q.captured=!1,Q.insideElementPressed=!0,Q.insideElement=!0,Q.originalTarget=z.originalEvent.target,oe(rt,Q);return}rt.addContact(),!z.preventGesture&&!z.defaultPrevented?(z.shouldCapture=!0,z.shouldReleaseCapture=!1,z.preventDefault=!0,(U.dragHandler||U.dragEndHandler||U.pinchHandler)&&i.MouseTracker.gesturePointVelocityTracker.addPoint(U,Q),rt.contacts===1?U.pressHandler&&!z.preventGesture&&U.pressHandler({eventSource:U,pointerType:Q.type,position:se(Q.contactPos,U.element),buttons:rt.buttons,isTouchEvent:Q.type==="touch",originalEvent:z.originalEvent,userData:U.userData}):rt.contacts===2&&U.pinchHandler&&Q.type==="touch"&&(Fe.pinchGPoints=rt.asArray(),Fe.lastPinchDist=Fe.currentPinchDist=Fe.pinchGPoints[0].currentPos.distanceTo(Fe.pinchGPoints[1].currentPos),Fe.lastPinchCenter=Fe.currentPinchCenter=I(Fe.pinchGPoints[0].currentPos,Fe.pinchGPoints[1].currentPos))):(z.shouldCapture=!1,z.shouldReleaseCapture=!1)}function Fn(U,z,Q,ee){var Fe=s[U.hash],rt=U.getActivePointersListByType(Q.type),Rt,bn,Ot,Ar=!1,Kn;if(typeof z.originalEvent.buttons<"u"?rt.buttons=z.originalEvent.buttons:ee===0?rt.buttons^=-2:ee===1?rt.buttons^=-5:ee===2?rt.buttons^=-3:ee===3?rt.buttons^=-9:ee===4?rt.buttons^=-17:ee===5&&(rt.buttons^=-33),z.shouldCapture=!1,ee!==0){z.shouldReleaseCapture=!1,U.nonPrimaryReleaseHandler&&!z.preventGesture&&!z.defaultPrevented&&(z.preventDefault=!0,U.nonPrimaryReleaseHandler({eventSource:U,pointerType:Q.type,position:se(Q.currentPos,U.element),button:ee,buttons:rt.buttons,isTouchEvent:Q.type==="touch",originalEvent:z.originalEvent,userData:U.userData}));return}Ot=rt.getById(Q.id),Ot?(rt.removeContact(),Ot.captured&&(Ar=!0),Ot.lastPos=Ot.currentPos,Ot.lastTime=Ot.currentTime,Ot.currentPos=Q.currentPos,Ot.currentTime=Q.currentTime,Ot.insideElement||De(U,rt,Ot),Rt=Ot.currentPos,bn=Ot.currentTime):(i.console.warn("updatePointerUp(): pointerup on untracked gPoint"),Q.captured=!1,Q.insideElementPressed=!1,Q.insideElement=!0,oe(rt,Q),Ot=Q),!z.preventGesture&&!z.defaultPrevented&&(Ar?(z.shouldReleaseCapture=!0,z.preventDefault=!0,(U.dragHandler||U.dragEndHandler||U.pinchHandler)&&i.MouseTracker.gesturePointVelocityTracker.removePoint(U,Ot),rt.contacts===0?(U.releaseHandler&&U.releaseHandler({eventSource:U,pointerType:Ot.type,position:se(Rt,U.element),buttons:rt.buttons,insideElementPressed:Ot.insideElementPressed,insideElementReleased:Ot.insideElement,isTouchEvent:Ot.type==="touch",originalEvent:z.originalEvent,userData:U.userData}),U.dragEndHandler&&Fe.sentDragEvent&&U.dragEndHandler({eventSource:U,pointerType:Ot.type,position:se(Ot.currentPos,U.element),speed:Ot.speed,direction:Ot.direction,shift:z.originalEvent.shiftKey,isTouchEvent:Ot.type==="touch",originalEvent:z.originalEvent,userData:U.userData}),Fe.sentDragEvent=!1,(U.clickHandler||U.dblClickHandler)&&Ot.insideElement&&(Kn=bn-Ot.contactTime<=U.clickTimeThreshold&&Ot.contactPos.distanceTo(Rt)<=U.clickDistThreshold,U.clickHandler&&U.clickHandler({eventSource:U,pointerType:Ot.type,position:se(Ot.currentPos,U.element),quick:Kn,shift:z.originalEvent.shiftKey,isTouchEvent:Ot.type==="touch",originalEvent:z.originalEvent,originalTarget:Ot.originalTarget,userData:U.userData}),U.dblClickHandler&&Kn&&(rt.clicks++,rt.clicks===1?(Fe.lastClickPos=Rt,Fe.dblClickTimeOut=setTimeout(function(){rt.clicks=0},U.dblClickTimeThreshold)):rt.clicks===2&&(clearTimeout(Fe.dblClickTimeOut),rt.clicks=0,Fe.lastClickPos.distanceTo(Rt)<=U.dblClickDistThreshold&&U.dblClickHandler({eventSource:U,pointerType:Ot.type,position:se(Ot.currentPos,U.element),shift:z.originalEvent.shiftKey,isTouchEvent:Ot.type==="touch",originalEvent:z.originalEvent,userData:U.userData}),Fe.lastClickPos=null)))):rt.contacts===2&&U.pinchHandler&&Ot.type==="touch"&&(Fe.pinchGPoints=rt.asArray(),Fe.lastPinchDist=Fe.currentPinchDist=Fe.pinchGPoints[0].currentPos.distanceTo(Fe.pinchGPoints[1].currentPos),Fe.lastPinchCenter=Fe.currentPinchCenter=I(Fe.pinchGPoints[0].currentPos,Fe.pinchGPoints[1].currentPos))):(z.shouldReleaseCapture=!1,U.releaseHandler&&(U.releaseHandler({eventSource:U,pointerType:Ot.type,position:se(Rt,U.element),buttons:rt.buttons,insideElementPressed:Ot.insideElementPressed,insideElementReleased:Ot.insideElement,isTouchEvent:Ot.type==="touch",originalEvent:z.originalEvent,userData:U.userData}),z.preventDefault=!0)))}function Zt(U,z,Q){var ee=s[U.hash],Fe=U.getActivePointersListByType(Q.type),rt,Rt,bn;if(typeof z.originalEvent.buttons<"u"&&(Fe.buttons=z.originalEvent.buttons),rt=Fe.getById(Q.id),rt)rt.lastPos=rt.currentPos,rt.lastTime=rt.currentTime,rt.currentPos=Q.currentPos,rt.currentTime=Q.currentTime;else return;z.shouldCapture=!1,z.shouldReleaseCapture=!1,U.stopHandler&&Q.type==="mouse"&&(clearTimeout(U.stopTimeOut),U.stopTimeOut=setTimeout(function(){Xi(U,z.originalEvent,Q.type)},U.stopDelay)),Fe.contacts===0?U.moveHandler&&U.moveHandler({eventSource:U,pointerType:Q.type,position:se(Q.currentPos,U.element),buttons:Fe.buttons,isTouchEvent:Q.type==="touch",originalEvent:z.originalEvent,userData:U.userData}):Fe.contacts===1?(U.moveHandler&&(rt=Fe.asArray()[0],U.moveHandler({eventSource:U,pointerType:rt.type,position:se(rt.currentPos,U.element),buttons:Fe.buttons,isTouchEvent:rt.type==="touch",originalEvent:z.originalEvent,userData:U.userData})),U.dragHandler&&!z.preventGesture&&!z.defaultPrevented&&(rt=Fe.asArray()[0],bn=rt.currentPos.minus(rt.lastPos),U.dragHandler({eventSource:U,pointerType:rt.type,position:se(rt.currentPos,U.element),buttons:Fe.buttons,delta:bn,speed:rt.speed,direction:rt.direction,shift:z.originalEvent.shiftKey,isTouchEvent:rt.type==="touch",originalEvent:z.originalEvent,userData:U.userData}),z.preventDefault=!0,ee.sentDragEvent=!0)):Fe.contacts===2&&(U.moveHandler&&(Rt=Fe.asArray(),U.moveHandler({eventSource:U,pointerType:Rt[0].type,position:se(I(Rt[0].currentPos,Rt[1].currentPos),U.element),buttons:Fe.buttons,isTouchEvent:Rt[0].type==="touch",originalEvent:z.originalEvent,userData:U.userData})),U.pinchHandler&&Q.type==="touch"&&!z.preventGesture&&!z.defaultPrevented&&(bn=ee.pinchGPoints[0].currentPos.distanceTo(ee.pinchGPoints[1].currentPos),bn!==ee.currentPinchDist&&(ee.lastPinchDist=ee.currentPinchDist,ee.currentPinchDist=bn,ee.lastPinchCenter=ee.currentPinchCenter,ee.currentPinchCenter=I(ee.pinchGPoints[0].currentPos,ee.pinchGPoints[1].currentPos),U.pinchHandler({eventSource:U,pointerType:"touch",gesturePoints:ee.pinchGPoints,lastCenter:se(ee.lastPinchCenter,U.element),center:se(ee.currentPinchCenter,U.element),lastDistance:ee.lastPinchDist,distance:ee.currentPinchDist,shift:z.originalEvent.shiftKey,originalEvent:z.originalEvent,userData:U.userData}),z.preventDefault=!0)))}function or(U,z,Q){var ee=U.getActivePointersListByType(Q.type),Fe;Fe=ee.getById(Q.id),Fe&&De(U,ee,Fe)}function Xi(U,z,Q){U.stopHandler&&U.stopHandler({eventSource:U,pointerType:Q,position:$(z,U.element),buttons:U.getActivePointersListByType(Q).buttons,isTouchEvent:Q==="touch",originalEvent:z,userData:U.userData})}}(u),function(i){i.ControlAnchor={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4,ABSOLUTE:5},i.Control=function(s,c,p){var v=s.parentNode;typeof c=="number"&&(i.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"),c={anchor:c}),c.attachToViewer=typeof c.attachToViewer>"u"?!0:c.attachToViewer,this.autoFade=typeof c.autoFade>"u"?!0:c.autoFade,this.element=s,this.anchor=c.anchor,this.container=p,this.anchor===i.ControlAnchor.ABSOLUTE?(this.wrapper=i.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top=typeof c.top=="number"?c.top+"px":c.top,this.wrapper.style.left=typeof c.left=="number"?c.left+"px":c.left,this.wrapper.style.height=typeof c.height=="number"?c.height+"px":c.height,this.wrapper.style.width=typeof c.width=="number"?c.width+"px":c.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=i.makeNeutralElement("div"),this.wrapper.style.display="inline-block",this.anchor===i.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%")),this.wrapper.appendChild(this.element),c.attachToViewer?this.anchor===i.ControlAnchor.TOP_RIGHT||this.anchor===i.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.wrapper,this.container.firstChild):this.container.appendChild(this.wrapper):v.appendChild(this.wrapper)},i.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.anchor!==i.ControlAnchor.NONE&&this.container.removeChild(this.wrapper)},isVisible:function(){return this.wrapper.style.display!=="none"},setVisible:function(s){this.wrapper.style.display=s?this.anchor===i.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(s){this.element[i.SIGNAL]&&i.Browser.vendor===i.BROWSERS.IE?i.setElementOpacity(this.element,s,!0):i.setElementOpacity(this.wrapper,s,!0)}}}(u),function(i){i.ControlDock=function(c){var p=["topleft","topright","bottomright","bottomleft"],v,y;for(i.extend(!0,this,{id:"controldock-"+i.now()+"-"+Math.floor(Math.random()*1e6),container:i.makeNeutralElement("div"),controls:[]},c),this.container.onsubmit=function(){return!1},this.element&&(this.element=i.getElement(this.element),this.element.appendChild(this.container),this.element.style.position="relative",this.container.style.width="100%",this.container.style.height="100%"),y=0;y<p.length;y++)v=p[y],this.controls[v]=i.makeNeutralElement("div"),this.controls[v].style.position="absolute",v.match("left")&&(this.controls[v].style.left="0px"),v.match("right")&&(this.controls[v].style.right="0px"),v.match("top")&&(this.controls[v].style.top="0px"),v.match("bottom")&&(this.controls[v].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)},i.ControlDock.prototype={addControl:function(c,p){c=i.getElement(c);var v=null;if(!(s(this,c)>=0)){switch(p.anchor){case i.ControlAnchor.TOP_RIGHT:v=this.controls.topright,c.style.position="relative",c.style.paddingRight="0px",c.style.paddingTop="0px";break;case i.ControlAnchor.BOTTOM_RIGHT:v=this.controls.bottomright,c.style.position="relative",c.style.paddingRight="0px",c.style.paddingBottom="0px";break;case i.ControlAnchor.BOTTOM_LEFT:v=this.controls.bottomleft,c.style.position="relative",c.style.paddingLeft="0px",c.style.paddingBottom="0px";break;case i.ControlAnchor.TOP_LEFT:v=this.controls.topleft,c.style.position="relative",c.style.paddingLeft="0px",c.style.paddingTop="0px";break;case i.ControlAnchor.ABSOLUTE:v=this.container,c.style.margin="0px",c.style.padding="0px";break;default:case i.ControlAnchor.NONE:v=this.container,c.style.margin="0px",c.style.padding="0px";break}this.controls.push(new i.Control(c,p,v)),c.style.display="inline-block"}},removeControl:function(c){c=i.getElement(c);var p=s(this,c);return p>=0&&(this.controls[p].destroy(),this.controls.splice(p,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var c;for(c=this.controls.length-1;c>=0;c--)if(this.controls[c].isVisible())return!0;return!1},setControlsEnabled:function(c){var p;for(p=this.controls.length-1;p>=0;p--)this.controls[p].setVisible(c);return this}};function s(c,p){var v=c.controls,y;for(y=v.length-1;y>=0;y--)if(v[y].element===p)return y;return-1}}(u),function(i){i.Placement=i.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}}})}(u),function(i){var s={},c=1;i.Viewer=function(N){var oe=arguments,De=this,$e;if(i.isPlainObject(N)||(N={id:oe[0],xmlPath:oe.length>1?oe[1]:void 0,prefixUrl:oe.length>2?oe[2]:void 0,controls:oe.length>3?oe[3]:void 0,overlays:oe.length>4?oe[4]:void 0}),N.config&&(i.extend(!0,N,N.config),delete N.config),i.extend(!0,this,{id:N.id,hash:N.hash||c++,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},i.DEFAULT_SETTINGS,N),typeof this.hash>"u")throw new Error("A hash must be defined, either by specifying options.id or options.hash.");for(typeof s[this.hash]<"u"&&i.console.warn("Hash "+this.hash+" has already been used."),s[this.hash]={fsBoundsDelta:new i.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=i.now(),i.EventSource.call(this),this.addHandler("open-failed",function(qe){var Et=i.getString("Errors.OpenFailed",qe.eventSource,qe.message);De._showMessage(Et)}),i.ControlDock.call(this,N),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=i.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",function(qe){qe.width="100%",qe.height="100%",qe.overflow="hidden",qe.position="absolute",qe.top="0px",qe.left="0px"}(this.canvas.style),i.setElementTouchActionNone(this.canvas),N.tabIndex!==""&&(this.canvas.tabIndex=N.tabIndex===void 0?0:N.tabIndex),this.container.className="openseadragon-container",function(qe){qe.width="100%",qe.height="100%",qe.position="relative",qe.overflow="hidden",qe.left="0px",qe.top="0px",qe.textAlign="left"}(this.container.style),i.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 i.MouseTracker({userData:"Viewer.innerTracker",element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,contextMenuHandler:i.delegate(this,$),keyDownHandler:i.delegate(this,se),keyHandler:i.delegate(this,I),clickHandler:i.delegate(this,ne),dblClickHandler:i.delegate(this,he),dragHandler:i.delegate(this,ce),dragEndHandler:i.delegate(this,Se),enterHandler:i.delegate(this,Pe),leaveHandler:i.delegate(this,Xe),pressHandler:i.delegate(this,tt),releaseHandler:i.delegate(this,ht),nonPrimaryPressHandler:i.delegate(this,yt),nonPrimaryReleaseHandler:i.delegate(this,dt),scrollHandler:i.delegate(this,xt),pinchHandler:i.delegate(this,Tt)}),this.outerTracker=new i.MouseTracker({userData:"Viewer.outerTracker",element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:i.delegate(this,Nt),leaveHandler:i.delegate(this,Mt)}),this.toolbar&&(this.toolbar=new i.ControlDock({element:this.toolbar})),this.bindStandardControls(),s[this.hash].prevContainerSize=p(this.container),this.world=new i.World({viewer:this}),this.world.addHandler("add-item",function(qe){De.source=De.world.getItemAt(0).source,s[De.hash].forceRedraw=!0,De._updateRequestId||(De._updateRequestId=E(De,Ht))}),this.world.addHandler("remove-item",function(qe){De.world.getItemCount()?De.source=De.world.getItemAt(0).source:De.source=null,s[De.hash].forceRedraw=!0}),this.world.addHandler("metrics-change",function(qe){De.viewport&&De.viewport._setContentBounds(De.world.getHomeBounds(),De.world.getContentFactor())}),this.world.addHandler("item-index-change",function(qe){De.source=De.world.getItemAt(0).source}),this.viewport=new i.Viewport({containerSize:s[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 i.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:N.timeout}),this.tileCache=new i.TileCache({maxImageCacheCount:this.maxImageCacheCount}),this.drawer=new i.Drawer({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor}),this.overlaysContainer=i.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),this.drawer.canRotate()||(this.rotateLeft&&($e=this.buttonGroup.buttons.indexOf(this.rotateLeft),this.buttonGroup.buttons.splice($e,1),this.buttonGroup.element.removeChild(this.rotateLeft.element)),this.rotateRight&&($e=this.buttonGroup.buttons.indexOf(this.rotateRight),this.buttonGroup.buttons.splice($e,1),this.buttonGroup.element.removeChild(this.rotateRight.element))),this._addUpdatePixelDensityRatioEvent(),this.showNavigator&&(this.navigator=new i.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),$e=0;$e<this.customControls.length;$e++)this.addControl(this.customControls[$e].id,{anchor:this.customControls[$e].anchor});i.requestAnimationFrame(function(){O(De)}),this.imageSmoothingEnabled!==void 0&&!this.imageSmoothingEnabled&&this.drawer.setImageSmoothingEnabled(this.imageSmoothingEnabled),i._viewers.set(this.element,this)},i.extend(i.Viewer.prototype,i.EventSource.prototype,i.ControlDock.prototype,{isOpen:function(){return!!this.world.getItemCount()},openDzi:function(N){return i.console.error("[Viewer.openDzi] this function is deprecated; use Viewer.open() instead."),this.open(N)},openTileSource:function(N){return i.console.error("[Viewer.openTileSource] this function is deprecated; use Viewer.open() instead."),this.open(N)},open:function(N,oe){var De=this;if(this.close(),!N)return this;if(this.sequenceMode&&i.isArray(N))return this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null),typeof oe<"u"&&!isNaN(oe)&&(this.initialPage=oe),this.tileSources=N,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(i.isArray(N)||(N=[N]),!N.length)return this;this._opening=!0;for(var $e=N.length,qe=0,Et=0,pt,$t=function(){if(qe+Et===$e)if(qe){(De._firstOpen||!De.preserveViewport)&&(De.viewport.goHome(!0),De.viewport.update()),De._firstOpen=!1;var Lt=N[0];if(Lt.tileSource&&(Lt=Lt.tileSource),De.overlays&&!De.preserveOverlays)for(var Fn=0;Fn<De.overlays.length;Fn++)De.currentOverlays[Fn]=y(De,De.overlays[Fn]);De._drawOverlays(),De._opening=!1,De.raiseEvent("open",{source:Lt})}else De._opening=!1,De.raiseEvent("open-failed",pt)},Cn=function(Lt){(!i.isPlainObject(Lt)||!Lt.tileSource)&&(Lt={tileSource:Lt}),Lt.index!==void 0&&(i.console.error("[Viewer.open] setting indexes here is not supported; use addTiledImage instead"),delete Lt.index),Lt.collectionImmediately===void 0&&(Lt.collectionImmediately=!0);var Fn=Lt.success;Lt.success=function(or){if(qe++,Lt.tileSource.overlays)for(var Xi=0;Xi<Lt.tileSource.overlays.length;Xi++)De.addOverlay(Lt.tileSource.overlays[Xi]);Fn&&Fn(or),$t()};var Zt=Lt.error;Lt.error=function(or){Et++,pt||(pt=or),Zt&&Zt(or),$t()},De.addTiledImage(Lt)},en=0;en<N.length;en++)Cn(N[en]);return this},close:function(){return s[this.hash]?(this._opening=!1,this.navigator&&this.navigator.close(),this.preserveOverlays||(this.clearOverlays(),this.overlaysContainer.innerHTML=""),s[this.hash].animating=!1,this.world.removeAll(),this.imageLoader.clear(),this.raiseEvent("close"),this):this},destroy:function(){if(s[this.hash]){if(this._removeUpdatePixelDensityRatioEvent(),this.close(),this.clearOverlays(),this.overlaysContainer.innerHTML="",this.referenceStrip&&(this.referenceStrip.destroy(),this.referenceStrip=null),this._updateRequestId!==null&&(i.cancelAnimationFrame(this._updateRequestId),this._updateRequestId=null),this.drawer&&this.drawer.destroy(),this.navigator&&(this.navigator.destroy(),s[this.navigator.hash]=null,delete s[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(),s[this.hash]=null,delete s[this.hash],this.canvas=null,this.container=null,i._viewers.delete(this.element),this.element=null}},isMouseNavEnabled:function(){return this.innerTracker.isTracking()},setMouseNavEnabled:function(N){return this.innerTracker.setTracking(N),this.outerTracker.setTracking(N),this.raiseEvent("mouse-enabled",{enabled:N}),this},areControlsEnabled:function(){var N=this.controls.length,oe;for(oe=0;oe<this.controls.length;oe++)N=N&&this.controls[oe].isVisible();return N},setControlsEnabled:function(N){return N?H(this):O(this),this.raiseEvent("controls-enabled",{enabled:N}),this},setDebugMode:function(N){for(var oe=0;oe<this.world.getItemCount();oe++)this.world.getItemAt(oe).debugMode=N;this.debugMode=N,this.forceRedraw()},isFullPage:function(){return s[this.hash].fullPage},setFullPage:function(N){var oe=document.body,De=oe.style,$e=document.documentElement.style,qe=this,Et,pt;if(N===this.isFullPage())return this;var $t={fullPage:N,preventDefaultAction:!1};if(this.raiseEvent("pre-full-page",$t),$t.preventDefaultAction)return this;if(N){for(this.elementSize=i.getElementSize(this.element),this.pageScroll=i.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=De.margin,this.docMargin=$e.margin,De.margin="0",$e.margin="0",this.bodyPadding=De.padding,this.docPadding=$e.padding,De.padding="0",$e.padding="0",this.bodyWidth=De.width,this.docWidth=$e.width,De.width="100%",$e.width="100%",this.bodyHeight=De.height,this.docHeight=$e.height,De.height="100%",$e.height="100%",this.bodyDisplay=De.display,De.display="block",this.previousBody=[],s[this.hash].prevElementParent=this.element.parentNode,s[this.hash].prevNextSibling=this.element.nextSibling,s[this.hash].prevElementWidth=this.element.style.width,s[this.hash].prevElementHeight=this.element.style.height,Et=oe.childNodes.length,pt=0;pt<Et;pt++)this.previousBody.push(oe.childNodes[0]),oe.removeChild(oe.childNodes[0]);this.toolbar&&this.toolbar.element&&(this.toolbar.parentNode=this.toolbar.element.parentNode,this.toolbar.nextSibling=this.toolbar.element.nextSibling,oe.appendChild(this.toolbar.element),i.addClass(this.toolbar.element,"fullpage")),i.addClass(this.element,"fullpage"),oe.appendChild(this.element),this.element.style.height=i.getWindowSize().y+"px",this.element.style.width=i.getWindowSize().x+"px",this.toolbar&&this.toolbar.element&&(this.element.style.height=i.getElementSize(this.element).y-i.getElementSize(this.toolbar.element).y+"px"),s[this.hash].fullPage=!0,i.delegate(this,Nt)({})}else{for(this.element.style.margin=this.elementMargin,this.element.style.padding=this.elementPadding,De.margin=this.bodyMargin,$e.margin=this.docMargin,De.padding=this.bodyPadding,$e.padding=this.docPadding,De.width=this.bodyWidth,$e.width=this.docWidth,De.height=this.bodyHeight,$e.height=this.docHeight,De.display=this.bodyDisplay,oe.removeChild(this.element),Et=this.previousBody.length,pt=0;pt<Et;pt++)oe.appendChild(this.previousBody.shift());i.removeClass(this.element,"fullpage"),s[this.hash].prevElementParent.insertBefore(this.element,s[this.hash].prevNextSibling),this.toolbar&&this.toolbar.element&&(oe.removeChild(this.toolbar.element),i.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=s[this.hash].prevElementWidth,this.element.style.height=s[this.hash].prevElementHeight;var Cn=0,en=function(){i.setPageScroll(qe.pageScroll);var Lt=i.getPageScroll();Cn++,Cn<10&&(Lt.x!==qe.pageScroll.x||Lt.y!==qe.pageScroll.y)&&i.requestAnimationFrame(en)};i.requestAnimationFrame(en),s[this.hash].fullPage=!1,i.delegate(this,Mt)({})}return this.navigator&&this.viewport&&this.navigator.update(this.viewport),this.raiseEvent("full-page",{fullPage:N}),this},setFullScreen:function(N){var oe=this;if(!i.supportsFullScreen)return this.setFullPage(N);if(i.isFullScreen()===N)return this;var De={fullScreen:N,preventDefaultAction:!1};if(this.raiseEvent("pre-full-screen",De),De.preventDefaultAction)return this;if(N){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 $e=function(){var qe=i.isFullScreen();qe||(i.removeEvent(document,i.fullScreenEventName,$e),i.removeEvent(document,i.fullScreenErrorEventName,$e),oe.setFullPage(!1),oe.isFullPage()&&(oe.element.style.width=oe.fullPageStyleWidth,oe.element.style.height=oe.fullPageStyleHeight)),oe.navigator&&oe.viewport&&setTimeout(function(){oe.navigator.update(oe.viewport)}),oe.raiseEvent("full-screen",{fullScreen:qe})};i.addEvent(document,i.fullScreenEventName,$e),i.addEvent(document,i.fullScreenErrorEventName,$e),i.requestFullScreen(document.body)}else i.exitFullScreen();return this},isVisible:function(){return this.container.style.visibility!=="hidden"},setVisible:function(N){return this.container.style.visibility=N?"":"hidden",this.raiseEvent("visible",{visible:N}),this},addTiledImage:function(N){i.console.assert(N,"[Viewer.addTiledImage] options is required"),i.console.assert(N.tileSource,"[Viewer.addTiledImage] options.tileSource is required"),i.console.assert(!N.replace||N.index>-1&&N.index<this.world.getItemCount(),"[Viewer.addTiledImage] if options.replace is used, options.index must be a valid index in Viewer.world");var oe=this;N.replace&&(N.replaceItem=oe.world.getItemAt(N.index)),this._hideMessage(),N.placeholderFillStyle===void 0&&(N.placeholderFillStyle=this.placeholderFillStyle),N.opacity===void 0&&(N.opacity=this.opacity),N.preload===void 0&&(N.preload=this.preload),N.compositeOperation===void 0&&(N.compositeOperation=this.compositeOperation),N.crossOriginPolicy===void 0&&(N.crossOriginPolicy=N.tileSource.crossOriginPolicy!==void 0?N.tileSource.crossOriginPolicy:this.crossOriginPolicy),N.ajaxWithCredentials===void 0&&(N.ajaxWithCredentials=this.ajaxWithCredentials),N.loadTilesWithAjax===void 0&&(N.loadTilesWithAjax=this.loadTilesWithAjax),N.ajaxHeaders===void 0||N.ajaxHeaders===null?N.ajaxHeaders=this.ajaxHeaders:i.isPlainObject(N.ajaxHeaders)&&i.isPlainObject(this.ajaxHeaders)&&(N.ajaxHeaders=i.extend({},this.ajaxHeaders,N.ajaxHeaders));var De={options:N};function $e(pt){for(var $t=0;$t<oe._loadQueue.length;$t++)if(oe._loadQueue[$t]===De){oe._loadQueue.splice($t,1);break}oe._loadQueue.length===0&&qe(De),oe.raiseEvent("add-item-failed",pt),N.error&&N.error(pt)}function qe(pt){oe.collectionMode&&(oe.world.arrange({immediately:pt.options.collectionImmediately,rows:oe.collectionRows,columns:oe.collectionColumns,layout:oe.collectionLayout,tileSize:oe.collectionTileSize,tileMargin:oe.collectionTileMargin}),oe.world.setAutoRefigureSizes(!0))}if(i.isArray(N.tileSource)){setTimeout(function(){$e({message:"[Viewer.addTiledImage] Sequences can not be added; add them one at a time instead.",source:N.tileSource,options:N})});return}this._loadQueue.push(De);function Et(){for(var pt,$t,Cn;oe._loadQueue.length&&(pt=oe._loadQueue[0],!!pt.tileSource);){if(oe._loadQueue.splice(0,1),pt.options.replace){var en=oe.world.getIndexOfItem(pt.options.replaceItem);en!==-1&&(pt.options.index=en),oe.world.removeItem(pt.options.replaceItem)}$t=new i.TiledImage({viewer:oe,source:pt.tileSource,viewport:oe.viewport,drawer:oe.drawer,tileCache:oe.tileCache,imageLoader:oe.imageLoader,x:pt.options.x,y:pt.options.y,width:pt.options.width,height:pt.options.height,fitBounds:pt.options.fitBounds,fitBoundsPlacement:pt.options.fitBoundsPlacement,clip:pt.options.clip,placeholderFillStyle:pt.options.placeholderFillStyle,opacity:pt.options.opacity,preload:pt.options.preload,degrees:pt.options.degrees,flipped:pt.options.flipped,compositeOperation:pt.options.compositeOperation,springStiffness:oe.springStiffness,animationTime:oe.animationTime,minZoomImageRatio:oe.minZoomImageRatio,wrapHorizontal:oe.wrapHorizontal,wrapVertical:oe.wrapVertical,immediateRender:oe.immediateRender,blendTime:oe.blendTime,alwaysBlend:oe.alwaysBlend,minPixelRatio:oe.minPixelRatio,smoothTileEdgesMinZoom:oe.smoothTileEdgesMinZoom,iOSDevice:oe.iOSDevice,crossOriginPolicy:pt.options.crossOriginPolicy,ajaxWithCredentials:pt.options.ajaxWithCredentials,loadTilesWithAjax:pt.options.loadTilesWithAjax,ajaxHeaders:pt.options.ajaxHeaders,debugMode:oe.debugMode}),oe.collectionMode&&oe.world.setAutoRefigureSizes(!1),oe.navigator&&(Cn=i.extend({},pt.options,{replace:!1,originalTiledImage:$t,tileSource:pt.tileSource}),oe.navigator.addTiledImage(Cn)),oe.world.addItem($t,{index:pt.options.index}),oe._loadQueue.length===0&&qe(pt),oe.world.getItemCount()===1&&!oe.preserveViewport&&oe.viewport.goHome(!0),pt.options.success&&pt.options.success({item:$t})}}v(this,N.tileSource,N,function(pt){De.tileSource=pt,Et()},function(pt){pt.options=N,$e(pt),Et()})},addSimpleImage:function(N){i.console.assert(N,"[Viewer.addSimpleImage] options is required"),i.console.assert(N.url,"[Viewer.addSimpleImage] options.url is required");var oe=i.extend({},N,{tileSource:{type:"image",url:N.url}});delete oe.url,this.addTiledImage(oe)},addLayer:function(N){var oe=this;i.console.error("[Viewer.addLayer] this function is deprecated; use Viewer.addTiledImage() instead.");var De=i.extend({},N,{success:function($e){oe.raiseEvent("add-layer",{options:N,drawer:$e.item})},error:function($e){oe.raiseEvent("add-layer-failed",$e)}});return this.addTiledImage(De),this},getLayerAtLevel:function(N){return i.console.error("[Viewer.getLayerAtLevel] this function is deprecated; use World.getItemAt() instead."),this.world.getItemAt(N)},getLevelOfLayer:function(N){return i.console.error("[Viewer.getLevelOfLayer] this function is deprecated; use World.getIndexOfItem() instead."),this.world.getIndexOfItem(N)},getLayersCount:function(){return i.console.error("[Viewer.getLayersCount] this function is deprecated; use World.getItemCount() instead."),this.world.getItemCount()},setLayerLevel:function(N,oe){return i.console.error("[Viewer.setLayerLevel] this function is deprecated; use World.setItemIndex() instead."),this.world.setItemIndex(N,oe)},removeLayer:function(N){return i.console.error("[Viewer.removeLayer] this function is deprecated; use World.removeItem() instead."),this.world.removeItem(N)},forceRedraw:function(){return s[this.hash].forceRedraw=!0,this},bindSequenceControls:function(){var N=i.delegate(this,W),oe=i.delegate(this,re),De=i.delegate(this,this.goToNextPage),$e=i.delegate(this,this.goToPreviousPage),qe=this.navImages,Et=!0;return this.showSequenceControl&&((this.previousButton||this.nextButton)&&(Et=!1),this.previousButton=new i.Button({element:this.previousButton?i.getElement(this.previousButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:i.getString("Tooltips.PreviousPage"),srcRest:ft(this.prefixUrl,qe.previous.REST),srcGroup:ft(this.prefixUrl,qe.previous.GROUP),srcHover:ft(this.prefixUrl,qe.previous.HOVER),srcDown:ft(this.prefixUrl,qe.previous.DOWN),onRelease:$e,onFocus:N,onBlur:oe}),this.nextButton=new i.Button({element:this.nextButton?i.getElement(this.nextButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:i.getString("Tooltips.NextPage"),srcRest:ft(this.prefixUrl,qe.next.REST),srcGroup:ft(this.prefixUrl,qe.next.GROUP),srcHover:ft(this.prefixUrl,qe.next.HOVER),srcDown:ft(this.prefixUrl,qe.next.DOWN),onRelease:De,onFocus:N,onBlur:oe}),this.navPrevNextWrap||this.previousButton.disable(),(!this.tileSources||!this.tileSources.length)&&this.nextButton.disable(),Et&&(this.paging=new i.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:i.ControlAnchor.BOTTOM_RIGHT}):this.addControl(this.pagingControl,{anchor:this.sequenceControlAnchor||i.ControlAnchor.TOP_LEFT}))),this},bindStandardControls:function(){var N=i.delegate(this,Gt),oe=i.delegate(this,at),De=i.delegate(this,ct),$e=i.delegate(this,Ge),qe=i.delegate(this,_t),Et=i.delegate(this,In),pt=i.delegate(this,Jt),$t=i.delegate(this,Vr),Cn=i.delegate(this,yr),en=i.delegate(this,kr),Lt=i.delegate(this,W),Fn=i.delegate(this,re),Zt=this.navImages,or=[],Xi=!0;return this.showNavigationControl&&((this.zoomInButton||this.zoomOutButton||this.homeButton||this.fullPageButton||this.rotateLeftButton||this.rotateRightButton||this.flipButton)&&(Xi=!1),this.showZoomControl&&(or.push(this.zoomInButton=new i.Button({element:this.zoomInButton?i.getElement(this.zoomInButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:i.getString("Tooltips.ZoomIn"),srcRest:ft(this.prefixUrl,Zt.zoomIn.REST),srcGroup:ft(this.prefixUrl,Zt.zoomIn.GROUP),srcHover:ft(this.prefixUrl,Zt.zoomIn.HOVER),srcDown:ft(this.prefixUrl,Zt.zoomIn.DOWN),onPress:N,onRelease:oe,onClick:De,onEnter:N,onExit:oe,onFocus:Lt,onBlur:Fn})),or.push(this.zoomOutButton=new i.Button({element:this.zoomOutButton?i.getElement(this.zoomOutButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:i.getString("Tooltips.ZoomOut"),srcRest:ft(this.prefixUrl,Zt.zoomOut.REST),srcGroup:ft(this.prefixUrl,Zt.zoomOut.GROUP),srcHover:ft(this.prefixUrl,Zt.zoomOut.HOVER),srcDown:ft(this.prefixUrl,Zt.zoomOut.DOWN),onPress:$e,onRelease:oe,onClick:qe,onEnter:$e,onExit:oe,onFocus:Lt,onBlur:Fn}))),this.showHomeControl&&or.push(this.homeButton=new i.Button({element:this.homeButton?i.getElement(this.homeButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:i.getString("Tooltips.Home"),srcRest:ft(this.prefixUrl,Zt.home.REST),srcGroup:ft(this.prefixUrl,Zt.home.GROUP),srcHover:ft(this.prefixUrl,Zt.home.HOVER),srcDown:ft(this.prefixUrl,Zt.home.DOWN),onRelease:Et,onFocus:Lt,onBlur:Fn})),this.showFullPageControl&&or.push(this.fullPageButton=new i.Button({element:this.fullPageButton?i.getElement(this.fullPageButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:i.getString("Tooltips.FullPage"),srcRest:ft(this.prefixUrl,Zt.fullpage.REST),srcGroup:ft(this.prefixUrl,Zt.fullpage.GROUP),srcHover:ft(this.prefixUrl,Zt.fullpage.HOVER),srcDown:ft(this.prefixUrl,Zt.fullpage.DOWN),onRelease:pt,onFocus:Lt,onBlur:Fn})),this.showRotationControl&&(or.push(this.rotateLeftButton=new i.Button({element:this.rotateLeftButton?i.getElement(this.rotateLeftButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:i.getString("Tooltips.RotateLeft"),srcRest:ft(this.prefixUrl,Zt.rotateleft.REST),srcGroup:ft(this.prefixUrl,Zt.rotateleft.GROUP),srcHover:ft(this.prefixUrl,Zt.rotateleft.HOVER),srcDown:ft(this.prefixUrl,Zt.rotateleft.DOWN),onRelease:$t,onFocus:Lt,onBlur:Fn})),or.push(this.rotateRightButton=new i.Button({element:this.rotateRightButton?i.getElement(this.rotateRightButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:i.getString("Tooltips.RotateRight"),srcRest:ft(this.prefixUrl,Zt.rotateright.REST),srcGroup:ft(this.prefixUrl,Zt.rotateright.GROUP),srcHover:ft(this.prefixUrl,Zt.rotateright.HOVER),srcDown:ft(this.prefixUrl,Zt.rotateright.DOWN),onRelease:Cn,onFocus:Lt,onBlur:Fn}))),this.showFlipControl&&or.push(this.flipButton=new i.Button({element:this.flipButton?i.getElement(this.flipButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:i.getString("Tooltips.Flip"),srcRest:ft(this.prefixUrl,Zt.flip.REST),srcGroup:ft(this.prefixUrl,Zt.flip.GROUP),srcHover:ft(this.prefixUrl,Zt.flip.HOVER),srcDown:ft(this.prefixUrl,Zt.flip.DOWN),onRelease:en,onFocus:Lt,onBlur:Fn})),Xi?(this.buttonGroup=new i.ButtonGroup({buttons:or,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.navControl=this.buttonGroup.element,this.addHandler("open",i.delegate(this,gn)),this.toolbar?this.toolbar.addControl(this.navControl,{anchor:this.navigationControlAnchor||i.ControlAnchor.TOP_LEFT}):this.addControl(this.navControl,{anchor:this.navigationControlAnchor||i.ControlAnchor.TOP_LEFT})):this.customButtons=or),this},currentPage:function(){return this._sequenceIndex},goToPage:function(N){return this.tileSources&&N>=0&&N<this.tileSources.length&&(this._sequenceIndex=N,this._updateSequenceButtons(N),this.open(this.tileSources[N]),this.referenceStrip&&this.referenceStrip.setFocus(N),this.raiseEvent("page",{page:N})),this},addOverlay:function(N,oe,De,$e){var qe;if(i.isPlainObject(N)?qe=N:qe={element:N,location:oe,placement:De,onDraw:$e},N=i.getElement(qe.element),b(this.currentOverlays,N)>=0)return this;var Et=y(this,qe);return this.currentOverlays.push(Et),Et.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:N,location:qe.location,placement:qe.placement}),this},updateOverlay:function(N,oe,De){var $e;return N=i.getElement(N),$e=b(this.currentOverlays,N),$e>=0&&(this.currentOverlays[$e].update(oe,De),s[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:N,location:oe,placement:De})),this},removeOverlay:function(N){var oe;return N=i.getElement(N),oe=b(this.currentOverlays,N),oe>=0&&(this.currentOverlays[oe].destroy(),this.currentOverlays.splice(oe,1),s[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:N})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return s[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(N){var oe;return N=i.getElement(N),oe=b(this.currentOverlays,N),oe>=0?this.currentOverlays[oe]:null},_updateSequenceButtons:function(N){this.nextButton&&(!this.tileSources||this.tileSources.length-1===N?this.navPrevNextWrap||this.nextButton.disable():this.nextButton.enable()),this.previousButton&&(N>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(N){this._hideMessage();var oe=i.makeNeutralElement("div");oe.appendChild(document.createTextNode(N)),this.messageDiv=i.makeCenteredNode(oe),i.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var N=this.messageDiv;N&&(N.parentNode.removeChild(N),delete this.messageDiv)},gestureSettingsByDeviceType:function(N){switch(N){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var N,oe=this.currentOverlays.length;for(N=0;N<oe;N++)this.currentOverlays[N].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 i.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 i.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')},_addUpdatePixelDensityRatioEvent:function(){this._updatePixelDensityRatioBind=this._updatePixelDensityRatio.bind(this),i.addEvent(window,"resize",this._updatePixelDensityRatioBind)},_removeUpdatePixelDensityRatioEvent:function(){i.removeEvent(window,"resize",this._updatePixelDensityRatioBind)},_updatePixelDensityRatio:function(){var N=i.pixelDensityRatio,oe=i.getCurrentPixelDensityRatio();N!==oe&&(i.pixelDensityRatio=oe,this.world.resetItems(),this.forceRedraw())},goToPreviousPage:function(){var N=this._sequenceIndex-1;this.navPrevNextWrap&&N<0&&(N+=this.tileSources.length),this.goToPage(N)},goToNextPage:function(){var N=this._sequenceIndex+1;this.navPrevNextWrap&&N>=this.tileSources.length&&(N=0),this.goToPage(N)}});function p(N){return N=i.getElement(N),new i.Point(N.clientWidth===0?1:N.clientWidth,N.clientHeight===0?1:N.clientHeight)}function v(N,oe,De,$e,qe){var Et=N;if(i.type(oe)==="string"){if(oe.match(/^\s*<.*>\s*$/))oe=i.parseXml(oe);else if(oe.match(/^\s*[{[].*[}\]]\s*$/))try{var pt=i.parseJSON(oe);oe=pt}catch{}}function $t(Cn,en){Cn.ready?$e(Cn):(Cn.addHandler("ready",function(){$e(Cn)}),Cn.addHandler("open-failed",function(Lt){qe({message:Lt.message,source:en})}))}setTimeout(function(){if(i.type(oe)==="string")oe=new i.TileSource({url:oe,crossOriginPolicy:De.crossOriginPolicy!==void 0?De.crossOriginPolicy:N.crossOriginPolicy,ajaxWithCredentials:N.ajaxWithCredentials,ajaxHeaders:De.ajaxHeaders?De.ajaxHeaders:N.ajaxHeaders,useCanvas:N.useCanvas,success:function(Fn){$e(Fn.tileSource)}}),oe.addHandler("open-failed",function(Fn){qe(Fn)});else if(i.isPlainObject(oe)||oe.nodeType)if(oe.crossOriginPolicy===void 0&&(De.crossOriginPolicy!==void 0||N.crossOriginPolicy!==void 0)&&(oe.crossOriginPolicy=De.crossOriginPolicy!==void 0?De.crossOriginPolicy:N.crossOriginPolicy),oe.ajaxWithCredentials===void 0&&(oe.ajaxWithCredentials=N.ajaxWithCredentials),oe.useCanvas===void 0&&(oe.useCanvas=N.useCanvas),i.isFunction(oe.getTileUrl)){var Cn=new i.TileSource(oe);Cn.getTileUrl=oe.getTileUrl,$e(Cn)}else{var en=i.TileSource.determineType(Et,oe);if(!en){qe({message:"Unable to load TileSource",source:oe});return}var Lt=en.prototype.configure.apply(Et,[oe]);$t(new en(Lt),oe)}else $t(oe,oe)})}function y(N,oe){if(oe instanceof i.Overlay)return oe;var De=null;if(oe.element)De=i.getElement(oe.element);else{var $e=oe.id?oe.id:"openseadragon-overlay-"+Math.floor(Math.random()*1e7);De=i.getElement(oe.id),De||(De=document.createElement("a"),De.href="#/overlay/"+$e),De.id=$e,i.addClass(De,oe.className?oe.className:"openseadragon-overlay")}var qe=oe.location,Et=oe.width,pt=oe.height;if(!qe){var $t=oe.x,Cn=oe.y;if(oe.px!==void 0){var en=N.viewport.imageToViewportRectangle(new i.Rect(oe.px,oe.py,Et||0,pt||0));$t=en.x,Cn=en.y,Et=Et!==void 0?en.width:void 0,pt=pt!==void 0?en.height:void 0}qe=new i.Point($t,Cn)}var Lt=oe.placement;return Lt&&i.type(Lt)==="string"&&(Lt=i.Placement[oe.placement.toUpperCase()]),new i.Overlay({element:De,location:qe,placement:Lt,onDraw:oe.onDraw,checkResize:oe.checkResize,width:Et,height:pt,rotationMode:oe.rotationMode})}function b(N,oe){var De;for(De=N.length-1;De>=0;De--)if(N[De].element===oe)return De;return-1}function E(N,oe){return i.requestAnimationFrame(function(){oe(N)})}function S(N){i.requestAnimationFrame(function(){A(N)})}function O(N){!N.autoHideControls||(N.controlsShouldFade=!0,N.controlsFadeBeginTime=i.now()+N.controlsFadeDelay,window.setTimeout(function(){S(N)},N.controlsFadeDelay))}function A(N){var oe,De,$e,qe;if(N.controlsShouldFade){for(oe=i.now(),De=oe-N.controlsFadeBeginTime,$e=1-De/N.controlsFadeLength,$e=Math.min(1,$e),$e=Math.max(0,$e),qe=N.controls.length-1;qe>=0;qe--)N.controls[qe].autoFade&&N.controls[qe].setOpacity($e);$e>0&&S(N)}}function H(N){var oe;for(N.controlsShouldFade=!1,oe=N.controls.length-1;oe>=0;oe--)N.controls[oe].setOpacity(1)}function W(){H(this)}function re(){O(this)}function $(N){var oe={tracker:N.eventSource,position:N.position,originalEvent:N.originalEvent,preventDefault:N.preventDefault};this.raiseEvent("canvas-contextmenu",oe),N.preventDefault=oe.preventDefault}function se(N){var oe={originalEvent:N.originalEvent,preventDefaultAction:!1,preventVerticalPan:N.preventVerticalPan,preventHorizontalPan:N.preventHorizontalPan};if(this.raiseEvent("canvas-key",oe),!oe.preventDefaultAction&&!N.ctrl&&!N.alt&&!N.meta)switch(N.keyCode){case 38:oe.preventVerticalPan||(N.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new i.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),N.preventDefault=!0;break;case 40:oe.preventVerticalPan||(N.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new i.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),N.preventDefault=!0;break;case 37:oe.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new i.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),N.preventDefault=!0;break;case 39:oe.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new i.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),N.preventDefault=!0;break;default:N.preventDefault=!1;break}else N.preventDefault=!1}function I(N){var oe={originalEvent:N.originalEvent,preventDefaultAction:!1,preventVerticalPan:N.preventVerticalPan,preventHorizontalPan:N.preventHorizontalPan};if(this.raiseEvent("canvas-key",oe),!oe.preventDefaultAction&&!N.ctrl&&!N.alt&&!N.meta)switch(N.keyCode){case 43:case 61:this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),N.preventDefault=!0;break;case 45:this.viewport.zoomBy(.9),this.viewport.applyConstraints(),N.preventDefault=!0;break;case 48:this.viewport.goHome(),this.viewport.applyConstraints(),N.preventDefault=!0;break;case 119:case 87:oe.preventVerticalPan||(N.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new i.Point(0,-40))),this.viewport.applyConstraints()),N.preventDefault=!0;break;case 115:case 83:oe.preventVerticalPan||(N.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new i.Point(0,40))),this.viewport.applyConstraints()),N.preventDefault=!0;break;case 97:oe.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new i.Point(-40,0))),this.viewport.applyConstraints()),N.preventDefault=!0;break;case 100:oe.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new i.Point(40,0))),this.viewport.applyConstraints()),N.preventDefault=!0;break;case 114:this.viewport.flipped?this.viewport.setRotation(i.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)):this.viewport.setRotation(i.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)),this.viewport.applyConstraints(),N.preventDefault=!0;break;case 82:this.viewport.flipped?this.viewport.setRotation(i.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)):this.viewport.setRotation(i.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)),this.viewport.applyConstraints(),N.preventDefault=!0;break;case 102:this.viewport.toggleFlip(),N.preventDefault=!0;break;case 106:this.goToPreviousPage();break;case 107:this.goToNextPage();break;default:N.preventDefault=!1;break}else N.preventDefault=!1}function ne(N){var oe,De=document.activeElement===this.canvas;De||this.canvas.focus(),this.viewport.flipped&&(N.position.x=this.viewport.getContainerSize().x-N.position.x);var $e={tracker:N.eventSource,position:N.position,quick:N.quick,shift:N.shift,originalEvent:N.originalEvent,originalTarget:N.originalTarget,preventDefaultAction:!1};this.raiseEvent("canvas-click",$e),!$e.preventDefaultAction&&this.viewport&&N.quick&&(oe=this.gestureSettingsByDeviceType(N.pointerType),oe.clickToZoom&&(this.viewport.zoomBy(N.shift?1/this.zoomPerClick:this.zoomPerClick,oe.zoomToRefPoint?this.viewport.pointFromPixel(N.position,!0):null),this.viewport.applyConstraints()))}function he(N){var oe,De={tracker:N.eventSource,position:N.position,shift:N.shift,originalEvent:N.originalEvent,preventDefaultAction:!1};this.raiseEvent("canvas-double-click",De),!De.preventDefaultAction&&this.viewport&&(oe=this.gestureSettingsByDeviceType(N.pointerType),oe.dblClickToZoom&&(this.viewport.zoomBy(N.shift?1/this.zoomPerClick:this.zoomPerClick,oe.zoomToRefPoint?this.viewport.pointFromPixel(N.position,!0):null),this.viewport.applyConstraints()))}function ce(N){var oe,De={tracker:N.eventSource,pointerType:N.pointerType,position:N.position,delta:N.delta,speed:N.speed,direction:N.direction,shift:N.shift,originalEvent:N.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag",De),oe=this.gestureSettingsByDeviceType(N.pointerType),oe.dragToPan&&!De.preventDefaultAction&&this.viewport){if(this.panHorizontal||(N.delta.x=0),this.panVertical||(N.delta.y=0),this.viewport.flipped&&(N.delta.x=-N.delta.x),this.constrainDuringPan){var $e=this.viewport.deltaPointsFromPixels(N.delta.negate());this.viewport.centerSpringX.target.value+=$e.x,this.viewport.centerSpringY.target.value+=$e.y;var qe=this.viewport.getBounds(),Et=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=$e.x,this.viewport.centerSpringY.target.value-=$e.y,qe.x!==Et.x&&(N.delta.x=0),qe.y!==Et.y&&(N.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(N.delta.negate()),oe.flickEnabled&&!this.constrainDuringPan)}}function Se(N){var oe={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",oe),!oe.preventDefaultAction&&this.viewport){var De=this.gestureSettingsByDeviceType(N.pointerType);if(De.flickEnabled&&N.speed>=De.flickMinSpeed){var $e=0;this.panHorizontal&&($e=De.flickMomentum*N.speed*Math.cos(N.direction));var qe=0;this.panVertical&&(qe=De.flickMomentum*N.speed*Math.sin(N.direction));var Et=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),pt=this.viewport.pointFromPixel(new i.Point(Et.x-$e,Et.y-qe));this.viewport.panTo(pt,!1)}this.viewport.applyConstraints()}}function Pe(N){this.raiseEvent("canvas-enter",{tracker:N.eventSource,pointerType:N.pointerType,position:N.position,buttons:N.buttons,pointers:N.pointers,insideElementPressed:N.insideElementPressed,buttonDownAny:N.buttonDownAny,originalEvent:N.originalEvent})}function Xe(N){this.raiseEvent("canvas-exit",{tracker:N.eventSource,pointerType:N.pointerType,position:N.position,buttons:N.buttons,pointers:N.pointers,insideElementPressed:N.insideElementPressed,buttonDownAny:N.buttonDownAny,originalEvent:N.originalEvent})}function tt(N){this.raiseEvent("canvas-press",{tracker:N.eventSource,pointerType:N.pointerType,position:N.position,insideElementPressed:N.insideElementPressed,insideElementReleased:N.insideElementReleased,originalEvent:N.originalEvent})}function ht(N){this.raiseEvent("canvas-release",{tracker:N.eventSource,pointerType:N.pointerType,position:N.position,insideElementPressed:N.insideElementPressed,insideElementReleased:N.insideElementReleased,originalEvent:N.originalEvent})}function yt(N){this.raiseEvent("canvas-nonprimary-press",{tracker:N.eventSource,position:N.position,pointerType:N.pointerType,button:N.button,buttons:N.buttons,originalEvent:N.originalEvent})}function dt(N){this.raiseEvent("canvas-nonprimary-release",{tracker:N.eventSource,position:N.position,pointerType:N.pointerType,button:N.button,buttons:N.buttons,originalEvent:N.originalEvent})}function Tt(N){var oe,De,$e,qe,Et={tracker:N.eventSource,pointerType:N.pointerType,gesturePoints:N.gesturePoints,lastCenter:N.lastCenter,center:N.center,lastDistance:N.lastDistance,distance:N.distance,shift:N.shift,originalEvent:N.originalEvent,preventDefaultPanAction:!1,preventDefaultZoomAction:!1,preventDefaultRotateAction:!1};if(this.raiseEvent("canvas-pinch",Et),this.viewport&&(oe=this.gestureSettingsByDeviceType(N.pointerType),oe.pinchToZoom&&(!Et.preventDefaultPanAction||!Et.preventDefaultZoomAction)&&(De=this.viewport.pointFromPixel(N.center,!0),Et.preventDefaultZoomAction||this.viewport.zoomBy(N.distance/N.lastDistance,De,!0),oe.zoomToRefPoint&&!Et.preventDefaultPanAction&&($e=this.viewport.pointFromPixel(N.lastCenter,!0),qe=$e.minus(De),this.panHorizontal||(qe.x=0),this.panVertical||(qe.y=0),this.viewport.panBy(qe,!0)),this.viewport.applyConstraints()),oe.pinchRotate&&!Et.preventDefaultRotateAction)){var pt=Math.atan2(N.gesturePoints[0].currentPos.y-N.gesturePoints[1].currentPos.y,N.gesturePoints[0].currentPos.x-N.gesturePoints[1].currentPos.x),$t=Math.atan2(N.gesturePoints[0].lastPos.y-N.gesturePoints[1].lastPos.y,N.gesturePoints[0].lastPos.x-N.gesturePoints[1].lastPos.x);this.viewport.setRotation(this.viewport.getRotation()+(pt-$t)*(180/Math.PI))}}function xt(N){var oe,De,$e,qe,Et;qe=i.now(),Et=qe-this._lastScrollTime,Et>this.minScrollDeltaTime?(this._lastScrollTime=qe,oe={tracker:N.eventSource,position:N.position,scroll:N.scroll,shift:N.shift,originalEvent:N.originalEvent,preventDefaultAction:!1,preventDefault:!0},this.raiseEvent("canvas-scroll",oe),!oe.preventDefaultAction&&this.viewport&&(this.viewport.flipped&&(N.position.x=this.viewport.getContainerSize().x-N.position.x),De=this.gestureSettingsByDeviceType(N.pointerType),De.scrollToZoom&&($e=Math.pow(this.zoomPerScroll,N.scroll),this.viewport.zoomBy($e,De.zoomToRefPoint?this.viewport.pointFromPixel(N.position,!0):null),this.viewport.applyConstraints())),N.preventDefault=oe.preventDefault):N.preventDefault=!0}function Nt(N){s[this.hash].mouseInside=!0,H(this),this.raiseEvent("container-enter",{tracker:N.eventSource,pointerType:N.pointerType,position:N.position,buttons:N.buttons,pointers:N.pointers,insideElementPressed:N.insideElementPressed,buttonDownAny:N.buttonDownAny,originalEvent:N.originalEvent})}function Mt(N){N.pointers<1&&(s[this.hash].mouseInside=!1,s[this.hash].animating||O(this)),this.raiseEvent("container-exit",{tracker:N.eventSource,pointerType:N.pointerType,position:N.position,buttons:N.buttons,pointers:N.pointers,insideElementPressed:N.insideElementPressed,buttonDownAny:N.buttonDownAny,originalEvent:N.originalEvent})}function Ht(N){Qt(N),N.isOpen()?N._updateRequestId=E(N,Ht):N._updateRequestId=!1}function Qt(N){if(!(N._opening||!s[N.hash])){if(N.autoResize){var oe=p(N.container),De=s[N.hash].prevContainerSize;if(!oe.equals(De)){var $e=N.viewport;if(N.preserveImageSizeOnResize){var qe=De.x/oe.x,Et=$e.getZoom()*qe,pt=$e.getCenter();$e.resize(oe,!1),$e.zoomTo(Et,null,!0),$e.panTo(pt,!0)}else{var $t=$e.getBounds();$e.resize(oe,!0),$e.fitBoundsWithConstraints($t,!0)}s[N.hash].prevContainerSize=oe,s[N.hash].forceRedraw=!0}}var Cn=N.viewport.update(),en=N.world.update()||Cn;Cn&&N.raiseEvent("viewport-change"),N.referenceStrip&&(en=N.referenceStrip.update(N.viewport)||en),!s[N.hash].animating&&en&&(N.raiseEvent("animation-start"),H(N)),(en||s[N.hash].forceRedraw||N.world.needsDraw())&&(wn(N),N._drawOverlays(),N.navigator&&N.navigator.update(N.viewport),s[N.hash].forceRedraw=!1,en&&N.raiseEvent("animation")),s[N.hash].animating&&!en&&(N.raiseEvent("animation-finish"),s[N.hash].mouseInside||O(N)),s[N.hash].animating=en}}function wn(N){N.imageLoader.clear(),N.drawer.clear(),N.world.draw(),N.raiseEvent("update-viewport",{})}function ft(N,oe){return N?N+oe:oe}function Gt(){s[this.hash].lastZoomTime=i.now(),s[this.hash].zoomFactor=this.zoomPerSecond,s[this.hash].zooming=!0,lt(this)}function Ge(){s[this.hash].lastZoomTime=i.now(),s[this.hash].zoomFactor=1/this.zoomPerSecond,s[this.hash].zooming=!0,lt(this)}function at(){s[this.hash].zooming=!1}function lt(N){i.requestAnimationFrame(i.delegate(N,st))}function st(){var N,oe,De;s[this.hash].zooming&&this.viewport&&(N=i.now(),oe=N-s[this.hash].lastZoomTime,De=Math.pow(s[this.hash].zoomFactor,oe/1e3),this.viewport.zoomBy(De),this.viewport.applyConstraints(),s[this.hash].lastZoomTime=N,lt(this))}function ct(){this.viewport&&(s[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function _t(){this.viewport&&(s[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function gn(){this.buttonGroup&&(this.buttonGroup.emulateEnter(),this.buttonGroup.emulateLeave())}function In(){this.viewport&&this.viewport.goHome()}function Jt(){this.isFullPage()&&!i.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttonGroup&&this.buttonGroup.emulateLeave(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function Vr(){if(this.viewport){var N=this.viewport.getRotation();this.viewport.flipped?N=i.positiveModulo(N+this.rotationIncrement,360):N=i.positiveModulo(N-this.rotationIncrement,360),this.viewport.setRotation(N)}}function yr(){if(this.viewport){var N=this.viewport.getRotation();this.viewport.flipped?N=i.positiveModulo(N-this.rotationIncrement,360):N=i.positiveModulo(N+this.rotationIncrement,360),this.viewport.setRotation(N)}}function kr(){this.viewport.toggleFlip()}}(u),function(i){i.Navigator=function(E){var S=E.viewer,O=this,A,H;E.id?(this.element=document.getElementById(E.id),E.controlOptions={anchor:i.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(E.id="navigator-"+i.now(),this.element=i.makeNeutralElement("div"),E.controlOptions={anchor:i.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:E.autoFade},E.position&&(E.position==="BOTTOM_RIGHT"?E.controlOptions.anchor=i.ControlAnchor.BOTTOM_RIGHT:E.position==="BOTTOM_LEFT"?E.controlOptions.anchor=i.ControlAnchor.BOTTOM_LEFT:E.position==="TOP_RIGHT"?E.controlOptions.anchor=i.ControlAnchor.TOP_RIGHT:E.position==="TOP_LEFT"?E.controlOptions.anchor=i.ControlAnchor.TOP_LEFT:E.position==="ABSOLUTE"&&(E.controlOptions.anchor=i.ControlAnchor.ABSOLUTE,E.controlOptions.top=E.top,E.controlOptions.left=E.left,E.controlOptions.height=E.height,E.controlOptions.width=E.width))),this.element.id=E.id,this.element.className+=" navigator",E=i.extend(!0,{sizeRatio:i.DEFAULT_SETTINGS.navigatorSizeRatio},E,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,autoResize:E.autoResize,minZoomImageRatio:1,background:E.background,opacity:E.opacity,borderColor:E.borderColor,displayRegionColor:E.displayRegionColor}),E.minPixelRatio=this.minPixelRatio=S.minPixelRatio,i.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new i.Point(1,1),this.totalBorderWidths=new i.Point(this.borderWidth*2,this.borderWidth*2).minus(this.fudge),E.controlOptions.anchor!==i.ControlAnchor.NONE&&function($,se){$.margin="0px",$.border=se+"px solid "+E.borderColor,$.padding="0px",$.background=E.background,$.opacity=E.opacity,$.overflow="hidden"}(this.element.style,this.borderWidth),this.displayRegion=i.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function($,se){$.position="relative",$.top="0px",$.left="0px",$.fontSize="0px",$.overflow="hidden",$.border=se+"px solid "+E.displayRegionColor,$.margin="0px",$.padding="0px",$.background="transparent",$.float="left",$.cssFloat="left",$.styleFloat="left",$.zIndex=999999999,$.cursor="default"}(this.displayRegion.style,this.borderWidth),i.setElementPointerEventsNone(this.displayRegion),i.setElementTouchActionNone(this.displayRegion),this.displayRegionContainer=i.makeNeutralElement("div"),this.displayRegionContainer.id=this.element.id+"-displayregioncontainer",this.displayRegionContainer.className="displayregioncontainer",this.displayRegionContainer.style.width="100%",this.displayRegionContainer.style.height="100%",i.setElementPointerEventsNone(this.displayRegionContainer),i.setElementTouchActionNone(this.displayRegionContainer),S.addControl(this.element,E.controlOptions),this._resizeWithViewer=E.controlOptions.anchor!==i.ControlAnchor.ABSOLUTE&&E.controlOptions.anchor!==i.ControlAnchor.NONE,E.width&&E.height?(this.setWidth(E.width),this.setHeight(E.height)):this._resizeWithViewer&&(A=i.getElementSize(S.element),this.element.style.height=Math.round(A.y*E.sizeRatio)+"px",this.element.style.width=Math.round(A.x*E.sizeRatio)+"px",this.oldViewerSize=A,H=i.getElementSize(this.element),this.elementArea=H.x*H.y),this.oldContainerSize=new i.Point(0,0),i.Viewer.apply(this,[E]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer);function W($){y(O.displayRegionContainer,$),y(O.displayRegion,-$),O.viewport.setRotation($)}if(E.navigatorRotate){var re=E.viewer.viewport?E.viewer.viewport.getRotation():E.viewer.degrees||0;W(re),E.viewer.addHandler("rotate",function($){W($.degrees)})}this.innerTracker.destroy(),this.innerTracker=new i.MouseTracker({userData:"Navigator.innerTracker",element:this.element,dragHandler:i.delegate(this,c),clickHandler:i.delegate(this,s),releaseHandler:i.delegate(this,p),scrollHandler:i.delegate(this,v),preProcessEventHandler:function($){$.eventType==="wheel"&&($.preventDefault=!0)}}),this.outerTracker.userData="Navigator.outerTracker",i.setElementPointerEventsNone(this.canvas),i.setElementPointerEventsNone(this.container),this.addHandler("reset-size",function(){O.viewport&&O.viewport.goHome(!0)}),S.world.addHandler("item-index-change",function($){window.setTimeout(function(){var se=O.world.getItemAt($.previousIndex);O.world.setItemIndex(se,$.newIndex)},1)}),S.world.addHandler("remove-item",function($){var se=$.item,I=O._getMatchingItem(se);I&&O.world.removeItem(I)}),this.update(S.viewport)},i.extend(i.Navigator.prototype,i.EventSource.prototype,i.Viewer.prototype,{updateSize:function(){if(this.viewport){var E=new i.Point(this.container.clientWidth===0?1:this.container.clientWidth,this.container.clientHeight===0?1:this.container.clientHeight);E.equals(this.oldContainerSize)||(this.viewport.resize(E,!0),this.viewport.goHome(!0),this.oldContainerSize=E,this.drawer.clear(),this.world.draw())}},setWidth:function(E){this.width=E,this.element.style.width=typeof E=="number"?E+"px":E,this._resizeWithViewer=!1},setHeight:function(E){this.height=E,this.element.style.height=typeof E=="number"?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){b(this.displayRegion,E),b(this.canvas,E),b(this.element,E)},update:function(E){var S,O,A,H,W,re;if(S=i.getElementSize(this.viewer.element),this._resizeWithViewer&&S.x&&S.y&&!S.equals(this.oldViewerSize)&&(this.oldViewerSize=S,this.maintainSizeRatio||!this.elementArea?(O=S.x*this.sizeRatio,A=S.y*this.sizeRatio):(O=Math.sqrt(this.elementArea*(S.x/S.y)),A=this.elementArea/O),this.element.style.width=Math.round(O)+"px",this.element.style.height=Math.round(A)+"px",this.elementArea||(this.elementArea=O*A),this.updateSize()),E&&this.viewport){H=E.getBoundsNoRotate(!0),W=this.viewport.pixelFromPointNoRotate(H.getTopLeft(),!1),re=this.viewport.pixelFromPointNoRotate(H.getBottomRight(),!1).minus(this.totalBorderWidths);var $=this.displayRegion.style;$.display=this.world.getItemCount()?"block":"none",$.top=Math.round(W.y)+"px",$.left=Math.round(W.x)+"px";var se=Math.abs(W.x-re.x),I=Math.abs(W.y-re.y);$.width=Math.round(Math.max(se,0))+"px",$.height=Math.round(Math.max(I,0))+"px"}},addTiledImage:function(E){var S=this,O=E.originalTiledImage;delete E.original;var A=i.extend({},E,{success:function(H){var W=H.item;W._originalForNavigator=O,S._matchBounds(W,O,!0),S._matchOpacity(W,O),S._matchCompositeOperation(W,O);function re(){S._matchBounds(W,O)}function $(){S._matchOpacity(W,O)}function se(){S._matchCompositeOperation(W,O)}O.addHandler("bounds-change",re),O.addHandler("clip-change",re),O.addHandler("opacity-change",$),O.addHandler("composite-operation-change",se)}});return i.Viewer.prototype.addTiledImage.apply(this,[A])},destroy:function(){return i.Viewer.prototype.destroy.apply(this)},_getMatchingItem:function(E){for(var S=this.world.getItemCount(),O,A=0;A<S;A++)if(O=this.world.getItemAt(A),O._originalForNavigator===E)return O;return null},_matchBounds:function(E,S,O){var A=S.getBoundsNoRotate();E.setPosition(A.getTopLeft(),O),E.setWidth(A.width,O),E.setRotation(S.getRotation(),O),E.setClip(S.getClip()),E.setFlip(S.getFlip())},_matchOpacity:function(E,S){E.setOpacity(S.opacity)},_matchCompositeOperation:function(E,S){E.setCompositeOperation(S.compositeOperation)}});function s(E){var S={tracker:E.eventSource,position:E.position,quick:E.quick,shift:E.shift,originalEvent:E.originalEvent,preventDefaultAction:!1};if(this.viewer.raiseEvent("navigator-click",S),!S.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 O=this.viewport.pointFromPixel(E.position);this.panVertical?this.panHorizontal||(O.x=this.viewer.viewport.getCenter(!0).x):O.y=this.viewer.viewport.getCenter(!0).y,this.viewer.viewport.panTo(O),this.viewer.viewport.applyConstraints()}}function c(E){var S={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",S),!S.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 p(E){E.insideElementPressed&&this.viewer.viewport&&this.viewer.viewport.applyConstraints()}function v(E){var S={tracker:E.eventSource,position:E.position,scroll:E.scroll,shift:E.shift,originalEvent:E.originalEvent,preventDefault:E.preventDefault};this.viewer.raiseEvent("navigator-scroll",S),E.preventDefault=S.preventDefault}function y(E,S){b(E,"rotate("+S+"deg)")}function b(E,S){E.style.webkitTransform=S,E.style.mozTransform=S,E.style.msTransform=S,E.style.oTransform=S,E.style.transform=S}}(u),function(i){var s={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"}};i.extend(i,{getString:function(c){var p=c.split("."),v=null,y=arguments,b=s,E;for(E=0;E<p.length-1;E++)b=b[p[E]]||{};return v=b[p[E]],typeof v!="string"&&(i.console.log("Untranslated source string:",c),v=""),v.replace(/\{\d+\}/g,function(S){var O=parseInt(S.match(/\d+/),10)+1;return O<y.length?y[O]:""})},setString:function(c,p){var v=c.split("."),y=s,b;for(b=0;b<v.length-1;b++)y[v[b]]||(y[v[b]]={}),y=y[v[b]];y[v[b]]=p}})}(u),function(i){i.Point=function(s,c){this.x=typeof s=="number"?s:0,this.y=typeof c=="number"?c:0},i.Point.prototype={clone:function(){return new i.Point(this.x,this.y)},plus:function(s){return new i.Point(this.x+s.x,this.y+s.y)},minus:function(s){return new i.Point(this.x-s.x,this.y-s.y)},times:function(s){return new i.Point(this.x*s,this.y*s)},divide:function(s){return new i.Point(this.x/s,this.y/s)},negate:function(){return new i.Point(-this.x,-this.y)},distanceTo:function(s){return Math.sqrt(Math.pow(this.x-s.x,2)+Math.pow(this.y-s.y,2))},squaredDistanceTo:function(s){return Math.pow(this.x-s.x,2)+Math.pow(this.y-s.y,2)},apply:function(s){return new i.Point(s(this.x),s(this.y))},equals:function(s){return s instanceof i.Point&&this.x===s.x&&this.y===s.y},rotate:function(s,c){c=c||new i.Point(0,0);var p,v;if(s%90===0){var y=i.positiveModulo(s,360);switch(y){case 0:p=1,v=0;break;case 90:p=0,v=1;break;case 180:p=-1,v=0;break;case 270:p=0,v=-1;break}}else{var b=s*Math.PI/180;p=Math.cos(b),v=Math.sin(b)}var E=p*(this.x-c.x)-v*(this.y-c.y)+c.x,S=v*(this.x-c.x)+p*(this.y-c.y)+c.y;return new i.Point(E,S)},toString:function(){return"("+Math.round(this.x*100)/100+","+Math.round(this.y*100)/100+")"}}}(u),function(i){i.TileSource=function(c,p,v,y,b,E){var S=this,O=arguments,A,H;if(i.isPlainObject(c)?A=c:A={width:O[0],height:O[1],tileSize:O[2],tileOverlap:O[3],minLevel:O[4],maxLevel:O[5]},i.EventSource.call(this),i.extend(!0,this,A),!this.success){for(H=0;H<arguments.length;H++)if(i.isFunction(arguments[H])){this.success=arguments[H];break}}this.success&&this.addHandler("ready",function(W){S.success(W)}),i.type(arguments[0])==="string"&&(this.url=arguments[0]),this.url?(this.aspectRatio=1,this.dimensions=new i.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=A.width&&A.height?A.width/A.height:1,this.dimensions=new i.Point(A.width,A.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=A.tileOverlap?A.tileOverlap:0,this.minLevel=A.minLevel?A.minLevel:0,this.maxLevel=A.maxLevel!==void 0&&A.maxLevel!==null?A.maxLevel:A.width&&A.height?Math.ceil(Math.log(Math.max(A.width,A.height))/Math.log(2)):0,this.success&&i.isFunction(this.success)&&this.success(this))},i.TileSource.prototype={getTileSize:function(c){return i.console.error("[TileSource.getTileSize] is deprecated. Use TileSource.getTileWidth() and TileSource.getTileHeight() instead"),this._tileWidth},getTileWidth:function(c){return this._tileWidth?this._tileWidth:this.getTileSize(c)},getTileHeight:function(c){return this._tileHeight?this._tileHeight:this.getTileSize(c)},setMaxLevel:function(c){this.maxLevel=c,this._memoizeLevelScale()},getLevelScale:function(c){return this._memoizeLevelScale(),this.getLevelScale(c)},_memoizeLevelScale:function(){var c={},p;for(p=0;p<=this.maxLevel;p++)c[p]=1/Math.pow(2,this.maxLevel-p);this.getLevelScale=function(v){return c[v]}},getNumTiles:function(c){var p=this.getLevelScale(c),v=Math.ceil(p*this.dimensions.x/this.getTileWidth(c)),y=Math.ceil(p*this.dimensions.y/this.getTileHeight(c));return new i.Point(v,y)},getPixelRatio:function(c){var p=this.dimensions.times(this.getLevelScale(c)),v=1/p.x*i.pixelDensityRatio,y=1/p.y*i.pixelDensityRatio;return new i.Point(v,y)},getClosestLevel:function(){var c,p;for(c=this.minLevel+1;c<=this.maxLevel&&(p=this.getNumTiles(c),!(p.x>1||p.y>1));c++);return c-1},getTileAtPoint:function(c,p){var v=p.x>=0&&p.x<=1&&p.y>=0&&p.y<=1/this.aspectRatio;i.console.assert(v,"[TileSource.getTileAtPoint] must be called with a valid point.");var y=this.dimensions.x*this.getLevelScale(c),b=p.x*y,E=p.y*y,S=Math.floor(b/this.getTileWidth(c)),O=Math.floor(E/this.getTileHeight(c));p.x>=1&&(S=this.getNumTiles(c).x-1);var A=1e-15;return p.y>=1/this.aspectRatio-A&&(O=this.getNumTiles(c).y-1),new i.Point(S,O)},getTileBounds:function(c,p,v,y){var b=this.dimensions.times(this.getLevelScale(c)),E=this.getTileWidth(c),S=this.getTileHeight(c),O=p===0?0:E*p-this.tileOverlap,A=v===0?0:S*v-this.tileOverlap,H=E+(p===0?1:2)*this.tileOverlap,W=S+(v===0?1:2)*this.tileOverlap,re=1/b.x;return H=Math.min(H,b.x-O),W=Math.min(W,b.y-A),y?new i.Rect(0,0,H,W):new i.Rect(O*re,A*re,H*re,W*re)},getImageInfo:function(c){var p=this,v,y,b,E,S,O,A;c&&(S=c.split("/"),O=S[S.length-1],A=O.lastIndexOf("."),A>-1&&(S[S.length-1]=O.slice(0,A))),y=function(H){typeof H=="string"&&(H=i.parseXml(H));var W=i.TileSource.determineType(p,H,c);if(!W){p.raiseEvent("open-failed",{message:"Unable to load TileSource",source:c});return}E=W.prototype.configure.apply(p,[H,c]),E.ajaxWithCredentials===void 0&&(E.ajaxWithCredentials=p.ajaxWithCredentials),b=new W(E),p.ready=!0,p.raiseEvent("ready",{tileSource:b})},c.match(/\.js$/)?(v=c.split("/").pop().replace(".js",""),i.jsonp({url:c,async:!1,callbackName:v,callback:y})):i.makeAjaxRequest({url:c,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(H){var W=s(H);y(W)},error:function(H,W){var re;try{re="HTTP "+H.status+" attempting to load TileSource"}catch{var $;typeof W>"u"||!W.toString?$="Unknown error":$=W.toString(),re=$+" attempting to load TileSource"}p.raiseEvent("open-failed",{message:re,source:c})}})},supports:function(c,p){return!1},configure:function(c,p){throw new Error("Method not implemented.")},getTileUrl:function(c,p,v){throw new Error("Method not implemented.")},getTileAjaxHeaders:function(c,p,v){return{}},tileExists:function(c,p,v){var y=this.getNumTiles(c);return c>=this.minLevel&&c<=this.maxLevel&&p>=0&&v>=0&&p<y.x&&v<y.y}},i.extend(!0,i.TileSource.prototype,i.EventSource.prototype);function s(c){var p=c.responseText,v=c.status,y,b;if(c){if(c.status!==200&&c.status!==0)throw v=c.status,y=v===404?"Not Found":c.statusText,new Error(i.getString("Errors.Status",v,y))}else throw new Error(i.getString("Errors.Security"));if(p.match(/\s*<.*/))try{b=c.responseXML&&c.responseXML.documentElement?c.responseXML:i.parseXml(p)}catch{b=c.responseText}else if(p.match(/\s*[{[].*/))try{b=i.parseJSON(p)}catch{b=p}else b=p;return b}i.TileSource.determineType=function(c,p,v){var y;for(y in u)if(y.match(/.+TileSource$/)&&i.isFunction(u[y])&&i.isFunction(u[y].prototype.supports)&&u[y].prototype.supports.call(c,p,v))return u[y];return i.console.error("No TileSource was able to open %s %s",v,p),null}}(u),function(i){i.DziTileSource=function(p,v,y,b,E,S,O,A,H){var W,re,$,se;if(i.isPlainObject(p)?se=p:se={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=se.tilesUrl,this.fileFormat=se.fileFormat,this.displayRects=se.displayRects,this.displayRects)for(W=this.displayRects.length-1;W>=0;W--)for(re=this.displayRects[W],$=re.minLevel;$<=re.maxLevel;$++)this._levelRects[$]||(this._levelRects[$]=[]),this._levelRects[$].push(re);i.TileSource.apply(this,[se])},i.extend(i.DziTileSource.prototype,i.TileSource.prototype,{supports:function(p,v){var y;return p.Image?y=p.Image.xmlns:p.documentElement&&(p.documentElement.localName==="Image"||p.documentElement.tagName==="Image")&&(y=p.documentElement.namespaceURI),y=(y||"").toLowerCase(),y.indexOf("schemas.microsoft.com/deepzoom/2008")!==-1||y.indexOf("schemas.microsoft.com/deepzoom/2009")!==-1},configure:function(p,v){var y;return i.isPlainObject(p)?y=c(this,p):y=s(this,p),v&&!y.tilesUrl&&(y.tilesUrl=v.replace(/([^/]+?)(\.(dzi|xml|js)?(\?[^/]*)?)?\/?$/,"$1_files/"),v.search(/\.(dzi|xml|js)\?/)!==-1?y.queryParams=v.match(/\?.*/):y.queryParams=""),y},getTileUrl:function(p,v,y){return[this.tilesUrl,p,"/",v,"_",y,".",this.fileFormat,this.queryParams].join("")},tileExists:function(p,v,y){var b=this._levelRects[p],E,S,O,A,H,W,re;if(this.minLevel&&p<this.minLevel||this.maxLevel&&p>this.maxLevel)return!1;if(!b||!b.length)return!0;for(re=b.length-1;re>=0;re--)if(E=b[re],!(p<E.minLevel||p>E.maxLevel)&&(S=this.getLevelScale(p),O=E.x*S,A=E.y*S,H=O+E.width*S,W=A+E.height*S,O=Math.floor(O/this._tileWidth),A=Math.floor(A/this._tileWidth),H=Math.ceil(H/this._tileWidth),W=Math.ceil(W/this._tileWidth),O<=v&&v<H&&A<=y&&y<W))return!0;return!1}});function s(p,v){if(!v||!v.documentElement)throw new Error(i.getString("Errors.Xml"));var y=v.documentElement,b=y.localName||y.tagName,E=v.documentElement.namespaceURI,S=null,O=[],A,H,W,re,$;if(b==="Image")try{if(re=y.getElementsByTagName("Size")[0],re===void 0&&(re=y.getElementsByTagNameNS(E,"Size")[0]),S={Image:{xmlns:"http://schemas.microsoft.com/deepzoom/2008",Url:y.getAttribute("Url"),Format:y.getAttribute("Format"),DisplayRect:null,Overlap:parseInt(y.getAttribute("Overlap"),10),TileSize:parseInt(y.getAttribute("TileSize"),10),Size:{Height:parseInt(re.getAttribute("Height"),10),Width:parseInt(re.getAttribute("Width"),10)}}},!i.imageFormatSupported(S.Image.Format))throw new Error(i.getString("Errors.ImageFormat",S.Image.Format.toUpperCase()));for(A=y.getElementsByTagName("DisplayRect"),A===void 0&&(A=y.getElementsByTagNameNS(E,"DisplayRect")[0]),$=0;$<A.length;$++)H=A[$],W=H.getElementsByTagName("Rect")[0],W===void 0&&(W=H.getElementsByTagNameNS(E,"Rect")[0]),O.push({Rect:{X:parseInt(W.getAttribute("X"),10),Y:parseInt(W.getAttribute("Y"),10),Width:parseInt(W.getAttribute("Width"),10),Height:parseInt(W.getAttribute("Height"),10),MinLevel:parseInt(H.getAttribute("MinLevel"),10),MaxLevel:parseInt(H.getAttribute("MaxLevel"),10)}});return O.length&&(S.Image.DisplayRect=O),c(p,S)}catch(ne){throw ne instanceof Error?ne:new Error(i.getString("Errors.Dzi"))}else{if(b==="Collection")throw new Error(i.getString("Errors.Dzc"));if(b==="Error"){var se=y.getElementsByTagName("Message")[0],I=se.firstChild.nodeValue;throw new Error(I)}}throw new Error(i.getString("Errors.Dzi"))}function c(p,v){var y=v.Image,b=y.Url,E=y.Format,S=y.Size,O=y.DisplayRect||[],A=parseInt(S.Width,10),H=parseInt(S.Height,10),W=parseInt(y.TileSize,10),re=parseInt(y.Overlap,10),$=[],se,I;for(I=0;I<O.length;I++)se=O[I].Rect,$.push(new i.DisplayRect(parseInt(se.X,10),parseInt(se.Y,10),parseInt(se.Width,10),parseInt(se.Height,10),parseInt(se.MinLevel,10),parseInt(se.MaxLevel,10)));return i.extend(!0,{width:A,height:H,tileSize:W,tileOverlap:re,minLevel:null,maxLevel:null,tilesUrl:b,fileFormat:E,displayRects:$},v)}}(u),function(i){i.IIIFTileSource=function(y){if(i.extend(!0,this,y),!(this.height&&this.width&&this["@id"]))throw new Error("IIIF required parameters not provided.");if(y.tileSizePerScaleFactor={},this.tileFormat=this.tileFormat||"jpg",this.version=y.version,this.tile_width&&this.tile_height)y.tileWidth=this.tile_width,y.tileHeight=this.tile_height;else if(this.tile_width)y.tileSize=this.tile_width;else if(this.tile_height)y.tileSize=this.tile_height;else if(this.tiles)if(this.tiles.length===1)y.tileWidth=this.tiles[0].width,y.tileHeight=this.tiles[0].height||this.tiles[0].width,this.scale_factors=this.tiles[0].scaleFactors;else{this.scale_factors=[];for(var b=0;b<this.tiles.length;b++)for(var E=0;E<this.tiles[b].scaleFactors.length;E++){var S=this.tiles[b].scaleFactors[E];this.scale_factors.push(S),y.tileSizePerScaleFactor[S]={width:this.tiles[b].width,height:this.tiles[b].height||this.tiles[b].width}}}else if(s(y)){for(var O=Math.min(this.height,this.width),A=[256,512,1024],H=[],W=0;W<A.length;W++)A[W]<=O&&H.push(A[W]);H.length>0?y.tileSize=Math.max.apply(null,H):y.tileSize=O}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,y.levels=c(this),i.extend(!0,y,{width:y.levels[y.levels.length-1].width,height:y.levels[y.levels.length-1].height,tileSize:Math.max(y.height,y.width),tileOverlap:0,minLevel:0,maxLevel:y.levels.length-1}),this.levels=y.levels):i.console.error("Nothing in the info.json to construct image pyramids from");if(!y.maxLevel&&!this.emulateLegacyImagePyramid)if(!this.scale_factors)y.maxLevel=Number(Math.ceil(Math.log(Math.max(this.width,this.height),2)));else{var re=Math.max.apply(null,this.scale_factors);y.maxLevel=Math.round(Math.log(re)*Math.LOG2E)}i.TileSource.apply(this,[y])},i.extend(i.IIIFTileSource.prototype,i.TileSource.prototype,{supports:function(y,b){return y.protocol&&y.protocol==="http://iiif.io/api/image"||y["@context"]&&(y["@context"]==="http://library.stanford.edu/iiif/image-api/1.1/context.json"||y["@context"]==="http://iiif.io/api/image/1/context.json")||y.profile&&y.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html")===0||y.identifier&&y.width&&y.height?!0:!!(y.documentElement&&y.documentElement.tagName==="info"&&y.documentElement.namespaceURI==="http://library.stanford.edu/iiif/image-api/ns/")},configure:function(y,b){if(i.isPlainObject(y)){if(!y["@context"])y["@context"]="http://iiif.io/api/image/1.0/context.json",y["@id"]=b.replace("/info.json",""),y.version=1;else{var E=y["@context"];if(Array.isArray(E)){for(var S=0;S<E.length;S++)if(typeof E[S]=="string"&&(/^http:\/\/iiif\.io\/api\/image\/[1-3]\/context\.json$/.test(E[S])||E[S]==="http://library.stanford.edu/iiif/image-api/1.1/context.json")){E=E[S];break}}switch(E){case"http://iiif.io/api/image/1/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/context.json":y.version=1;break;case"http://iiif.io/api/image/2/context.json":y.version=2;break;case"http://iiif.io/api/image/3/context.json":y.version=3;break;default:i.console.error("Data has a @context property which contains no known IIIF context URI.")}}if(!y["@id"]&&y.id&&(y["@id"]=y.id),y.preferredFormats){for(var O=0;O<y.preferredFormats.length;O++)if(u.imageFormatSupported(y.preferredFormats[O])){y.tileFormat=y.preferredFormats[O];break}}return y}else{var A=p(y);return A["@context"]="http://iiif.io/api/image/1.0/context.json",A["@id"]=b.replace("/info.xml",""),A.version=1,A}},getTileWidth:function(y){if(this.emulateLegacyImagePyramid)return i.TileSource.prototype.getTileWidth.call(this,y);var b=Math.pow(2,this.maxLevel-y);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[b]?this.tileSizePerScaleFactor[b].width:this._tileWidth},getTileHeight:function(y){if(this.emulateLegacyImagePyramid)return i.TileSource.prototype.getTileHeight.call(this,y);var b=Math.pow(2,this.maxLevel-y);return this.tileSizePerScaleFactor&&this.tileSizePerScaleFactor[b]?this.tileSizePerScaleFactor[b].height:this._tileHeight},getLevelScale:function(y){if(this.emulateLegacyImagePyramid){var b=NaN;return this.levels.length>0&&y>=this.minLevel&&y<=this.maxLevel&&(b=this.levels[y].width/this.levels[this.maxLevel].width),b}return i.TileSource.prototype.getLevelScale.call(this,y)},getNumTiles:function(y){if(this.emulateLegacyImagePyramid){var b=this.getLevelScale(y);return b?new i.Point(1,1):new i.Point(0,0)}return i.TileSource.prototype.getNumTiles.call(this,y)},getTileAtPoint:function(y,b){return this.emulateLegacyImagePyramid?new i.Point(0,0):i.TileSource.prototype.getTileAtPoint.call(this,y,b)},getTileUrl:function(y,b,E){if(this.emulateLegacyImagePyramid){var S=null;return this.levels.length>0&&y>=this.minLevel&&y<=this.maxLevel&&(S=this.levels[y].url),S}var O="0",A=Math.pow(.5,this.maxLevel-y),H=Math.ceil(this.width*A),W=Math.ceil(this.height*A),re,$,se,I,ne,he,ce,Se,Pe,Xe,tt,ht,yt,dt;return re=this.getTileWidth(y),$=this.getTileHeight(y),se=Math.ceil(re/A),I=Math.ceil($/A),this.version===1?yt="native."+this.tileFormat:yt="default."+this.tileFormat,H<re&&W<$?(this.version===2&&H===this.width?Xe="full":this.version===3&&H===this.width&&W===this.height?Xe="max":this.version===3?Xe=H+","+W:Xe=H+",",ne="full"):(he=b*se,ce=E*I,Se=Math.min(se,this.width-he),Pe=Math.min(I,this.height-ce),b===0&&E===0&&Se===this.width&&Pe===this.height?ne="full":ne=[he,ce,Se,Pe].join(","),tt=Math.ceil(Se*A),ht=Math.ceil(Pe*A),this.version===2&&tt===this.width?Xe="full":this.version===3&&tt===this.width&&ht===this.height?Xe="max":this.version===3?Xe=tt+","+ht:Xe=tt+","),dt=[this["@id"],ne,Xe,O,yt].join("/"),dt},__testonly__:{canBeTiled:s,constructLevels:c}});function s(y){var b=["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"],E=Array.isArray(y.profile)?y.profile[0]:y.profile,S=b.indexOf(E)!==-1,O=!1;return y.version===2&&y.profile.length>1&&y.profile[1].supports&&(O=y.profile[1].supports.indexOf("sizeByW")!==-1),y.version===3&&y.extraFeatures&&(O=y.extraFeatures.indexOf("sizeByWh")!==-1),!S||O}function c(y){for(var b=[],E=0;E<y.sizes.length;E++)b.push({url:y["@id"]+"/full/"+y.sizes[E].width+","+(y.version===3?y.sizes[E].height:"")+"/0/default."+y.tileFormat,width:y.sizes[E].width,height:y.sizes[E].height});return b.sort(function(S,O){return S.width-O.width})}function p(y){if(!y||!y.documentElement)throw new Error(i.getString("Errors.Xml"));var b=y.documentElement,E=b.tagName,S=null;if(E==="info")try{return S={},v(b,S),S}catch(O){throw O instanceof Error?O:new Error(i.getString("Errors.IIIF"))}throw new Error(i.getString("Errors.IIIF"))}function v(y,b,E){var S,O;if(y.nodeType===3&&E)O=y.nodeValue.trim(),O.match(/^\d*$/)&&(O=Number(O)),b[E]?(i.isArray(b[E])||(b[E]=[b[E]]),b[E].push(O)):b[E]=O;else if(y.nodeType===1)for(S=0;S<y.childNodes.length;S++)v(y.childNodes[S],b,y.nodeName)}}(u),function(i){i.OsmTileSource=function(s,c,p,v,y){var b;i.isPlainObject(s)?b=s:b={width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]},(!b.width||!b.height)&&(b.width=65572864,b.height=65572864),b.tileSize||(b.tileSize=256,b.tileOverlap=0),b.tilesUrl||(b.tilesUrl="http://tile.openstreetmap.org/"),b.minLevel=8,i.TileSource.apply(this,[b])},i.extend(i.OsmTileSource.prototype,i.TileSource.prototype,{supports:function(s,c){return s.type&&s.type==="openstreetmaps"},configure:function(s,c){return s},getTileUrl:function(s,c,p){return this.tilesUrl+(s-8)+"/"+c+"/"+p+".png"}})}(u),function(i){i.TmsTileSource=function(s,c,p,v,y){var b;i.isPlainObject(s)?b=s:b={width:arguments[0],height:arguments[1],tileSize:arguments[2],tileOverlap:arguments[3],tilesUrl:arguments[4]};var E=Math.ceil(b.width/256)*256,S=Math.ceil(b.height/256)*256,O;E>S?O=E/256:O=S/256,b.maxLevel=Math.ceil(Math.log(O)/Math.log(2))-1,b.tileSize=256,b.width=E,b.height=S,i.TileSource.apply(this,[b])},i.extend(i.TmsTileSource.prototype,i.TileSource.prototype,{supports:function(s,c){return s.type&&s.type==="tiledmapservice"},configure:function(s,c){return s},getTileUrl:function(s,c,p){var v=this.getNumTiles(s).y-1;return this.tilesUrl+s+"/"+c+"/"+(v-p)+".png"}})}(u),function(i){i.ZoomifyTileSource=function(s){typeof s.tileSize>"u"&&(s.tileSize=256),typeof s.fileFormat>"u"&&(s.fileFormat="jpg",this.fileFormat=s.fileFormat);var c={x:s.width,y:s.height};for(s.imageSizes=[{x:s.width,y:s.height}],s.gridSize=[this._getGridSize(s.width,s.height,s.tileSize)];parseInt(c.x,10)>s.tileSize||parseInt(c.y,10)>s.tileSize;)c.x=Math.floor(c.x/2),c.y=Math.floor(c.y/2),s.imageSizes.push({x:c.x,y:c.y}),s.gridSize.push(this._getGridSize(c.x,c.y,s.tileSize));s.imageSizes.reverse(),s.gridSize.reverse(),s.minLevel=0,s.maxLevel=s.gridSize.length-1,u.TileSource.apply(this,[s])},i.extend(i.ZoomifyTileSource.prototype,i.TileSource.prototype,{_getGridSize:function(s,c,p){return{x:Math.ceil(s/p),y:Math.ceil(c/p)}},_calculateAbsoluteTileNumber:function(s,c,p){for(var v=0,y={},b=0;b<s;b++)y=this.gridSize[b],v+=y.x*y.y;return y=this.gridSize[s],v+=y.x*p+c,v},supports:function(s,c){return s.type&&s.type==="zoomifytileservice"},configure:function(s,c){return s},getTileUrl:function(s,c,p){var v=0,y=this._calculateAbsoluteTileNumber(s,c,p);return v=Math.floor(y/256),this.tilesUrl+"TileGroup"+v+"/"+s+"-"+c+"-"+p+"."+this.fileFormat}})}(u),function(i){i.LegacyTileSource=function(v){var y,b,E;i.isArray(v)&&(y={type:"legacy-image-pyramid",levels:v}),y.levels=s(y.levels),y.levels.length>0?(b=y.levels[y.levels.length-1].width,E=y.levels[y.levels.length-1].height):(b=0,E=0,i.console.error("No supported image formats found")),i.extend(!0,y,{width:b,height:E,tileSize:Math.max(E,b),tileOverlap:0,minLevel:0,maxLevel:y.levels.length>0?y.levels.length-1:0}),i.TileSource.apply(this,[y]),this.levels=y.levels},i.extend(i.LegacyTileSource.prototype,i.TileSource.prototype,{supports:function(v,y){return v.type&&v.type==="legacy-image-pyramid"||v.documentElement&&v.documentElement.getAttribute("type")==="legacy-image-pyramid"},configure:function(v,y){var b;return i.isPlainObject(v)?b=p(this,v):b=c(this,v),b},getLevelScale:function(v){var y=NaN;return this.levels.length>0&&v>=this.minLevel&&v<=this.maxLevel&&(y=this.levels[v].width/this.levels[this.maxLevel].width),y},getNumTiles:function(v){var y=this.getLevelScale(v);return y?new i.Point(1,1):new i.Point(0,0)},getTileUrl:function(v,y,b){var E=null;return this.levels.length>0&&v>=this.minLevel&&v<=this.maxLevel&&(E=this.levels[v].url),E}});function s(v){var y=[],b,E;for(E=0;E<v.length;E++)b=v[E],b.height&&b.width&&b.url?y.push({url:b.url,width:Number(b.width),height:Number(b.height)}):i.console.error("Unsupported image format: %s",b.url?b.url:"<no URL>");return y.sort(function(S,O){return S.height-O.height})}function c(v,y){if(!y||!y.documentElement)throw new Error(i.getString("Errors.Xml"));var b=y.documentElement,E=b.tagName,S=null,O=[],A,H;if(E==="image")try{for(S={type:b.getAttribute("type"),levels:[]},O=b.getElementsByTagName("level"),H=0;H<O.length;H++)A=O[H],S.levels.push({url:A.getAttribute("url"),width:parseInt(A.getAttribute("width"),10),height:parseInt(A.getAttribute("height"),10)});return p(v,S)}catch(W){throw W instanceof Error?W:new Error("Unknown error parsing Legacy Image Pyramid XML.")}else{if(E==="collection")throw new Error("Legacy Image Pyramid Collections not yet supported.");if(E==="error")throw new Error("Error: "+y)}throw new Error("Unknown element "+E)}function p(v,y){return y.levels}}(u),function(i){i.ImageTileSource=function(s){s=i.extend({buildPyramid:!0,crossOriginPolicy:!1,ajaxWithCredentials:!1,useCanvas:!0},s),i.TileSource.apply(this,[s])},i.extend(i.ImageTileSource.prototype,i.TileSource.prototype,{supports:function(s,c){return s.type&&s.type==="image"},configure:function(s,c){return s},getImageInfo:function(s){var c=this._image=new Image,p=this;this.crossOriginPolicy&&(c.crossOrigin=this.crossOriginPolicy),this.ajaxWithCredentials&&(c.useCredentials=this.ajaxWithCredentials),i.addEvent(c,"load",function(){p.width=c.naturalWidth,p.height=c.naturalHeight,p.aspectRatio=p.width/p.height,p.dimensions=new i.Point(p.width,p.height),p._tileWidth=p.width,p._tileHeight=p.height,p.tileOverlap=0,p.minLevel=0,p.levels=p._buildLevels(),p.maxLevel=p.levels.length-1,p.ready=!0,p.raiseEvent("ready",{tileSource:p})}),i.addEvent(c,"error",function(){p.raiseEvent("open-failed",{message:"Error loading image at "+s,source:s})}),c.src=s},getLevelScale:function(s){var c=NaN;return s>=this.minLevel&&s<=this.maxLevel&&(c=this.levels[s].width/this.levels[this.maxLevel].width),c},getNumTiles:function(s){var c=this.getLevelScale(s);return c?new i.Point(1,1):new i.Point(0,0)},getTileUrl:function(s,c,p){var v=null;return s>=this.minLevel&&s<=this.maxLevel&&(v=this.levels[s].url),v},getContext2D:function(s,c,p){var v=null;return s>=this.minLevel&&s<=this.maxLevel&&(v=this.levels[s].context2D),v},destroy:function(){this._freeupCanvasMemory()},_buildLevels:function(){var s=[{url:this._image.src,width:this._image.naturalWidth,height:this._image.naturalHeight}];if(!this.buildPyramid||!i.supportsCanvas||!this.useCanvas)return delete this._image,s;var c=this._image.naturalWidth,p=this._image.naturalHeight,v=document.createElement("canvas"),y=v.getContext("2d");if(v.width=c,v.height=p,y.drawImage(this._image,0,0,c,p),s[0].context2D=y,delete this._image,i.isCanvasTainted(v))return s;for(;c>=2&&p>=2;){c=Math.floor(c/2),p=Math.floor(p/2);var b=document.createElement("canvas"),E=b.getContext("2d");b.width=c,b.height=p,E.drawImage(v,0,0,c,p),s.splice(0,0,{context2D:E,width:c,height:p}),v=b,y=E}return s},_freeupCanvasMemory:function(){for(var s=0;s<this.levels.length;s++)this.levels[s].context2D.canvas.height=0,this.levels[s].context2D.canvas.width=0}})}(u),function(i){i.TileSourceCollection=function(s,c,p,v){i.console.error("TileSourceCollection is deprecated; use World instead")}}(u),function(i){i.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},i.Button=function(E){var S=this;i.EventSource.call(this),i.extend(!0,this,{tooltip:null,srcRest:null,srcGroup:null,srcHover:null,srcDown:null,clickTimeThreshold:i.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:i.DEFAULT_SETTINGS.clickDistThreshold,fadeDelay:0,fadeLength:2e3,onPress:null,onRelease:null,onClick:null,onEnter:null,onExit:null,onFocus:null,onBlur:null,userData:null},E),this.element=E.element||i.makeNeutralElement("div"),E.element||(this.imgRest=i.makeTransparentImage(this.srcRest),this.imgGroup=i.makeTransparentImage(this.srcGroup),this.imgHover=i.makeTransparentImage(this.srcHover),this.imgDown=i.makeTransparentImage(this.srcDown),this.imgRest.alt=this.imgGroup.alt=this.imgHover.alt=this.imgDown.alt=this.tooltip,i.setElementPointerEventsNone(this.imgRest),i.setElementPointerEventsNone(this.imgGroup),i.setElementPointerEventsNone(this.imgHover),i.setElementPointerEventsNone(this.imgDown),this.element.style.position="relative",i.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",i.Browser.vendor===i.BROWSERS.FIREFOX&&i.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=i.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 i.MouseTracker({userData:"Button.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(O){O.insideElementPressed?(y(S,i.ButtonState.DOWN),S.raiseEvent("enter",{originalEvent:O.originalEvent})):O.buttonDownAny||y(S,i.ButtonState.HOVER)},focusHandler:function(O){S.tracker.enterHandler(O),S.raiseEvent("focus",{originalEvent:O.originalEvent})},leaveHandler:function(O){b(S,i.ButtonState.GROUP),O.insideElementPressed&&S.raiseEvent("exit",{originalEvent:O.originalEvent})},blurHandler:function(O){S.tracker.leaveHandler(O),S.raiseEvent("blur",{originalEvent:O.originalEvent})},pressHandler:function(O){y(S,i.ButtonState.DOWN),S.raiseEvent("press",{originalEvent:O.originalEvent})},releaseHandler:function(O){O.insideElementPressed&&O.insideElementReleased?(b(S,i.ButtonState.HOVER),S.raiseEvent("release",{originalEvent:O.originalEvent})):O.insideElementPressed?b(S,i.ButtonState.GROUP):y(S,i.ButtonState.HOVER)},clickHandler:function(O){O.quick&&S.raiseEvent("click",{originalEvent:O.originalEvent})},keyHandler:function(O){O.keyCode===13?(S.raiseEvent("click",{originalEvent:O.originalEvent}),S.raiseEvent("release",{originalEvent:O.originalEvent}),O.preventDefault=!0):O.preventDefault=!1}}),b(this,i.ButtonState.REST)},i.extend(i.Button.prototype,i.EventSource.prototype,{notifyGroupEnter:function(){y(this,i.ButtonState.GROUP)},notifyGroupExit:function(){b(this,i.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,i.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,i.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}});function s(E){i.requestAnimationFrame(function(){c(E)})}function c(E){var S,O,A;E.shouldFade&&(S=i.now(),O=S-E.fadeBeginTime,A=1-O/E.fadeLength,A=Math.min(1,A),A=Math.max(0,A),E.imgGroup&&i.setElementOpacity(E.imgGroup,A,!0),A>0&&s(E))}function p(E){E.shouldFade=!0,E.fadeBeginTime=i.now()+E.fadeDelay,window.setTimeout(function(){s(E)},E.fadeDelay)}function v(E){E.shouldFade=!1,E.imgGroup&&i.setElementOpacity(E.imgGroup,1,!0)}function y(E,S){E.element.disabled||(S>=i.ButtonState.GROUP&&E.currentState===i.ButtonState.REST&&(v(E),E.currentState=i.ButtonState.GROUP),S>=i.ButtonState.HOVER&&E.currentState===i.ButtonState.GROUP&&(E.imgHover&&(E.imgHover.style.visibility=""),E.currentState=i.ButtonState.HOVER),S>=i.ButtonState.DOWN&&E.currentState===i.ButtonState.HOVER&&(E.imgDown&&(E.imgDown.style.visibility=""),E.currentState=i.ButtonState.DOWN))}function b(E,S){E.element.disabled||(S<=i.ButtonState.HOVER&&E.currentState===i.ButtonState.DOWN&&(E.imgDown&&(E.imgDown.style.visibility="hidden"),E.currentState=i.ButtonState.HOVER),S<=i.ButtonState.GROUP&&E.currentState===i.ButtonState.HOVER&&(E.imgHover&&(E.imgHover.style.visibility="hidden"),E.currentState=i.ButtonState.GROUP),S<=i.ButtonState.REST&&E.currentState===i.ButtonState.GROUP&&(p(E),E.currentState=i.ButtonState.REST))}}(u),function(i){i.ButtonGroup=function(s){i.extend(!0,this,{buttons:[],clickTimeThreshold:i.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:i.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},s);var c=this.buttons.concat([]),p=this,v;if(this.element=s.element||i.makeNeutralElement("div"),!s.group)for(this.element.style.display="inline-block",v=0;v<c.length;v++)this.element.appendChild(c[v].element);i.setElementTouchActionNone(this.element),this.tracker=new i.MouseTracker({userData:"ButtonGroup.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(y){var b;for(b=0;b<p.buttons.length;b++)p.buttons[b].notifyGroupEnter()},leaveHandler:function(y){var b;if(!y.insideElementPressed)for(b=0;b<p.buttons.length;b++)p.buttons[b].notifyGroupExit()}})},i.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 s=this.buttons.pop();this.element.removeChild(s.element),s.destroy()}this.tracker.destroy(),this.element=null}}}(u),function(i){i.Rect=function(s,c,p,v,y){this.x=typeof s=="number"?s:0,this.y=typeof c=="number"?c:0,this.width=typeof p=="number"?p:0,this.height=typeof v=="number"?v:0,this.degrees=typeof y=="number"?y:0,this.degrees=i.positiveModulo(this.degrees,360);var b,E;this.degrees>=270?(b=this.getTopRight(),this.x=b.x,this.y=b.y,E=this.height,this.height=this.width,this.width=E,this.degrees-=270):this.degrees>=180?(b=this.getBottomRight(),this.x=b.x,this.y=b.y,this.degrees-=180):this.degrees>=90&&(b=this.getBottomLeft(),this.x=b.x,this.y=b.y,E=this.height,this.height=this.width,this.width=E,this.degrees-=90)},i.Rect.fromSummits=function(s,c,p){var v=s.distanceTo(c),y=s.distanceTo(p),b=c.minus(s),E=Math.atan(b.y/b.x);return b.x<0?E+=Math.PI:b.y<0&&(E+=2*Math.PI),new i.Rect(s.x,s.y,v,y,E/Math.PI*180)},i.Rect.prototype={clone:function(){return new i.Rect(this.x,this.y,this.width,this.height,this.degrees)},getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new i.Point(this.x,this.y)},getBottomRight:function(){return new i.Point(this.x+this.width,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getTopRight:function(){return new i.Point(this.x+this.width,this.y).rotate(this.degrees,this.getTopLeft())},getBottomLeft:function(){return new i.Point(this.x,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getCenter:function(){return new i.Point(this.x+this.width/2,this.y+this.height/2).rotate(this.degrees,this.getTopLeft())},getSize:function(){return new i.Point(this.width,this.height)},equals:function(s){return s instanceof i.Rect&&this.x===s.x&&this.y===s.y&&this.width===s.width&&this.height===s.height&&this.degrees===s.degrees},times:function(s){return new i.Rect(this.x*s,this.y*s,this.width*s,this.height*s,this.degrees)},translate:function(s){return new i.Rect(this.x+s.x,this.y+s.y,this.width,this.height,this.degrees)},union:function(s){var c=this.getBoundingBox(),p=s.getBoundingBox(),v=Math.min(c.x,p.x),y=Math.min(c.y,p.y),b=Math.max(c.x+c.width,p.x+p.width),E=Math.max(c.y+c.height,p.y+p.height);return new i.Rect(v,y,b-v,E-y)},intersection:function(s){var c=1e-10,p=[],v=this.getTopLeft();s.containsPoint(v,c)&&p.push(v);var y=this.getTopRight();s.containsPoint(y,c)&&p.push(y);var b=this.getBottomLeft();s.containsPoint(b,c)&&p.push(b);var E=this.getBottomRight();s.containsPoint(E,c)&&p.push(E);var S=s.getTopLeft();this.containsPoint(S,c)&&p.push(S);var O=s.getTopRight();this.containsPoint(O,c)&&p.push(O);var A=s.getBottomLeft();this.containsPoint(A,c)&&p.push(A);var H=s.getBottomRight();this.containsPoint(H,c)&&p.push(H);for(var W=this._getSegments(),re=s._getSegments(),$=0;$<W.length;$++)for(var se=W[$],I=0;I<re.length;I++){var ne=re[I],he=ce(se[0],se[1],ne[0],ne[1]);he&&p.push(he)}function ce(dt,Tt,xt,Nt){var Mt=Tt.minus(dt),Ht=Nt.minus(xt),Qt=-Ht.x*Mt.y+Mt.x*Ht.y;if(Qt===0)return null;var wn=(Mt.x*(dt.y-xt.y)-Mt.y*(dt.x-xt.x))/Qt,ft=(Ht.x*(dt.y-xt.y)-Ht.y*(dt.x-xt.x))/Qt;return-c<=wn&&wn<=1-c&&-c<=ft&&ft<=1-c?new i.Point(dt.x+ft*Mt.x,dt.y+ft*Mt.y):null}if(p.length===0)return null;for(var Se=p[0].x,Pe=p[0].x,Xe=p[0].y,tt=p[0].y,ht=1;ht<p.length;ht++){var yt=p[ht];yt.x<Se&&(Se=yt.x),yt.x>Pe&&(Pe=yt.x),yt.y<Xe&&(Xe=yt.y),yt.y>tt&&(tt=yt.y)}return new i.Rect(Se,Xe,Pe-Se,tt-Xe)},_getSegments:function(){var s=this.getTopLeft(),c=this.getTopRight(),p=this.getBottomLeft(),v=this.getBottomRight();return[[s,c],[c,v],[v,p],[p,s]]},rotate:function(s,c){if(s=i.positiveModulo(s,360),s===0)return this.clone();c=c||this.getCenter();var p=this.getTopLeft().rotate(s,c),v=this.getTopRight().rotate(s,c),y=v.minus(p);y=y.apply(function(E){var S=1e-15;return Math.abs(E)<S?0:E});var b=Math.atan(y.y/y.x);return y.x<0?b+=Math.PI:y.y<0&&(b+=2*Math.PI),new i.Rect(p.x,p.y,this.width,this.height,b/Math.PI*180)},getBoundingBox:function(){if(this.degrees===0)return this.clone();var s=this.getTopLeft(),c=this.getTopRight(),p=this.getBottomLeft(),v=this.getBottomRight(),y=Math.min(s.x,c.x,p.x,v.x),b=Math.max(s.x,c.x,p.x,v.x),E=Math.min(s.y,c.y,p.y,v.y),S=Math.max(s.y,c.y,p.y,v.y);return new i.Rect(y,E,b-y,S-E)},getIntegerBoundingBox:function(){var s=this.getBoundingBox(),c=Math.floor(s.x),p=Math.floor(s.y),v=Math.ceil(s.width+s.x-c),y=Math.ceil(s.height+s.y-p);return new i.Rect(c,p,v,y)},containsPoint:function(s,c){c=c||0;var p=this.getTopLeft(),v=this.getTopRight(),y=this.getBottomLeft(),b=v.minus(p),E=y.minus(p);return(s.x-p.x)*b.x+(s.y-p.y)*b.y>=-c&&(s.x-v.x)*b.x+(s.y-v.y)*b.y<=c&&(s.x-p.x)*E.x+(s.y-p.y)*E.y>=-c&&(s.x-y.x)*E.x+(s.y-y.y)*E.y<=c},toString:function(){return"["+Math.round(this.x*100)/100+", "+Math.round(this.y*100)/100+", "+Math.round(this.width*100)/100+"x"+Math.round(this.height*100)/100+", "+Math.round(this.degrees*100)/100+"deg]"}}}(u),function(i){var s={};i.ReferenceStrip=function(A){var H=this,W=A.viewer,re=i.getElementSize(W.element),$,se,I;for(A.id||(A.id="referencestrip-"+i.now(),this.element=i.makeNeutralElement("div"),this.element.id=A.id,this.element.className="referencestrip"),A=i.extend(!0,{sizeRatio:i.DEFAULT_SETTINGS.referenceStripSizeRatio,position:i.DEFAULT_SETTINGS.referenceStripPosition,scroll:i.DEFAULT_SETTINGS.referenceStripScroll,clickTimeThreshold:i.DEFAULT_SETTINGS.clickTimeThreshold},A,{element:this.element}),i.extend(this,A),s[this.id]={animating:!1},this.minPixelRatio=this.viewer.minPixelRatio,this.element.tabIndex=0,se=this.element.style,se.marginTop="0px",se.marginRight="0px",se.marginBottom="0px",se.marginLeft="0px",se.left="0px",se.bottom="0px",se.border="0px",se.background="#000",se.position="relative",i.setElementTouchActionNone(this.element),i.setElementOpacity(this.element,.8),this.viewer=W,this.tracker=new i.MouseTracker({userData:"ReferenceStrip.tracker",element:this.element,clickHandler:i.delegate(this,c),dragHandler:i.delegate(this,p),scrollHandler:i.delegate(this,v),enterHandler:i.delegate(this,b),leaveHandler:i.delegate(this,E),keyDownHandler:i.delegate(this,S),keyHandler:i.delegate(this,O),preProcessEventHandler:function(ne){ne.eventType==="wheel"&&(ne.preventDefault=!0)}}),A.width&&A.height?(this.element.style.width=A.width+"px",this.element.style.height=A.height+"px",W.addControl(this.element,{anchor:i.ControlAnchor.BOTTOM_LEFT})):A.scroll==="horizontal"?(this.element.style.width=re.x*A.sizeRatio*W.tileSources.length+12*W.tileSources.length+"px",this.element.style.height=re.y*A.sizeRatio+"px",W.addControl(this.element,{anchor:i.ControlAnchor.BOTTOM_LEFT})):(this.element.style.height=re.y*A.sizeRatio*W.tileSources.length+12*W.tileSources.length+"px",this.element.style.width=re.x*A.sizeRatio+"px",W.addControl(this.element,{anchor:i.ControlAnchor.TOP_LEFT})),this.panelWidth=re.x*this.sizeRatio+8,this.panelHeight=re.y*this.sizeRatio+8,this.panels=[],this.miniViewers={},I=0;I<W.tileSources.length;I++)$=i.makeNeutralElement("div"),$.id=this.element.id+"-"+I,$.style.width=H.panelWidth+"px",$.style.height=H.panelHeight+"px",$.style.display="inline",$.style.float="left",$.style.cssFloat="left",$.style.styleFloat="left",$.style.padding="2px",i.setElementTouchActionNone($),i.setElementPointerEventsNone($),this.element.appendChild($),$.activePanel=!1,this.panels.push($);y(this,this.scroll==="vertical"?re.y:re.x,0),this.setFocus(0)},i.ReferenceStrip.prototype={setFocus:function(A){var H=this.element.querySelector("#"+this.element.id+"-"+A),W=i.getElementSize(this.viewer.canvas),re=Number(this.element.style.width.replace("px","")),$=Number(this.element.style.height.replace("px","")),se=-Number(this.element.style.marginLeft.replace("px","")),I=-Number(this.element.style.marginTop.replace("px","")),ne;this.currentSelected!==H&&(this.currentSelected&&(this.currentSelected.style.background="#000"),this.currentSelected=H,this.currentSelected.style.background="#999",this.scroll==="horizontal"?(ne=Number(A)*(this.panelWidth+3),ne>se+W.x-this.panelWidth?(ne=Math.min(ne,re-W.x),this.element.style.marginLeft=-ne+"px",y(this,W.x,-ne)):ne<se&&(ne=Math.max(0,ne-W.x/2),this.element.style.marginLeft=-ne+"px",y(this,W.x,-ne))):(ne=Number(A)*(this.panelHeight+3),ne>I+W.y-this.panelHeight?(ne=Math.min(ne,$-W.y),this.element.style.marginTop=-ne+"px",y(this,W.y,-ne)):ne<I&&(ne=Math.max(0,ne-W.y/2),this.element.style.marginTop=-ne+"px",y(this,W.y,-ne))),this.currentPage=A,b.call(this,{eventSource:this.tracker}))},update:function(){return s[this.id].animating?(i.console.log("image reference strip update"),!0):!1},destroy:function(){if(this.miniViewers)for(var A in this.miniViewers)this.miniViewers[A].destroy();this.tracker.destroy(),this.element&&this.viewer.removeControl(this.element)}};function c(A){if(A.quick){var H;this.scroll==="horizontal"?H=Math.floor(A.position.x/this.panelWidth):H=Math.floor(A.position.y/this.panelHeight),this.viewer.goToPage(H)}this.element.focus()}function p(A){if(this.dragging=!0,this.element){var H=Number(this.element.style.marginLeft.replace("px","")),W=Number(this.element.style.marginTop.replace("px","")),re=Number(this.element.style.width.replace("px","")),$=Number(this.element.style.height.replace("px","")),se=i.getElementSize(this.viewer.canvas);this.scroll==="horizontal"?-A.delta.x>0?H>-(re-se.x)&&(this.element.style.marginLeft=H+A.delta.x*2+"px",y(this,se.x,H+A.delta.x*2)):-A.delta.x<0&&H<0&&(this.element.style.marginLeft=H+A.delta.x*2+"px",y(this,se.x,H+A.delta.x*2)):-A.delta.y>0?W>-($-se.y)&&(this.element.style.marginTop=W+A.delta.y*2+"px",y(this,se.y,W+A.delta.y*2)):-A.delta.y<0&&W<0&&(this.element.style.marginTop=W+A.delta.y*2+"px",y(this,se.y,W+A.delta.y*2))}}function v(A){if(this.element){var H=Number(this.element.style.marginLeft.replace("px","")),W=Number(this.element.style.marginTop.replace("px","")),re=Number(this.element.style.width.replace("px","")),$=Number(this.element.style.height.replace("px","")),se=i.getElementSize(this.viewer.canvas);this.scroll==="horizontal"?A.scroll>0?H>-(re-se.x)&&(this.element.style.marginLeft=H-A.scroll*60+"px",y(this,se.x,H-A.scroll*60)):A.scroll<0&&H<0&&(this.element.style.marginLeft=H-A.scroll*60+"px",y(this,se.x,H-A.scroll*60)):A.scroll<0?W>se.y-$&&(this.element.style.marginTop=W+A.scroll*60+"px",y(this,se.y,W+A.scroll*60)):A.scroll>0&&W<0&&(this.element.style.marginTop=W+A.scroll*60+"px",y(this,se.y,W+A.scroll*60)),A.preventDefault=!0}}function y(A,H,W){var re,$,se,I,ne,he;for(A.scroll==="horizontal"?re=A.panelWidth:re=A.panelHeight,$=Math.ceil(H/re)+5,se=Math.ceil((Math.abs(W)+H)/re)+1,$=se-$,$=$<0?0:$,ne=$;ne<se&&ne<A.panels.length;ne++)if(he=A.panels[ne],!he.activePanel){var ce,Se=A.viewer.tileSources[ne];Se.referenceStripThumbnailUrl?ce={type:"image",url:Se.referenceStripThumbnailUrl}:ce=Se,I=new i.Viewer({id:he.id,tileSources:[ce],element:he,navigatorSizeRatio:A.sizeRatio,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,loadTilesWithAjax:A.viewer.loadTilesWithAjax,ajaxHeaders:A.viewer.ajaxHeaders,useCanvas:A.useCanvas}),i.setElementPointerEventsNone(I.canvas),i.setElementPointerEventsNone(I.container),I.innerTracker.setTracking(!1),I.outerTracker.setTracking(!1),A.miniViewers[he.id]=I,he.activePanel=!0}}function b(A){var H=A.eventSource.element;this.scroll==="horizontal"?H.style.marginBottom="0px":H.style.marginLeft="0px"}function E(A){var H=A.eventSource.element;this.scroll==="horizontal"?H.style.marginBottom="-"+i.getElementSize(H).y/2+"px":H.style.marginLeft="-"+i.getElementSize(H).x/2+"px"}function S(A){if(!A.ctrl&&!A.alt&&!A.meta)switch(A.keyCode){case 38:v.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),A.preventDefault=!0;break;case 40:v.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),A.preventDefault=!0;break;case 37:v.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),A.preventDefault=!0;break;case 39:v.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),A.preventDefault=!0;break;default:A.preventDefault=!1;break}else A.preventDefault=!1}function O(A){if(!A.ctrl&&!A.alt&&!A.meta)switch(A.keyCode){case 61:v.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),A.preventDefault=!0;break;case 45:v.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),A.preventDefault=!0;break;case 48:case 119:case 87:v.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),A.preventDefault=!0;break;case 115:case 83:v.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),A.preventDefault=!0;break;case 97:v.call(this,{eventSource:this.tracker,position:null,scroll:-1,shift:null}),A.preventDefault=!0;break;case 100:v.call(this,{eventSource:this.tracker,position:null,scroll:1,shift:null}),A.preventDefault=!0;break;default:A.preventDefault=!1;break}else A.preventDefault=!1}}(u),function(i){i.DisplayRect=function(s,c,p,v,y,b){i.Rect.apply(this,[s,c,p,v]),this.minLevel=y,this.maxLevel=b},i.extend(i.DisplayRect.prototype,i.Rect.prototype)}(u),function(i){i.Spring=function(c){var p=arguments;typeof c!="object"&&(c={initial:p.length&&typeof p[0]=="number"?p[0]:void 0,springStiffness:p.length>1?p[1].springStiffness:5,animationTime:p.length>1?p[1].animationTime:1.5}),i.console.assert(typeof c.springStiffness=="number"&&c.springStiffness!==0,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),i.console.assert(typeof c.animationTime=="number"&&c.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),c.exponential&&(this._exponential=!0,delete c.exponential),i.extend(!0,this,c),this.current={value:typeof this.initial=="number"?this.initial:this._exponential?0:1,time:i.now()},i.console.assert(!this._exponential||this.current.value!==0,"[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))},i.Spring.prototype={resetTo:function(c){i.console.assert(!this._exponential||c!==0,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=c,this.start.time=this.target.time=this.current.time=i.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(c){i.console.assert(!this._exponential||c!==0,"[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=c,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(c){this.start.value+=c,this.target.value+=c,this._exponential&&(i.console.assert(this.target.value!==0&&this.start.value!==0,"[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(c){this._exponential=c,this._exponential&&(i.console.assert(this.current.value!==0&&this.target.value!==0&&this.start.value!==0,"[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(){this.current.time=i.now();var c,p;this._exponential?(c=this.start._logValue,p=this.target._logValue):(c=this.start.value,p=this.target.value);var v=this.current.time>=this.target.time?p:c+(p-c)*s(this.springStiffness,(this.current.time-this.start.time)/(this.target.time-this.start.time)),y=this.current.value;return this._exponential?this.current.value=Math.exp(v):this.current.value=v,y!==this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}};function s(c,p){return(1-Math.exp(c*-p))/(1-Math.exp(-c))}}(u),function(i){function s(p){i.extend(!0,this,{timeout:i.DEFAULT_SETTINGS.timeout,jobId:null},p),this.image=null}s.prototype={errorMsg:null,start:function(){var p=this,v=this.abort;this.image=new Image,this.image.onload=function(){p.finish(!0)},this.image.onabort=this.image.onerror=function(){p.errorMsg="Image load aborted",p.finish(!1)},this.jobId=window.setTimeout(function(){p.errorMsg="Image load exceeded timeout ("+p.timeout+" ms)",p.finish(!1)},this.timeout),this.loadWithAjax?(this.request=i.makeAjaxRequest({url:this.src,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,responseType:"arraybuffer",success:function(y){var b;try{b=new window.Blob([y.response])}catch(A){var E=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(A.name==="TypeError"&&E){var S=new E;S.append(y.response),b=S.getBlob()}}b.size===0&&(p.errorMsg="Empty image response.",p.finish(!1));var O=(window.URL||window.webkitURL).createObjectURL(b);p.image.src=O},error:function(y){p.errorMsg="Image load aborted - XHR error",p.finish(!1)}}),this.abort=function(){p.request.abort(),typeof v=="function"&&v()}):(this.crossOriginPolicy!==!1&&(this.image.crossOrigin=this.crossOriginPolicy),this.image.src=this.src)},finish:function(p){this.image.onload=this.image.onerror=this.image.onabort=null,p||(this.image=null),this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},i.ImageLoader=function(p){i.extend(!0,this,{jobLimit:i.DEFAULT_SETTINGS.imageLoaderLimit,timeout:i.DEFAULT_SETTINGS.timeout,jobQueue:[],jobsInProgress:0},p)},i.ImageLoader.prototype={addJob:function(p){var v=this,y=function(S){c(v,S,p.callback)},b={src:p.src,loadWithAjax:p.loadWithAjax,ajaxHeaders:p.loadWithAjax?p.ajaxHeaders:null,crossOriginPolicy:p.crossOriginPolicy,ajaxWithCredentials:p.ajaxWithCredentials,callback:y,abort:p.abort,timeout:this.timeout},E=new s(b);!this.jobLimit||this.jobsInProgress<this.jobLimit?(E.start(),this.jobsInProgress++):this.jobQueue.push(E)},clear:function(){for(var p=0;p<this.jobQueue.length;p++){var v=this.jobQueue[p];typeof v.abort=="function"&&v.abort()}this.jobQueue=[]}};function c(p,v,y){var b;p.jobsInProgress--,(!p.jobLimit||p.jobsInProgress<p.jobLimit)&&p.jobQueue.length>0&&(b=p.jobQueue.shift(),b.start(),p.jobsInProgress++),y(v.image,v.errorMsg,v.request)}}(u),function(i){i.Tile=function(s,c,p,v,y,b,E,S,O,A){this.level=s,this.x=c,this.y=p,this.bounds=v,this.sourceBounds=A,this.exists=y,this.url=b,this.context2D=E,this.loadWithAjax=S,this.ajaxHeaders=O,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},i.Tile.prototype={toString:function(){return this.level+"/"+this.x+"_"+this.y},_hasTransparencyChannel:function(){return!!this.context2D||this.url.match(".png")},drawHTML:function(s){if(!this.cacheImageRecord){i.console.warn("[Tile.drawHTML] attempting to draw tile %s when it's not cached",this.toString());return}if(!this.loaded){i.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());return}this.element||(this.element=i.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!==s&&s.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)"),i.setElementOpacity(this.element,this.opacity)},drawCanvas:function(s,c,p,v){var y=this.position.times(i.pixelDensityRatio),b=this.size.times(i.pixelDensityRatio),E;if(!this.context2D&&!this.cacheImageRecord){i.console.warn("[Tile.drawCanvas] attempting to draw tile %s when it's not cached",this.toString());return}if(E=this.context2D||this.cacheImageRecord.getRenderedContext(),!this.loaded||!E){i.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());return}s.save(),s.globalAlpha=this.opacity,typeof p=="number"&&p!==1&&(y=y.times(p),b=b.times(p)),v instanceof i.Point&&(y=y.plus(v)),s.globalAlpha===1&&this._hasTransparencyChannel()&&s.clearRect(y.x,y.y,b.x,b.y),c({context:s,tile:this,rendered:E});var S,O;this.sourceBounds?(S=Math.min(this.sourceBounds.width,E.canvas.width),O=Math.min(this.sourceBounds.height,E.canvas.height)):(S=E.canvas.width,O=E.canvas.height),s.translate(y.x+b.x/2,0),this.flipped&&s.scale(-1,1),s.drawImage(E.canvas,0,0,S,O,-b.x/2,y.y,b.x,b.y),s.restore()},getScaleForEdgeSmoothing:function(){var s;if(this.cacheImageRecord)s=this.cacheImageRecord.getRenderedContext();else if(this.context2D)s=this.context2D;else return i.console.warn("[Tile.drawCanvas] attempting to get tile scale %s when tile's not cached",this.toString()),1;return s.canvas.width/(this.size.x*i.pixelDensityRatio)},getTranslationForEdgeSmoothing:function(s,c,p){var v=Math.max(1,Math.ceil((p.x-c.x)/2)),y=Math.max(1,Math.ceil((p.y-c.y)/2));return new i.Point(v,y).minus(this.position.times(i.pixelDensityRatio).times(s||1).apply(function(b){return b%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}}}(u),function(i){i.OverlayPlacement=i.Placement,i.OverlayRotationMode=i.freezeObject({NO_ROTATION:1,EXACT:2,BOUNDING_BOX:3}),i.Overlay=function(s,c,p){var v;i.isPlainObject(s)?v=s:v={element:s,location:c,placement:p},this.element=v.element,this.style=v.element.style,this._init(v)},i.Overlay.prototype={_init:function(s){this.location=s.location,this.placement=s.placement===void 0?i.Placement.TOP_LEFT:s.placement,this.onDraw=s.onDraw,this.checkResize=s.checkResize===void 0?!0:s.checkResize,this.width=s.width===void 0?null:s.width,this.height=s.height===void 0?null:s.height,this.rotationMode=s.rotationMode||i.OverlayRotationMode.EXACT,this.location instanceof i.Rect&&(this.width=this.location.width,this.height=this.location.height,this.location=this.location.getTopLeft(),this.placement=i.Placement.TOP_LEFT),this.scales=this.width!==null&&this.height!==null,this.bounds=new i.Rect(this.location.x,this.location.y,this.width,this.height),this.position=this.location},adjust:function(s,c){var p=i.Placement.properties[this.placement];!p||(p.isHorizontallyCentered?s.x-=c.x/2:p.isRight&&(s.x-=c.x),p.isVerticallyCentered?s.y-=c.y/2:p.isBottom&&(s.y-=c.y))},destroy:function(){var s=this.element,c=this.style;s.parentNode&&(s.parentNode.removeChild(s),s.prevElementParent&&(c.display="none",document.body.appendChild(s))),this.onDraw=null,c.top="",c.left="",c.position="",this.width!==null&&(c.width=""),this.height!==null&&(c.height="");var p=i.getCssPropertyWithVendorPrefix("transformOrigin"),v=i.getCssPropertyWithVendorPrefix("transform");p&&v&&(c[p]="",c[v]="")},drawHTML:function(s,c){var p=this.element;p.parentNode!==s&&(p.prevElementParent=p.parentNode,p.prevNextSibling=p.nextSibling,s.appendChild(p),this.style.position="absolute",this.size=i.getElementSize(p));var v=this._getOverlayPositionAndSize(c),y=v.position,b=this.size=v.size,E=v.rotate;if(this.onDraw)this.onDraw(y,b,this.element);else{var S=this.style;S.left=y.x+"px",S.top=y.y+"px",this.width!==null&&(S.width=b.x+"px"),this.height!==null&&(S.height=b.y+"px");var O=i.getCssPropertyWithVendorPrefix("transformOrigin"),A=i.getCssPropertyWithVendorPrefix("transform");O&&A&&(E?(S[O]=this._getTransformOrigin(),S[A]="rotate("+E+"deg)"):(S[O]="",S[A]="")),S.display="block"}},_getOverlayPositionAndSize:function(s){var c=s.pixelFromPoint(this.location,!0),p=this._getSizeInPixels(s);this.adjust(c,p);var v=0;if(s.degrees&&this.rotationMode!==i.OverlayRotationMode.NO_ROTATION)if(this.rotationMode===i.OverlayRotationMode.BOUNDING_BOX&&this.width!==null&&this.height!==null){var y=new i.Rect(c.x,c.y,p.x,p.y),b=this._getBoundingBox(y,s.degrees);c=b.getTopLeft(),p=b.getSize()}else v=s.degrees;return{position:c,size:p,rotate:v}},_getSizeInPixels:function(s){var c=this.size.x,p=this.size.y;if(this.width!==null||this.height!==null){var v=s.deltaPixelsFromPointsNoRotate(new i.Point(this.width||0,this.height||0),!0);this.width!==null&&(c=v.x),this.height!==null&&(p=v.y)}if(this.checkResize&&(this.width===null||this.height===null)){var y=this.size=i.getElementSize(this.element);this.width===null&&(c=y.x),this.height===null&&(p=y.y)}return new i.Point(c,p)},_getBoundingBox:function(s,c){var p=this._getPlacementPoint(s);return s.rotate(c,p).getBoundingBox()},_getPlacementPoint:function(s){var c=new i.Point(s.x,s.y),p=i.Placement.properties[this.placement];return p&&(p.isHorizontallyCentered?c.x+=s.width/2:p.isRight&&(c.x+=s.width),p.isVerticallyCentered?c.y+=s.height/2:p.isBottom&&(c.y+=s.height)),c},_getTransformOrigin:function(){var s="",c=i.Placement.properties[this.placement];return c&&(c.isLeft?s="left":c.isRight&&(s="right"),c.isTop?s+=" top":c.isBottom&&(s+=" bottom")),s},update:function(s,c){var p=i.isPlainObject(s)?s:{location:s,placement:c};this._init({location:p.location||this.location,placement:p.placement!==void 0?p.placement:this.placement,onDraw:p.onDraw||this.onDraw,checkResize:p.checkResize||this.checkResize,width:p.width!==void 0?p.width:this.width,height:p.height!==void 0?p.height:this.height,rotationMode:p.rotationMode||this.rotationMode})},getBounds:function(s){i.console.assert(s,"A viewport must now be passed to Overlay.getBounds.");var c=this.width,p=this.height;if(c===null||p===null){var v=s.deltaPointsFromPixelsNoRotate(this.size,!0);c===null&&(c=v.x),p===null&&(p=v.y)}var y=this.location.clone();return this.adjust(y,new i.Point(c,p)),this._adjustBoundsForRotation(s,new i.Rect(y.x,y.y,c,p))},_adjustBoundsForRotation:function(s,c){if(!s||s.degrees===0||this.rotationMode===i.OverlayRotationMode.EXACT)return c;if(this.rotationMode===i.OverlayRotationMode.BOUNDING_BOX){if(this.width===null||this.height===null)return c;var p=this._getOverlayPositionAndSize(s);return s.viewerElementToViewportRectangle(new i.Rect(p.position.x,p.position.y,p.size.x,p.size.y))}return c.rotate(-s.degrees,this._getPlacementPoint(c))}}}(u),function(i){i.Drawer=function(s){i.console.assert(s.viewer,"[Drawer] options.viewer is required");var c=arguments;if(i.isPlainObject(s)||(s={source:c[0],viewport:c[1],element:c[2]}),i.console.assert(s.viewport,"[Drawer] options.viewport is required"),i.console.assert(s.element,"[Drawer] options.element is required"),s.source&&i.console.error("[Drawer] options.source is no longer accepted; use TiledImage instead"),this.viewer=s.viewer,this.viewport=s.viewport,this.debugGridColor=typeof s.debugGridColor=="string"?[s.debugGridColor]:s.debugGridColor||i.DEFAULT_SETTINGS.debugGridColor,s.opacity&&i.console.error("[Drawer] options.opacity is no longer accepted; set the opacity on the TiledImage instead"),this.useCanvas=i.supportsCanvas&&(this.viewer?this.viewer.useCanvas:!0),this.container=i.getElement(s.element),this.canvas=i.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 p=this._calculateCanvasSize();this.canvas.width=p.x,this.canvas.height=p.y}this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.position="absolute",i.setElementOpacity(this.canvas,this.opacity,!0),i.setElementPointerEventsNone(this.canvas),i.setElementTouchActionNone(this.canvas),this.container.style.textAlign="left",this.container.appendChild(this.canvas),this._imageSmoothingEnabled=!0},i.Drawer.prototype={addOverlay:function(s,c,p,v){return i.console.error("drawer.addOverlay is deprecated. Use viewer.addOverlay instead."),this.viewer.addOverlay(s,c,p,v),this},updateOverlay:function(s,c,p){return i.console.error("drawer.updateOverlay is deprecated. Use viewer.updateOverlay instead."),this.viewer.updateOverlay(s,c,p),this},removeOverlay:function(s){return i.console.error("drawer.removeOverlay is deprecated. Use viewer.removeOverlay instead."),this.viewer.removeOverlay(s),this},clearOverlays:function(){return i.console.error("drawer.clearOverlays is deprecated. Use viewer.clearOverlays instead."),this.viewer.clearOverlays(),this},viewportCoordToDrawerCoord:function(s){var c=this.viewport.pixelFromPointNoRotate(s,!0);return new i.Point(c.x*i.pixelDensityRatio,c.y*i.pixelDensityRatio)},clipWithPolygons:function(s,c){if(this.useCanvas){var p=this._getContext(c);p.beginPath(),s.forEach(function(v){v.forEach(function(y,b){p[b===0?"moveTo":"lineTo"](y.x,y.y)})}),p.clip()}},setOpacity:function(s){i.console.error("drawer.setOpacity is deprecated. Use tiledImage.setOpacity instead.");for(var c=this.viewer.world,p=0;p<c.getItemCount();p++)c.getItemAt(p).setOpacity(s);return this},getOpacity:function(){i.console.error("drawer.getOpacity is deprecated. Use tiledImage.getOpacity instead.");for(var s=this.viewer.world,c=0,p=0;p<s.getItemCount();p++){var v=s.getItemAt(p).getOpacity();v>c&&(c=v)}return c},needsUpdate:function(){return i.console.error("[Drawer.needsUpdate] this function is deprecated. Use World.needsDraw instead."),this.viewer.world.needsDraw()},numTilesLoaded:function(){return i.console.error("[Drawer.numTilesLoaded] this function is deprecated. Use TileCache.numTilesLoaded instead."),this.viewer.tileCache.numTilesLoaded()},reset:function(){return i.console.error("[Drawer.reset] this function is deprecated. Use World.resetItems instead."),this.viewer.world.resetItems(),this},update:function(){return i.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 s=this._calculateCanvasSize();if((this.canvas.width!==s.x||this.canvas.height!==s.y)&&(this.canvas.width=s.x,this.canvas.height=s.y,this._updateImageSmoothingEnabled(this.context),this.sketchCanvas!==null)){var c=this._calculateSketchCanvasSize();this.sketchCanvas.width=c.x,this.sketchCanvas.height=c.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}},_clear:function(s,c){if(this.useCanvas){var p=this._getContext(s);if(c)p.clearRect(c.x,c.y,c.width,c.height);else{var v=p.canvas;p.clearRect(0,0,v.width,v.height)}}},viewportToDrawerRectangle:function(s){var c=this.viewport.pixelFromPointNoRotate(s.getTopLeft(),!0),p=this.viewport.deltaPixelsFromPointsNoRotate(s.getSize(),!0);return new i.Rect(c.x*i.pixelDensityRatio,c.y*i.pixelDensityRatio,p.x*i.pixelDensityRatio,p.y*i.pixelDensityRatio)},drawTile:function(s,c,p,v,y){if(i.console.assert(s,"[Drawer.drawTile] tile is required"),i.console.assert(c,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var b=this._getContext(p);v=v||1,s.drawCanvas(b,c,v,y)}else s.drawHTML(this.canvas)},_getContext:function(s){var c=this.context;if(s){if(this.sketchCanvas===null){this.sketchCanvas=document.createElement("canvas");var p=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=p.x,this.sketchCanvas.height=p.y,this.sketchContext=this.sketchCanvas.getContext("2d"),this.viewport.getRotation()===0){var v=this;this.viewer.addHandler("rotate",function y(){if(v.viewport.getRotation()!==0){v.viewer.removeHandler("rotate",y);var b=v._calculateSketchCanvasSize();v.sketchCanvas.width=b.x,v.sketchCanvas.height=b.y}})}this._updateImageSmoothingEnabled(this.sketchContext)}c=this.sketchContext}return c},saveContext:function(s){!this.useCanvas||this._getContext(s).save()},restoreContext:function(s){!this.useCanvas||this._getContext(s).restore()},setClip:function(s,c){if(this.useCanvas){var p=this._getContext(c);p.beginPath(),p.rect(s.x,s.y,s.width,s.height),p.clip()}},drawRectangle:function(s,c,p){if(this.useCanvas){var v=this._getContext(p);v.save(),v.fillStyle=c,v.fillRect(s.x,s.y,s.width,s.height),v.restore()}},blendSketch:function(s,c,p,v){var y=s;if(i.isPlainObject(y)||(y={opacity:s,scale:c,translate:p,compositeOperation:v}),!(!this.useCanvas||!this.sketchCanvas)){s=y.opacity,v=y.compositeOperation;var b=y.bounds;if(this.context.save(),this.context.globalAlpha=s,v&&(this.context.globalCompositeOperation=v),b)b.x<0&&(b.width+=b.x,b.x=0),b.x+b.width>this.canvas.width&&(b.width=this.canvas.width-b.x),b.y<0&&(b.height+=b.y,b.y=0),b.y+b.height>this.canvas.height&&(b.height=this.canvas.height-b.y),this.context.drawImage(this.sketchCanvas,b.x,b.y,b.width,b.height,b.x,b.y,b.width,b.height);else{c=y.scale||1,p=y.translate;var E=p instanceof i.Point?p:new i.Point(0,0),S=0,O=0;if(p){var A=this.sketchCanvas.width-this.canvas.width,H=this.sketchCanvas.height-this.canvas.height;S=Math.round(A/2),O=Math.round(H/2)}this.context.drawImage(this.sketchCanvas,E.x-S*c,E.y-O*c,(this.canvas.width+2*S)*c,(this.canvas.height+2*O)*c,-S,-O,this.canvas.width+2*S,this.canvas.height+2*O)}this.context.restore()}},drawDebugInfo:function(s,c,p,v){if(this.useCanvas){var y=this.viewer.world.getIndexOfItem(v)%this.debugGridColor.length,b=this.context;b.save(),b.lineWidth=2*i.pixelDensityRatio,b.font="small-caps bold "+13*i.pixelDensityRatio+"px arial",b.strokeStyle=this.debugGridColor[y],b.fillStyle=this.debugGridColor[y],this.viewport.degrees!==0&&this._offsetForRotation({degrees:this.viewport.degrees}),v.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:v.getRotation(!0),point:v.viewport.pixelFromPointNoRotate(v._getRotationPoint(!0),!0)}),v.viewport.degrees===0&&v.getRotation(!0)%360===0&&v._drawer.viewer.viewport.getFlip()&&v._drawer._flip(),b.strokeRect(s.position.x*i.pixelDensityRatio,s.position.y*i.pixelDensityRatio,s.size.x*i.pixelDensityRatio,s.size.y*i.pixelDensityRatio);var E=(s.position.x+s.size.x/2)*i.pixelDensityRatio,S=(s.position.y+s.size.y/2)*i.pixelDensityRatio;b.translate(E,S),b.rotate(Math.PI/180*-this.viewport.degrees),b.translate(-E,-S),s.x===0&&s.y===0&&(b.fillText("Zoom: "+this.viewport.getZoom(),s.position.x*i.pixelDensityRatio,(s.position.y-30)*i.pixelDensityRatio),b.fillText("Pan: "+this.viewport.getBounds().toString(),s.position.x*i.pixelDensityRatio,(s.position.y-20)*i.pixelDensityRatio)),b.fillText("Level: "+s.level,(s.position.x+10)*i.pixelDensityRatio,(s.position.y+20)*i.pixelDensityRatio),b.fillText("Column: "+s.x,(s.position.x+10)*i.pixelDensityRatio,(s.position.y+30)*i.pixelDensityRatio),b.fillText("Row: "+s.y,(s.position.x+10)*i.pixelDensityRatio,(s.position.y+40)*i.pixelDensityRatio),b.fillText("Order: "+p+" of "+c,(s.position.x+10)*i.pixelDensityRatio,(s.position.y+50)*i.pixelDensityRatio),b.fillText("Size: "+s.size.toString(),(s.position.x+10)*i.pixelDensityRatio,(s.position.y+60)*i.pixelDensityRatio),b.fillText("Position: "+s.position.toString(),(s.position.x+10)*i.pixelDensityRatio,(s.position.y+70)*i.pixelDensityRatio),this.viewport.degrees!==0&&this._restoreRotationChanges(),v.getRotation(!0)%360!==0&&this._restoreRotationChanges(),v.viewport.degrees===0&&v.getRotation(!0)%360===0&&v._drawer.viewer.viewport.getFlip()&&v._drawer._flip(),b.restore()}},debugRect:function(s){if(this.useCanvas){var c=this.context;c.save(),c.lineWidth=2*i.pixelDensityRatio,c.strokeStyle=this.debugGridColor[0],c.fillStyle=this.debugGridColor[0],c.strokeRect(s.x*i.pixelDensityRatio,s.y*i.pixelDensityRatio,s.width*i.pixelDensityRatio,s.height*i.pixelDensityRatio),c.restore()}},setImageSmoothingEnabled:function(s){this.useCanvas&&(this._imageSmoothingEnabled=s,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw())},_updateImageSmoothingEnabled:function(s){s.msImageSmoothingEnabled=this._imageSmoothingEnabled,s.imageSmoothingEnabled=this._imageSmoothingEnabled},getCanvasSize:function(s){var c=this._getContext(s).canvas;return new i.Point(c.width,c.height)},getCanvasCenter:function(){return new i.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(s){var c=s.point?s.point.times(i.pixelDensityRatio):this.getCanvasCenter(),p=this._getContext(s.useSketch);p.save(),p.translate(c.x,c.y),this.viewer.viewport.flipped?(p.rotate(Math.PI/180*-s.degrees),p.scale(-1,1)):p.rotate(Math.PI/180*s.degrees),p.translate(-c.x,-c.y)},_flip:function(s){s=s||{};var c=s.point?s.point.times(i.pixelDensityRatio):this.getCanvasCenter(),p=this._getContext(s.useSketch);p.translate(c.x,0),p.scale(-1,1),p.translate(-c.x,0)},_restoreRotationChanges:function(s){var c=this._getContext(s);c.restore()},_calculateCanvasSize:function(){var s=i.pixelDensityRatio,c=this.viewport.getContainerSize();return{x:Math.round(c.x*s),y:Math.round(c.y*s)}},_calculateSketchCanvasSize:function(){var s=this._calculateCanvasSize();if(this.viewport.getRotation()===0)return s;var c=Math.ceil(Math.sqrt(s.x*s.x+s.y*s.y));return{x:c,y:c}}}}(u),function(i){i.Viewport=function(s){var c=arguments;c.length&&c[0]instanceof i.Point&&(s={containerSize:c[0],contentSize:c[1],config:c[2]}),s.config&&(i.extend(!0,s,s.config),delete s.config),this._margins=i.extend({left:0,top:0,right:0,bottom:0},s.margins||{}),delete s.margins,i.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,viewer:null,springStiffness:i.DEFAULT_SETTINGS.springStiffness,animationTime:i.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:i.DEFAULT_SETTINGS.minZoomImageRatio,maxZoomPixelRatio:i.DEFAULT_SETTINGS.maxZoomPixelRatio,visibilityRatio:i.DEFAULT_SETTINGS.visibilityRatio,wrapHorizontal:i.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:i.DEFAULT_SETTINGS.wrapVertical,defaultZoomLevel:i.DEFAULT_SETTINGS.defaultZoomLevel,minZoomLevel:i.DEFAULT_SETTINGS.minZoomLevel,maxZoomLevel:i.DEFAULT_SETTINGS.maxZoomLevel,degrees:i.DEFAULT_SETTINGS.degrees,flipped:i.DEFAULT_SETTINGS.flipped,homeFillsViewer:i.DEFAULT_SETTINGS.homeFillsViewer},s),this._updateContainerInnerSize(),this.centerSpringX=new i.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.centerSpringY=new i.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.zoomSpring=new i.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 i.Rect(0,0,1,1),1),this.goHome(!0),this.update()},i.Viewport.prototype={resetContentSize:function(s){return i.console.assert(s,"[Viewport.resetContentSize] contentSize is required"),i.console.assert(s instanceof i.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),i.console.assert(s.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),i.console.assert(s.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new i.Rect(0,0,1,s.y/s.x),s.x),this},setHomeBounds:function(s,c){i.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(s,c)},_setContentBounds:function(s,c){i.console.assert(s,"[Viewport._setContentBounds] bounds is required"),i.console.assert(s instanceof i.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),i.console.assert(s.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),i.console.assert(s.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=s.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(c),this._contentBounds=s.rotate(this.degrees).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(c),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:c,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var s=this._contentAspectRatio/this.getAspectRatio(),c;return this.homeFillsViewer?c=s>=1?s:1:c=s>=1?1:s,c/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var s=this._contentBounds.getCenter(),c=1/this.getHomeZoom(),p=c/this.getAspectRatio();return new i.Rect(s.x-c/2,s.y-p/2,c,p)},goHome:function(s){return this.viewer&&this.viewer.raiseEvent("home",{immediately:s}),this.fitBounds(this.getHomeBounds(),s)},getMinZoom:function(){var s=this.getHomeZoom(),c=this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*s;return c},getMaxZoom:function(){var s=this.maxZoomLevel;return s||(s=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,s/=this._contentBounds.width),Math.max(s,this.getHomeZoom())},getAspectRatio:function(){return this._containerInnerSize.x/this._containerInnerSize.y},getContainerSize:function(){return new i.Point(this.containerSize.x,this.containerSize.y)},getMargins:function(){return i.extend({},this._margins)},setMargins:function(s){i.console.assert(i.type(s)==="object","[Viewport.setMargins] margins must be an object"),this._margins=i.extend({left:0,top:0,right:0,bottom:0},s),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(s){return this.getBoundsNoRotate(s).rotate(-this.getRotation())},getBoundsNoRotate:function(s){var c=this.getCenter(s),p=1/this.getZoom(s),v=p/this.getAspectRatio();return new i.Rect(c.x-p/2,c.y-v/2,p,v)},getBoundsWithMargins:function(s){return this.getBoundsNoRotateWithMargins(s).rotate(-this.getRotation(),this.getCenter(s))},getBoundsNoRotateWithMargins:function(s){var c=this.getBoundsNoRotate(s),p=this._containerInnerSize.x*this.getZoom(s);return c.x-=this._margins.left/p,c.y-=this._margins.top/p,c.width+=(this._margins.left+this._margins.right)/p,c.height+=(this._margins.top+this._margins.bottom)/p,c},getCenter:function(s){var c=new i.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),p=new i.Point(this.centerSpringX.target.value,this.centerSpringY.target.value),v,y,b,E,S,O,A,H;return s?c:this.zoomPoint?(v=this.pixelFromPoint(this.zoomPoint,!0),y=this.getZoom(),b=1/y,E=b/this.getAspectRatio(),S=new i.Rect(c.x-b/2,c.y-E/2,b,E),O=this._pixelFromPoint(this.zoomPoint,S),A=O.minus(v),H=A.divide(this._containerInnerSize.x*y),p.plus(H)):p},getZoom:function(s){return s?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(s){return Math.max(Math.min(s,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(s){var c=new i.Rect(s.x,s.y,s.width,s.height);if(!this.wrapHorizontal){var p=this.visibilityRatio*c.width,v=c.x+c.width,y=this._contentBoundsNoRotate.x+this._contentBoundsNoRotate.width,b=this._contentBoundsNoRotate.x-v+p,E=y-c.x-p;p>this._contentBoundsNoRotate.width?c.x+=(b+E)/2:E<0?c.x+=E:b>0&&(c.x+=b)}if(!this.wrapVertical){var S=this.visibilityRatio*c.height,O=c.y+c.height,A=this._contentBoundsNoRotate.y+this._contentBoundsNoRotate.height,H=this._contentBoundsNoRotate.y-O+S,W=A-c.y-S;S>this._contentBoundsNoRotate.height?c.y+=(H+W)/2:W<0?c.y+=W:H>0&&(c.y+=H)}return c},_raiseConstraintsEvent:function(s){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:s})},applyConstraints:function(s){var c=this.getZoom(),p=this._applyZoomConstraints(c);c!==p&&this.zoomTo(p,this.zoomPoint,s);var v=this.getBoundsNoRotate(),y=this._applyBoundaryConstraints(v);return this._raiseConstraintsEvent(s),(v.x!==y.x||v.y!==y.y||s)&&this.fitBounds(y.rotate(-this.getRotation()),s),this},ensureVisible:function(s){return this.applyConstraints(s)},_fitBounds:function(s,c){c=c||{};var p=c.immediately||!1,v=c.constraints||!1,y=this.getAspectRatio(),b=s.getCenter(),E=new i.Rect(s.x,s.y,s.width,s.height,s.degrees+this.getRotation()).getBoundingBox();E.getAspectRatio()>=y?E.height=E.width/y:E.width=E.height*y,E.x=b.x-E.width/2,E.y=b.y-E.height/2;var S=1/E.width;if(v){var O=E.getAspectRatio(),A=this._applyZoomConstraints(S);S!==A&&(S=A,E.width=1/S,E.x=b.x-E.width/2,E.height=E.width/O,E.y=b.y-E.height/2),E=this._applyBoundaryConstraints(E),b=E.getCenter(),this._raiseConstraintsEvent(p)}if(p)return this.panTo(b,!0),this.zoomTo(S,null,!0);this.panTo(this.getCenter(!0),!0),this.zoomTo(this.getZoom(!0),null,!0);var H=this.getBounds(),W=this.getZoom();if(W===0||Math.abs(S/W-1)<1e-8)return this.zoomTo(S,!0),this.panTo(b,p);E=E.rotate(-this.getRotation());var re=E.getTopLeft().times(S).minus(H.getTopLeft().times(W)).divide(S-W);return this.zoomTo(S,re,p)},fitBounds:function(s,c){return this._fitBounds(s,{immediately:c,constraints:!1})},fitBoundsWithConstraints:function(s,c){return this._fitBounds(s,{immediately:c,constraints:!0})},fitVertically:function(s){var c=new i.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(c,s)},fitHorizontally:function(s){var c=new i.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(c,s)},getConstrainedBounds:function(s){var c,p;return c=this.getBounds(s),p=this._applyBoundaryConstraints(c),p},panBy:function(s,c){var p=new i.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(p.plus(s),c)},panTo:function(s,c){return c?(this.centerSpringX.resetTo(s.x),this.centerSpringY.resetTo(s.y)):(this.centerSpringX.springTo(s.x),this.centerSpringY.springTo(s.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:s,immediately:c}),this},zoomBy:function(s,c,p){return this.zoomTo(this.zoomSpring.target.value*s,c,p)},zoomTo:function(s,c,p){var v=this;return this.zoomPoint=c instanceof i.Point&&!isNaN(c.x)&&!isNaN(c.y)?c:null,p?this._adjustCenterSpringsForZoomPoint(function(){v.zoomSpring.resetTo(s)}):this.zoomSpring.springTo(s),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:s,refPoint:c,immediately:p}),this},setRotation:function(s){return!this.viewer||!this.viewer.drawer.canRotate()?this:(this.degrees=i.positiveModulo(s,360),this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:s}),this)},getRotation:function(){return this.degrees},resize:function(s,c){var p=this.getBoundsNoRotate(),v=p,y;return this.containerSize.x=s.x,this.containerSize.y=s.y,this._updateContainerInnerSize(),c&&(y=s.x/this.containerSize.x,v.width=p.width*y,v.height=v.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:s,maintain:c}),this.fitBounds(v,!0)},_updateContainerInnerSize:function(){this._containerInnerSize=new i.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 s=this;this._adjustCenterSpringsForZoomPoint(function(){s.zoomSpring.update()}),this.centerSpringX.update(),this.centerSpringY.update();var c=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,c},_adjustCenterSpringsForZoomPoint:function(s){if(this.zoomPoint){var c=this.pixelFromPoint(this.zoomPoint,!0);s();var p=this.pixelFromPoint(this.zoomPoint,!0),v=p.minus(c),y=this.deltaPointsFromPixels(v,!0);this.centerSpringX.shiftBy(y.x),this.centerSpringY.shiftBy(y.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else s()},deltaPixelsFromPointsNoRotate:function(s,c){return s.times(this._containerInnerSize.x*this.getZoom(c))},deltaPixelsFromPoints:function(s,c){return this.deltaPixelsFromPointsNoRotate(s.rotate(this.getRotation()),c)},deltaPointsFromPixelsNoRotate:function(s,c){return s.divide(this._containerInnerSize.x*this.getZoom(c))},deltaPointsFromPixels:function(s,c){return this.deltaPointsFromPixelsNoRotate(s,c).rotate(-this.getRotation())},pixelFromPointNoRotate:function(s,c){return this._pixelFromPointNoRotate(s,this.getBoundsNoRotate(c))},pixelFromPoint:function(s,c){return this._pixelFromPoint(s,this.getBoundsNoRotate(c))},_pixelFromPointNoRotate:function(s,c){return s.minus(c.getTopLeft()).times(this._containerInnerSize.x/c.width).plus(new i.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(s,c){return this._pixelFromPointNoRotate(s.rotate(this.getRotation(),this.getCenter(!0)),c)},pointFromPixelNoRotate:function(s,c){var p=this.getBoundsNoRotate(c);return s.minus(new i.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/p.width).plus(p.getTopLeft())},pointFromPixel:function(s,c){return this.pointFromPixelNoRotate(s,c).rotate(-this.getRotation(),this.getCenter(!0))},_viewportToImageDelta:function(s,c){var p=this._contentBoundsNoRotate.width;return new i.Point(s*this._contentSizeNoRotate.x/p,c*this._contentSizeNoRotate.x/p)},viewportToImageCoordinates:function(s,c){if(s instanceof i.Point)return this.viewportToImageCoordinates(s.x,s.y);if(this.viewer){var p=this.viewer.world.getItemCount();if(p>1)i.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(p===1){var v=this.viewer.world.getItemAt(0);return v.viewportToImageCoordinates(s,c,!0)}}return this._viewportToImageDelta(s-this._contentBoundsNoRotate.x,c-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(s,c){var p=this._contentBoundsNoRotate.width;return new i.Point(s/this._contentSizeNoRotate.x*p,c/this._contentSizeNoRotate.x*p)},imageToViewportCoordinates:function(s,c){if(s instanceof i.Point)return this.imageToViewportCoordinates(s.x,s.y);if(this.viewer){var p=this.viewer.world.getItemCount();if(p>1)i.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(p===1){var v=this.viewer.world.getItemAt(0);return v.imageToViewportCoordinates(s,c,!0)}}var y=this._imageToViewportDelta(s,c);return y.x+=this._contentBoundsNoRotate.x,y.y+=this._contentBoundsNoRotate.y,y},imageToViewportRectangle:function(s,c,p,v){var y=s;if(y instanceof i.Rect||(y=new i.Rect(s,c,p,v)),this.viewer){var b=this.viewer.world.getItemCount();if(b>1)i.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(b===1){var E=this.viewer.world.getItemAt(0);return E.imageToViewportRectangle(s,c,p,v,!0)}}var S=this.imageToViewportCoordinates(y.x,y.y),O=this._imageToViewportDelta(y.width,y.height);return new i.Rect(S.x,S.y,O.x,O.y,y.degrees)},viewportToImageRectangle:function(s,c,p,v){var y=s;if(y instanceof i.Rect||(y=new i.Rect(s,c,p,v)),this.viewer){var b=this.viewer.world.getItemCount();if(b>1)i.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(b===1){var E=this.viewer.world.getItemAt(0);return E.viewportToImageRectangle(s,c,p,v,!0)}}var S=this.viewportToImageCoordinates(y.x,y.y),O=this._viewportToImageDelta(y.width,y.height);return new i.Rect(S.x,S.y,O.x,O.y,y.degrees)},viewerElementToImageCoordinates:function(s){var c=this.pointFromPixel(s,!0);return this.viewportToImageCoordinates(c)},imageToViewerElementCoordinates:function(s){var c=this.imageToViewportCoordinates(s);return this.pixelFromPoint(c,!0)},windowToImageCoordinates:function(s){i.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var c=s.minus(i.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(c)},imageToWindowCoordinates:function(s){i.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer.");var c=this.imageToViewerElementCoordinates(s);return c.plus(i.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(s){return this.pointFromPixel(s,!0)},viewportToViewerElementCoordinates:function(s){return this.pixelFromPoint(s,!0)},viewerElementToViewportRectangle:function(s){return i.Rect.fromSummits(this.pointFromPixel(s.getTopLeft(),!0),this.pointFromPixel(s.getTopRight(),!0),this.pointFromPixel(s.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(s){return i.Rect.fromSummits(this.pixelFromPoint(s.getTopLeft(),!0),this.pixelFromPoint(s.getTopRight(),!0),this.pixelFromPoint(s.getBottomLeft(),!0))},windowToViewportCoordinates:function(s){i.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var c=s.minus(i.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(c)},viewportToWindowCoordinates:function(s){i.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer.");var c=this.viewportToViewerElementCoordinates(s);return c.plus(i.getElementPosition(this.viewer.element))},viewportToImageZoom:function(s){if(this.viewer){var c=this.viewer.world.getItemCount();if(c>1)i.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(c===1){var p=this.viewer.world.getItemAt(0);return p.viewportToImageZoom(s)}}var v=this._contentSizeNoRotate.x,y=this._containerInnerSize.x,b=this._contentBoundsNoRotate.width,E=y/v*b;return s*E},imageToViewportZoom:function(s){if(this.viewer){var c=this.viewer.world.getItemCount();if(c>1)i.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(c===1){var p=this.viewer.world.getItemAt(0);return p.imageToViewportZoom(s)}}var v=this._contentSizeNoRotate.x,y=this._containerInnerSize.x,b=this._contentBoundsNoRotate.width,E=v/y/b;return s*E},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(s){return this.flipped===s?this:(this.flipped=s,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:s}),this)}}}(u),function(i){i.TiledImage=function(I){var ne=this;i.console.assert(I.tileCache,"[TiledImage] options.tileCache is required"),i.console.assert(I.drawer,"[TiledImage] options.drawer is required"),i.console.assert(I.viewer,"[TiledImage] options.viewer is required"),i.console.assert(I.imageLoader,"[TiledImage] options.imageLoader is required"),i.console.assert(I.source,"[TiledImage] options.source is required"),i.console.assert(!I.clip||I.clip instanceof i.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),i.EventSource.call(this),this._tileCache=I.tileCache,delete I.tileCache,this._drawer=I.drawer,delete I.drawer,this._imageLoader=I.imageLoader,delete I.imageLoader,I.clip instanceof i.Rect&&(this._clip=I.clip.clone()),delete I.clip;var he=I.x||0;delete I.x;var ce=I.y||0;delete I.y,this.normHeight=I.source.dimensions.y/I.source.dimensions.x,this.contentAspectX=I.source.dimensions.x/I.source.dimensions.y;var Se=1;I.width?(Se=I.width,delete I.width,I.height&&(i.console.error("specifying both width and height to a tiledImage is not supported"),delete I.height)):I.height&&(Se=I.height/this.normHeight,delete I.height);var Pe=I.fitBounds;delete I.fitBounds;var Xe=I.fitBoundsPlacement||u.Placement.CENTER;delete I.fitBoundsPlacement;var tt=I.degrees||0;delete I.degrees,i.extend(!0,this,{viewer:null,tilesMatrix:{},coverage:{},loadingCoverage:{},lastDrawn:[],lastResetTime:0,_midDraw:!1,_needsDraw:!0,_hasOpaqueTile:!1,_tilesLoading:0,springStiffness:i.DEFAULT_SETTINGS.springStiffness,animationTime:i.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:i.DEFAULT_SETTINGS.minZoomImageRatio,wrapHorizontal:i.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:i.DEFAULT_SETTINGS.wrapVertical,immediateRender:i.DEFAULT_SETTINGS.immediateRender,blendTime:i.DEFAULT_SETTINGS.blendTime,alwaysBlend:i.DEFAULT_SETTINGS.alwaysBlend,minPixelRatio:i.DEFAULT_SETTINGS.minPixelRatio,smoothTileEdgesMinZoom:i.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,iOSDevice:i.DEFAULT_SETTINGS.iOSDevice,debugMode:i.DEFAULT_SETTINGS.debugMode,crossOriginPolicy:i.DEFAULT_SETTINGS.crossOriginPolicy,ajaxWithCredentials:i.DEFAULT_SETTINGS.ajaxWithCredentials,placeholderFillStyle:i.DEFAULT_SETTINGS.placeholderFillStyle,opacity:i.DEFAULT_SETTINGS.opacity,preload:i.DEFAULT_SETTINGS.preload,compositeOperation:i.DEFAULT_SETTINGS.compositeOperation},I),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new i.Spring({initial:he,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new i.Spring({initial:ce,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new i.Spring({initial:Se,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new i.Spring({initial:tt,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),Pe&&this.fitBounds(Pe,Xe,!0),this._drawingHandler=function(ht){ne.viewer.raiseEvent("tile-drawing",i.extend({tiledImage:ne},ht))}},i.extend(i.TiledImage.prototype,i.EventSource.prototype,{needsDraw:function(){return this._needsDraw},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(I){I!==this._fullyLoaded&&(this._fullyLoaded=I,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=i.now(),this._needsDraw=!0},update:function(){var I=this._xSpring.update(),ne=this._ySpring.update(),he=this._scaleSpring.update(),ce=this._degreesSpring.update();return I||ne||he||ce?(this._updateForScale(),this._needsDraw=!0,!0):!1},draw:function(){this.opacity!==0||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(I){return this.getBoundsNoRotate(I).rotate(this.getRotation(I),this._getRotationPoint(I))},getBoundsNoRotate:function(I){return I?new i.Rect(this._xSpring.current.value,this._ySpring.current.value,this._worldWidthCurrent,this._worldHeightCurrent):new i.Rect(this._xSpring.target.value,this._ySpring.target.value,this._worldWidthTarget,this._worldHeightTarget)},getWorldBounds:function(){return i.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"),this.getBounds()},getClippedBounds:function(I){var ne=this.getBoundsNoRotate(I);if(this._clip){var he=I?this._worldWidthCurrent:this._worldWidthTarget,ce=he/this.source.dimensions.x,Se=this._clip.times(ce);ne=new i.Rect(ne.x+Se.x,ne.y+Se.y,Se.width,Se.height)}return ne.rotate(this.getRotation(I),this._getRotationPoint(I))},getTileBounds:function(I,ne,he){var ce=this.source.getNumTiles(I),Se=(ce.x+ne%ce.x)%ce.x,Pe=(ce.y+he%ce.y)%ce.y,Xe=this.source.getTileBounds(I,Se,Pe);return this.getFlip()&&(Xe.x=1-Xe.x-Xe.width),Xe.x+=(ne-Se)/ce.x,Xe.y+=this._worldHeightCurrent/this._worldWidthCurrent*((he-Pe)/ce.y),Xe},getContentSize:function(){return new i.Point(this.source.dimensions.x,this.source.dimensions.y)},getSizeInWindowCoordinates:function(){var I=this.imageToWindowCoordinates(new i.Point(0,0)),ne=this.imageToWindowCoordinates(this.getContentSize());return new i.Point(ne.x-I.x,ne.y-I.y)},_viewportToImageDelta:function(I,ne,he){var ce=he?this._scaleSpring.current.value:this._scaleSpring.target.value;return new i.Point(I*(this.source.dimensions.x/ce),ne*(this.source.dimensions.y*this.contentAspectX/ce))},viewportToImageCoordinates:function(I,ne,he){var ce;return I instanceof i.Point?(he=ne,ce=I):ce=new i.Point(I,ne),ce=ce.rotate(-this.getRotation(he),this._getRotationPoint(he)),he?this._viewportToImageDelta(ce.x-this._xSpring.current.value,ce.y-this._ySpring.current.value):this._viewportToImageDelta(ce.x-this._xSpring.target.value,ce.y-this._ySpring.target.value)},_imageToViewportDelta:function(I,ne,he){var ce=he?this._scaleSpring.current.value:this._scaleSpring.target.value;return new i.Point(I/this.source.dimensions.x*ce,ne/this.source.dimensions.y/this.contentAspectX*ce)},imageToViewportCoordinates:function(I,ne,he){I instanceof i.Point&&(he=ne,ne=I.y,I=I.x);var ce=this._imageToViewportDelta(I,ne);return he?(ce.x+=this._xSpring.current.value,ce.y+=this._ySpring.current.value):(ce.x+=this._xSpring.target.value,ce.y+=this._ySpring.target.value),ce.rotate(this.getRotation(he),this._getRotationPoint(he))},imageToViewportRectangle:function(I,ne,he,ce,Se){var Pe=I;Pe instanceof i.Rect?Se=ne:Pe=new i.Rect(I,ne,he,ce);var Xe=this.imageToViewportCoordinates(Pe.getTopLeft(),Se),tt=this._imageToViewportDelta(Pe.width,Pe.height,Se);return new i.Rect(Xe.x,Xe.y,tt.x,tt.y,Pe.degrees+this.getRotation(Se))},viewportToImageRectangle:function(I,ne,he,ce,Se){var Pe=I;I instanceof i.Rect?Se=ne:Pe=new i.Rect(I,ne,he,ce);var Xe=this.viewportToImageCoordinates(Pe.getTopLeft(),Se),tt=this._viewportToImageDelta(Pe.width,Pe.height,Se);return new i.Rect(Xe.x,Xe.y,tt.x,tt.y,Pe.degrees-this.getRotation(Se))},viewerElementToImageCoordinates:function(I){var ne=this.viewport.pointFromPixel(I,!0);return this.viewportToImageCoordinates(ne)},imageToViewerElementCoordinates:function(I){var ne=this.imageToViewportCoordinates(I);return this.viewport.pixelFromPoint(ne,!0)},windowToImageCoordinates:function(I){var ne=I.minus(u.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(ne)},imageToWindowCoordinates:function(I){var ne=this.imageToViewerElementCoordinates(I);return ne.plus(u.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(I){var ne=this._scaleSpring.current.value;return I=I.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new i.Rect((I.x-this._xSpring.current.value)/ne,(I.y-this._ySpring.current.value)/ne,I.width/ne,I.height/ne,I.degrees)},viewportToImageZoom:function(I){var ne=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return ne*I},imageToViewportZoom:function(I){var ne=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return I/ne},setPosition:function(I,ne){var he=this._xSpring.target.value===I.x&&this._ySpring.target.value===I.y;if(ne){if(he&&this._xSpring.current.value===I.x&&this._ySpring.current.value===I.y)return;this._xSpring.resetTo(I.x),this._ySpring.resetTo(I.y),this._needsDraw=!0}else{if(he)return;this._xSpring.springTo(I.x),this._ySpring.springTo(I.y),this._needsDraw=!0}he||this._raiseBoundsChange()},setWidth:function(I,ne){this._setScale(I,ne)},setHeight:function(I,ne){this._setScale(I/this.normHeight,ne)},setCroppingPolygons:function(I){var ne=function(ce){return ce instanceof i.Point||typeof ce.x=="number"&&typeof ce.y=="number"},he=function(ce){return ce.map(function(Se){try{if(ne(Se))return{x:Se.x,y:Se.y};throw new Error}catch{throw new Error("A Provided cropping polygon point is not supported")}})};try{if(!i.isArray(I))throw new Error("Provided cropping polygon is not an array");this._croppingPolygons=I.map(function(ce){return he(ce)})}catch(ce){i.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),i.console.error(ce),this._croppingPolygons=null}},resetCroppingPolygons:function(){this._croppingPolygons=null},fitBounds:function(I,ne,he){ne=ne||i.Placement.CENTER;var ce=i.Placement.properties[ne],Se=this.contentAspectX,Pe=0,Xe=0,tt=1,ht=1;if(this._clip&&(Se=this._clip.getAspectRatio(),tt=this._clip.width/this.source.dimensions.x,ht=this._clip.height/this.source.dimensions.y,I.getAspectRatio()>Se?(Pe=this._clip.x/this._clip.height*I.height,Xe=this._clip.y/this._clip.height*I.height):(Pe=this._clip.x/this._clip.width*I.width,Xe=this._clip.y/this._clip.width*I.width)),I.getAspectRatio()>Se){var yt=I.height/ht,dt=0;ce.isHorizontallyCentered?dt=(I.width-I.height*Se)/2:ce.isRight&&(dt=I.width-I.height*Se),this.setPosition(new i.Point(I.x-Pe+dt,I.y-Xe),he),this.setHeight(yt,he)}else{var Tt=I.width/tt,xt=0;ce.isVerticallyCentered?xt=(I.height-I.width/Se)/2:ce.isBottom&&(xt=I.height-I.width/Se),this.setPosition(new i.Point(I.x-Pe,I.y-Xe+xt),he),this.setWidth(Tt,he)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(I){i.console.assert(!I||I instanceof i.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),I instanceof i.Rect?this._clip=I.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getFlip:function(){return!!this.flipped},setFlip:function(I){this.flipped=!!I,this._needsDraw=!0,this._raiseBoundsChange()},getOpacity:function(){return this.opacity},setOpacity:function(I){I!==this.opacity&&(this.opacity=I,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(I){this._preload=!!I,this._needsDraw=!0},getRotation:function(I){return I?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(I,ne){this._degreesSpring.target.value===I&&this._degreesSpring.isAtTargetValue()||(ne?this._degreesSpring.resetTo(I):this._degreesSpring.springTo(I),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(I){return this.getBoundsNoRotate(I).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(I){I!==this.compositeOperation&&(this.compositeOperation=I,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},_setScale:function(I,ne){var he=this._scaleSpring.target.value===I;if(ne){if(he&&this._scaleSpring.current.value===I)return;this._scaleSpring.resetTo(I),this._updateForScale(),this._needsDraw=!0}else{if(he)return;this._scaleSpring.springTo(I),this._updateForScale(),this._needsDraw=!0}he||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 I=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),ne=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,he=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(ne/this.minPixelRatio)/Math.log(2))));return he=Math.max(he,this.source.minLevel||0),I=Math.min(I,he),{lowestLevel:I,highestLevel:he}},_updateViewport:function(){for(this._needsDraw=!1,this._tilesLoading=0,this.loadingCoverage={};this.lastDrawn.length>0;){var I=this.lastDrawn.pop();I.beingDrawn=!1}var ne=this.viewport,he=this._viewportToTiledImageRectangle(ne.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var ce=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(he=he.intersection(ce),he===null)return}for(var Se=this._getLevelsInterval(),Pe=Se.lowestLevel,Xe=Se.highestLevel,tt=null,ht=!1,yt=i.now(),dt=Xe;dt>=Pe;dt--){var Tt=!1,xt=ne.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(dt),!0).x*this._scaleSpring.current.value;if(dt===Pe||!ht&&xt>=this.minPixelRatio)Tt=!0,ht=!0;else if(!ht)continue;var Nt=ne.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(dt),!1).x*this._scaleSpring.current.value,Mt=ne.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,Ht=this.immediateRender?1:Mt,Qt=Math.min(1,(xt-.5)/.5),wn=Ht/Math.abs(Ht-Nt);if(tt=s(this,ht,Tt,dt,Qt,wn,he,yt,tt),O(this.coverage,dt))break}$(this,this.lastDrawn),tt&&!tt.context2D?(v(this,tt,yt),this._needsDraw=!0,this._setFullyLoaded(!1)):this._setFullyLoaded(this._tilesLoading===0)},_getCornerTiles:function(I,ne,he){var ce,Se;this.wrapHorizontal?(ce=i.positiveModulo(ne.x,1),Se=i.positiveModulo(he.x,1)):(ce=Math.max(0,ne.x),Se=Math.min(1,he.x));var Pe,Xe,tt=1/this.source.aspectRatio;this.wrapVertical?(Pe=i.positiveModulo(ne.y,tt),Xe=i.positiveModulo(he.y,tt)):(Pe=Math.max(0,ne.y),Xe=Math.min(tt,he.y));var ht=this.source.getTileAtPoint(I,new i.Point(ce,Pe)),yt=this.source.getTileAtPoint(I,new i.Point(Se,Xe)),dt=this.source.getNumTiles(I);return this.wrapHorizontal&&(ht.x+=dt.x*Math.floor(ne.x),yt.x+=dt.x*Math.floor(he.x)),this.wrapVertical&&(ht.y+=dt.y*Math.floor(ne.y/tt),yt.y+=dt.y*Math.floor(he.y/tt)),{topLeft:ht,bottomRight:yt}}});function s(I,ne,he,ce,Se,Pe,Xe,tt,ht){var yt=Xe.getBoundingBox().getTopLeft(),dt=Xe.getBoundingBox().getBottomRight();I.viewer&&I.viewer.raiseEvent("update-level",{tiledImage:I,havedrawn:ne,level:ce,opacity:Se,visibility:Pe,drawArea:Xe,topleft:yt,bottomright:dt,currenttime:tt,best:ht}),W(I.coverage,ce),W(I.loadingCoverage,ce);var Tt=I._getCornerTiles(ce,yt,dt),xt=Tt.topLeft,Nt=Tt.bottomRight,Mt=I.source.getNumTiles(ce),Ht=I.viewport.pixelFromPoint(I.viewport.getCenter());I.getFlip()&&(Nt.x+=1,I.wrapHorizontal||(Nt.x=Math.min(Nt.x,Mt.x-1)));for(var Qt=xt.x;Qt<=Nt.x;Qt++)for(var wn=xt.y;wn<=Nt.y;wn++){var ft;if(I.getFlip()){var Gt=(Mt.x+Qt%Mt.x)%Mt.x;ft=Qt+Mt.x-Gt-Gt-1}else ft=Qt;Xe.intersection(I.getTileBounds(ce,ft,wn))!==null&&(ht=c(I,he,ne,ft,wn,ce,Se,Pe,Ht,Mt,tt,ht))}return ht}function c(I,ne,he,ce,Se,Pe,Xe,tt,ht,yt,dt,Tt){var xt=p(ce,Se,Pe,I,I.source,I.tilesMatrix,dt,yt,I._worldWidthCurrent,I._worldHeightCurrent),Nt=he;I.viewer&&I.viewer.raiseEvent("update-tile",{tiledImage:I,tile:xt}),H(I.coverage,Pe,ce,Se,!1);var Mt=xt.loaded||xt.loading||A(I.loadingCoverage,Pe,ce,Se);if(H(I.loadingCoverage,Pe,ce,Se,Mt),!xt.exists||(ne&&!Nt&&(A(I.coverage,Pe,ce,Se)?H(I.coverage,Pe,ce,Se,!0):Nt=!0),!Nt))return Tt;if(E(xt,I.source.tileOverlap,I.viewport,ht,tt,I),!xt.loaded)if(xt.context2D)b(I,xt);else{var Ht=I._tileCache.getImageRecord(xt.cacheKey);if(Ht){var Qt=Ht.getImage();b(I,xt,Qt)}}if(xt.loaded){var wn=S(I,xt,ce,Se,Pe,Xe,dt);wn&&(I._needsDraw=!0)}else xt.loading?I._tilesLoading++:Mt||(Tt=re(Tt,xt));return Tt}function p(I,ne,he,ce,Se,Pe,Xe,tt,ht,yt){var dt,Tt,xt,Nt,Mt,Ht,Qt,wn,ft;return Pe[he]||(Pe[he]={}),Pe[he][I]||(Pe[he][I]={}),(!Pe[he][I][ne]||!Pe[he][I][ne].flipped!=!ce.flipped)&&(dt=(tt.x+I%tt.x)%tt.x,Tt=(tt.y+ne%tt.y)%tt.y,xt=ce.getTileBounds(he,I,ne),Nt=Se.getTileBounds(he,dt,Tt,!0),Mt=Se.tileExists(he,dt,Tt),Ht=Se.getTileUrl(he,dt,Tt),ce.loadTilesWithAjax?(Qt=Se.getTileAjaxHeaders(he,dt,Tt),i.isPlainObject(ce.ajaxHeaders)&&(Qt=i.extend({},ce.ajaxHeaders,Qt))):Qt=null,wn=Se.getContext2D?Se.getContext2D(he,dt,Tt):void 0,ft=new i.Tile(he,I,ne,xt,Mt,Ht,wn,ce.loadTilesWithAjax,Qt,Nt),ce.getFlip()?dt===0&&(ft.isRightMost=!0):dt===tt.x-1&&(ft.isRightMost=!0),Tt===tt.y-1&&(ft.isBottomMost=!0),ft.flipped=ce.flipped,Pe[he][I][ne]=ft),ft=Pe[he][I][ne],ft.lastTouchTime=Xe,ft}function v(I,ne,he){ne.loading=!0,I._imageLoader.addJob({src:ne.url,loadWithAjax:ne.loadWithAjax,ajaxHeaders:ne.ajaxHeaders,crossOriginPolicy:I.crossOriginPolicy,ajaxWithCredentials:I.ajaxWithCredentials,callback:function(ce,Se,Pe){y(I,ne,he,ce,Se,Pe)},abort:function(){ne.loading=!1}})}function y(I,ne,he,ce,Se,Pe){if(!ce){i.console.log("Tile %s failed to load: %s - error: %s",ne,ne.url,Se),I.viewer.raiseEvent("tile-load-failed",{tile:ne,tiledImage:I,time:he,message:Se,tileRequest:Pe}),ne.loading=!1,ne.exists=!1;return}if(he<I.lastResetTime){i.console.log("Ignoring tile %s loaded before reset: %s",ne,ne.url),ne.loading=!1;return}var Xe=function(){var tt=I.source.getClosestLevel();b(I,ne,ce,tt,Pe)};I._midDraw?window.setTimeout(Xe,1):Xe()}function b(I,ne,he,ce,Se){var Pe=0;function Xe(){return Pe++,tt}function tt(){Pe--,Pe===0&&(ne.loading=!1,ne.loaded=!0,ne.context2D||I._tileCache.cacheTile({image:he,tile:ne,cutoff:ce,tiledImage:I}),I._needsDraw=!0)}I.viewer.raiseEvent("tile-loaded",{tile:ne,tiledImage:I,tileRequest:Se,image:he,getCompletionCallback:Xe}),Xe()()}function E(I,ne,he,ce,Se,Pe){var Xe=I.bounds.getTopLeft();Xe.x*=Pe._scaleSpring.current.value,Xe.y*=Pe._scaleSpring.current.value,Xe.x+=Pe._xSpring.current.value,Xe.y+=Pe._ySpring.current.value;var tt=I.bounds.getSize();tt.x*=Pe._scaleSpring.current.value,tt.y*=Pe._scaleSpring.current.value;var ht=he.pixelFromPointNoRotate(Xe,!0),yt=he.pixelFromPointNoRotate(Xe,!1),dt=he.deltaPixelsFromPointsNoRotate(tt,!0),Tt=he.deltaPixelsFromPointsNoRotate(tt,!1),xt=yt.plus(Tt.divide(2)),Nt=ce.squaredDistanceTo(xt);ne||(dt=dt.plus(new i.Point(1,1))),I.isRightMost&&Pe.wrapHorizontal&&(dt.x+=.75),I.isBottomMost&&Pe.wrapVertical&&(dt.y+=.75),I.position=ht,I.size=dt,I.squaredDistance=Nt,I.visibility=Se}function S(I,ne,he,ce,Se,Pe,Xe){var tt=1e3*I.blendTime,ht,yt;if(ne.blendStart||(ne.blendStart=Xe),ht=Xe-ne.blendStart,yt=tt?Math.min(1,ht/tt):1,I.alwaysBlend&&(yt*=Pe),ne.opacity=yt,I.lastDrawn.push(ne),yt===1)H(I.coverage,Se,he,ce,!0),I._hasOpaqueTile=!0;else if(ht<tt)return!0;return!1}function O(I,ne,he,ce){var Se,Pe,Xe,tt;if(!I[ne])return!1;if(he===void 0||ce===void 0){Se=I[ne];for(Xe in Se)if(Object.prototype.hasOwnProperty.call(Se,Xe)){Pe=Se[Xe];for(tt in Pe)if(Object.prototype.hasOwnProperty.call(Pe,tt)&&!Pe[tt])return!1}return!0}return I[ne][he]===void 0||I[ne][he][ce]===void 0||I[ne][he][ce]===!0}function A(I,ne,he,ce){return he===void 0||ce===void 0?O(I,ne+1):O(I,ne+1,2*he,2*ce)&&O(I,ne+1,2*he,2*ce+1)&&O(I,ne+1,2*he+1,2*ce)&&O(I,ne+1,2*he+1,2*ce+1)}function H(I,ne,he,ce,Se){if(!I[ne]){i.console.warn("Setting coverage for a tile before its level's coverage has been reset: %s",ne);return}I[ne][he]||(I[ne][he]={}),I[ne][he][ce]=Se}function W(I,ne){I[ne]={}}function re(I,ne){return!I||ne.visibility>I.visibility||ne.visibility===I.visibility&&ne.squaredDistance<I.squaredDistance?ne:I}function $(I,ne){if(!(I.opacity===0||ne.length===0&&!I.placeholderFillStyle)){var he=ne[0],ce;he&&(ce=I.opacity<1||I.compositeOperation&&I.compositeOperation!=="source-over"||!I._isBottomItem()&&he._hasTransparencyChannel());var Se,Pe,Xe=I.viewport.getZoom(!0),tt=I.viewportToImageZoom(Xe);ne.length>1&&tt>I.smoothTileEdgesMinZoom&&!I.iOSDevice&&I.getRotation(!0)%360===0&&i.supportsCanvas&&(ce=!0,Se=he.getScaleForEdgeSmoothing(),Pe=he.getTranslationForEdgeSmoothing(Se,I._drawer.getCanvasSize(!1),I._drawer.getCanvasSize(!0)));var ht;ce&&(Se||(ht=I.viewport.viewportToViewerElementRectangle(I.getClippedBounds(!0)).getIntegerBoundingBox(),I._drawer.viewer.viewport.getFlip()&&(I.viewport.degrees!==0||I.getRotation(!0)%360!==0)&&(ht.x=I._drawer.viewer.container.clientWidth-(ht.x+ht.width)),ht=ht.times(i.pixelDensityRatio)),I._drawer._clear(!0,ht)),Se||(I.viewport.degrees!==0&&I._drawer._offsetForRotation({degrees:I.viewport.degrees,useSketch:ce}),I.getRotation(!0)%360!==0&&I._drawer._offsetForRotation({degrees:I.getRotation(!0),point:I.viewport.pixelFromPointNoRotate(I._getRotationPoint(!0),!0),useSketch:ce}),I.viewport.degrees===0&&I.getRotation(!0)%360===0&&I._drawer.viewer.viewport.getFlip()&&I._drawer._flip());var yt=!1;if(I._clip){I._drawer.saveContext(ce);var dt=I.imageToViewportRectangle(I._clip,!0);dt=dt.rotate(-I.getRotation(!0),I._getRotationPoint(!0));var Tt=I._drawer.viewportToDrawerRectangle(dt);Se&&(Tt=Tt.times(Se)),Pe&&(Tt=Tt.translate(Pe)),I._drawer.setClip(Tt,ce),yt=!0}if(I._croppingPolygons){I._drawer.saveContext(ce);try{var xt=I._croppingPolygons.map(function(Qt){return Qt.map(function(wn){var ft=I.imageToViewportCoordinates(wn.x,wn.y,!0).rotate(-I.getRotation(!0),I._getRotationPoint(!0)),Gt=I._drawer.viewportCoordToDrawerCoord(ft);return Se&&(Gt=Gt.times(Se)),Gt})});I._drawer.clipWithPolygons(xt,ce)}catch(Qt){i.console.error(Qt)}yt=!0}if(I.placeholderFillStyle&&I._hasOpaqueTile===!1){var Nt=I._drawer.viewportToDrawerRectangle(I.getBounds(!0));Se&&(Nt=Nt.times(Se)),Pe&&(Nt=Nt.translate(Pe));var Mt=null;typeof I.placeholderFillStyle=="function"?Mt=I.placeholderFillStyle(I,I._drawer.context):Mt=I.placeholderFillStyle,I._drawer.drawRectangle(Nt,Mt,ce)}for(var Ht=ne.length-1;Ht>=0;Ht--)he=ne[Ht],I._drawer.drawTile(he,I._drawingHandler,ce,Se,Pe),he.beingDrawn=!0,I.viewer&&I.viewer.raiseEvent("tile-drawn",{tiledImage:I,tile:he});yt&&I._drawer.restoreContext(ce),Se||(I.getRotation(!0)%360!==0&&I._drawer._restoreRotationChanges(ce),I.viewport.degrees!==0&&I._drawer._restoreRotationChanges(ce)),ce&&(Se&&(I.viewport.degrees!==0&&I._drawer._offsetForRotation({degrees:I.viewport.degrees,useSketch:!1}),I.getRotation(!0)%360!==0&&I._drawer._offsetForRotation({degrees:I.getRotation(!0),point:I.viewport.pixelFromPointNoRotate(I._getRotationPoint(!0),!0),useSketch:!1})),I._drawer.blendSketch({opacity:I.opacity,scale:Se,translate:Pe,compositeOperation:I.compositeOperation,bounds:ht}),Se&&(I.getRotation(!0)%360!==0&&I._drawer._restoreRotationChanges(!1),I.viewport.degrees!==0&&I._drawer._restoreRotationChanges(!1))),Se||I.viewport.degrees===0&&I.getRotation(!0)%360===0&&I._drawer.viewer.viewport.getFlip()&&I._drawer._flip(),se(I,ne)}}function se(I,ne){if(I.debugMode)for(var he=ne.length-1;he>=0;he--){var ce=ne[he];try{I._drawer.drawDebugInfo(ce,ne.length,he,I)}catch(Se){i.console.error(Se)}}}}(u),function(i){var s=function(p){i.console.assert(p,"[TileCache.cacheTile] options is required"),i.console.assert(p.tile,"[TileCache.cacheTile] options.tile is required"),i.console.assert(p.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=p.tile,this.tiledImage=p.tiledImage},c=function(p){i.console.assert(p,"[ImageRecord] options is required"),i.console.assert(p.image,"[ImageRecord] options.image is required"),this._image=p.image,this._tiles=[]};c.prototype={destroy:function(){this._image=null,this._renderedContext=null,this._tiles=null},getImage:function(){return this._image},getRenderedContext:function(){if(!this._renderedContext){var p=document.createElement("canvas");p.width=this._image.width,p.height=this._image.height,this._renderedContext=p.getContext("2d"),this._renderedContext.drawImage(this._image,0,0),this._image=null}return this._renderedContext},setRenderedContext:function(p){i.console.error("ImageRecord.setRenderedContext is deprecated. The rendered context should be created by the ImageRecord itself when calling ImageRecord.getRenderedContext."),this._renderedContext=p},addTile:function(p){i.console.assert(p,"[ImageRecord.addTile] tile is required"),this._tiles.push(p)},removeTile:function(p){for(var v=0;v<this._tiles.length;v++)if(this._tiles[v]===p){this._tiles.splice(v,1);return}i.console.warn("[ImageRecord.removeTile] trying to remove unknown tile",p)},getTileCount:function(){return this._tiles.length}},i.TileCache=function(p){p=p||{},this._maxImageCacheCount=p.maxImageCacheCount||i.DEFAULT_SETTINGS.maxImageCacheCount,this._tilesLoaded=[],this._imagesLoaded=[],this._imagesLoadedCount=0},i.TileCache.prototype={numTilesLoaded:function(){return this._tilesLoaded.length},cacheTile:function(p){i.console.assert(p,"[TileCache.cacheTile] options is required"),i.console.assert(p.tile,"[TileCache.cacheTile] options.tile is required"),i.console.assert(p.tile.cacheKey,"[TileCache.cacheTile] options.tile.cacheKey is required"),i.console.assert(p.tiledImage,"[TileCache.cacheTile] options.tiledImage is required");var v=p.cutoff||0,y=this._tilesLoaded.length,b=this._imagesLoaded[p.tile.cacheKey];if(b||(i.console.assert(p.image,"[TileCache.cacheTile] options.image is required to create an ImageRecord"),b=this._imagesLoaded[p.tile.cacheKey]=new c({image:p.image}),this._imagesLoadedCount++),b.addTile(p.tile),p.tile.cacheImageRecord=b,this._imagesLoadedCount>this._maxImageCacheCount){for(var E=null,S=-1,O=null,A,H,W,re,$,se,I=this._tilesLoaded.length-1;I>=0;I--)if(se=this._tilesLoaded[I],A=se.tile,!(A.level<=v||A.beingDrawn)){if(!E){E=A,S=I,O=se;continue}re=A.lastTouchTime,H=E.lastTouchTime,$=A.level,W=E.level,(re<H||re===H&&$>W)&&(E=A,S=I,O=se)}E&&S>=0&&(this._unloadTile(O),y=S)}this._tilesLoaded[y]=new s({tile:p.tile,tiledImage:p.tiledImage})},clearTilesFor:function(p){i.console.assert(p,"[TileCache.clearTilesFor] tiledImage is required");for(var v,y=0;y<this._tilesLoaded.length;++y)v=this._tilesLoaded[y],v.tiledImage===p&&(this._unloadTile(v),this._tilesLoaded.splice(y,1),y--)},getImageRecord:function(p){return i.console.assert(p,"[TileCache.getImageRecord] cacheKey is required"),this._imagesLoaded[p]},_unloadTile:function(p){i.console.assert(p,"[TileCache._unloadTile] tileRecord is required");var v=p.tile,y=p.tiledImage;v.unload(),v.cacheImageRecord=null;var b=this._imagesLoaded[v.cacheKey];b.removeTile(v),b.getTileCount()||(b.destroy(),delete this._imagesLoaded[v.cacheKey],this._imagesLoadedCount--),y.viewer.raiseEvent("tile-unloaded",{tile:v,tiledImage:y})}}}(u),function(i){i.World=function(s){var c=this;i.console.assert(s.viewer,"[World] options.viewer is required"),i.EventSource.call(this),this.viewer=s.viewer,this._items=[],this._needsDraw=!1,this._autoRefigureSizes=!0,this._needsSizesFigured=!1,this._delegatedFigureSizes=function(p){c._autoRefigureSizes?c._figureSizes():c._needsSizesFigured=!0},this._figureSizes()},i.extend(i.World.prototype,i.EventSource.prototype,{addItem:function(s,c){if(i.console.assert(s,"[World.addItem] item is required"),i.console.assert(s instanceof i.TiledImage,"[World.addItem] only TiledImages supported at this time"),c=c||{},c.index!==void 0){var p=Math.max(0,Math.min(this._items.length,c.index));this._items.splice(p,0,s)}else this._items.push(s);this._autoRefigureSizes?this._figureSizes():this._needsSizesFigured=!0,this._needsDraw=!0,s.addHandler("bounds-change",this._delegatedFigureSizes),s.addHandler("clip-change",this._delegatedFigureSizes),this.raiseEvent("add-item",{item:s})},getItemAt:function(s){return i.console.assert(s!==void 0,"[World.getItemAt] index is required"),this._items[s]},getIndexOfItem:function(s){return i.console.assert(s,"[World.getIndexOfItem] item is required"),i.indexOf(this._items,s)},getItemCount:function(){return this._items.length},setItemIndex:function(s,c){i.console.assert(s,"[World.setItemIndex] item is required"),i.console.assert(c!==void 0,"[World.setItemIndex] index is required");var p=this.getIndexOfItem(s);if(c>=this._items.length)throw new Error("Index bigger than number of layers.");c===p||p===-1||(this._items.splice(p,1),this._items.splice(c,0,s),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:s,previousIndex:p,newIndex:c}))},removeItem:function(s){i.console.assert(s,"[World.removeItem] item is required");var c=i.indexOf(this._items,s);c!==-1&&(s.removeHandler("bounds-change",this._delegatedFigureSizes),s.removeHandler("clip-change",this._delegatedFigureSizes),s.destroy(),this._items.splice(c,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(s))},removeAll:function(){this.viewer._cancelPendingImages();var s,c;for(c=0;c<this._items.length;c++)s=this._items[c],s.removeHandler("bounds-change",this._delegatedFigureSizes),s.removeHandler("clip-change",this._delegatedFigureSizes),s.destroy();var p=this._items;for(this._items=[],this._figureSizes(),this._needsDraw=!0,c=0;c<p.length;c++)s=p[c],this._raiseRemoveItem(s)},resetItems:function(){for(var s=0;s<this._items.length;s++)this._items[s].reset()},update:function(){for(var s=!1,c=0;c<this._items.length;c++)s=this._items[c].update()||s;return s},draw:function(){for(var s=0;s<this._items.length;s++)this._items[s].draw();this._needsDraw=!1},needsDraw:function(){for(var s=0;s<this._items.length;s++)if(this._items[s].needsDraw())return!0;return this._needsDraw},getHomeBounds:function(){return this._homeBounds.clone()},getContentFactor:function(){return this._contentFactor},setAutoRefigureSizes:function(s){this._autoRefigureSizes=s,s&this._needsSizesFigured&&(this._figureSizes(),this._needsSizesFigured=!1)},arrange:function(s){s=s||{};var c=s.immediately||!1,p=s.layout||i.DEFAULT_SETTINGS.collectionLayout,v=s.rows||i.DEFAULT_SETTINGS.collectionRows,y=s.columns||i.DEFAULT_SETTINGS.collectionColumns,b=s.tileSize||i.DEFAULT_SETTINGS.collectionTileSize,E=s.tileMargin||i.DEFAULT_SETTINGS.collectionTileMargin,S=b+E,O;!s.rows&&y?O=y:O=Math.ceil(this._items.length/v);var A=0,H=0,W,re,$,se,I;this.setAutoRefigureSizes(!1);for(var ne=0;ne<this._items.length;ne++)ne&&ne%O===0&&(p==="horizontal"?(H+=S,A=0):(A+=S,H=0)),W=this._items[ne],re=W.getBounds(),re.width>re.height?$=b:$=b*(re.width/re.height),se=$*(re.height/re.width),I=new i.Point(A+(b-$)/2,H+(b-se)/2),W.setPosition(I,c),W.setWidth($,c),p==="horizontal"?A+=S:H+=S;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var s=this._homeBounds?this._homeBounds.clone():null,c=this._contentSize?this._contentSize.clone():null,p=this._contentFactor||0;if(!this._items.length)this._homeBounds=new i.Rect(0,0,1,1),this._contentSize=new i.Point(1,1),this._contentFactor=1;else{var v=this._items[0],y=v.getBounds();this._contentFactor=v.getContentSize().x/y.width;for(var b=v.getClippedBounds().getBoundingBox(),E=b.x,S=b.y,O=b.x+b.width,A=b.y+b.height,H=1;H<this._items.length;H++)v=this._items[H],y=v.getBounds(),this._contentFactor=Math.max(this._contentFactor,v.getContentSize().x/y.width),b=v.getClippedBounds().getBoundingBox(),E=Math.min(E,b.x),S=Math.min(S,b.y),O=Math.max(O,b.x+b.width),A=Math.max(A,b.y+b.height);this._homeBounds=new i.Rect(E,S,O-E,A-S),this._contentSize=new i.Point(this._homeBounds.width*this._contentFactor,this._homeBounds.height*this._contentFactor)}(this._contentFactor!==p||!this._homeBounds.equals(s)||!this._contentSize.equals(c))&&this.raiseEvent("metrics-change",{})},_raiseRemoveItem:function(s){this.raiseEvent("remove-item",{item:s})}})}(u)})(rP);var qi=rP.exports;const Xt="http://www.w3.org/2000/svg",Xm=a=>{const u=a.getAttribute("class");return u?new Set(u.split(" ")):new Set},Ti=(a,u)=>{const i=Xm(a);i.add(u),a.setAttribute("class",Array.from(i).join(" "))},gc=(a,u)=>{const i=Xm(a);i.delete(u),i.size===0?a.removeAttribute("class"):a.setAttribute("class",Array.from(i).join(" "))},Zm=(a,u)=>Xm(a).has(u),Yi=(a,u)=>{const i=a.selector("FragmentSelector");if(i!=null&&i.conformsTo.startsWith("http://www.w3.org/TR/media-frags")){const{value:s}=i,c=s.includes(":")?s.substring(s.indexOf("=")+1,s.indexOf(":")):"pixel",p=s.includes(":")?s.substring(s.indexOf(":")+1):s.substring(s.indexOf("=")+1);let[v,y,b,E]=p.split(",").map(parseFloat);return c.toLowerCase()==="percent"&&(v=v*u.naturalWidth/100,y=y*u.naturalHeight/100,b=b*u.naturalWidth/100,E=E*u.naturalHeight/100),{x:v,y,w:b,h:E}}},KY=(a,u,i,s,c)=>({source:c==null?void 0:c.src,selector:{type:"FragmentSelector",conformsTo:"http://www.w3.org/TR/media-frags/",value:`xywh=pixel:${a},${u},${i},${s}`}}),JY=(a,u,i,s,c)=>{const p=a/c.naturalWidth*100,v=u/c.naturalHeight*100,y=i/c.naturalWidth*100,b=s/c.naturalHeight*100;return{source:c.src,selector:{type:"FragmentSelector",conformsTo:"http://www.w3.org/TR/media-frags/",value:`xywh=percent:${p},${v},${y},${b}`}}},Ca=(a,u,i,s,c,p)=>(p==null?void 0:p.toLowerCase())==="percent"?JY(a,u,i,s,c):KY(a,u,i,s,c),vc=(a,u,i,s,c)=>{a.setAttribute("x",u),a.setAttribute("y",i),a.setAttribute("width",s),a.setAttribute("height",c)},yc=(a,u,i)=>{a.setAttribute("cx",u),a.setAttribute("cy",i),a.setAttribute("r",7)},iP=(a,u,i,s,c)=>{const p=document.createElementNS(Xt,"path");p.setAttribute("fill-rule","evenodd");const{naturalWidth:v,naturalHeight:y}=a;return p.setAttribute("d",`M0 0 h${v} v${y} h-${v} z M${u} ${i} h${s} v${c} h-${s} z`),p},oP=(a,u,i,s,c,p)=>{const{naturalWidth:v,naturalHeight:y}=u;a.setAttribute("d",`M0 0 h${v} v${y} h-${v} z M${i} ${s} h${c} v${p} h-${c} z`)},Km=(a,u,i,s)=>{const{x:c,y:p,w:v,h:y}=a.type==="Annotation"||a.type==="Selection"?Yi(a,u):{x:a,y:u,w:i,h:s},b=document.createElementNS(Xt,"g");if(v===0&&y===0){Ti(b,"a9s-point"),Ti(b,"a9s-non-scaling"),b.setAttribute("transform-origin",`${c} ${p}`);const E=document.createElementNS(Xt,"circle"),S=document.createElementNS(Xt,"circle");S.setAttribute("class","a9s-inner"),yc(S,c,p),E.setAttribute("class","a9s-outer"),yc(E,c,p),b.appendChild(E),b.appendChild(S)}else{const E=document.createElementNS(Xt,"rect"),S=document.createElementNS(Xt,"rect");S.setAttribute("class","a9s-inner"),vc(S,c,p,v,y),E.setAttribute("class","a9s-outer"),vc(E,c,p,v,y),b.appendChild(E),b.appendChild(S)}return b},Jm=a=>{const u=a.querySelector(".a9s-outer");if(u.nodeName==="rect"){const i=parseFloat(u.getAttribute("x")),s=parseFloat(u.getAttribute("y")),c=parseFloat(u.getAttribute("width")),p=parseFloat(u.getAttribute("height"));return{x:i,y:s,w:c,h:p}}else{const i=parseFloat(u.getAttribute("cx")),s=parseFloat(u.getAttribute("cy"));return{x:i,y:s,w:0,h:0}}},aP=(a,u,i,s,c)=>{const p=a.querySelector(".a9s-inner"),v=a.querySelector(".a9s-outer");v.nodeName==="rect"?(vc(p,u,i,s,c),vc(v,u,i,s,c)):(yc(p,u,i),yc(v,u,i))},QY=(a,u)=>{const{w:i,h:s}=Yi(a,u);return i*s};class $Y{constructor(u,i,s,c,p){o(this,"dragTo",(v,y)=>{this.group.style.display=null,this.opposite=[v,y];const{x:b,y:E,w:S,h:O}=this.bbox;oP(this.mask,this.env.image,b,E,S,O),aP(this.rect,b,E,S,O)}),o(this,"getBoundingClientRect",()=>this.rect.getBoundingClientRect()),o(this,"toSelection",()=>{const{x:v,y,w:b,h:E}=this.bbox;return new js(Ca(v,y,b,E,this.env.image,this.config.fragmentUnit))}),o(this,"destroy",()=>{this.group.parentNode.removeChild(this.group),this.mask=null,this.rect=null,this.group=null}),this.anchor=[u,i],this.opposite=[u,i],this.config=c,this.env=p,this.group=document.createElementNS(Xt,"g"),this.mask=iP(p.image,u,i,2,2),this.mask.setAttribute("class","a9s-selection-mask"),this.rect=Km(u,i,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),s.appendChild(this.group)}get bbox(){const u=this.opposite[0]-this.anchor[0],i=this.opposite[1]-this.anchor[1];return{x:u>0?this.anchor[0]:this.opposite[0],y:i>0?this.anchor[1]:this.opposite[1],w:Math.max(1,Math.abs(u)),h:Math.max(1,Math.abs(i))}}get element(){return this.rect}}const eX={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"},Qm=()=>"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,tX=a=>{let u=null;const i=(c,p)=>new MouseEvent(c,{screenX:p.screenX,screenY:p.screenY,clientX:p.clientX,clientY:p.clientY,pageX:p.pageX,pageY:p.pageY,bubbles:!0}),s=c=>{const p=c.changedTouches[0],v=i(eX[c.type],p);p.target.dispatchEvent(v),c.preventDefault(),(c.type==="touchstart"||c.type==="touchmove")&&(u&&clearTimeout(u),u=setTimeout(()=>{const y=i("dblclick",p);p.target.dispatchEvent(y)},800)),c.type==="touchend"&&u&&clearTimeout(u)};a.addEventListener("touchstart",s,!0),a.addEventListener("touchmove",s,!0),a.addEventListener("touchend",s,!0),a.addEventListener("touchcancel",s,!0)},wc="An implementation is missing",nX=Qm();class sP extends gu{constructor(u,i,s){super(),o(this,"enableResponsive",()=>{window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>{const p=this.svg.getBoundingClientRect(),{width:v,height:y}=this.svg.viewBox.baseVal;this.scale=Math.max(v/p.width,y/p.height),this.onScaleChanged&&this.onScaleChanged(this.scale)}),this.resizeObserver.observe(this.svg.parentNode))}),o(this,"getSVGPoint",p=>{const v=this.svg.createSVGPoint();if(nX){const y=this.svg.getBoundingClientRect(),b=p.clientX-y.x,E=p.clientY-y.y,{left:S,top:O}=this.svg.getBoundingClientRect();return v.x=b+S,v.y=E+O,v.matrixTransform(this.g.getScreenCTM().inverse())}else return v.x=p.offsetX,v.y=p.offsetY,v.matrixTransform(this.g.getCTM().inverse())}),o(this,"drawHandle",(p,v)=>{const y=document.createElementNS(Xt,"g");y.setAttribute("class","a9s-handle");const b=document.createElementNS(Xt,"g"),E=H=>{const W=document.createElementNS(Xt,"circle");return W.setAttribute("cx",p),W.setAttribute("cy",v),W.setAttribute("r",H),W.setAttribute("transform-origin",`${p} ${v}`),W},S=this.config.handleRadius||6,O=E(S);O.setAttribute("class","a9s-handle-inner");const A=E(S+1);return A.setAttribute("class","a9s-handle-outer"),b.appendChild(A),b.appendChild(O),y.appendChild(b),y}),o(this,"setHandleXY",(p,v,y)=>{const b=p.querySelector(".a9s-handle-inner");b.setAttribute("cx",v),b.setAttribute("cy",y),b.setAttribute("transform-origin",`${v} ${y}`);const E=p.querySelector(".a9s-handle-outer");E.setAttribute("cx",v),E.setAttribute("cy",y),E.setAttribute("transform-origin",`${v} ${y}`)}),o(this,"getHandleXY",p=>{const v=p.querySelector(".a9s-handle-outer");return{x:parseFloat(v.getAttribute("cx")),y:parseFloat(v.getAttribute("cy"))}}),o(this,"scaleHandle",p=>{const v=p.querySelector(".a9s-handle-inner"),y=p.querySelector(".a9s-handle-outer"),b=this.scale*(this.config.handleRadius||6);v.setAttribute("r",b),y.setAttribute("r",b)}),this.svg=u.closest("svg"),this.g=u,this.config=i,this.env=s,this.scale=1;const{image:c}=s;(c instanceof Element||c instanceof HTMLDocument)&&this.enableResponsive()}destroy(){this.resizeObserver&&this.resizeObserver.disconnect(),this.resizeObserver=null}}class $m extends sP{constructor(u,i,s){super(u,i,s),o(this,"attachListeners",({mouseMove:c,mouseUp:p,dblClick:v})=>{c&&(this.mouseMove=y=>{const{x:b,y:E}=this.getSVGPoint(y);this.started||(this.emit("startSelection",{x:b,y:E}),this.started=!0),c(b,E,y)},this.svg.addEventListener("mousemove",this.mouseMove)),p&&(this.mouseUp=y=>{if(y.button!==0)return;const{x:b,y:E}=this.getSVGPoint(y);p(b,E,y)},document.addEventListener("mouseup",this.mouseUp)),v&&(this.dblClick=y=>{const{x:b,y:E}=this.getSVGPoint(y);v(b,E,y)},document.addEventListener("dblclick",this.dblClick))}),o(this,"detachListeners",()=>{this.mouseMove&&this.svg.removeEventListener("mousemove",this.mouseMove),this.mouseUp&&document.removeEventListener("mouseup",this.mouseUp),this.dblClick&&document.removeEventListener("dblclick",this.dblClick)}),o(this,"start",(c,p)=>{const{x:v,y}=this.getSVGPoint(c);this.startDrawing(v,y,p,c)}),o(this,"startDrawing",c=>{throw new Error(wc)}),o(this,"createEditableShape",(c,p)=>{throw new Error(wc)}),this.started=!1}get isDrawing(){throw new Error(wc)}}$m.supports=a=>{throw new Error(wc)};const lP="An implementation is missing";class uP extends sP{constructor(u,i,s,c){super(i,s,c),o(this,"updateState",p=>{throw new Error(lP)}),this.annotation=u}get element(){throw new Error(lP)}}const rX=/firefox/i.test(navigator.userAgent),cP=(a,u,i,s,c)=>{a.setAttribute("width",s),a.setAttribute("height",c),rX?(a.setAttribute("x",0),a.setAttribute("y",0),a.setAttribute("transform",`translate(${u}, ${i})`)):(a.setAttribute("x",u),a.setAttribute("y",i))},iX=(a,u)=>{const{x:i,y:s,width:c,height:p}=u.getBBox(),v=document.createElementNS(Xt,"svg");v.setAttribute("class","a9s-formatter-el"),cP(v,i,s,c,p);const y=document.createElementNS(Xt,"g");y.appendChild(a),v.appendChild(y),u.append(v)},bc=(a,u,i)=>{if(!i)return a;const s=i.reduce((y,b)=>{const E=b(u);if(!E)return y;if(typeof E=="string"||E instanceof String)y.className=y.className?`${y.className} ${E}`:E;else if(E.nodeType===Node.ELEMENT_NODE)y.elements=y.elements?[...y.elements,E]:[E];else{const{className:S,style:O,element:A}=E;S&&(y.className=y.className?`${y.className} ${S}`:S),O&&(y.style=y.style?`${y.style} ${O}`:O),A&&(y.elements=y.elements?[...y.elements,A]:[A])}for(const S in E)E.hasOwnProperty(S)&&S.startsWith("data-")&&(y[S]=E[S]);return y},{}),{className:c,style:p,elements:v}=s;if(c&&Ti(a,c),p){const y=a.querySelector(".a9s-outer"),b=a.querySelector(".a9s-inner");y&&b?(y.setAttribute("style","display:none"),b.setAttribute("style",p)):a.setAttribute("style",p)}v&&v.forEach(y=>iX(y,a));for(const y in s)s.hasOwnProperty(y)&&y.startsWith("data-")&&a.setAttribute(y,s[y])},hP=(a,u,i,s,c)=>{const p=a.querySelector(".a9s-formatter-el");p&&cP(p,u,i,s,c)},Hs="corner",Ec="edge";class oX extends uP{constructor(u,i,s,c){super(u,i,s,c),o(this,"onScaleChanged",()=>this.handles.map(this.scaleHandle)),o(this,"setSize",(S,O,A,H)=>{aP(this.rectangle,S,O,A,H),oP(this.mask,this.env.image,S,O,A,H),hP(this.elementGroup,S,O,A,H);const[W,re,$,se,I,ne,he,ce]=this.handles;this.setHandleXY(W,S,O),this.setHandleXY(re,S+A,O),this.setHandleXY($,S+A,O+H),this.setHandleXY(se,S,O+H),this.enableEdgeControls&&(this.setHandleXY(I,S+A/2,O),this.setHandleXY(ne,S+A,O+H/2),this.setHandleXY(he,S+A/2,O+H),this.setHandleXY(ce,S,O+H/2))}),o(this,"stretchCorners",(S,O,A)=>{const H=this.getHandleXY(O),W=A.x-H.x,re=A.y-H.y,$=W>0?H.x:A.x,se=re>0?H.y:A.y,I=Math.abs(W),ne=Math.abs(re);return this.setSize($,se,I,ne),{x:$,y:se,w:I,h:ne}}),o(this,"stretchEdge",(S,O,A)=>{const H=this.getHandleXY(O),W=Jm(this.rectangle),re=S%2===0,$=re?W.w:A.x-H.x,se=re?A.y-H.y:W.h,I=re?W.x:$>0?H.x:A.x,ne=re?se>0?H.y:A.y:W.y,he=Math.abs($),ce=Math.abs(se);return this.setSize(I,ne,he,ce),{x:I,y:ne,w:he,h:ce}}),o(this,"onGrab",(S,O)=>A=>{if(A.button!==0)return;this.grabbedElem=S,this.grabbedType=O;const H=this.getSVGPoint(A),{x:W,y:re}=Jm(this.rectangle);this.mouseOffset={x:H.x-W,y:H.y-re}}),o(this,"onMouseMove",S=>{if(S.button!==0)return;const O=(A,H)=>A<0?0:A>H?H:A;if(this.grabbedElem){const A=this.getSVGPoint(S);if(this.grabbedElem===this.rectangle){const{w:H,h:W}=Jm(this.rectangle),{naturalWidth:re,naturalHeight:$}=this.env.image,se=O(A.x-this.mouseOffset.x,re-H),I=O(A.y-this.mouseOffset.y,$-W);this.setSize(se,I,H,W),this.emit("update",Ca(se,I,H,W,this.env.image,this.config.fragmentUnit))}else{const H=this.handles.indexOf(this.grabbedElem),W=this.handles[H^2],{x:re,y:$,w:se,h:I}=this.grabbedType===Hs?this.stretchCorners(H,W,A):this.stretchEdge(H,W,A);this.emit("update",Ca(re,$,se,I,this.env.image,this.config.fragmentUnit))}}}),o(this,"onMouseUp",S=>{this.grabbedElem=null,this.grabbedType=null,this.mouseOffset=null}),o(this,"updateState",S=>{const{x:O,y:A,w:H,h:W}=Yi(S,this.env.image);this.setSize(O,A,H,W)}),this.svg.addEventListener("mousemove",this.onMouseMove),this.svg.addEventListener("mouseup",this.onMouseUp);const{x:p,y:v,w:y,h:b}=Yi(u,c.image);this.containerGroup=document.createElementNS(Xt,"g"),this.mask=iP(c.image,p,v,y,b),this.mask.setAttribute("class","a9s-selection-mask"),this.containerGroup.appendChild(this.mask),this.elementGroup=document.createElementNS(Xt,"g"),this.elementGroup.setAttribute("class","a9s-annotation editable selected"),this.elementGroup.setAttribute("data-id",u.id),this.rectangle=Km(p,v,y,b),this.rectangle.querySelector(".a9s-inner").addEventListener("mousedown",this.onGrab(this.rectangle)),this.elementGroup.appendChild(this.rectangle),this.enableEdgeControls=s.enableEdgeControls;const E=this.enableEdgeControls?[[p+y/2,v,Ec],[p+y,v+b/2,Ec],[p+y/2,v+b,Ec],[p,v+b/2,Ec]]:[];this.handles=[[p,v,Hs],[p+y,v,Hs],[p+y,v+b,Hs],[p,v+b,Hs],...E].map(S=>{const[O,A,H]=S,W=this.drawHandle(O,A);return W.addEventListener("mousedown",this.onGrab(W,H)),this.elementGroup.appendChild(W),W}),this.containerGroup.appendChild(this.elementGroup),i.appendChild(this.containerGroup),bc(this.rectangle,u,s.formatters),this.grabbedElem=null,this.grabbedType=null,this.mouseOffset=null}get element(){return this.elementGroup}destroy(){this.containerGroup.parentNode.removeChild(this.containerGroup),super.destroy()}}class xc extends $m{constructor(u,i,s){super(u,i,s),o(this,"startDrawing",(c,p)=>{this.attachListeners({mouseMove:this.onMouseMove,mouseUp:this.onMouseUp}),this.rubberband=new $Y(c,p,this.g,this.config,this.env)}),o(this,"stop",()=>{this.rubberband&&(this.rubberband.destroy(),this.rubberband=null)}),o(this,"onMouseMove",(c,p)=>this.rubberband.dragTo(c,p)),o(this,"onMouseUp",()=>{this.detachListeners(),this.started=!1;const{width:c,height:p}=this.rubberband.getBoundingClientRect(),v=this.config.minSelectionWidth||4,y=this.config.minSelectionHeight||4;if(c>=v&&p>=y){const{element:b}=this.rubberband;b.annotation=this.rubberband.toSelection(),this.emit("complete",b)}else this.emit("cancel");this.stop()}),o(this,"createEditableShape",(c,p)=>new oX(c,this.g,{...this.config,formatters:p},this.env)),this.rubberband=null}get isDrawing(){return this.rubberband!=null}}xc.identifier="rect",xc.supports=a=>{const u=a.selector("FragmentSelector");return u==null?void 0:u.conformsTo.startsWith("http://www.w3.org/TR/media-frags")};const Sc=a=>{let u=0,i=a.length-1;for(let s=0;s<a.length;s++)u+=(a[i][0]+a[s][0])*(a[i][1]-a[s][1]),i=s;return Math.abs(.5*u)},aX=(a,u,i,s)=>{const c=a[0]-u,p=a[1]-i;return Math.sqrt(c*c+p*p)<=s},sX=(a,u,i,s,c,p)=>{const y=Math.cos(0),b=Math.sin(0),E=a[0]-u,S=a[1]-i,O=y*E+b*S,A=b*E-y*S;return O*O/(s*s)+A*A/(c*c)<=1},eg=(a,u)=>{const i=a[0],s=a[1];let c=!1;for(let p=0,v=u.length-1;p<u.length;v=p++){const y=u[p][0],b=u[p][1],E=u[v][0],S=u[v][1];b>s!=S>s&&i<(E-y)*(s-b)/(S-b)+y&&(c=!c)}return c},lX=(a,u)=>{for(let i of a)if(!eg(i,u))return!1;return!0},uX=(a,u,i,s,c,p)=>{const v=a[0],y=a[1],b=s-u,E=c-i,S=Math.sqrt(b*b+E*E);return Math.abs((v-u)*E-(y-i)*b)/S<=p},dP=a=>{const u=a.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map(c=>c.trim()),i=[];let s=[];for(let c of u){const p=c.substring(0,1);if(p.toLowerCase()==="z")i.push([...s]),s=[];else{const v=c.substring(1).split(" ").map(S=>parseFloat(S.trim())),y=p===p.toUpperCase(),b=y?v[0]:v[0]+s[s.length-1][0],E=y?v[1]:v[1]+s[s.length-1][1];s.push([b,E])}}return s.length>0&&i.push([...s]),i},cX=a=>{const u=new XMLSerializer().serializeToString(a.documentElement).replace("<svg>",`<svg xmlns="${Xt}">`);return new DOMParser().parseFromString(u,"image/svg+xml").documentElement},fP=a=>{const u=s=>{Array.from(s.attributes).forEach(c=>{c.name.startsWith("on")&&s.removeAttribute(c.name)})},i=a.getElementsByTagName("script");return Array.from(i).reverse().forEach(s=>s.parentNode.removeChild(s)),u(a),Array.from(a.querySelectorAll("*")).forEach(u),a},Ro=a=>{const u=a.selector("SvgSelector");if(u){const i=new DOMParser,{value:s}=u,c=i.parseFromString(s,"image/svg+xml"),p=c.lookupPrefix(Xt),v=c.lookupNamespaceURI(null);return p||v?fP(c).firstChild:fP(cX(c)).firstChild}},pP=a=>{const u=Ro(a),i=document.createElementNS(Xt,"g"),s=u.cloneNode(!0);s.setAttribute("class","a9s-inner");const c=u.cloneNode(!0);return c.setAttribute("class","a9s-outer"),i.appendChild(c),i.appendChild(s),i},tg=(a,u)=>{const i=a.querySelector(".a9s-inner").cloneNode(!0);i.removeAttribute("class"),i.removeAttribute("xmlns");let s=i.outerHTML||new XMLSerializer().serializeToString(i);return s=s.replace(` xmlns="${Xt}"`,""),{source:u==null?void 0:u.src,selector:{type:"SvgSelector",value:`<svg>${s}</svg>`}}},hX=a=>{const u=Ro(a),i=u.nodeName.toLowerCase();if(i==="polygon")return dX(u);if(i==="circle")return fX(u);if(i==="ellipse")return pX(u);if(i=="path")return mX(u);if(i=="line")return 0;throw`Unsupported SVG shape type: ${i}`},dX=a=>{const u=a.getAttribute("points").trim().split(" ").map(i=>i.split(",").map(s=>parseFloat(s.trim())));return Sc(u)},fX=a=>{const u=a.getAttribute("r");return u*u*Math.PI},pX=a=>{const u=a.getAttribute("rx"),i=a.getAttribute("ry");return u*i*Math.PI},mX=a=>{const u=dP(a);if(u.length==1)return Sc(u[0]);{const i=c=>u.find(p=>{if(c!==p)return lX(c,p)});let s=0;for(let c of u)i(c)?s-=Sc(c):s+=Sc(c);return s}};class mP{constructor(u,i){o(this,"redraw",()=>{this.mask.setAttribute("d",`M0 0 h${this.w} v${this.h} h-${this.w} z M${this.polygon.getAttribute("points")} z`)}),o(this,"destroy",()=>this.mask.parentNode.removeChild(this.mask)),this.w=u.naturalWidth,this.h=u.naturalHeight,this.polygon=i,this.mask=document.createElementNS(Xt,"path"),this.mask.setAttribute("fill-rule","evenodd"),this.mask.setAttribute("class","a9s-selection-mask"),this.mask.setAttribute("d",`M0 0 h${this.w} v${this.h} h-${this.w} z M${this.polygon.getAttribute("points")} z`)}get element(){return this.mask}}class gX{constructor(u,i,s){o(this,"setPoints",c=>{const p=c.map(v=>`${v[0]},${v[1]}`).join(" ");this.outer.setAttribute("points",p),this.inner.setAttribute("points",p)}),o(this,"getBoundingClientRect",()=>this.outer.getBoundingClientRect()),o(this,"dragTo",c=>{this.group.style.display=null,this.mousepos=c;const p=[...this.points,c];this.setPoints(p),this.mask.redraw()}),o(this,"addPoint",()=>{const[c,p]=this.mousepos,v=this.points[this.points.length-1];Math.pow(c-v[0],2)+Math.pow(p-v[1],2)>4&&(this.points=[...this.points,this.mousepos],this.setPoints(this.points),this.mask.redraw())}),o(this,"destroy",()=>{this.group.parentNode.removeChild(this.group),this.polygon=null,this.group=null}),o(this,"toSelection",()=>new js(tg(this.group,this.env.image))),this.points=[u],this.env=s,this.mousepos=u,this.group=document.createElementNS(Xt,"g"),this.polygon=document.createElementNS(Xt,"g"),this.polygon.setAttribute("class","a9s-selection"),this.outer=document.createElementNS(Xt,"polygon"),this.outer.setAttribute("class","a9s-outer"),this.inner=document.createElementNS(Xt,"polygon"),this.inner.setAttribute("class","a9s-inner"),this.setPoints(this.points),this.mask=new mP(s.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),i.appendChild(this.group)}get element(){return this.polygon}}const ng=a=>{const u=a.querySelector(".a9s-inner").points,i=[];for(let s=0;s<u.numberOfItems;s++)i.push(u.getItem(s));return i},vX=a=>a.querySelector(".a9s-inner").getBBox();class yX extends uP{constructor(u,i,s,c){super(u,i,s,c),o(this,"onScaleChanged",()=>this.handles.map(this.scaleHandle)),o(this,"setPoints",p=>{const v=H=>Math.round(10*H)/10,y=p.map(H=>`${v(H.x)},${v(H.y)}`).join(" ");this.shape.querySelector(".a9s-inner").setAttribute("points",y);const b=this.shape.querySelector(".a9s-outer");b.setAttribute("points",y),this.mask.redraw();const{x:E,y:S,width:O,height:A}=b.getBBox();hP(this.elementGroup,E,S,O,A)}),o(this,"onGrab",p=>v=>{v.button===0&&(this.grabbedElem=p,this.grabbedAt=this.getSVGPoint(v))}),o(this,"onMouseMove",p=>{const v=(y,b,E)=>y+b<0?-y:y+b>E?E-y:b;if(this.grabbedElem){const y=this.getSVGPoint(p);if(this.grabbedElem===this.shape){const{x:b,y:E,width:S,height:O}=vX(this.shape),{naturalWidth:A,naturalHeight:H}=this.env.image,W=v(b,y.x-this.grabbedAt.x,A-S),re=v(E,y.y-this.grabbedAt.y,H-O),$=ng(this.shape).map(se=>({x:se.x+W,y:se.y+re}));this.grabbedAt=y,this.setPoints($),$.forEach((se,I)=>this.setHandleXY(this.handles[I],se.x,se.y)),this.emit("update",tg(this.shape,this.env.image))}else{const b=this.handles.indexOf(this.grabbedElem),E=ng(this.shape).map((S,O)=>O===b?y:S);this.setPoints(E),this.setHandleXY(this.handles[b],y.x,y.y),this.emit("update",tg(this.shape,this.env.image))}}}),o(this,"onMouseUp",p=>{this.grabbedElem=null,this.grabbedAt=null}),o(this,"updateState",p=>{const v=Ro(p).getAttribute("points").split(" ").map(y=>{const[b,E]=y.split(",").map(S=>parseFloat(S.trim()));return{x:b,y:E}});this.setPoints(v),v.forEach((y,b)=>this.setHandleXY(this.handles[b],y.x,y.y))}),o(this,"destroy",()=>{this.containerGroup.parentNode.removeChild(this.containerGroup),super.destroy()}),this.svg.addEventListener("mousemove",this.onMouseMove),this.svg.addEventListener("mouseup",this.onMouseUp),this.containerGroup=document.createElementNS(Xt,"g"),this.shape=pP(u),this.shape.querySelector(".a9s-inner").addEventListener("mousedown",this.onGrab(this.shape)),this.mask=new mP(c.image,this.shape.querySelector(".a9s-inner")),this.containerGroup.appendChild(this.mask.element),this.elementGroup=document.createElementNS(Xt,"g"),this.elementGroup.setAttribute("class","a9s-annotation editable selected"),this.elementGroup.setAttribute("data-id",u.id),this.elementGroup.appendChild(this.shape),this.handles=ng(this.shape).map(p=>{const v=this.drawHandle(p.x,p.y);return v.addEventListener("mousedown",this.onGrab(v)),this.elementGroup.appendChild(v),v}),this.containerGroup.appendChild(this.elementGroup),i.appendChild(this.containerGroup),bc(this.shape,u,s.formatters),this.grabbedElem=null,this.grabbedAt=null}get element(){return this.elementGroup}}class rg extends $m{constructor(u,i,s){super(u,i,s),o(this,"startDrawing",(c,p,v)=>{this._isDrawing=!0,this._startOnSingleClick=v,this.attachListeners({mouseMove:this.onMouseMove,mouseUp:this.onMouseUp,dblClick:this.onDblClick}),this.rubberband=new gX([c,p],this.g,this.env)}),o(this,"stop",()=>{this.detachListeners(),this._isDrawing=!1,this.rubberband&&(this.rubberband.destroy(),this.rubberband=null)}),o(this,"onMouseMove",(c,p)=>this.rubberband.dragTo([c,p])),o(this,"onMouseUp",()=>{const{width:c,height:p}=this.rubberband.getBoundingClientRect(),v=this.config.minSelectionWidth||4,y=this.config.minSelectionHeight||4;c>=v||p>=y?this.rubberband.addPoint():this._startOnSingleClick||(this.emit("cancel"),this.stop())}),o(this,"onDblClick",()=>{this._isDrawing=!1;const c=this.rubberband.element;c.annotation=this.rubberband.toSelection(),this.emit("complete",c),this.stop()}),o(this,"createEditableShape",(c,p)=>new yX(c,this.g,{...this.config,formatters:p},this.env)),this._isDrawing=!1,this._startOnSingleClick=!1}get isDrawing(){return this._isDrawing}}rg.identifier="polygon",rg.supports=a=>{var u;const i=a.selector("SvgSelector");if(i)return(u=i.value)==null?void 0:u.match(/^<svg.*<polygon/g)};class wX extends gu{constructor(u,i,s){super(),o(this,"listTools",()=>this._registered.map(c=>c.identifier)),o(this,"registerTool",c=>{const p=c.identifier;this.listTools().includes(p)&&this.unregisterTool(p),this._registered.unshift(c)}),o(this,"unregisterTool",c=>this._registered=this._registered.filter(p=>p.identifier!==c)),o(this,"setCurrent",c=>{this._current&&this._current.destroy();const p=typeof c=="string"||c instanceof String?this._registered.find(v=>v.identifier===c):c;this._current=new p(this._g,this._config,this._env),this._current.on("startSelection",v=>this.emit("startSelection",v)),this._current.on("complete",v=>this.emit("complete",v)),this._current.on("cancel",v=>this.emit("cancel",v))}),o(this,"forAnnotation",c=>{var p;const[v,...y]=c.targets,b=(p=v.renderedVia)==null?void 0:p.name,E=b?this._registered.find(S=>S.identifier===b):this._registered.find(S=>S.supports(c));return E?new E(this._g,this._config,this._env):null}),this._g=u,this._config=i,this._env=s,this._registered=[xc,rg],this.setCurrent(xc)}get current(){return this._current}}const bX={FragmentSelector:Km,SvgSelector:pP},EX={FragmentSelector:QY,SvgSelector:hX},gP=a=>{const u=a.targets[0];if(u)return Array.isArray(u.selector)?u.selector[0]:u.selector},ig=(a,u)=>bX[gP(a).type](a,u),vP=(a,u)=>EX[gP(a).type](a,u);class xX{constructor(u){const i=document.createElementNS(Xt,"svg");i.setAttribute("class","a9s-osd-crosshair-container");const s=document.createElementNS(Xt,"g");s.setAttribute("class","a9s-crosshair"),i.appendChild(s);const c=document.createElementNS(Xt,"line"),p=document.createElementNS(Xt,"line");s.appendChild(c),s.appendChild(p),u.parentElement.appendChild(i);const v=y=>{const{offsetX:b,offsetY:E}=y,S=u.parentElement.offsetWidth,O=u.parentElement.offsetHeight;c.setAttribute("x1",0),c.setAttribute("y1",E),c.setAttribute("x2",S),c.setAttribute("y2",E),p.setAttribute("x1",b),p.setAttribute("y1",0),p.setAttribute("x2",b),p.setAttribute("y2",O)};u.addEventListener("pointermove",v),u.parentElement.addEventListener("pointermove",v)}}function SX(a,u,i,s,c){yP(a,u,i||0,s||a.length-1,c||TX)}function yP(a,u,i,s,c){for(;s>i;){if(s-i>600){var p=s-i+1,v=u-i+1,y=Math.log(p),b=.5*Math.exp(2*y/3),E=.5*Math.sqrt(y*b*(p-b)/p)*(v-p/2<0?-1:1),S=Math.max(i,Math.floor(u-v*b/p+E)),O=Math.min(s,Math.floor(u+(p-v)*b/p+E));yP(a,u,S,O,c)}var A=a[u],H=i,W=s;for(zs(a,i,u),c(a[s],A)>0&&zs(a,i,s);H<W;){for(zs(a,H,W),H++,W--;c(a[H],A)<0;)H++;for(;c(a[W],A)>0;)W--}c(a[i],A)===0?zs(a,i,W):(W++,zs(a,W,s)),W<=u&&(i=W+1),u<=W&&(s=W-1)}}function zs(a,u,i){var s=a[u];a[u]=a[i],a[i]=s}function TX(a,u){return a<u?-1:a>u?1:0}class _X{constructor(u=9){this._maxEntries=Math.max(4,u),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(u){let i=this.data;const s=[];if(!_c(u,i))return s;const c=this.toBBox,p=[];for(;i;){for(let v=0;v<i.children.length;v++){const y=i.children[v],b=i.leaf?c(y):y;_c(u,b)&&(i.leaf?s.push(y):ag(u,b)?this._all(y,s):p.push(y))}i=p.pop()}return s}collides(u){let i=this.data;if(!_c(u,i))return!1;const s=[];for(;i;){for(let c=0;c<i.children.length;c++){const p=i.children[c],v=i.leaf?this.toBBox(p):p;if(_c(u,v)){if(i.leaf||ag(u,v))return!0;s.push(p)}}i=s.pop()}return!1}load(u){if(!(u&&u.length))return this;if(u.length<this._minEntries){for(let s=0;s<u.length;s++)this.insert(u[s]);return this}let i=this._build(u.slice(),0,u.length-1,0);if(!this.data.children.length)this.data=i;else if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){const s=this.data;this.data=i,i=s}this._insert(i,this.data.height-i.height-1,!0)}return this}insert(u){return u&&this._insert(u,this.data.height-1),this}clear(){return this.data=Ra([]),this}remove(u,i){if(!u)return this;let s=this.data;const c=this.toBBox(u),p=[],v=[];let y,b,E;for(;s||p.length;){if(s||(s=p.pop(),b=p[p.length-1],y=v.pop(),E=!0),s.leaf){const S=CX(u,s.children,i);if(S!==-1)return s.children.splice(S,1),p.push(s),this._condense(p),this}!E&&!s.leaf&&ag(s,c)?(p.push(s),v.push(y),y=0,b=s,s=s.children[0]):b?(y++,s=b.children[y],E=!1):s=null}return this}toBBox(u){return u}compareMinX(u,i){return u.minX-i.minX}compareMinY(u,i){return u.minY-i.minY}toJSON(){return this.data}fromJSON(u){return this.data=u,this}_all(u,i){const s=[];for(;u;)u.leaf?i.push(...u.children):s.push(...u.children),u=s.pop();return i}_build(u,i,s,c){const p=s-i+1;let v=this._maxEntries,y;if(p<=v)return y=Ra(u.slice(i,s+1)),Pa(y,this.toBBox),y;c||(c=Math.ceil(Math.log(p)/Math.log(v)),v=Math.ceil(p/Math.pow(v,c-1))),y=Ra([]),y.leaf=!1,y.height=c;const b=Math.ceil(p/v),E=b*Math.ceil(Math.sqrt(v));wP(u,i,s,E,this.compareMinX);for(let S=i;S<=s;S+=E){const O=Math.min(S+E-1,s);wP(u,S,O,b,this.compareMinY);for(let A=S;A<=O;A+=b){const H=Math.min(A+b-1,O);y.children.push(this._build(u,A,H,c-1))}}return Pa(y,this.toBBox),y}_chooseSubtree(u,i,s,c){for(;c.push(i),!(i.leaf||c.length-1===s);){let p=1/0,v=1/0,y;for(let b=0;b<i.children.length;b++){const E=i.children[b],S=og(E),O=OX(u,E)-S;O<v?(v=O,p=S<p?S:p,y=E):O===v&&S<p&&(p=S,y=E)}i=y||i.children[0]}return i}_insert(u,i,s){const c=s?u:this.toBBox(u),p=[],v=this._chooseSubtree(c,this.data,i,p);for(v.children.push(u),Us(v,c);i>=0&&p[i].children.length>this._maxEntries;)this._split(p,i),i--;this._adjustParentBBoxes(c,p,i)}_split(u,i){const s=u[i],c=s.children.length,p=this._minEntries;this._chooseSplitAxis(s,p,c);const v=this._chooseSplitIndex(s,p,c),y=Ra(s.children.splice(v,s.children.length-v));y.height=s.height,y.leaf=s.leaf,Pa(s,this.toBBox),Pa(y,this.toBBox),i?u[i-1].children.push(y):this._splitRoot(s,y)}_splitRoot(u,i){this.data=Ra([u,i]),this.data.height=u.height+1,this.data.leaf=!1,Pa(this.data,this.toBBox)}_chooseSplitIndex(u,i,s){let c,p=1/0,v=1/0;for(let y=i;y<=s-i;y++){const b=Vs(u,0,y,this.toBBox),E=Vs(u,y,s,this.toBBox),S=kX(b,E),O=og(b)+og(E);S<p?(p=S,c=y,v=O<v?O:v):S===p&&O<v&&(v=O,c=y)}return c||s-i}_chooseSplitAxis(u,i,s){const c=u.leaf?this.compareMinX:PX,p=u.leaf?this.compareMinY:RX,v=this._allDistMargin(u,i,s,c),y=this._allDistMargin(u,i,s,p);v<y&&u.children.sort(c)}_allDistMargin(u,i,s,c){u.children.sort(c);const p=this.toBBox,v=Vs(u,0,i,p),y=Vs(u,s-i,s,p);let b=Tc(v)+Tc(y);for(let E=i;E<s-i;E++){const S=u.children[E];Us(v,u.leaf?p(S):S),b+=Tc(v)}for(let E=s-i-1;E>=i;E--){const S=u.children[E];Us(y,u.leaf?p(S):S),b+=Tc(y)}return b}_adjustParentBBoxes(u,i,s){for(let c=s;c>=0;c--)Us(i[c],u)}_condense(u){for(let i=u.length-1,s;i>=0;i--)u[i].children.length===0?i>0?(s=u[i-1].children,s.splice(s.indexOf(u[i]),1)):this.clear():Pa(u[i],this.toBBox)}}function CX(a,u,i){if(!i)return u.indexOf(a);for(let s=0;s<u.length;s++)if(i(a,u[s]))return s;return-1}function Pa(a,u){Vs(a,0,a.children.length,u,a)}function Vs(a,u,i,s,c){c||(c=Ra(null)),c.minX=1/0,c.minY=1/0,c.maxX=-1/0,c.maxY=-1/0;for(let p=u;p<i;p++){const v=a.children[p];Us(c,a.leaf?s(v):v)}return c}function Us(a,u){return a.minX=Math.min(a.minX,u.minX),a.minY=Math.min(a.minY,u.minY),a.maxX=Math.max(a.maxX,u.maxX),a.maxY=Math.max(a.maxY,u.maxY),a}function PX(a,u){return a.minX-u.minX}function RX(a,u){return a.minY-u.minY}function og(a){return(a.maxX-a.minX)*(a.maxY-a.minY)}function Tc(a){return a.maxX-a.minX+(a.maxY-a.minY)}function OX(a,u){return(Math.max(u.maxX,a.maxX)-Math.min(u.minX,a.minX))*(Math.max(u.maxY,a.maxY)-Math.min(u.minY,a.minY))}function kX(a,u){const i=Math.max(a.minX,u.minX),s=Math.max(a.minY,u.minY),c=Math.min(a.maxX,u.maxX),p=Math.min(a.maxY,u.maxY);return Math.max(0,c-i)*Math.max(0,p-s)}function ag(a,u){return a.minX<=u.minX&&a.minY<=u.minY&&u.maxX<=a.maxX&&u.maxY<=a.maxY}function _c(a,u){return u.minX<=a.maxX&&u.minY<=a.maxY&&u.maxX>=a.minX&&u.maxY>=a.minY}function Ra(a){return{children:a,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function wP(a,u,i,s,c){const p=[u,i];for(;p.length;){if(i=p.pop(),u=p.pop(),i-u<=s)continue;const v=u+Math.ceil((i-u)/s/2)*s;SX(a,v,u,i,c),p.push(u,v,v,i)}}const sg=(a,u)=>{if(a.targets[0].selector.type==="FragmentSelector"){const{x:i,y:s,w:c,h:p}=Yi(a);return{minX:i,minY:s,maxX:i+c,maxY:s+p}}else{const i=ig(a,u),s=document.createElementNS(Xt,"svg");s.style.position="absolute",s.style.opacity=0,s.style.top=0,s.style.left=0,s.appendChild(i),document.body.appendChild(s);const{x:c,y:p,width:v,height:y}=i.getBBox();return document.body.removeChild(s),{minX:c,minY:p,maxX:c+v,maxY:p+y}}},AX=a=>{var u;const i=a.targets[0];return Array.isArray(i.selector)?i.selector[0].type:(u=i.selector)==null?void 0:u.type},DX=(a,u,i,s)=>{const c=Ro(i),p=c.nodeName.toLowerCase(),v=[a,u];if(p==="polygon"){const y=Array.from(c.points).map(b=>[b.x,b.y]);return eg(v,y)}else if(p==="circle"){const y=c.getAttribute("cx"),b=c.getAttribute("cy"),E=c.getAttribute("r");return aX(v,y,b,E)}else if(p==="ellipse"){const y=c.getAttribute("cx"),b=c.getAttribute("cy"),E=c.getAttribute("rx"),S=c.getAttribute("ry");return sX(v,y,b,E,S)}else{if(p==="path")return dP(c).find(y=>eg(v,y));if(p==="line"){const y=parseInt(c.getAttribute("x1")),b=parseInt(c.getAttribute("y1")),E=parseInt(c.getAttribute("x2")),S=parseInt(c.getAttribute("y2"));return uX(v,y,b,E,S,s)}else throw`Unsupported SVG shape type: ${p}`}};class IX{constructor(u){o(this,"clear",()=>this.spatial_index.clear()),o(this,"getAnnotationAt",(i,s,c)=>{const p=c?5/c:5,v=this.spatial_index.search({minX:i-p,minY:s-p,maxX:i+p,maxY:s+p}).map(y=>y.annotation).filter(y=>{const b=AX(y);if(b==="FragmentSelector")return!0;if(b==="SvgSelector")return DX(i,s,y,p);throw`Unsupported selector type: ${b}`});if(v.length>0)return v.sort((y,b)=>vP(y,this.env.image)-vP(b,this.env.image)),v[0]}),o(this,"getAnnotationsIntersecting",i=>{const s=i.minX,c=s?i:sg(i,this.env.image),p=this.spatial_index.search(c).map(v=>v.annotation);return s?p:p.filter(v=>!v.isEqual(i))}),o(this,"insert",i=>{(Array.isArray(i)?i:[i]).forEach(s=>{this.spatial_index.insert({...sg(s,this.env.image),annotation:s})})}),o(this,"getBounds",i=>this.getBounds(i,this.env.image)),o(this,"remove",i=>{const s={...sg(i,this.env.image),annotation:i};this.spatial_index.remove(s,(c,p)=>c.annotation.id===p.annotation.id)}),this.env=u,u.store=this,this.spatial_index=new _X}}const bP=(a,u)=>{const i=(Zm(u,".a9s-annotation")?u:u.closest(".a9s-annotation")).querySelector(".a9s-outer").getBoundingClientRect(),{canvas:s}=a.drawer,c=s.getBoundingClientRect(),p=s.width/c.width,v=s.height/c.height,y=i.x-c.x,b=i.y-c.y,{width:E,height:S}=i,O=document.createElement("CANVAS"),A=O.getContext("2d");O.width=E,O.height=S,A.drawImage(s,y*p,b*v,E*p,S*v,0,0,E,S);const H=a.viewport.viewerElementToImageCoordinates(new OpenSeadragon.Point(y,b)),W=a.viewport.viewportToImageZoom(a.viewport.getZoom());return{snippet:O,transform:re=>{const $=H.x+re[0]/p/W,se=H.y+re[1]/v/W;return[$,se]}}},MX=Qm();class EP extends gu{constructor(u){super(),o(this,"_getShapeAt",s=>{const c=b=>{const E=this.svg.createSVGPoint();if(window.TouchEvent&&b instanceof TouchEvent){const S=this.svg.getBoundingClientRect(),O=b.touches[0],A=O.clientX-S.x,H=O.clientY-S.y,{left:W,top:re}=this.svg.getBoundingClientRect();return E.x=A+W,E.y=H+re,E.matrixTransform(this.g.getScreenCTM().inverse())}else return E.x=b.offsetX,E.y=b.offsetY,E.matrixTransform(this.g.getCTM().inverse())},{x:p,y:v}=c(s),y=this.store.getAnnotationAt(p,v,this.currentScale());if(y)return this.findShape(y)}),o(this,"_initDrawingTools",s=>{var c;let p=!1,v=!1,y=!1;this.tools=new wX(this.g,this.config,this.env),this.tools.on("complete",S=>{v=!1,this.onDrawingComplete(S)}),this.mouseTracker=new qi.MouseTracker({element:this.svg,preProcessEventHandler:S=>{this.mouseTracker.enabled||(S.preventDefault=!1,S.preventGesture=!0),this.selectedShape&&S.eventType==="wheel"&&(S.preventDefault=!1,this.viewer.canvas.dispatchEvent(new S.originalEvent.constructor(S.eventType,S.originalEvent)))},pressHandler:S=>{this.tools.current.isDrawing||(this.tools.current.start(S.originalEvent,this.drawOnSingleClick&&!this.hoveredShape),s||this.scaleTool(this.tools.current))},moveHandler:S=>{if(this.tools.current.isDrawing){const{x:O,y:A}=this.tools.current.getSVGPoint(S.originalEvent);!S.buttons||!v?(S.originalEvent.stopPropagation(),this.tools.current.onMouseMove(O,A,S.originalEvent),p||(this.emit("startSelection",{x:O,y:A}),p=!0)):(!y&&this.tools.current.onDragStart&&this.tools.current.onDragStart(O,A,S.originalEvent),y=!0)}},releaseHandler:S=>{if(this.tools.current.isDrawing){v=!0;const{x:O,y:A}=this.tools.current.getSVGPoint(S.originalEvent);p&&this.emit("endSelection",{x:O,y:A}),this.tools.current.onMouseUp(O,A,S.originalEvent),y&&this.tools.current.onDragEnd&&this.tools.current.onDragEnd()}p=!1,y=!1}});const b=this.config.hotkey?this.config.hotkey.key?this.config.hotkey.key.toLowerCase():this.config.hotkey.toLowerCase():"shift",E=(c=this.config.hotkey)==null?void 0:c.inverted;this.mouseTracker.enabled=E,this.onKeyDown&&document.removeEventListener("keydown",this.onKeyDown),this.onKeyUp&&document.removeEventListener("keydown",this.onKeyDown),this.onKeyDown=S=>{if(S.key.toLowerCase()===b&&!this.selectedShape){const O=!this.readOnly&&!E;this.mouseTracker.enabled=O,this.tools.current.enabled=O}},this.onKeyUp=S=>{S.key.toLowerCase()===b&&!this.tools.current.isDrawing&&(this.mouseTracker.enabled=E,this.tools.current.enabled=E)},document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp)}),o(this,"_initMouseEvents",()=>{this.svg.addEventListener("mousemove",c=>{var p,v;if(!((p=this.tools)!=null&&p.current.isDrawing)&&!c.target.closest(".a9s-annotation.editable.selected")){const y=this._getShapeAt(c);if((y==null?void 0:y.annotation)!==((v=this.hoveredShape)==null?void 0:v.annotation)){if(this.hoveredShape){const b=this.hoveredShape.element||this.hoveredShape;gc(b,"hover"),this.emit("mouseLeaveAnnotation",this.hoveredShape.annotation,this.hoveredShape)}y&&(Ti(y,"hover"),this.emit("mouseEnterAnnotation",y.annotation,y))}this.hoveredShape=y}}),this.svg.parentElement.addEventListener("mouseleave",()=>{this.hoveredShape&&(gc(this.hoveredShape,"hover"),this.emit("mouseLeaveAnnotation",this.hoveredShape.annotation,this.hoveredShape),this.hoveredShape=null)});let s=null;this.viewer.addHandler("canvas-press",()=>s=new Date().getTime()),this.viewer.addHandler("canvas-click",c=>{var p;const{originalEvent:v}=c;if(!((p=this.tools.current)!=null&&p.isDrawing||this.disableSelect)&&new Date().getTime()-s<250){const y=v.target.closest(".a9s-annotation.editable.selected")?this.selectedShape:this._getShapeAt(v);y?(c.preventDefaultAction=!0,this.selectShape(y)):y||(this.deselect(),this.emit("select",{}))}this.disableSelect&&this.hoveredShape&&this.emit("clickAnnotation",this.hoveredShape.annotation,this.hoveredShape)})}),o(this,"_lazy",s=>{if(this.viewer.world.getItemAt(0))s();else{const c=()=>{s(),this.viewer.removeHandler("open",c),this.viewer.world.removeHandler("add-item",c)};this.viewer.addHandler("open",c),this.viewer.world.addHandler("add-item",c)}}),o(this,"_refreshNonScalingAnnotations",()=>{const s=this.currentScale();Array.from(this.svg.querySelectorAll(".a9s-non-scaling")).forEach(c=>c.setAttribute("transform",`scale(${1/s})`))}),o(this,"addAnnotation",(s,c)=>{const p=c||this.g,v=ig(s,this.env.image);return Ti(v,"a9s-annotation"),v.setAttribute("data-id",s.id),v.annotation=s,p.appendChild(v),bc(v,s,this.formatters),this.scaleFormatterElements(v),v}),o(this,"addDrawingTool",s=>this.tools.registerTool(s)),o(this,"addOrUpdateAnnotation",(s,c)=>{var p;const v=(p=this.selectedShape)==null?void 0:p.annotation;(v===s||v!=null&&v.isSelection||v==c)&&this.deselect(),c&&this.removeAnnotation(s),this.removeAnnotation(s);const y=this.addAnnotation(s);Zm(y,"a9s-non-scaling")&&y.setAttribute("transform",`scale(${1/this.currentScale()})`),this.store.insert(s)}),o(this,"currentScale",()=>{const s=this.viewer.viewport.getContainerSize().x;return this.viewer.viewport.getZoom(!0)*s/this.viewer.world.getContentFactor()}),o(this,"deselect",()=>{var s;if((s=this.tools)==null||s.current.stop(),this.selectedShape){const{annotation:c}=this.selectedShape;if(this.selectedShape.destroy){if(this.selectedShape.mouseTracker.destroy(),this.selectedShape.destroy(),!c.isSelection){const p=this.addAnnotation(c);Zm(p,"a9s-non-scaling")&&p.setAttribute("transform",`scale(${1/this.currentScale()})`)}}else gc(this.selectedShape,"selected");this.selectedShape=null}}),o(this,"destroy",()=>{this.deselect(),this.svg.parentNode.removeChild(this.svg)}),o(this,"findShape",s=>{const c=s!=null&&s.id?s.id:s;return this.g.querySelector(`.a9s-annotation[data-id="${c}"]`)}),o(this,"_fit",(s,c,p)=>{const v=this.findShape(s);if(v){const y=c?typeof c=="boolean"?c:c.immediately:!1,b=(c==null?void 0:c.padding)||0,E=this.viewer.container.getBoundingClientRect(),S=Math.min(2*b/E.width,2*b/E.height),{x:O,y:A,width:H,height:W}=v.getBBox(),re=O-S*H,$=A-S*W,se=H+2*S*H,I=W+2*S*W,ne=this.viewer.viewport.imageToViewportRectangle(re,$,se,I);this.viewer.viewport[p](ne,y)}}),o(this,"fitBounds",(s,c)=>this._fit(s,c,"fitBounds")),o(this,"fitBoundsWithConstraints",(s,c)=>this._fit(s,c,"fitBoundsWithConstraints")),o(this,"getAnnotations",()=>Array.from(this.g.querySelectorAll(".a9s-annotation")).map(s=>s.annotation)),o(this,"getAnnotationsIntersecting",s=>{const c=s.id?s:this.findShape(s).annotation;return this.store.getAnnotationsIntersecting(c)}),o(this,"getImageSnippetById",s=>{const c=this.findShape(s);if(c)return bP(this.viewer,c)}),o(this,"getSelectedImageSnippet",()=>{var s;if(this.selectedShape){const c=(s=this.selectedShape.element)!=null?s:this.selectedShape;return bP(this.viewer,c)}}),o(this,"init",s=>{this.deselect(),Array.from(this.g.querySelectorAll(".a9s-annotation")).forEach(c=>this.g.removeChild(c)),this.store.clear(),this._lazy(()=>{console.time("Took"),console.log("Drawing..."),this.loaded||(this.g.style.display="none"),s.forEach(c=>this.addAnnotation(c)),console.log("Indexing..."),this.store.insert(s),console.timeEnd("Took"),this.resize()})}),o(this,"listDrawingTools",()=>this.tools.listTools()),o(this,"overrideId",(s,c)=>{const p=this.findShape(s);p.setAttribute("data-id",c);const{annotation:v}=p,y=v.clone({id:c});return p.annotation=y,this.store.remove(v),this.store.insert(y),y}),o(this,"panTo",(s,c)=>{const p=this.findShape(s);if(p){const{top:v,left:y,width:b,height:E}=p.getBoundingClientRect(),S=y+b/2+window.scrollX,O=v+E/2+window.scrollY,A=this.viewer.viewport.windowToViewportCoordinates(new qi.Point(S,O));this.viewer.viewport.panTo(A,c)}}),o(this,"removeAnnotation",s=>{var c,p;const v=s.type?s.id:s;((c=this.selectedShape)==null?void 0:c.annotation.id)===v&&this.deselect();const y=this.findShape(s);if(y){const{annotation:b}=y;((p=this.selectedShape)==null?void 0:p.annotation)===b&&this.deselect(),y.parentNode.removeChild(y),this.store.remove(b)}}),o(this,"removeDrawingTool",s=>{var c;return(c=this.tools)==null?void 0:c.unregisterTool(s)}),o(this,"scaleFormatterElements",s=>{const c=1/this.currentScale();if(s){const p=s.querySelector(".a9s-formatter-el");p&&p.firstChild.setAttribute("transform",`scale(${c})`)}else Array.from(this.g.querySelectorAll(".a9s-formatter-el")).forEach(p=>p.firstChild.setAttribute("transform",`scale(${c})`))}),o(this,"scaleTool",s=>{if(s){const c=1/this.currentScale();s.scale=c,s.onScaleChanged&&s.onScaleChanged(c)}}),o(this,"selectAnnotation",(s,c)=>{this.selectedShape&&this.deselect();const p=this.findShape(s);if(p){this.selectShape(p,c);const v=this.selectedShape.element?this.selectedShape.element:this.selectedShape;return{annotation:p.annotation,element:v}}else this.deselect()}),o(this,"selectShape",(s,c)=>{var p;if(!c&&!s.annotation.isSelection&&this.emit("clickAnnotation",s.annotation,s),((p=this.selectedShape)==null?void 0:p.annotation)===s.annotation)return;this.selectedShape&&this.selectedShape.annotation!==s.annotation&&this.deselect();const{annotation:v}=s;if(this.readOnly||v.readOnly||this.headless)this.selectedShape=s,Ti(s,"selected"),c||this.emit("select",{annotation:v,element:s,skipEvent:c});else{const y=this.tools.forAnnotation(v);if(y){setTimeout(()=>{s.parentNode.removeChild(s),c||this.emit("select",{annotation:v,element:this.selectedShape.element})},1),this.selectedShape=y.createEditableShape(v,this.formatters),this.scaleTool(this.selectedShape),this.scaleFormatterElements(this.selectedShape.element),this.selectedShape.element.annotation=v;const b=new qi.MouseTracker({element:this.svg,preProcessEventHandler:E=>{E.stopPropagation=!0,E.preventDefault=!1,E.preventGesture=!0}}).setTracking(!1);this.selectedShape.element.addEventListener("mouseenter",()=>{this.hoveredShape=this.selectedShape,b.setTracking(!0)}),this.selectedShape.element.addEventListener("mouseleave",()=>{this.hoveredShape=null,b.setTracking(!1)}),this.selectedShape.mouseTracker=b,this.selectedShape.on("update",E=>this.emit("updateTarget",this.selectedShape.element,E))}else this.selectedShape=s,c||this.emit("select",{annotation:v,element:this.selectedShape})}}),o(this,"setDrawingEnabled",s=>{if(this.mouseTracker){const c=s&&!this.readOnly;this.mouseTracker.enabled=c,this.mouseTracker.setTracking(c),this.tools.current&&(this.tools.current.enabled=c)}}),o(this,"setDrawingTool",s=>{var c;this.tools&&((c=this.tools.current)==null||c.stop(),this.tools.setCurrent(s))}),o(this,"setVisible",s=>{s?this.svg.style.display=null:(this.deselect(),this.svg.style.display="none")}),o(this,"stopDrawing",()=>{var s;(s=this.tools)!=null&&s.current&&(this.tools.current.isDrawing&&this.tools.current.stop(),this.mouseTracker.enabled=!1,this.tools.current.enabled=!1)}),this.viewer=u.viewer,this.config=u.config,this.env=u.env,this.readOnly=u.config.readOnly,this.headless=u.config.headless,u.config.formatter?this.formatters=[u.config.formatter]:u.config.formatters&&(this.formatters=Array.isArray(u.config.formatters)?u.config.formatters:[u.config.formatters]),this.disableSelect=u.config.disableSelect,this.drawOnSingleClick=u.config.drawOnSingleClick,this.svg=document.createElementNS(Xt,"svg"),MX?(this.svg.setAttribute("class","a9s-annotationlayer a9s-osd-annotationlayer touch"),tX(this.svg)):this.svg.setAttribute("class","a9s-annotationlayer a9s-osd-annotationlayer"),this.g=document.createElementNS(Xt,"g"),this.svg.appendChild(this.g),this.viewer.canvas.appendChild(this.svg),this.viewer.addHandler("animation",()=>this.resize()),this.viewer.addHandler("rotate",()=>this.resize()),this.viewer.addHandler("resize",()=>this.resize()),this.viewer.addHandler("flip",()=>this.resize()),this.loaded=!1;const i=()=>{const{x:s,y:c}=this.viewer.world.getItemAt(0).source.dimensions,p=this.viewer.world.getItemAt(0).source["@id"]||new URL(this.viewer.world.getItemAt(0).source.url,document.baseURI).href;this.env.image={src:p,naturalWidth:s,naturalHeight:c},u.config.crosshair&&(this.crosshair||(this.crosshair=new xX(this.svg),Ti(this.svg,"no-cursor"))),this.loaded||this.emit("load",p),this.loaded=!0,this.g.style.display="inline",this.resize()};this.viewer.addHandler("open",i),this.viewer.world.addHandler("add-item",i),this.viewer.world.getItemAt(0)&&i(),this.store=new IX(this.env),this.selectedShape=null,this.hoveredShape=null,this._initMouseEvents()}resize(){var u;const i=this.viewer.viewport.getFlip(),s=this.viewer.viewport.pixelFromPoint(new qi.Point(0,0),!0);i&&(s.x=this.viewer.viewport._containerInnerSize.x-s.x);const c=this.currentScale(),p=i?-c:c,v=this.viewer.viewport.getRotation();this.g.setAttribute("transform",`translate(${s.x}, ${s.y}) scale(${p}, ${c}) rotate(${v})`),this._refreshNonScalingAnnotations(),this.scaleFormatterElements(),this.selectedShape&&(this.selectedShape.element?(this.scaleTool(this.selectedShape),this.emit("viewportChange",this.selectedShape.element)):this.emit("viewportChange",this.selectedShape)),(u=this.tools)!=null&&u.current&&this.scaleTool(this.tools.current)}}class NX extends EP{constructor(u){super(u),o(this,"onDrawingComplete",i=>{var s;this.mouseTracker.enabled=(s=this.config.hotkey)==null?void 0:s.inverted,this.selectShape(i),this.emit("createSelection",i.annotation)}),this._initDrawingTools()}}const lg=a=>{const u=a.viewport.viewportToImageRectangle(a.viewport.getBounds(!0)),i=a.viewport.getContainerSize().x,s=a.viewport.getZoom(!0)*i/a.world.getContentFactor();return{extent:u,scale:s}},LX=a=>{var u;const i=a.targets[0];return i?Array.isArray(i.selector)?i.selector[0].type:(u=i.selector)==null?void 0:u.type:null},xP=(a,u)=>{const{extent:i,scale:s}=lg(a),{selector:c}=u,p=Po.create({target:u});if(c.type==="SvgSelector"){const v=Ro(p),y=v.nodeName.toLowerCase();let b=null;if(y==="polygon")b=FX(v,i,s);else if(y==="circle")b=BX(v,i,s);else if(y==="ellipse")b=jX(v,i,s);else if(y==="path")b=HX(v,i,s);else throw`Unsupported SVG shape type: ${y}`;let E=b.outerHTML||new XMLSerializer().serializeToString(b);return E=E.replace(` xmlns="${Xt}"`,""),{...u,selector:{type:"SvgSelector",value:`<svg>${E}</svg>`}}}else if(c.type==="FragmentSelector"){const{x:v,y,w:b,h:E}=Yi(p),S=i.x+v/s,O=i.y+y/s,A=b/s,H=E/s;return b===0&&E===0?{...Ca(S,O,A,H),renderedVia:{name:"point"}}:Ca(S,O,A,H)}else throw`Unsupported selector type: ${c.type}`},FX=(a,u,i)=>{const s=Array.from(a.points).map(c=>{const p=u.x+c.x/i,v=u.y+c.y/i;return p+","+v}).join(" ");return a.setAttribute("points",s),a},BX=(a,u,i)=>{const s=parseFloat(a.getAttribute("cx")),c=parseFloat(a.getAttribute("cy")),p=parseFloat(a.getAttribute("r"));return a.setAttribute("cx",u.x+s/i),a.setAttribute("cy",u.y+c/i),a.setAttribute("r",p/i),a},jX=(a,u,i)=>{const s=parseFloat(a.getAttribute("cx")),c=parseFloat(a.getAttribute("cy")),p=parseFloat(a.getAttribute("rx")),v=parseFloat(a.getAttribute("ry"));return a.setAttribute("cx",u.x+s/i),a.setAttribute("cy",u.y+c/i),a.setAttribute("rx",p/i),a.setAttribute("ry",v/i),a},HX=(a,u,i)=>{const s=a.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map(c=>c.trim()).map(c=>{const p=c.substring(0,1);if(p.toLowerCase()==="z")return p;{const v=c.substring(1).split(" ").map(S=>parseFloat(S.trim())),y=p===p.toUpperCase(),b=y?u.x+v[0]/i:v[0]/i,E=y?u.y+v[1]/i:v[1]/i;return p+" "+b+" "+E}}).join(" ");return a.setAttribute("d",s),a},SP=(a,u)=>{const{extent:i,scale:s}=lg(a),c=u.selector("FragmentSelector");if(u.selector("SvgSelector")){const p=Ro(u),v=p.nodeName.toLowerCase();let y=null;if(v==="polygon")y=zX(p,i,s);else if(v==="circle")y=VX(p,i,s);else if(v==="ellipse")y=UX(p,i,s);else if(v==="path")y=WX(p,i,s);else throw`Unsupported SVG shape type: ${v}`;let b=y.outerHTML||new XMLSerializer().serializeToString(y);b=b.replace(` xmlns="${Xt}"`,"");const E={selector:{type:"SvgSelector",value:`<svg>${b}</svg>`}};return u.clone({target:E})}else if(c){const{x:p,y:v,w:y,h:b}=Yi(u),E=(p-i.x)*s,S=(v-i.y)*s,O=Ca(E,S,y*s,b*s);return u.clone({target:O})}},zX=(a,u,i)=>{const s=Array.from(a.points).map(c=>{const p=i*(c.x-u.x),v=i*(c.y-u.y);return p+","+v}).join(" ");return a.setAttribute("points",s),a},VX=(a,u,i)=>{const s=a.getAttribute("cx"),c=a.getAttribute("cy"),p=a.getAttribute("r");return a.setAttribute("cx",i*(s-u.x)),a.setAttribute("cy",i*(c-u.y)),a.setAttribute("r",p*i),a},UX=(a,u,i)=>{const s=a.getAttribute("cx"),c=a.getAttribute("cy"),p=a.getAttribute("rx"),v=a.getAttribute("ry");return a.setAttribute("cx",i*(s-u.x)),a.setAttribute("cy",i*(c-u.y)),a.setAttribute("rx",p*i),a.setAttribute("ry",v*i),a},WX=(a,u,i)=>{const s=a.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map(c=>c.trim()).map(c=>{const p=c.substring(0,1);if(p.toLowerCase()==="z")return p;{const v=c.substring(1).split(" ").filter(S=>S).map(S=>parseFloat(S.trim())),y=p===p.toUpperCase(),b=y?i*(v[0]-u.x):i*v[0],E=y?i*(v[1]-u.y):i*v[1];return p+" "+b+" "+E}}).join(" ");return a.setAttribute("d",s),a},TP=(a,u)=>{const{extent:i,scale:s}=lg(a),c=LX(u.annotation);if(c==="FragmentSelector")GX(u,i,s);else if(c==="SvgSelector")qX(u,i,s);else throw`Unsupported selector type type: ${c}`;const p=u.querySelector(".a9s-formatter-el");if(p){const{x:v,y}=u.querySelector(".a9s-inner").getBBox();p.setAttribute("x",v),p.setAttribute("y",y)}},GX=(a,u,i)=>{const{x:s,y:c,w:p,h:v}=Yi(a.annotation),y=a.querySelector(".a9s-outer"),b=a.querySelector(".a9s-inner"),E=i*(s-u.x),S=i*(c-u.y);p===0&&v===0?[y,b].forEach(O=>{O.setAttribute("cx",E),O.setAttribute("cy",S)}):[y,b].forEach(O=>{O.setAttribute("x",E),O.setAttribute("y",S),O.setAttribute("width",p*i),O.setAttribute("height",v*i)})},qX=(a,u,i)=>{const s=Ro(a.annotation),c=s.nodeName.toLowerCase();if(c==="polygon")YX(a,s,u,i);else if(c==="circle")XX(a,s,u,i);else if(c==="ellipse")ZX(a,s,u,i);else if(c==="path")KX(a,s,u,i);else throw`Unsupported SVG shape type: ${c}`},YX=(a,u,i,s)=>{const c=Array.from(u.points).map(p=>{const v=s*(p.x-i.x),y=s*(p.y-i.y);return v+","+y}).join(" ");a.querySelector(".a9s-outer").setAttribute("points",c),a.querySelector(".a9s-inner").setAttribute("points",c)},XX=(a,u,i,s)=>{const c=s*(u.getAttribute("cx")-i.x),p=s*(u.getAttribute("cy")-i.y),v=s*u.getAttribute("r"),y=a.querySelector(".a9s-outer");y.setAttribute("cx",c),y.setAttribute("cy",p),y.setAttribute("r",v);const b=a.querySelector(".a9s-inner");b.setAttribute("cx",c),b.setAttribute("cy",p),b.setAttribute("r",v)},ZX=(a,u,i,s)=>{const c=s*(u.getAttribute("cx")-i.x),p=s*(u.getAttribute("cy")-i.y),v=s*u.getAttribute("rx"),y=s*u.getAttribute("ry"),b=a.querySelector(".a9s-outer");b.setAttribute("cx",c),b.setAttribute("cy",p),b.setAttribute("rx",v),b.setAttribute("ry",y);const E=a.querySelector(".a9s-inner");E.setAttribute("cx",c),E.setAttribute("cy",p),E.setAttribute("rx",v),E.setAttribute("ry",y)},KX=(a,u,i,s)=>{const c=u.getAttribute("d").split(/(?=M|m|L|l|H|h|V|v|Z|z)/g).map(p=>p.trim()).map(p=>{const v=p.substring(0,1);if(v.toLowerCase()==="z")return v;{const y=p.substring(1).split(" ").filter(O=>O).map(O=>parseFloat(O.trim())),b=v===v.toUpperCase(),E=b?s*(y[0]-i.x):s*y[0],S=b?s*(y[1]-i.y):s*y[1];return v+" "+E+" "+S}}).join(" ");a.querySelector(".a9s-inner").setAttribute("d",c),a.querySelector(".a9s-outer").setAttribute("d",c)},JX=Qm();class QX extends EP{constructor(u){super(u),o(this,"_fit",(i,s,c)=>{const p=s?typeof s=="boolean"?s:s.immediately:!1,v=(s==null?void 0:s.padding)||0,y=this.findShape(i);if(y){const b=this.viewer.container.getBoundingClientRect(),E=y.getBoundingClientRect(),S=E.x-b.x,O=E.y-b.y,{width:A,height:H}=E,W=S-v,re=O-v,$=A+2*v,se=H+2*v,I=this.viewer.viewport.viewerElementToViewportRectangle(new qi.Rect(W,re,$,se));this.viewer.viewport[c](I,p)}}),o(this,"_getShapeAt",i=>{const s=b=>{if(JX){const E=this.svg.getBoundingClientRect(),S=b.clientX-E.x,O=b.clientY-E.y;return new qi.Point(S,O)}else return new qi.Point(b.offsetX,b.offsetY)},c=this.viewer.viewport.viewerElementToViewportCoordinates(s(i)),{x:p,y:v}=this.viewer.viewport.viewportToImageCoordinates(c.x,c.y),y=this.store.getAnnotationAt(p,v,this.currentScale());if(y)return this.findShape(y)}),o(this,"_refreshNonScalingAnnotations",()=>{}),o(this,"addAnnotation",(i,s)=>{const c=s||this.g,p=ig(i,this.env.image);return Ti(p,"a9s-annotation"),p.setAttribute("data-id",i.id),p.annotation=i,TP(this.viewer,p),c.appendChild(p),bc(p,i,this.formatters),p}),o(this,"addOrUpdateAnnotation",(i,s)=>{var c;const p=(c=this.selectedShape)==null?void 0:c.annotation;(p===i||p!=null&&p.isSelection||p==s)&&this.deselect(),s&&this.removeAnnotation(i),this.removeAnnotation(i),this.addAnnotation(i),this.store.insert(i)}),o(this,"deselect",()=>{var i;if((i=this.tools)==null||i.current.stop(),this.selectedShape){const{annotation:s}=this.selectedShape;this.selectedShape.destroy?(this.selectedShape.mouseTracker.destroy(),this.selectedShape.destroy(),s.isSelection||this.addAnnotation(s)):gc(this.selectedShape,"selected"),this.selectedShape=null}}),o(this,"onDrawingComplete",i=>{const s=i.annotation.clone({target:xP(this.viewer,i.annotation.target)});i.annotation=s,this.selectShape(i),this.emit("createSelection",i.annotation),this.mouseTracker.enabled=!1}),o(this,"selectShape",(i,s)=>{var c;if(!s&&!i.annotation.isSelection&&this.emit("clickAnnotation",i.annotation,i),((c=this.selectedShape)==null?void 0:c.annotation)===i.annotation)return;this.selectedShape&&this.selectedShape.annotation!==i.annotation&&this.deselect(!0);const{annotation:p}=i;if(this.readOnly||p.readOnly||this.headless)this.selectedShape=i,Ti(i,"selected"),s||this.emit("select",{annotation:p,element:i,skipEvent:s});else{setTimeout(()=>{i.parentNode.removeChild(i),s||this.emit("select",{annotation:p,element:this.selectedShape.element})},1);const v=this.tools.forAnnotation(p);this.selectedShape=v.createEditableShape(p),this.selectedShape.element.annotation=p;const y=SP(this.viewer,p);this.selectedShape.updateState(y);const b=new qi.MouseTracker({element:this.svg,preProcessEventHandler:E=>{E.stopPropagation=!0,E.preventDefault=!1,E.preventGesture=!0}}).setTracking(!1);this.selectedShape.element.addEventListener("mouseenter",()=>{this.hoveredShape=this.selectedShape,b.setTracking(!0)}),this.selectedShape.element.addEventListener("mouseleave",()=>{this.hoveredShape=null,b.setTracking(!1)}),this.selectedShape.mouseTracker=b,this.selectedShape.on("update",E=>{const S=xP(this.viewer,E);this.selectedShape.element.annotation=this.selectedShape.annotation.clone({target:S}),this.emit("updateTarget",this.selectedShape.element,S)})}}),this._initDrawingTools(!0)}resize(){if(this.store&&(Array.from(this.g.querySelectorAll(".a9s-annotation:not(.selected)")).forEach(u=>TP(this.viewer,u)),this.selectedShape))if(this.selectedShape.element){const u=SP(this.viewer,this.selectedShape.element.annotation);this.selectedShape.updateState&&this.selectedShape.updateState(u),this.emit("viewportChange",this.selectedShape.element)}else this.emit("viewportChange",this.selectedShape)}}var $X=0;function _P(a,u,i,s,c){var p,v,y={};for(v in u)v=="ref"?p=u[v]:y[v]=u[v];var b={type:a,props:y,key:i,ref:p,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--$X,__source:s,__self:c};if(typeof a=="function"&&(p=a.defaultProps))for(v in p)y[v]===void 0&&(y[v]=p[v]);return d.vnode&&d.vnode(b),b}class e7 extends B{constructor(u){super(u),o(this,"clearState",i=>this.setState({selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null,beforeHeadlessModify:null},i)),o(this,"forwardEvent",(i,s)=>{this.annotationLayer.on(i,(c,p)=>{this.props[s](c.clone(),p)})}),o(this,"onKeyUp",i=>{if(i.which===27){this.annotationLayer.stopDrawing();const{selectedAnnotation:s}=this.state;s&&(this.cancelSelected(),this.props.onCancelSelected(s))}else if(i.which===46){const{disableDeleteKey:s}=this.props.config;if(!s){const{selectedAnnotation:c}=this.state;c&&(c.isSelection?this.onCancelAnnotation(c):this.onDeleteAnnotation(c))}}}),o(this,"handleStartSelect",i=>this.props.onSelectionStarted(i)),o(this,"handleEndSelect",i=>this.props.onSelectionEnded(i)),o(this,"handleSelect",(i,s)=>{this.state.editorDisabled?this.onHeadlessSelect(i,s):this.onNormalSelect(i,s)}),o(this,"onNormalSelect",(i,s)=>{const{annotation:c,element:p}=i;if(c){const v=()=>{this.setState({selectedAnnotation:c,selectedDOMElement:p,modifiedTarget:null},()=>{s||(c.isSelection?this.props.onSelectionCreated(c.clone()):this.props.onAnnotationSelected(c.clone(),p))})},{selectedAnnotation:y}=this.state;y&&!y.isEqual(c)?this.clearState(()=>{this.props.onCancelSelected(y),v()}):v()}else{const{selectedAnnotation:v}=this.state;v?this.clearState(()=>this.props.onCancelSelected(v)):this.clearState()}}),o(this,"onHeadlessSelect",(i,s)=>{this.saveSelected().then(()=>{this.onNormalSelect(i,s)})}),o(this,"handleUpdateTarget",(i,s)=>{this.setState({selectedDOMElement:i,modifiedTarget:s});const c=JSON.parse(JSON.stringify(s));this.props.onSelectionTargetChanged(c)}),o(this,"handleViewportChange",i=>this.setState({selectedDOMElement:i})),o(this,"overrideAnnotationId",i=>s=>{const{id:c}=i;this.state.selectedAnnotation?this.setState({selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null},()=>{this.annotationLayer.overrideId(c,s)}):this.annotationLayer.overrideId(c,s)}),o(this,"onCreateOrUpdateAnnotation",(i,s)=>(c,p)=>{let v=c.isSelection?c.toAnnotation():c;v=this.state.modifiedTarget?v.clone({target:this.state.modifiedTarget}):v.clone(),this.clearState(()=>{this.annotationLayer.addOrUpdateAnnotation(v,p),p?this.props[i](v,p.clone()):this.props[i](v,this.overrideAnnotationId(v)),s&&s()})}),o(this,"onDeleteAnnotation",i=>{this.clearState(),this.annotationLayer.removeAnnotation(i),this.props.onAnnotationDeleted(i)}),o(this,"onCancelAnnotation",(i,s)=>{this.state.editorDisabled||this.annotationLayer.deselect(),this.props.onCancelSelected(i),this.clearState(s)}),o(this,"addAnnotation",i=>{var s;i.id===((s=this.state.selectedAnnotation)==null?void 0:s.id)&&(this.annotationLayer.deselect(),this.clearState()),this.annotationLayer.addOrUpdateAnnotation(i.clone())}),o(this,"addDrawingTool",i=>this.annotationLayer.addDrawingTool(i)),o(this,"cancelSelected",()=>new Promise(i=>{this.annotationLayer.deselect(),this.state.selectedAnnotation?this.clearState(i):i()})),o(this,"fitBounds",(i,s)=>this.annotationLayer.fitBounds(i,s)),o(this,"fitBoundsWithConstraints",(i,s)=>this.annotationLayer.fitBoundsWithConstraints(i,s)),o(this,"getAnnotationById",i=>{var s;return(s=this.annotationLayer.findShape(i))==null?void 0:s.annotation}),o(this,"getAnnotations",()=>this.annotationLayer.getAnnotations().map(i=>i.clone())),o(this,"getAnnotationsIntersecting",i=>this.annotationLayer.getAnnotationsIntersecting(i)),o(this,"getImageSnippetById",i=>this.annotationLayer.getImageSnippetById(i)),o(this,"getSelected",()=>{var i;if(this.state.selectedAnnotation)return this.state.editorDisabled?this.state.selectedAnnotation:(i=this._editor.current)==null?void 0:i.getCurrentAnnotation()}),o(this,"getSelectedImageSnippet",()=>this.annotationLayer.getSelectedImageSnippet()),o(this,"listDrawingTools",()=>this.annotationLayer.listDrawingTools()),o(this,"panTo",(i,s)=>this.annotationLayer.panTo(i,s)),o(this,"removeAnnotation",i=>this.annotationLayer.removeAnnotation(i)),o(this,"removeDrawingTool",i=>this.annotationLayer.removeDrawingTool(i)),o(this,"saveSelected",()=>new Promise(i=>{const s=this.state.selectedAnnotation;if(s)if(this._editor.current)this._editor.current.onOk(),i();else if(s.isSelection)s.bodies.length>0||this.props.config.allowEmpty?this.onCreateOrUpdateAnnotation("onAnnotationCreated",i)(s):(this.annotationLayer.deselect(),i());else{const{beforeHeadlessModify:c,modifiedTarget:p}=this.state;c?this.onCreateOrUpdateAnnotation("onAnnotationUpdated",i)(s,c):p?this.onCreateOrUpdateAnnotation("onAnnotationUpdated",i)(s,s):this.onCancelAnnotation(s,i)}else i()})),o(this,"selectAnnotation",i=>{const s=this.annotationLayer.selectAnnotation(i,!0);if(s)return this.handleSelect(s,!0),s.annotation.clone();this.clearState()}),o(this,"setAnnotations",i=>this.annotationLayer.init(i.map(s=>s.clone()))),o(this,"setDrawingEnabled",i=>this.annotationLayer.setDrawingEnabled(i)),o(this,"setDrawingTool",i=>this.annotationLayer.setDrawingTool(i)),o(this,"setVisible",i=>{this.annotationLayer.setVisible(i),i||this.clearState()}),o(this,"updateSelected",(i,s)=>new Promise(c=>{this.state.selectedAnnotation&&(s?this.state.selectedAnnotation.isSelection?this.onCreateOrUpdateAnnotation("onAnnotationCreated",c)(i):this.onCreateOrUpdateAnnotation("onAnnotationUpdated",c)(i,this.state.selectedAnnotation):this.setState({selectedAnnotation:i,beforeHeadlessModify:this.state.beforeHeadlessModify||this.state.selectedAnnotation},c))})),this.state={selectedAnnotation:null,selectedDOMElement:null,modifiedTarget:null,readOnly:u.config.readOnly,editorDisabled:u.config.disableEditor,widgets:u.config.widgets,beforeHeadlessModify:null},this._editor=Ue.createRef()}componentDidMount(){this.annotationLayer=this.props.config.gigapixelMode?new QX(this.props):new NX(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)}componentWillUnmount(){this.annotationLayer.destroy(),document.removeEventListener("keyup",this.onKeyUp)}get disableEditor(){return this.state.editorDisabled}set disableEditor(u){this.setState({editorDisabled:u})}get disableSelect(){return this.annotationLayer.disableSelect}set disableSelect(u){this.annotationLayer.disableSelect=u}get formatters(){return this.annotationLayer.formatters}set formatters(u){this.annotationLayer.formatters=u}get readOnly(){return this.state.readOnly}set readOnly(u){this.annotationLayer.readOnly=u,this.setState({readOnly:u})}get widgets(){return this.state.widgets}set widgets(u){this.setState({widgets:u})}render(){var u;const i=this.state.selectedAnnotation&&!this.state.editorDisabled,s=this.state.readOnly||((u=this.state.selectedAnnotation)==null?void 0:u.readOnly);return i&&_P(zY,{ref:this._editor,detachable:!0,wrapperEl:this.props.wrapperEl,annotation:this.state.selectedAnnotation,modifiedTarget:this.state.modifiedTarget,selectedElement:this.state.selectedDOMElement,readOnly:s,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})}}class t7{constructor(u,i){o(this,"handleAnnotationCreated",(c,p)=>this._emitter.emit("createAnnotation",c.underlying,p)),o(this,"handleAnnotationDeleted",c=>this._emitter.emit("deleteAnnotation",c.underlying)),o(this,"handleAnnotationSelected",(c,p)=>this._emitter.emit("selectAnnotation",c.underlying,p)),o(this,"handleAnnotationUpdated",(c,p)=>this._emitter.emit("updateAnnotation",c.underlying,p.underlying)),o(this,"handleCancelSelected",c=>this._emitter.emit("cancelSelected",c.underlying)),o(this,"handleClickAnnotation",(c,p)=>this._emitter.emit("clickAnnotation",c.underlying,p)),o(this,"handleLoad",c=>this._emitter.emit("load",c)),o(this,"handleSelectionCreated",c=>this._emitter.emit("createSelection",c.underlying)),o(this,"handleSelectionStarted",c=>this._emitter.emit("startSelection",c)),o(this,"handleSelectionEnded",c=>this._emitter.emit("endSelection",c)),o(this,"handleSelectionTargetChanged",c=>this._emitter.emit("changeSelectionTarget",c)),o(this,"handleMouseEnterAnnotation",(c,p)=>this._emitter.emit("mouseEnterAnnotation",c.underlying,p)),o(this,"handleMouseLeaveAnnotation",(c,p)=>this._emitter.emit("mouseLeaveAnnotation",c.underlying,p)),o(this,"_wrap",c=>(c==null?void 0:c.type)==="Annotation"?new Po(c):c),o(this,"addAnnotation",c=>this._app.current.addAnnotation(new Po(c))),o(this,"addDrawingTool",c=>this._app.current.addDrawingTool(c)),o(this,"cancelSelected",()=>this._app.current.cancelSelected()),o(this,"clearAnnotations",()=>this.setAnnotations([])),o(this,"clearAuthInfo",()=>this._env.user=null),o(this,"destroy",()=>Ue.unmountComponentAtNode(this.appContainerEl)),o(this,"fitBounds",(c,p)=>this._app.current.fitBounds(this._wrap(c),p)),o(this,"fitBoundsWithConstraints",(c,p)=>this._app.current.fitBoundsWithConstraints(this._wrap(c),p)),o(this,"getAnnotationById",c=>{const p=this._app.current.getAnnotationById(c);return p==null?void 0:p.underlying}),o(this,"getAnnotations",()=>this._app.current.getAnnotations().map(c=>c.underlying)),o(this,"getAnnotationsIntersecting",c=>this._app.current.getAnnotationsIntersecting(this._wrap(c))),o(this,"getImageSnippetById",c=>this._app.current.getImageSnippetById(c)),o(this,"getSelected",()=>{const c=this._app.current.getSelected();return c==null?void 0:c.underlying}),o(this,"getSelectedImageSnippet",()=>this._app.current.getSelectedImageSnippet()),o(this,"listDrawingTools",()=>this._app.current.listDrawingTools()),o(this,"loadAnnotations",c=>fetch(c).then(p=>p.json()).then(p=>(this.setAnnotations(p),p))),o(this,"off",(c,p)=>this._emitter.off(c,p)),o(this,"on",(c,p)=>this._emitter.on(c,p)),o(this,"once",(c,p)=>this._emitter.once(c,p)),o(this,"panTo",(c,p)=>this._app.current.panTo(this._wrap(c),p)),o(this,"removeAnnotation",c=>this._app.current.removeAnnotation(this._wrap(c))),o(this,"removeDrawingTool",c=>this._app.current.removeDrawingTool(c)),o(this,"saveSelected",()=>this._app.current.saveSelected()),o(this,"selectAnnotation",c=>{const p=this._app.current.selectAnnotation(this._wrap(c));return p==null?void 0:p.underlying}),o(this,"setAnnotations",c=>{const p=(c||[]).map(v=>new Po(v));this._app.current.setAnnotations(p)}),o(this,"setAuthInfo",c=>this._env.user=c),o(this,"setDrawingEnabled",c=>this._app.current.setDrawingEnabled(c)),o(this,"setDrawingTool",c=>this._app.current.setDrawingTool(c)),o(this,"setServerTime",c=>this._env.setServerTime(c)),o(this,"setVisible",c=>this._app.current.setVisible(c)),o(this,"updateSelected",(c,p)=>{let v=null;c.type==="Annotation"?v=new Po(c):c.type==="Selection"&&(v=new js(c.target,c.body)),v&&this._app.current.updateSelected(v,p)});const s=i||{};this._app=Ue.createRef(),this._emitter=new gu,this._env=XY(),this._element=u.element,window.getComputedStyle(this._element).getPropertyValue("position")==="static"&&(this._element.style.position="relative"),ZY(s.locale,s.messages),this.appContainerEl=document.createElement("DIV"),this._element.appendChild(this.appContainerEl),Ue.render(_P(e7,{ref:this._app,viewer:u,wrapperEl:this._element,config:s,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)}get disableEditor(){return this._app.current.disableEditor}set disableEditor(u){this._app.current.disableEditor=u}get disableSelect(){return this._app.current.disableSelect}set disableSelect(u){this._app.current.disableSelect=u}get formatters(){return this._app.current.formatters||[]}set formatters(u){if(u){const i=Array.isArray(u)?u:[u];this._app.current.formatters=i}else this._app.current.formatters=null}get readOnly(){return this._app.current.readOnly}set readOnly(u){this._app.current.readOnly=u}get widgets(){return this._app.current.widgets}set widgets(u){this._app.current.widgets=u}}var n7=(a,u)=>new t7(a,u);return n7})})(Tx);var mV=Tx.exports;const gV=hi(mV);function vV(e){const n=`os-zoom-in ${e.side}`,t=`os-zoom-out ${e.side}`,r=e.documentView.bookMode?null:e.onZoomGrid;return te.jsxs("ul",{className:"ImageZoomControl",children:[te.jsx("li",{children:te.jsx("i",{title:"Zoom In",id:n,onClick:e.onZoomIn,className:"zoom-in fas fa-plus-circle fa-2x"})}),te.jsx("li",{children:te.jsx("i",{title:"Fixed Zoom 1",onClick:e.onZoomFixed_1,className:"zoom-3 fas fa-circle fa-2x"})}),te.jsx("li",{children:te.jsx("i",{title:"Fixed Zoom 2",onClick:e.onZoomFixed_2,className:"zoom-2 fas fa-circle fa-lg"})}),te.jsx("li",{children:te.jsx("i",{title:"Fixed Zoom 3",onClick:e.onZoomFixed_3,className:"zoom-1 fas fa-circle"})}),te.jsx("li",{children:te.jsx("i",{title:"Zoom Out",id:t,onClick:e.onZoomOut,className:"zoom-out fas fa-minus-circle fa-2x"})}),te.jsx("li",{className:e.documentView.bookMode?"disabled":"",children:te.jsx("i",{title:"Return to grid mode (not available in book mode)",onClick:r,className:"zoom-grid fas fa-th fa-2x"})})]})}function up(e){const{delay:n=0,color:t="dark"}=e,[r,o]=Te.useState(n===0);return Te.useEffect(()=>{if(n>0){const l=setTimeout(()=>{o(!0)},n);return()=>clearTimeout(l)}},[]),r?te.jsxs("div",{className:`big-ring-spinner ${t}`,children:[te.jsx("div",{}),te.jsx("div",{}),te.jsx("div",{}),te.jsx("div",{})]}):te.jsx("div",{})}function yV(e){const{side:n,initViewer:t,tileSource:r}=e,[o,l]=Te.useState(!0),d=Te.useRef(null);return Te.useEffect(()=>{(async()=>{d.current&&await t(d.current,r).then(()=>l(!1))})()},[]),Te.useMemo(()=>te.jsx("div",{id:`image-view-seadragon-${n}`,ref:d,children:o&&te.jsx(up,{color:"light",delay:1e3})}),[o])}function wV(e){const[n,t]=Te.useState(null),[r,o]=Te.useState(null),l=Gr(),d=Va(),[h]=cy(),[f,m]=Te.useState(!1);Te.useEffect(()=>{r&&h.get("zone")&&setTimeout(()=>r.selectAnnotation(h.get("zone")),50)},[r]);const g=V=>{e.documentViewActions.changeTranscriptionType(e.side,"g")},w=V=>{n.viewport.zoomTo(n.viewport.getMaxZoom())},x=V=>{n.viewport.zoomTo(n.viewport.getMaxZoom()/2)},T=V=>{n.viewport.fitVertically()},P=V=>{n.viewport.zoomBy(2)},C=V=>{n.viewport.zoomBy(.5)};Te.useEffect(()=>{r&&(r.off("selectAnnotation"),r.off("cancelSelected"),r.on("selectAnnotation",V=>{h.set("zone",V.id),d(`${l.pathname}?${ul(h.toString())}`)}),r.on("cancelSelected",()=>{d(l.pathname)}))},[l.pathname,r]);const _=async(V,j)=>{if(!V)t(null),o(null);else{const Z=gd({element:V,showNavigationControl:!1,zoomPerClick:2,gestureSettingsMouse:{clickToZoom:!1}});t(Z);const B=gV(Z,{});B.disableEditor=!0,B.readOnly=!0,o(B),Z.addTiledImage({tileSource:j})}};Te.useEffect(()=>()=>{n&&n.destroy()},[]);const{tileSource:k}=e.document.folioIndex[e.folioID];return Te.useEffect(()=>{const V=e.document.folioIndex[e.folioID];V.loading&&m(!0),V.tileSource&&n&&(n.open(V.tileSource),V.annotations&&r&&r.setAnnotations(V.annotations)),V.loading||m(!1)},[r,n,e.folioID,e.document.folioIndex]),te.jsx("div",{children:k?te.jsxs("div",{className:`image-view imageViewComponent ${e.side}`,style:{position:"relative"},children:[te.jsx(oa,{side:e.side,documentView:e.documentView,documentViewActions:e.documentViewActions,documentName:e.document.variorum&&e.document.folioIndex[e.folioID].doc_id}),te.jsx(vV,{side:e.side,documentView:e.documentView,onZoomFixed_1:w,onZoomFixed_2:x,onZoomFixed_3:T,onZoomGrid:g,onZoomIn:P,onZoomOut:C,viewer:n}),te.jsx(yV,{side:e.side,tileSource:k,initViewer:_,loading:f},e.folioID)]}):te.jsx(up,{color:"dark",delay:300})})}function bV(e){return{document:e.document}}const EV=Mr(bV)(wV);class xV extends Te.Component{render(){return te.jsx("div",{className:"single-pane-view",children:this.props.singlePane})}}function SV(e){return{document:e.document}}const TV=Mr(SV)(xV);class _V extends Te.Component{constructor(t){super();wr(this,"onDrag",t=>{if(this.dragging){const r=window.innerWidth-2*this.dividerWidth;let o,l,d;this.activeDivider===1?(o=t.clientX-this.dividerWidth/2,d=r*this.splitFractionRight,l=r-o-d):(d=r-t.clientX-this.dividerWidth/2,o=r*this.splitFraction,l=r-o-d),o>=this.leftPaneMinWidth&&l>=this.rightPaneMinWidth&&d>=this.thirdPaneMinWidth&&(this.splitFraction=r===0?0:o/r,this.splitFractionRight=r===0?0:d/r,this.updateUI()),this.updatePaneSize()}});wr(this,"onStartDrag",t=>{this.dragging=!0,this.activeDivider=t==="first"?1:2});wr(this,"onEndDrag",t=>{this.dragging=!1,this.activeDivider=0});wr(this,"onResize",t=>{this.updatePaneSize()});this.firstFolio=t.document.folios[0],this.rightPaneMinWidth=t.rightPane.props.documentView.right.transcriptionType==="glossary"?450:200,this.leftPaneMinWidth=t.leftPane.props.documentView.left.transcriptionType==="glossary"?450:200,this.thirdPaneMinWidth=t.thirdPane.props.documentView.third.transcriptionType==="glossary"?450:t.thirdPane.props.documentView.third.transcriptionType==="g"?0:200,this.splitFraction=t.threePanel?.49:.5,this.splitFractionRight=t.threePanel?.01:0,this.dividerWidth=16,this.state={style:{gridTemplateColumns:`${this.splitFraction}fr ${this.dividerWidth}px ${1-this.splitFraction-this.splitFractionRight}fr ${this.dividerWidth}px ${this.splitFractionRight}fr`}},this.dragging=!1,this.activeDivider=0,this.onDrag=this.onDrag.bind(this),this.onResize=this.onResize.bind(this),this.onEndDrag=this.onEndDrag.bind(this),this.updatePaneSize=this.updatePaneSize.bind(this),this.updatePaneSize=this.updatePaneSize.bind(this)}updateUI(){const t=this.splitFraction,r=this.splitFractionRight,o=1-t-r;this.setState({...this.state,style:{...this.state.style,gridTemplateColumns:`${t}fr ${this.dividerWidth}px ${o}fr ${this.dividerWidth}px ${r}fr`}})}updatePaneSize(){const t=Math.floor(Math.abs(window.innerWidth*this.splitFraction)),r=Math.floor(Math.abs(window.innerWidth*this.splitFractionRight)),o=Math.floor(window.innerWidth*(1-this.splitFraction-this.splitFractionRight));this.props.onWidth&&t>=this.leftPaneMinWidth&&o>=this.rightPaneMinWidth&&r>=this.thirdPaneMinWidth&&this.props.onWidth(t,o,r)}componentDidMount(){if(this.updateUI(),window.addEventListener("pointermove",this.onDrag),window.addEventListener("pointerup",this.onEndDrag),window.addEventListener("resize",this.onResize),this.props.onWidth){const t=Math.floor(Math.abs(window.innerWidth*this.splitFraction)),r=Math.floor(window.innerWidth*(1-this.splitFraction)),o=Math.floor(window.innerWidth*(1-this.splitFraction));this.props.onWidth(t,r,o)}}componentDidUpdate(t){this.rightPaneMinWidth=this.props.rightPane.props.documentView.right.transcriptionType==="glossary"?450:200,this.leftPaneMinWidth=this.props.leftPane.props.documentView.left.transcriptionType==="glossary"?450:200,this.thirdPaneMinWidth=this.props.thirdPane.props.documentView.third.transcriptionType==="glossary"?450:this.props.thirdPane.props.documentView.third.transcriptionType==="g"?0:200}componentWillUnmount(){window.removeEventListener("pointermove",this.onDrag),window.removeEventListener("pointerup",this.onEndDrag),window.removeEventListener("resize",this.onResize)}renderDivider(t){return te.jsx("div",{className:`divider ${t}_divider`,onPointerDown:()=>this.onStartDrag(t),children:te.jsx("div",{className:"drawer-button hidden",onClick:this.onDrawerButton,children:te.jsx("i",{className:"drawer-icon fas fa-caret-left fa-2x",children:" "})})})}render(){return te.jsxs("div",{className:"split-pane-view three-pane",style:{...this.state.style},children:[this.props.leftPane,this.renderDivider("first"),this.props.rightPane,this.props.threePanel&&this.renderDivider("second"),this.props.threePanel&&this.props.thirdPane]})}}function CV(e){return{document:e.document}}const PV=Mr(CV)(_V);function RV(e){const[n,t]=Te.useState(null),[r,o]=Te.useState(!1),l=g=>{t(g.currentTarget),o(!0)},d=g=>{o(!1)},h=()=>{const w=Er(e.text)||`ERROR: Could not find comment for id: ${e.commentID}.`,x={maxWidth:200,padding:"25px 15px 15px 15px"},T={float:"right",padding:5,fontStyle:"bold"};return te.jsx(Qd,{id:e.commentID,open:r,anchorEl:n,children:te.jsx(Rd,{in:r,children:te.jsxs(Cd,{className:"editor-comment-content",children:[te.jsx("div",{onClick:d,style:T,children:te.jsx("span",{className:"fa fa-window-close"})}),te.jsx(Yn,{style:x,children:w})]})})})},f={display:"inline"},m={fontStyle:"bold",fontSize:"18pt",color:"red"};return te.jsxs("div",{style:f,children:[te.jsx("span",{onClick:g=>l(g),style:m,children:"*"}),h()]})}class _x extends Te.Component{constructor(n){super(n),this.state={error:null,errorInfo:null}}static getDerivedStateFromError(n){return{error:!0}}componentDidCatch(n,t){this.setState({error:n,errorInfo:t})}render(){return this.state.errorInfo?te.jsxs("div",{style:{height:"350px",overflowY:"scroll"},children:[te.jsx("h2",{children:"Something went wrong."}),te.jsxs("details",{style:{whiteSpace:"pre-wrap"},children:["There has been an error rendering a comment",te.jsx("br",{}),this.state.error&&this.state.error.toString(),te.jsx("br",{}),this.state.errorInfo.componentStack]})]}):this.props.children}}class OV extends Te.Component{constructor(t,r){super(t,r);wr(this,"changeCurrentFolio",t=>{const{side:r,documentView:o,documentViewActions:l}=this.props,{dataset:d}=t.currentTarget;if(typeof d.id>"u"||d.id.length===0)return;const h=d.id;l.changeCurrentFolio(h,r,o[r].transcriptionType)});this.changeCurrentFolio=this.changeCurrentFolio.bind(this)}render(){const{side:t,document:r,documentView:o,bottom:l=!1}=this.props;if(o[t].iiifShortID==="-1")return null;const d=r.folioIndex[o[t].iiifShortID].name;return te.jsx("div",{className:l?"paginationComponent bottom":"paginationComponent",children:te.jsxs("div",{className:"paginationControl",children:[te.jsx("span",{title:"Go back",onClick:this.changeCurrentFolio,"data-id":o[t].previousFolioShortID,className:o[t].hasPrevious?"arrow":"arrow disabled",children:te.jsx(su,{})}),te.jsx("span",{className:"folioName",children:d}),te.jsxs("span",{title:"Go forward",onClick:this.changeCurrentFolio,"data-id":o[t].nextFolioShortID,className:o[t].hasNext?"arrow":"arrow disabled",children:[" ",te.jsx(lu,{})]})]})})}}function kV(e){return{document:e.document}}const aa=Mr(kV)(OV);class AV extends Te.Component{render(){const{html:n,htmlToReactParserOptionsSide:t}=this.props;return Er(n,t)}}function ws({side:e,documentView:n,documentViewActions:t}){return te.jsxs("div",{style:{position:"relative"},className:"watermarkContainer",children:[n.left.iiifShortID!=="-1"&&n.right.iiifShortID!=="-1"?te.jsx(oa,{side:e,documentView:n,documentViewActions:t}):null,te.jsxs("div",{className:"transcriptContent",children:[te.jsx(aa,{side:e,className:"pagination_upper",documentView:n,documentViewActions:t}),te.jsx("div",{className:"watermark",children:te.jsx("div",{className:e!=="third"?"watermark_contents":"third_pane_blank"})})]})]})}function DV(e,n,t){return t.includes(e)&&(n.attribs.classname?n.attribs.classname+=" selected-zone":n.attribs.classname="selected-zone"),n}function cp(e,n){if(e&&n.attribs["data-facs"]){const t=n.attribs["data-facs"].split(" ");return DV(e,n,t)}return n}function IV(e){return{replace(t){var r,o,l;switch(t.name){case"tei-line":return cp(e,t);case"tei-surface":return cp(e,t);case"tei-note":{const d=((r=t.children[0])==null?void 0:r.data)||"",h=t.attribs.n||t.attribs.id;return h?te.jsx(RV,{commentID:h,text:d}):t}case"tei-figure":{const d=t.children.find(g=>g.name==="tei-graphic"),h=(o=d==null?void 0:d.attribs)==null?void 0:o.url;if(!h)return t;const f=t.children.find(g=>g.name==="tei-figdesc"),m=(l=f==null?void 0:f.children[0])==null?void 0:l.data;return te.jsxs("figure",{className:"inline-figure",children:[te.jsx("img",{src:h,alt:m||"",className:"inline-image"}),m?te.jsx("figcaption",{children:m}):null]})}case"div":return cp(e,t);default:return t}}}}function MV(e){const[n]=cy(),{side:t,folioID:r,transcriptionType:o,document:l,documentView:d,documentViewActions:h}=e;if(r==="-1")return te.jsx(ws,{documentView:d,documentViewActions:h,side:t});const f=l.folioIndex[r];if(f&&!f.loading&&!f.transcription)return te.jsx(ws,{documentView:d,documentViewActions:h,side:t});const m=f&&f.transcription&&f.transcription[o];if(f&&!f.loading&&!m)return te.jsx(ws,{documentView:d,documentViewActions:h,side:t});const g=IV(n.get("zone")),w=m&&m.html,x=m&&m.layout;return f&&!f.loading&&!w?te.jsx(ws,{documentView:d,documentViewActions:h,side:t}):f&&f.loading?te.jsxs("div",{children:[te.jsx(oa,{side:t,documentView:d,documentViewActions:h,documentName:l.variorum&&f.doc_id}),te.jsx(aa,{side:t,documentView:d,documentViewActions:h}),te.jsx("div",{className:"transcriptionViewComponent",children:te.jsx("div",{className:"transcriptContent",children:te.jsx(_x,{children:te.jsx(up,{delay:3e3,color:"dark"})})})}),te.jsx(aa,{side:t,documentView:d,documentViewActions:h,bottom:!0})]}):te.jsxs("div",{style:{position:"relative",overflow:"auto"},children:[te.jsx(oa,{side:t,documentView:d,documentViewActions:h,documentName:l.variorum&&f.doc_id}),te.jsx(aa,{side:t,documentView:d,documentViewActions:h}),te.jsx("div",{className:"transcriptionViewComponent",children:te.jsx("div",{className:"transcriptContent",children:te.jsx(_x,{children:te.jsx("div",{className:"surface grid-mode",style:{gridTemplateAreas:x},children:te.jsx(AV,{html:w,htmlToReactParserOptionsSide:g})})})})}),te.jsx(aa,{side:t,documentView:d,documentViewActions:h,bottom:!0})]})}function NV(e){return{annotations:e.annotations,document:e.document}}const LV=Mr(NV)(MV);class FV extends Te.Component{render(){const{side:n,document:t,documentView:r,documentViewActions:o}=this.props,l=`xmlViewComponent ${n}`,d=`xmlViewComponent_${n}`,h=r[n].iiifShortID;if(h==="-1")return te.jsx("div",{className:"watermark",children:te.jsx("div",{className:"watermark_contents"})});const f=t.folioIndex[h];if(!f.transcription)return te.jsx(ws,{documentView:r,documentViewActions:o,side:n});const{transcriptionType:m}=r[n],g=f.transcription[m],{xml:w}=g;return te.jsxs("div",{id:d,className:l,style:{position:"relative",overflow:"auto"},children:[te.jsx(oa,{side:n,documentView:r,documentViewActions:o,documentName:t.variorum&&f.doc_id}),te.jsx(aa,{side:n,className:"pagination_upper",documentView:r,documentViewActions:o}),te.jsx("div",{className:"xmlContentInner",children:te.jsx("pre",{children:w})})]})}}function BV(e){return{document:e.document}}const jV=Mr(BV)(FV),hp={isXMLMode:!1,width:0};function HV(e){const[n,t]=Te.useState(!e.document.variorum),[r,o]=Te.useState(!1),[l,d]=Te.useState(hp),[h,f]=Te.useState(hp),[m,g]=Te.useState(hp),[w,x]=Te.useState(e.containerWidth<960),T=Uk(),P=Va(),C=Gr();Te.useEffect(()=>{yd(e,"RouteListenerSaga.userNavigatation",C)},[e.config]),Te.useEffect(()=>{x(e.containerWidth<960)},[e.containerWidth]);const _=me=>{P(me+C.search)},k=()=>{const{folioID:me,transcriptionType:be,folioID2:Ee,transcriptionType2:Oe,folioID3:F,transcriptionType3:we}=T,{document:Ne}=e,X=Ne.variorum?Object.keys(Ne.transcriptionTypes[Object.keys(Ne.transcriptionTypes)[0]])[0]:Object.keys(Ne.transcriptionTypes)[0];if(!me)return{left:{folioID:"-1",transcriptionType:"g"},right:{folioID:"-1",transcriptionType:Ne.variorum?"g":X},third:{folioID:"-1",transcriptionType:"g"}};const Be=Object.keys(Ne.folioIndex).includes(me),Je=Be?me:"-1";let He,Ze,Qe,it,Ke;if(Ee){const Le=Object.keys(Ne.folioIndex).includes(Ee);if(He=Be?be:"g",Ze=Le?Ee:"-1",Qe=Le?Oe||X:"g",F){const pe=Object.keys(Ne.folioIndex).includes(F);it=pe?F:"-1",Ke=pe?we||X:"g"}else it="-1",Ke="g"}else He="f",Ze=Be?me:"-1",Qe=Be?be||X:"g",it="-1",Ke="g";return{left:{folioID:Je,transcriptionType:He},right:{folioID:Ze,transcriptionType:Qe},third:{folioID:it,transcriptionType:Ke}}};Te.useEffect(()=>{yd(e,"DiplomaticActions.setFixedFrameMode",!0)},[]);const V=(me,be)=>{me==="left"?d({...l,isXMLMode:be}):me==="right"?f({...h,isXMLMode:be}):g({...m,isXMLMode:be})},j=(me,be)=>{if(o(be),be){const[Ee,Oe]=B(me);ae(Ee,"f",Oe,"f")}},Z=(me,be)=>{var Oe;const{document:Ee}=e;if(Ee.folioByName[me]){const F=(Oe=Ee.folioByName[me])==null?void 0:Oe.id;le(F,be,k()[be].transcriptionType)}},B=me=>{const{document:be}=e,Ee=be.folioIndex[me],{name:Oe,pageNumber:F}=Ee,we=be.variorum?be.folios.filter(Ne=>Ne.doc_id===Ee.doc_id):be.folios;return!Oe.endsWith("v")&&Oe.endsWith("r")?[we[F-1].id,we[F].id]:we[F+1]?[we[F].id,we[F+1].id]:[we[F].id,null]},Y=(me,be,Ee)=>{d({...l,width:me}),f({...h,width:be}),g({...m,width:Ee})},ie=(me,be)=>{const Ee=k();if(me==="left"){const{folioID:Oe}=Ee.left,F=Ee.right;ae(Oe,be,F.folioID,F.transcriptionType,Ee.third.folioID,Ee.third.transcriptionType)}else if(me==="right"){const{folioID:Oe}=Ee.right,F=Ee.left;ae(F.folioID,F.transcriptionType,Oe,be,Ee.third.folioID,Ee.third.transcriptionType)}else{const{folioID:Oe}=Ee.third;ae(Ee.left.folioID,Ee.left.transcriptionType,Ee.right.folioID,Ee.right.transcriptionType,Oe,be)}},ae=(me,be,Ee,Oe,F,we)=>{if(!me){_("/ec");return}if(!be){_(`/ec/${me}`);return}if(!Ee){_(`/ec/${me}/${be}`);return}if(!Oe){_(`/ec/${me}/${be}/${Ee}/tc`);return}if(!F){_(`/ec/${me}/${be}/${Ee}/${Oe}`);return}if(!we){_(`/ec/${me}/${be}/${Ee}/${Oe}/${F}/f`);return}_(`/ec/${me}/${be}/${Ee}/${Oe}/${F}/${we}`)},le=(me,be,Ee)=>{const Oe=k();if(r){const[F,we]=B(me);F&&ae(F,"f",we,"f")}else if(n)if(be==="left"){const F=Oe.right;ae(me,Ee,me,F.transcriptionType)}else if(be==="right"){const F=Oe.left;ae(me,F.transcriptionType,me,Ee)}else ae(Oe.left.folioID,Oe.left.transcriptionType,Oe.right.folioID,Oe.right.transcriptionType,me,Ee);else if(be==="left"){const F=Oe.right,we=Oe.third;ae(me,Ee,F.folioID,F.transcriptionType,we.folioID,we.transcriptionType)}else if(be==="right"){const F=Oe.left,we=Oe.third;ae(F.folioID,F.transcriptionType,me,Ee,we.folioID,we.transcriptionType)}else ae(Oe.left.folioID,Oe.left.transcriptionType,Oe.right.folioID,Oe.right.transcriptionType,me,Ee)},_e=me=>{const{transcriptionType:be}=k()[me],Ee=me==="left"?l.isXMLMode:me==="right"?h.isXMLMode:m.isXMLMode;return be==="g"?"ImageGridView":be==="f"?"ImageView":be==="glossary"?"GlossaryView":Ee?"XMLView":"TranscriptionView"},fe=me=>{const{document:be}=e,Ee=k()[me];if(Ee.folioID==="-1")return{...me==="left"?l:me==="right"?h:m,iiifShortID:Ee.folioID,transcriptionType:Ee.transcriptionType};const Oe=Ee.folioID,F=be.variorum?be.folios.filter(He=>He.doc_id===be.folioIndex[Oe].doc_id):be.folios,we=F.length;let Ne="",X="",Be=!1,Je=!1;if(r){const[He]=B(Oe),Ze=be.folioIndex[He].pageNumber;Ze>-1&&(Je=Ze<we-2,Ne=Je?F[Ze+2].id:"",Be=Ze>1&&we>1,X=Be?F[Ze-2].id:"")}else{const He=be.folioIndex[Oe].pageNumber;He>-1&&(Je=He<we-1,Ne=Je?F[He+1].id:"",Be=He>0&&we>1,X=Be?F[He-1].id:"")}return{...me==="left"?l:me==="right"?h:m,iiifShortID:Oe,transcriptionType:Ee.transcriptionType,hasPrevious:Be,hasNext:Je,previousFolioShortID:X,nextFolioShortID:Ne,documentID:be.variorum?be.folioIndex[Oe].doc_id:be.documentName}},de={setXMLMode:V,setLinkedMode:t,setBookMode:j,changeTranscriptionType:ie,changeCurrentFolio:le,jumpToFolio:Z},ve=(me,be)=>{const Ee=_e(me),Oe=Ae(me),F=be[me].iiifShortID,we=be[me].documentID,{transcriptionType:Ne}=be[me];return Ee==="ImageView"?te.jsx(EV,{folioID:F,documentView:be,documentViewActions:de,side:me},Oe):Ee==="TranscriptionView"?te.jsx(LV,{documentView:be,documentViewActions:de,side:me,folioID:F,transcriptionType:Ne},Oe):Ee==="XMLView"?te.jsx(jV,{folioID:F,transcriptionType:Ne,documentView:be,documentViewActions:de,side:me},Oe):Ee==="ImageGridView"?te.jsx(pV,{documentView:be,documentViewActions:de,side:me,selectedDoc:we||e.document.variorum&&Object.keys(e.document.derivativeNames)[me==="left"?0:me==="right"?1:Object.keys(e.document.derivativeNames).length>2?2:1]},Oe):Ee==="GlossaryView"?te.jsx(hV,{documentView:be,documentViewActions:de,side:me},Oe):te.jsx("div",{children:"ERROR: Unrecognized viewType."})},Ae=me=>{const be=me==="left"?l:me==="right"?h:m;return be.viewType==="ImageGridView"?`${me}-${be.viewType}`:typeof be.folio<"u"?`${me}-${be.viewType}-${be.folio.id}`:`${me}-${be.viewType}`};if(!e.document.loaded)return null;const ke={linkedMode:n,bookMode:r,left:fe("left"),right:fe("right"),third:fe("third")};return{...fe("right")},OO("md",e.width)&&!w?te.jsx("div",{style:{height:"100%"},children:te.jsx(PV,{leftPane:ve("left",ke),rightPane:ve("right",ke),thirdPane:ve("third",ke),onWidth:Y,threePanel:e.document.threePanel})}):te.jsx("div",{style:{height:"100%"},children:te.jsx(TV,{singlePane:ve(fe("left").iiifShortID==="-1"?"left":"right",ke)})})}function zV(e){return{document:e.document,glossary:e.glossary}}const bs=kv()(Mr(zV)(HV));function VV(e){const n=Te.useRef(!1),t=Gr(),r=()=>{yd(e,"RouteListenerSaga.userNavigatation",t)};return Te.useEffect(()=>{n.current||(r(),n.current=!0)},[]),Te.useEffect(()=>{r()},[t]),null}function UV(e){return{}}const WV=Mr(UV)(VV);function Cx(e){const[n,t]=Te.useState(0),[r,o]=Te.useState("min(100%, 100dvh"),l=Te.useRef(null);Te.useEffect(()=>{IO().listen(()=>{window.scrollTo(0,0)})},[]),Te.useEffect(()=>{l.current&&(t(l.current.offsetWidth),l.current.clientHeight===0&&o("100dvh"))},[l]);const{fixedFrameMode:d}=e.diplomatic,h=d?"editioncrafter":"editioncrafter sticky";return te.jsx(pk,{store:e.store,children:te.jsx(vA,{children:te.jsxs("div",{id:"diplomatic",className:h,ref:l,style:{height:r},children:[te.jsx(WV,{}),te.jsx("div",{id:"content",style:{height:"100%"},children:te.jsxs(aA,{children:[te.jsx(no,{path:"/ec/:folioID/:transcriptionType/:folioID2/:transcriptionType2/:folioID3/:transcriptionType3",element:te.jsx(bs,{...e,containerWidth:n}),exact:!0}),te.jsx(no,{path:"/ec/:folioID/:transcriptionType/:folioID2/:transcriptionType2",element:te.jsx(bs,{...e,containerWidth:n}),exact:!0}),te.jsx(no,{path:"/ec/:folioID/:transcriptionType",element:te.jsx(bs,{...e,containerWidth:n}),exact:!0}),te.jsx(no,{path:"/ec/:folioID",element:te.jsx(bs,{...e,containerWidth:n}),exact:!0}),te.jsx(no,{path:"/ec",element:te.jsx(bs,{...e,containerWidth:n}),exact:!0}),te.jsx(no,{path:"/",element:te.jsx(iA,{to:"/ec"}),exact:!0})]})})]})})})}Cx.propTypes={store:R.isRequired,config:R.isRequired};function GV(e){return{diplomatic:e.diplomatic,documentView:e.documentView}}const qV=kv()(Mr(GV)(Cx));function YV(e){const n=Wg({palette:{primary:{main:"#792421"},secondary:{main:"#EBE3DD"}}});return te.jsx(nl,{theme:n,children:te.jsx(qV,{config:e,store:DI(e)})})}return YV});
|